Git Product home page Git Product logo

scratch-gui's Introduction

BUILD INSTRUCTIONS

Items in [] may be unnecessary after upstreaming.

Prepare image

Install SSH key for access to raspberrypi-ui GitHub

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) (run without local repo overrides)

sudo apt install closure-compiler

In ~/

git clone [email protected]:raspberrypi-ui/scratch-gui.git

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

In ~/scratch-desktop

npm install

In scripts/electron-builder-wrapper.js, add the section

case 'linux':
    return ['appimage'];

to the calculateTargets function, and (for 32-bit ARM builds only), change the relevant line in the getPlatformFlag function to

case 'linux': return '--linux --armv7l';

In electron-builder.yaml, add a section

linux:
  target: dir

In ~/scratch-desktop/node_modules

rm -rf scratch-gui

git clone https://github.com/LLK/scratch-gui.git

In ~/scratch-desktop/node_modules/scratch-gui

git checkout scratch-desktop

cp -r ~/scratch-gui/src/lib/libraries/extensions/* src/lib/libraries/extensions/

In package.json, in the "devDependencies" section, remove the line starting “chromedriver”

npm install

In ~/scratch-desktop/node_modules/scratch-gui/node_modules/scratch-blocks

[cp ~/scratch-gui/node_modules/scratch-blocks/blocks_common/* blocks_common/]

[cp ~/scratch-gui/node_modules/scratch-blocks/core/* core/]

[In package.json, in the "devDependencies" section, remove the line starting “chromedriver”]

[npm install (ignore errors at end)]

In ~/scratch-desktop/node_modules/scratch-gui/node_modules/scratch-vm

In package.json, replace "browser" section with

"browser": {
    "fs": false,
    "child_process": false
},

npm install

cp -r ~/scratch-gui/node_modules/scratch-vm/src/extensions/* src/extensions/

cp ~/scratch-gui/node_modules/scratch-vm/src/extension-support/* src/extension-support/

[cp ~/scratch-gui/node_modules/scratch-vm/src/engine/* src/engine/]

npm run build

In ~/scratch-desktop/node_modules/scratch-gui

npm run build

In ~/scratch-desktop

npm run dist

Built standalone files will be in dist/linux-arm??-unpacked

scratch-gui's People

Contributors

spl237 avatar ericrosenbaum avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.