$ 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
I have two PC, both with 4 GB of RAM and a 64 bit OS. One has Ubuntu 18.04 and the other has a Debian 9.
On Debian start and work well, on Ubuntu I got the cyan windows with Starting Scratch, then it become a white window forever, and on the console I got an OOM error:
`
efa@02cor2130:~$ scratch-desktop
[8118:1228/163027.861206:FATAL:memory_linux.cc(36)] Out of memory.
`
I think the free memory is enought:
efa@02cor2130:~/dLoad/scratch$ cat /proc/meminfo | grep ^Me
MemTotal: 3839840 kB
MemFree: 1671344 kB
MemAvailable: 2361824 kB
How much is the needed memory by Scratch 3.6 ?