Note the version number (as of now, 4.4.1)
Carefully choose, and remember, a directory to store the source build in!
Open git bash or a Command Prompt window and run, for example:
git clone <https://github.com/godotengine/godot.git> --branch 4.4.1-stable
Create and remember a directory for Emscripten. I’m using C:\emscripten.
Download the SDK in that directory:
git clone <https://github.com/emscripten-core/emsdk.git>
Install Emscripten in Command Prompt:
Ensure you are in the DRIVE_LETTER:\emscripten\emsdk directory (the one with emsdk.bat in it), and run:
emsdk install latest
Then run:
emsdk activate latest
Run this in Command Prompt if not already installed:
pip install scons
If using Emscripten/doing web builds, run this in Command Prompt too (you may need to navigate to the python folder and confirm the version; I didn’t need to):
DRIVE_LETTER:\\emscripten\\emsdk\\python\\3.13.3_64bit\\python.exe -m pip install scons
If needed, update/change the version of your Godot source.
Checkout the needed version, for example:
git checkout 4.4.1-stable
Generate encryption key in git bash
openssl rand -hex 32 > godot.gdkey
(Optional) Create a build profile in Godot
Compile the Export Template(s)
Set the directory to the location you pulled Godot into, for example:
cd DRIVE_LETTER:\\godot\\
In a fresh Command Prompt terminal, set the encryption key generated earlier:
set SCRIPT_AES256_ENCRYPTION_KEY=your-64-character-key
Compile the export template through scons (check if you need/want the flags below too, and add them to this line):
scons platform=windows target=template_release
if you made a build template, add:
build_profile=your_custom_profile.build
if you are targeting 64-bit architectures (which is likely), add:
bit=64
Be patient. This could take a while.
The export template will be in DRIVE_LETTER:\your_godot_source_directory\bin\godot.windows.template_release.exe
Navigate to your Godot source folder; for example:
cd DRIVE_LETTER:\\godot\\
Open a fresh Command Prompt terminal and refer back to your Emscripten directory and its python version; replace that directory/version in the code below as needed, and run each line:
set PATH=C:\\emscripten\\emsdk\\python\\3.13.3_64bit;%PATH%
set PATH=C:\\emscripten\\emsdk\\upstream\\emscripten;%PATH%
set EMSDK=C:\\emscripten\\emsdk
Set the encryption key you generated earlier:
set SCRIPT_AES256_ENCRYPTION_KEY=your-64-character-key
Compile the export template through scons (check if you need/want the flag below too, then optionally add it to this line):
scons platform=web target=template_release threads=no
if you made a build template, add this:
build_profile=your_custom_profile.build
Be patient. This could take a while.
The export template will be in: DRIVE_LETTER:\your_godot_source_directory\bin\godot.web.template_release.wasm32.zip