Last active
October 20, 2024 20:43
-
-
Save marcusbelcher/fc9b831bd9e6384799ed6505552ca44b to your computer and use it in GitHub Desktop.
Install Emscripten / Emsdk on Windows 10 via CMD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/juj/emsdk.git | |
cd emsdk | |
rd /s /q clang | |
rd /s /q emscripten | |
rd /s /q java | |
rd /s /q node | |
rd /s /q python | |
rd /s /q zips | |
git reset --hard HEAD | |
git checkout master | |
git pull | |
call emsdk install latest | |
call emsdk activate latest | |
call emsdk_env | |
WHERE emmake >nul 2>nul | |
IF %ERRORLEVEL% NEQ 0 ECHO Emscripten install failed, run script again | |
IF %ERRORLEVEL% EQU 0 ECHO Emscripten install successful |
Add pause
on the end just to the console not auto close.
Thank you bro!
Doesn't get emcc
on your computer 👎
Also this may be pulling from an outdated branch, because when I run emcmdprompt.bat
I get:
Error: You appear to be using the `master` branch of emsdk.
We recently made the switch to using `main`
In order to continue to receive updates you will need to make the switch locally too.
For normal clones without any local branches simply running the following command should be enough:
`git checkout main`
For more information see https://github.com/emscripten-core/emsdk/issues/805
for me it was more like this (written for Linux/Bash but actually tested on Windows)
git clone https://github.com/emscripten-core/emsdk
cd emsdk/
# Download and install the latest SDK tools.
./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
# this will also setup the env vars for you
./emsdk activate latest
# then when you want to come back to the project later
# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
see also: https://emscripten.org/docs/getting_started/downloads.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saved my day bro! Thanks a lot!