Page 2 of 2

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 10:48 am
by lazzariomar
hippy wrote:
Sat Aug 17, 2019 1:07 pm
In that respect it would be great if someone could produce a concise list of step-by-step instructions for downloading, building and packaging for those of us who aren't familiar with doing that.
I can try...

Lyshie here create the create-deb-raspbian.sh file that do everything. The script installs some necessary software, download Scratch3 windows version and create the .deb file. You can stop to the second step if you don't need to distribute the .deb file to someone.

But what's inside this script? (You can execute the whole script or copy these lines in the terminal one at a time in the terminal and looks what happens, that is a better thing):
  • sudo apt-get install npm gdebi p7zip-full (install necessary software)
  • npm install electron@4.2.5 --save-dev (install electron that, more or less, do what AdobeAir did in previous version of Scratch)
  • mkdir /tmp/scratch-desktop (make a folder inside /tmp)
  • Code: Select all

    wget -O /tmp/scratch-desktop.exe 'https://downloads.scratch.mit.edu/desktop/Scratch%20Desktop%20Setup%203.4.0.exe'
    (download last Windows installer version)
  • 7za x -aoa -y /tmp/scratch-desktop.exe -o/tmp/scratch-desktop (decompress .exe, it is an executable .zip folder apparently)
  • cp -rf ~/node_modules/electron/dist/* /tmp/scratch-desktop/ (copy files from electron folder to scratch-desktop folder)
  • ln -fsr /tmp/scratch-desktop/electron /tmp/scratch-desktop/scratch-desktop (create a simbolic link so you can launch software typing scratch-desktop instead of electron)
  • /tmp/scratch-desktop/scratch-desktop (+Enter to launch Scratch)
From now you can use Scratch3 desktop. Move scratch-desktop folder outside /tmp or it will be deleted at next boot. You can also copy this folder to another RaspberryPI, it is like a portable version.

The second part of the script make all the necessary to create .deb file.

To use the whole script, you must:
1) open a terminal (ctrl+alt+T or use icon)
2) download .sh script

Code: Select all

wget https://gist.githubusercontent.com/lyshie/0c49393076b8b375ca1bd98c28f95fb0/raw/831f65cdee181e1f5159d782a12cadf04994fc7e/create-deb-raspbian.sh
chmod +x create-deb-raspbian.sh
3) make it executable

Code: Select all

chmod +x create-deb-raspbian.sh
4) run it

Code: Select all

./create-deb-raspbian.sh
5) wait

Omar

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 3:03 pm
by hippy
Many thanks for the explanation and it is all clear now -

The process takes the Windows Installer, extracts the binary blobs from within that, mixes in an electron runtime which allows those to run, and "bingo!"; a Pi version of the Scratch 3 Desktop.

Than, as an added bonus, that can be turned into a Pi-compatible .deb for distribution.

It's so simple I am somewhat surprised it's taken so long to arrive on the Pi or Linux!

It was the "Windows Installer" bit which had me confused, it not being exactly clear what was being done until you kindly explained it to me.

Plus the references to creating "scratch-desktop-3.4.0-1.x86_64.rpm" and "scratch-desktop_3.4.0_amd64.deb" which didn't look very Pi specific.

The process worked and it all runs fine on my Pi 3B, same CPU usage as the Official Scratch 3 Desktop for Pi, though obviously it is without the Pi specific extensions. I didn't try packaging.

It mostly being binary blobs doesn't help with using it on a Pi to experiment with Scratch 3 itself, adding extensions and so on, as I was hoping it would, but it is useful in itself.

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 5:39 pm
by spl23
hippy wrote:
Sun Aug 18, 2019 3:03 pm
It's so simple I am somewhat surprised it's taken so long to arrive on the Pi or Linux!
Ahem - you might find that the standard version of Scratch 3 doesn't have any Pi-specific extensions to control things like GPIOs or the SenseHAT. Those things don't appear out of nowhere overnight, you know - some poor sod has to write them... ;)

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 5:59 pm
by geev03
Also available on Windows 10.
Happy days ... ;)

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 7:59 pm
by lazzariomar
hippy wrote:
Sun Aug 18, 2019 3:03 pm
It's so simple I am somewhat surprised it's taken so long to arrive on the Pi or Linux!
While waiting for official MIT offline version, for Linux PC you can find various package version (deb, rpm, appimage, snap, pacman) at https://scratux.org/ website.
And other particular version like this https://thestempedia.com/product/pictoblox/ but now where are OT...

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sun Aug 18, 2019 8:24 pm
by hippy
spl23 wrote:
Sun Aug 18, 2019 5:39 pm
hippy wrote:
Sun Aug 18, 2019 3:03 pm
It's so simple I am somewhat surprised it's taken so long to arrive on the Pi or Linux!
Ahem - you might find that the standard version of Scratch 3 doesn't have any Pi-specific extensions to control things like GPIOs or the SenseHAT. Those things don't appear out of nowhere overnight, you know - some poor sod has to write them... ;)
I was more lamenting the lack of any Scratch 3 Desktop for Linux, including the Pi.

I fully appreciate the Pi specific extensions will have taken some time - I've been one of the 'poor sods' who had to write extensions for Scratch 2 :mrgreen:
geev03 wrote:
Sun Aug 18, 2019 5:59 pm
Also available on Windows 10.
Happy days ... ;)
The Scratch 3 Desktop for Windows has been available since the public transition to Scratch 3.

Despite stating Windows 10+ as a requirement the Desktop installs and runs under Windows 7.

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Tue Aug 20, 2019 5:45 am
by MisterEd
B.Goode wrote:
Fri Aug 16, 2019 11:14 am
MisterEd wrote:
Tue Jun 25, 2019 3:39 am
They just released the Raspberry Pi 4 today. You can get it with 1, 2, or 4 GB of RAM. :D

I hope they will be able to release Scratch 3 Desktop for the Raspberry Pi now that the new Raspberry Pi is a lot more capable.

I just ordered the Raspberry Pi 4 with 4GB of RAM. Unfortunately the 4GB version won't ship until August 1st.
"I hope they will be able to release Scratch 3 Desktop for the Raspberry Pi now that the new Raspberry Pi is a lot more capable."

Your wish is granted: https://www.raspberrypi.org/blog/scratc ... pberry-pi/
Thanks for the heads up. I have the offline version of Scratch 3 installed on my Pi 4 now.

The online version of Scratch 3 works OK on the Pi 4 but I am finding the offline version much more responsive.

I installed Buster on my Pi 3B+ last week. When I get a chance I will install and try the offline version of Scratch 3 on it. I hopes it works better than the online version which was unusable on it.

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sat Oct 19, 2019 8:42 am
by bluelion7
Can Scratux be used as a desktop offline version on Rasp. Pi 3 A+. Am I right that I source it through Github? Chromium is useless on A+ so I am looking for an offline version of Scratch. Thanks

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sat Oct 19, 2019 8:48 am
by fruitoftheloom
bluelion7 wrote:
Sat Oct 19, 2019 8:42 am
Can Scratux be used as a desktop offline version on Rasp. Pi 3 A+. Am I right that I source it through Github? Chromium is useless on A+ so I am looking for an offline version of Scratch. Thanks

Does not appear to as yet have a suitable Raspberry Pi release:

https://scratux.org/#download

Re: Scratch 3 Desktop Version for Raspberry Pi

Posted: Sat Oct 19, 2019 8:53 am
by B.Goode
bluelion7 wrote:
Sat Oct 19, 2019 8:42 am
I am looking for an offline version of Scratch.


https://www.raspberrypi.org/blog/scratc ... pberry-pi/


(But it may not perform well on your memory-constrained RPi 3A+)