From b1d97ea85c6dac1b593e9e3e038cef69da62e1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sat, 26 Nov 2022 19:08:08 +0000 Subject: [PATCH] chore: share the same emsdk path. --- .gitignore | 1 + src/KgmWasm/build-wasm | 10 ++++------ src/QmcWasm/build-wasm | 11 ++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 3d9c3e4..87b919e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules /dist +/build /coverage # local env files diff --git a/src/KgmWasm/build-wasm b/src/KgmWasm/build-wasm index 7a9c12d..85f5658 100755 --- a/src/KgmWasm/build-wasm +++ b/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 diff --git a/src/QmcWasm/build-wasm b/src/QmcWasm/build-wasm index 8a9a1f3..c906fae 100755 --- a/src/QmcWasm/build-wasm +++ b/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