Skip to content

Teakzieas/scratch-desktop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scratch-desktop

Scratch 3.0 as a standalone desktop application

Setting Up and Building Scratch Desktop

Follow the steps below to set up and build Scratch Desktop on your system.

1. Install Node.js (Version 16)

Use the following commands to install Node.js version 16 using NVM:

To build reliably use Node 16.20.0

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 16

2. Clone the Repository

Clone the Scratch Desktop repository and navigate into the project directory:

git clone https://github.com/Teakzieas/scratch-desktop.git
cd scratch-desktop

3. Run Pi Configuration

The following operations are performed by the Pi configuration script:

-- Enable I2C on Pi

-- Resize the Swap File to 2048 MB (in case a 4GB Pi does not have enough memory to build)

-- Install Java (required for google-closure-compiler)

-- Install Ruby and FPM (required for electron-builder to export)

npm run Piconfig

4. Install Project Dependencies

Install the required packages using the following command:

npm install --unsafe-perm

5. Running the Application

To start the application, use the following command:

npm run start

6. Build the Application

To build the application, execute the following commands:

export USE_SYSTEM_FPM="true"
NODE_OPTIONS=--max-old-space-size=4096 npm run dist:rpi64

build results are stored in Dist folder, .deb file

7. Saving Modifications

If you've made changes to StemHat files in the ScratchVM or ScratchGUI, save them with the following commands:

npm run Stemhat:save
git add -A
git commit -m "Your commit message"
git push

Notes

  • Ensure that I2C is enabled on the Raspberry Pi.
  • This setup was tested on a Raspberry Pi 4GB running Raspberry Pi OS 64-bit.

About

Scratch 3.0 as a self-contained desktop application

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 43.7%
  • JavaScript 43.1%
  • C++ 11.8%
  • CSS 0.5%
  • Shell 0.4%
  • Ruby 0.2%
  • Other 0.3%