Skip to content
Extended Scratch3 desktop app for Arduino.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
buildResources Change windows app icon. Apr 21, 2019
src Fix no return from list boards when there is no responding port. Apr 24, 2019
.editorconfig Use eslint-config-scratch Sep 27, 2018
.eslintignore Use eslint-config-scratch Sep 27, 2018
.eslintrc.js Add media library assets, fetch script Oct 19, 2018
.gitattributes Configure store and non-store builds for Mac & Win Dec 13, 2018
.gitignore MAS: fix embedded provisioning profile Dec 14, 2018
.npmignore Initial commit Sep 6, 2018
LICENSE Update LICENSE Mar 6, 2019 Refine readme. Apr 21, 2019
electron-builder.yaml Change product name. Apr 15, 2019
electron-webpack.json5 Fix build with/without `npm ln`, match scratch-gui Oct 24, 2018
package-lock.json 1.2.1 Jan 11, 2019
package.json Change version of scratch-gui. Apr 26, 2019
webpack.main.additions.js Further simplify and consolidate webpack config Dec 28, 2018
webpack.makeConfig.js Test loading extension from renderer. Mar 18, 2019
webpack.renderer.additions.js Fix to simple webpack.config. Apr 15, 2019


Scrattino3 Desktop is a programming environment based on Scratch 3.0

Developer Instructions

Prepare scratch-gui

This step is temporary: eventually, the scratch-desktop branch of the Scratch GUI repository will be merged with that repository's main development line. For now, though, there's a separate branch:

  1. Clone the scratch-gui repository if you haven't already.
  2. Switch to the scratch-desktop branch with git checkout scratch-desktop
  3. Build with BUILD_MODE=dist and STATIC_PATH=./static:
    • macOS, WSL, or Cygwin: run BUILD_MODE=dist;STATIC_PATH=./static npm run build or BUILD_MODE=dist;STATIC_PATH=./static npm run watch
    • CMD: run set BUILD_MODE=dist & STATIC_PATH=./static once, then npm run build or npm run watch any number of times in the same window.
    • PowerShell: run $env:BUILD_MODE = "dist"; $env:STATIC_PATH = "./static" once, then npm run build or npm run watch any number of times in the same window.
  4. Link cloned scratch-gui by npm link in the cloned scratch-gui.
  5. Set scratch-desktop to use linked scratch-gui by 'npm link scratch-gui'.

Prepare media library assets

In the scratch-desktop directory, run npm run fetch. Re-run this any time you update scratch-gui or make any other changes which might affect the media libraries.

Run in development mode

npm start

Make a packaged build

npm run dist

Node that on macOS this will require installing various certificates.

Signing the NSIS installer (Windows, non-store)

This section is relevant only to members of the Scratch Team.

By default all Windows installers are unsigned. An APPX package for the Microsoft Store shouldn't be signed: it will be signed automatically as part of the store submission process. On the other hand, the non-Store NSIS installer should be signed.

To generate a signed NSIS installer:

  1. Acquire our latest digital signing certificate and save it on your computer as a p12 file.
  2. Set WIN_CSC_LINK to the path to your certificate file. For maximum compatibility I use forward slashes.
    • CMD: set WIN_CSC_LINK=C:/Users/You/Somewhere/Certificate.p12
    • PowerShell: $env:WIN_CSC_LINK = "C:/Users/You/Somewhere/Certificate.p12"
  3. Set WIN_CSC_KEY_PASSWORD to the password string associated with your P12 file.
    • CMD: set WIN_CSC_KEY_PASSWORD=superSecret
    • PowerShell: $env:WIN_CSC_KEY_PASSWORD = "superSecret"
  4. Build the NSIS installer only: building the APPX installer will fail if these environment variables are set.
    • npm run dist -- -w nsis

Make a semi-packaged build

This will simulate a packaged build without actually packaging it: instead the files will be copied to a subdirectory of dist.

npm run dist:dir


You can debug the renderer process by opening the Chromium development console. This should be the same keyboard shortcut as Chrome on your platform. This won't work on a packaged build.

You can debug the main process the same way as any Node.js process. I like to use Visual Studio Code with a configuration like this:

    "launch": {
        "version": "0.2.0",
        "configurations": [
                "name": "Desktop",
                "type": "node",
                "request": "launch",
                "cwd": "${workspaceFolder:scratch-desktop}",
                "runtimeExecutable": "npm",
                "autoAttachChildProcesses": true,
                "runtimeArgs": ["start", "--"],
                "protocol": "inspector",
                "skipFiles": [
                    // it seems like skipFiles only reliably works with 1 entry :(
                "sourceMaps": true,
                "timeout": 30000,
                "outputCapture": "std"
You can’t perform that action at this time.