Skip to content

Instantly share code, notes, and snippets.

@marcusbelcher
Last active March 27, 2024 12:38
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save marcusbelcher/fc9b831bd9e6384799ed6505552ca44b to your computer and use it in GitHub Desktop.
Save marcusbelcher/fc9b831bd9e6384799ed6505552ca44b to your computer and use it in GitHub Desktop.
Install Emscripten / Emsdk on Windows 10 via CMD
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
@vilelalabs
Copy link

Saved my day bro! Thanks a lot!

@ViniciusFXavier
Copy link

Add pause on the end just to the console not auto close.

@Vlad1slave-adidas
Copy link

Thank you bro!

@Welding-Torch
Copy link

Doesn't get emcc on your computer 👎

@Welding-Torch
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment