Building
In order to embed a Scratch project in the executable, you'll need to compile the source code.
If you would like to change the name of the app or any other information you can edit one of the Makefiles.
- For the 3DS, you need to edit
Makefile_3dsand changeAPP_TITLE,APP_DESCRIPTIONandAPP_AUTHORto whatever you please. - For the Wii U, you need to edit
Makefile_wiiuand changeAPP_NAME,APP_SHORT_DESCRIPTION,APP_LONG_DESCRIPTIONandAPP_AUTHORto whatever you please. - For the Wii, you need to edit
Makefile_wiiand change anything under# Application Infoto whatever you please. - For the Vita, you need to edit the properties under
# METADATA/CONFIGto whatever you please. Do note however, if you're going to use custom LiveArea images, you must run them throughpngquant(install with your package manager) with--posterizeset to 4 first before packaging.
Docker
The recommended way to compile Scratch Everywhere! is with Docker. To compile with Docker all you need installed is Docker and Buildx.
To compile for the 3DS, run
docker build -f docker/Dockerfile.3ds --target exporter -o . ..To compile for the Wii U, run
docker build -f docker/Dockerfile.wiiu --target exporter -o . ..To compile for the Wii, run
docker build -f docker/Dockerfile.wii --target exporter -o . ..To compile for the GameCube, run
docker build -f docker/Dockerfile.gamecube --target exporter -o . ..To compile for the Nintendo Switch run
docker build -f docker/Dockerfile.switch --target exporter -o . ..To compile for the Vita, run
docker build -f docker/Dockerfile.vita --target exporter -o . ..
Manual
If you are compiling with cloud variables, you will need to have DevkitPro's SDKs, Mist++, and a modified version of libcurl (instructions in mistpp-packages repo) installed.
- For the 3DS, you will need the DevkitARM toolchain and libctru.
- If you want to compile with audio support, you will also need a 3DS compiled version of SDL2 and SDL2_mixer. See the Nightly Build commands for a reference on how to compile SDL2 3DS for yourself.
- For the Wii U, you will need the DevkitPPC toolchain, WUT, all SDL2-wiiu libraries, and libromfs-wiiu..
- For the Wii, you need the DevkitPPC toolchain, libogc, all SDL2-wii libraries, and libromfs-ogc..
- For the GameCube, you need the DevkitPPC toolchain, libogc, all SDL2-gamecube libraries, and libromfs-ogc..
- For the Switch, you need the DevkitA64 toolchain, libnx, and all SDL2-switch libraries.
- For the Vita, all you need is the vitasdk toolchain. It includes every SDL2 thing you might need.
NOTE
DevkitPro's install instructions are available at: https://devkitpro.org/wiki/Getting_Started
Download the source code from the releases tab and unzip it.
Make a romfs folder inside the unzipped source code and put the Scratch project inside of that.
- The Scratch project MUST be named
project.sb3, all lowercase. - For faster load times/less limitations, you can also unzip the sb3 project file and put the contents into a new folder called
project.
Then you need to compile the projects into proper Homebrew packages.
- For the 3DS, you simply need to run
make. Then copy theScratch-3DS.3dsxfile like you normally would. - For the Wii U, you need to run
make PLATFORM=wiiuand then copy thebuild/wiiu/scratch-wiiufolder into thesdcard:/wiiu/appsfolder on your sd card. - For the Wii, you need to run
make PLATFORM=wii package, then find the zipped file inbuild/wii/scratch-wii.zip. Unzip it and put theappsfolder inside the root of your Wii SD card. - For the GameCube, you need to run
make PLATFORM=gamecube, then find the.dolfile atbuild/gamecube/scratch-gamecube.dol. - For the Switch, you need to run
make PLATFORM=switch, then find the.nrofile atbuild/switch/scratch-nx.nro. - For the Vita, run
make PLATFORM=vita, then transfer the VPK atbuild/vita/scratch-vita.vpkover to your Vita.
Compilation Flags
Compilation flags are used to select which features will be enabled in the compiled version of Scratch Everywhere!. To use a compilation flag simply add it to the end of the make command (e.g. make ENABLE_BUBBLES=0).
ENABLE_LOADSCREEN(default:0on Wii and Gamecube,1otherwise): If set to1, the loading screen is enabled, if set to0the screen is simply black during that time. This option crashes on Wii and GameCube when trying to load large projects.ENABLE_AUDIO(default:1): If set to1, Audio will be enabled. If set to0, it will be disabled.ENABLE_CLOUDVARS(default:0): If set to1, cloud variable support is enabled, if set to0cloud variables are treated like normal variables. If your project doesn't use cloud variables, it is recommended to leave this turned off. If you run into errors while building try turning this off and see if that fixes the errors.- [Old 3DS]
RAM_AMOUNT(default:72): the amount of RAM, in megabytes, the old 3DS should be using. Can be set to32,64,72,80, or96.
