setup-cpp icon indicating copy to clipboard operation
setup-cpp copied to clipboard

Support emscripten

Open abeimler opened this issue 3 years ago • 1 comments

Similar to llvm, install emscripten in ~/emscripten (?)

  • [ ] Install on Linux
    • [ ] Ubuntu: apt-get install emscripten ?
    • [ ] Arch: https://archlinux.org/packages/community/x86_64/emscripten/
    • [ ] Fedora: dnf install emscripten ?
  • [ ] Windows: https://community.chocolatey.org/packages/emscripten ???
  • [ ] MacOS: https://formulae.brew.sh/formula/emscripten ???
  • [ ] add ./emsdk_env.sh in to ~/.cpprc (?) @aminya

See docker in project_options ...

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git /root/emsdk
# Download and install the latest SDK tools.
/root/emsdk/emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
/root/emsdk/emsdk activate latest
# Get emscripten repo, for Emscripten.cmake
git clone https://github.com/emscripten-core/emscripten /root/emscripten

Example:

.\setup_cpp_windows --compiler emscripten --cmake true --ninja true --ccache true --vcpkg true

abeimler avatar Dec 30 '22 03:12 abeimler

I think I can port the choco package of emscripten to TypeScript. The underlying logic is cross-platform https://github.com/aminya/chocolatey-emscripten

aminya avatar Dec 31 '22 01:12 aminya