2022-09-11 19:58:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
# Setup emsdk
|
|
|
|
if [ ! -d "emsdk" ]; then
|
|
|
|
wget https://github.com/emscripten-core/emsdk/archive/refs/heads/main.zip -O emscripten.zip
|
|
|
|
unzip emscripten.zip
|
|
|
|
mv emsdk-main emsdk
|
|
|
|
rm -rf emscripten.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
source ./emsdk/emsdk_env.sh
|
|
|
|
emsdk update
|
|
|
|
emsdk install latest
|
|
|
|
emsdk activate latest
|
|
|
|
source ./emsdk/emsdk_env.sh
|
|
|
|
|
|
|
|
# Setup web build
|
2022-09-13 10:02:36 +00:00
|
|
|
emcmake cmake -S . -B build_web -DCMAKE_BUILD_TYPE=Release -DPLATFORM=Web
|