diff --git a/build_android.sh b/build_android.sh index 93773568..91b25d76 100644 --- a/build_android.sh +++ b/build_android.sh @@ -1,3 +1,5 @@ +set -e + # if no $1 default arm64-v8a if [ -z $1 ]; then $1=arm64-v8a diff --git a/build_ios.sh b/build_ios.sh index 7b63bba7..3c4d8fe1 100644 --- a/build_ios.sh +++ b/build_ios.sh @@ -1,3 +1,5 @@ +set -e + rm -rf build mkdir build cd build diff --git a/build_web.sh b/build_web.sh index f3006c45..ae039479 100644 --- a/build_web.sh +++ b/build_web.sh @@ -1,10 +1,10 @@ +set -e + python prebuild.py rm -rf web/lib mkdir web/lib -SRC_C=$(find src/ -name "*.c") -SRC_CPP=$(find src/ -name "*.cpp") -SRC="$SRC_C $SRC_CPP" +SRC=$(find src/ -name "*.c") -em++ $SRC -Iinclude/ -fexceptions -frtti -s -Os -sEXPORTED_FUNCTIONS=_pkpy_new_repl,_pkpy_repl_input,_pkpy_new_vm -sEXPORTED_RUNTIME_METHODS=ccall -o web/lib/pocketpy.js +emcc $SRC -Iinclude/ -s -Os -sEXPORTED_FUNCTIONS=_py_initialize,_py_finalize,_py_exec,_py_replinput -sEXPORTED_RUNTIME_METHODS=ccall -o web/lib/pocketpy.js