chore: share the same emsdk path.

This commit is contained in:
鲁树人 2022-11-26 19:08:08 +00:00
parent deb6ceb52d
commit b1d97ea85c
3 changed files with 9 additions and 13 deletions

1
.gitignore vendored
View File

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

View File

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

View File

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