make further changes to the build script

This commit is contained in:
unset
2024-11-18 01:36:42 +01:00
parent db0dd2e0fa
commit b0d4f7254e

View File

@@ -26,7 +26,7 @@ args_win86-64()
args_emscripten() args_emscripten()
{ {
ARCHITECTURE="web" ARCHITECTURE="web"
COMPILER="/home/user/.local/bin/emcc" COMPILER="emcc" # just make sure it's in $PATH (it's a pain to install)
ARGS="-s USE_SDL=2" ARGS="-s USE_SDL=2"
FILE_EXSTENSION=".html" FILE_EXSTENSION=".html"
} }
@@ -46,7 +46,7 @@ fi
# make (and clear) the build directory # make (and clear) the build directory
mkdir "$BUILD_DIR $BUILD_DIR/$ARCHITECTURE" mkdir -p "$BUILD_DIR/$ARCHITECTURE"
rm -rf "${BUILD_DIR:?}/$ARCHITECTURE/*" rm -rf "${BUILD_DIR:?}/$ARCHITECTURE/*"
# copy included files or directories to the build directory # copy included files or directories to the build directory
@@ -58,8 +58,8 @@ fi
EXE_PATH=$BUILD_DIR/$ARCHITECTURE/$PROJECT_NAME$FILE_EXSTENSION EXE_PATH=$BUILD_DIR/$ARCHITECTURE/$PROJECT_NAME$FILE_EXSTENSION
echo "building at: $EXE_PATH" echo "building at: $EXE_PATH"
# check whether the compiler path contains an executable at said path # check whether the compiler can actually be executed
if [ ! -x "$COMPILER" ]; then if [ ! -x "$COMPILER" ] && ! command -v "$COMPILER" > /dev/null; then
echo -e "\033[91mCouldn't find an executable at path: \033[0m $COMPILER" echo -e "\033[91mCouldn't find an executable at path: \033[0m $COMPILER"
exit 1 exit 1
fi fi