$ cd ~
$ npm install electron --save-dev
$ ls ~/node_modules/electron/dist
$ rm -rf /tmp/scratch-desktop
$ mkdir /tmp/scratch-desktop
$ wget --max-redirect 5 -c -O /tmp/scratch-desktop.exe 'https://downloads.scratch.mit.edu/desktop/Scratch%20Setup.exe'
$ 7za x -aoa -y /tmp/scratch-desktop.exe -o/tmp/scratch-desktop
$ cp -rf ~/node_modules/electron/dist/* /tmp/scratch-desktop/
$ ln -fsr /tmp/scratch-desktop/electron /tmp/scratch-desktop/scratch-desktop
$ /tmp/scratch-desktop/scratch-desktop
$ chmod 755 /tmp/scratch-desktop/locales
$ chmod 755 /tmp/scratch-desktop/swiftshader
$ chmod 755 /tmp/scratch-desktop/resources
$ chmod 755 /tmp/scratch-desktop/resources/static
$ chmod 755 /tmp/scratch-desktop/resources/static/assets
$ cd /tmp/scratch-desktop/resources/
$ ~/node_modules/.bin/asar extract app.asar app
$ cat app/package.json
$ sudo dnf install rpm-build
$ cd ~
$ npm install electron-installer-redhat
$ chmod 755 /tmp/scratch-desktop/locales
$ chmod 755 /tmp/scratch-desktop/swiftshader
$ chmod 755 /tmp/scratch-desktop/resources
$ chmod 755 /tmp/scratch-desktop/resources/static
$ chmod 755 /tmp/scratch-desktop/resources/static/assets
$ ~/node_modules/.bin/electron-installer-redhat /tmp/config-rpm.json
OR
$ ~/node_modules/.bin/electron-installer-redhat --src /tmp/scratch-desktop/ --dest /tmp/ --arch x86_64
$ sudo dnf install /tmp/scratch-desktop-3.10.2-1.x86_64.rpm
$ sudo apt-get install -yq npm gdebi p7zip-full
$ ls /tmp
create-deb.sh config-deb.json
$ sh /tmp/create-deb.sh
$ sudo gdebi /tmp/scratch-desktop_3.10.2_amd64.deb
Dear Sirs,
After one year, I try to remake a new SCRATCH64bit.DEB for Linux.
From LINUX MINT 20.1 (Ubuntu 20.1) 64bit., I used the .sh script file I used in the past...
I just changed the version of scratch, but the command:
wget -O /tmp/scratch-desktop.exe 'https://downloads.scratch.mit.edu/desktop/Scratch%20Desktop%20Setup%VERSIONNUMBER.exe'
Is no more valid. So **I downloaded manually the .exe and and put in /temp the "scratch-desktop.exe" file. the .DEB was created, about 207Mbyte. the installation of .deb works, the menu icon is created but Scatch doesn't start!
From terminal:
`
linux@Mint201:~$ scratch-desktop
internal/modules/cjs/loader.js:586
throw err;
^
Error: Cannot find module '/usr/lib/scratch-desktop/resources/electron.asar/browser/init.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:584:15)
at Function.Module._load (internal/modules/cjs/loader.js:510:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:12)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:759:3)
`