Skip to content

Instantly share code, notes, and snippets.

@ezze
Last active July 8, 2021 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezze/f8ff57323bb0e6a1c6d8e5fefe9b49a7 to your computer and use it in GitHub Desktop.
Save ezze/f8ff57323bb0e6a1c6d8e5fefe9b49a7 to your computer and use it in GitHub Desktop.
Build Scratch 3 desktop application for Linux

In order to build Scratch 3 desktop application for Linux execute commands below.

  1. Install Git and Node.js (the easiest way to install Node.js is to use nvm). This is how it can be done in Ubuntu 20.04:

    sudo apt install -y git
    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
    source ~/.bashrc
    nvm install --lts=fermium
    
  2. Clone repository:

    git clone git@github.com:LLK/scratch-desktop
    

    or

    git clone https://github.com/LLK/scratch-desktop
    cd scratch-desktop
    
  3. Checkout version of interest by tag (optionally), e.g.:

    git checkout v3.24.0
    
  4. Install dependencies:

    npm install
    
  5. Compile the application:

    npm run clean && npm run compile && npm run fetch
    
  6. Prepare Linux packages:

    npx electron-builder --linux
    

    If you are interested in specific package targets only then specify them explicitly:

    npx electron-builder --linux zip
    

    The results can be found in scratch-desktop/dist directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment