Skip to content

KIT-SOC4S/ftd-scratch3-offline

Repository files navigation

ftd-scratch3-offline

Build Status

Building

About 2-3 GB disk space are needed as the build has to download packages for many different architectures.

git clone https://github.com/KIT-SOC4S/ftd-scratch3-offline.git
cd ftd-scratch3-offline/
./gradlew check distribute

The distribution can be found inside the ftd-ui-server/build/dist/ folder in an archive.

Building the scratch distribution

If you want to develop the extension you should clone without --depth 1.

mkdir scratch
cd scratch
git clone https://github.com/LLK/scratch-blocks.git
cd scratch-blocks
git checkout 63679b2861cd318bc1cb2ef7b02b8a3d83355158
cd ..
git clone https://github.com/intrigus/scratch-vm.git --depth 1
git clone https://github.com/intrigus/scratch-gui.git --depth 1

Then run this command:

cd scratch-vm
npm install
npm link
cd ../scratch-blocks
npm install
npm link
cd ../scratch-gui
npm install
npm link scratch-vm scratch-blocks
npm run build
cd build
tar --exclude='*.map' -cf scratch_dist.tar .
sha256sum  scratch_dist.tar > scratch_dist.tar.sha256.txt 

You should then upload the resulting scratch_dist.tar and scratch_dist.tar.sha256.txt files somewhere, e.g. as a Github release.

To update the scratch release that is distributed by default, go to https://github.com/KIT-SOC4S/ftd-scratch3-offline/blob/master/build.gradle and replace the URL in fetchMatchingScratchRelease and replace the checksum in verifyMatchingScratchRelease with the one from scratch_dist.tar.sha256.txt.