Browse Source

chore: share the same emsdk path.

20230320
Jixun Wu 2 years ago
parent
commit
38cc5e2189
  1. 1
      .gitignore
  2. 10
      src/KgmWasm/build-wasm
  3. 11
      src/QmcWasm/build-wasm

1
.gitignore

@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
/build
/coverage
# local env files

10
src/KgmWasm/build-wasm

@ -12,16 +12,16 @@ if [ -z "$BUILD_TYPE" ]; then
fi
mkdir -p build/wasm
if [ ! -d build/emsdk ]; then
git clone https://github.com/emscripten-core/emsdk.git build/emsdk
if [ ! -d ../../build/emsdk ]; then
git clone https://github.com/emscripten-core/emsdk.git ../../build/emsdk
fi
pushd build/emsdk
pushd ../../build/emsdk
#git pull
./emsdk install 3.0.0
./emsdk activate 3.0.0
source ./emsdk_env.sh
popd # build/emsdk
popd # ../../build/emsdk
pushd build/wasm
emcmake cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ../..
@ -33,8 +33,6 @@ TARGET_FILES="
KgmWasmBundle.js
"
#mkdir -p "${CURR_DIR}/npm"
#cp $TARGET_FILES "${CURR_DIR}/npm/"
cp $TARGET_FILES "${CURR_DIR}/"
popd # build/wasm

11
src/QmcWasm/build-wasm

@ -12,16 +12,15 @@ if [ -z "$BUILD_TYPE" ]; then
fi
mkdir -p build/wasm
if [ ! -d build/emsdk ]; then
git clone https://github.com/emscripten-core/emsdk.git build/emsdk
if [ ! -d ../../build/emsdk ]; then
git clone https://github.com/emscripten-core/emsdk.git ../../build/emsdk
fi
pushd build/emsdk
#git pull
pushd ../../build/emsdk
./emsdk install 3.0.0
./emsdk activate 3.0.0
source ./emsdk_env.sh
popd # build/emsdk
popd # ../../build/emsdk
pushd build/wasm
emcmake cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" ../..
@ -33,8 +32,6 @@ TARGET_FILES="
QmcWasmBundle.js
"
#mkdir -p "${CURR_DIR}/npm"
#cp $TARGET_FILES "${CURR_DIR}/npm/"
cp $TARGET_FILES "${CURR_DIR}/"
popd # build/wasm

Loading…
Cancel
Save