From: Lockl00p <97256723+Lockl00p@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:26:52 +0000 (-0500) Subject: Add isready function X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=86f0a053c03113ce13249a14b1373128573e9f08;p=xonotic%2Fxonotic.git Add isready function --- diff --git a/misc/buildfiles/emscripten/prejs.js b/misc/buildfiles/emscripten/prejs.js index 9db82aaa..ca4ce9a8 100644 --- a/misc/buildfiles/emscripten/prejs.js +++ b/misc/buildfiles/emscripten/prejs.js @@ -1,5 +1,9 @@ //current command in ascii decimal let currentcmd = [0,0,0] +let isready = function(){ + if(FS.analyzePath("/data/",false).exists == true){return 1} + return 0 +} let cmditerate = 0 console.log("Run Terminal Commands by running cmd(\"command to run here\")") cmd = function(input){ diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index 2cd7b5e8..2fcfe99a 100755 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -303,7 +303,7 @@ case "$cmd" in # 4 levels up: data, xonotic-data, qcsrc, server verbose cd "$d0/darkplaces" - verbose mkdir -p "$d0/.tmp/data" + verbose mkdir -p "$d0/.tmp/data/" if [ x"$BAD_TARGETS" = x" " ]; then $ECHO "Warning: invalid empty client, default clients will be used." @@ -312,7 +312,7 @@ case "$cmd" in verbose emmake make $MAKEFLAGS clean fi for T in $TARGETS; do - verbose emmake make $MAKEFLAGS LDFLAGS_EXTRA=' --pre-js ../../../../misc/buildfiles/emscripten/prejs.js -lidbfs.js -sSINGLE_FILE -sUSE_ZLIB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=700MB' EXE_UNIXSDL="darkplaces-emscripten.html" DP_SSE=0 CFLAGS_EXTRA="-I../../../../misc/builddeps/emscripten/d0_blind_id/include -L../../../../misc/builddeps/emscripten/d0_blind_id/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/d0_blind_id/lib -I../../../../misc/builddeps/emscripten/gmp/include -L../../../../misc/builddeps/emscripten/gmp/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/gmp/lib -L../../../../misc/builddeps/emscripten/jpeg/lib/ -Wl,-rpath,../../../../misc/builddeps/emscripten/jpeg/lib/ -I../../../../misc/builddeps/emscripten/jpeg/include/ -sUSE_SDL=2 -sUSE_ZLIB=1 -DUSE_GLES2" LIBM="" LIBZ="" LIB_JPEG="../../../../misc/builddeps/emscripten/jpeg/lib/libjpeg.a" STRIP=: "$@" "$T" + verbose emmake make $MAKEFLAGS LDFLAGS_EXTRA=' -sENVIRONMENT=web --pre-js ../../../../misc/buildfiles/emscripten/prejs.js -lidbfs.js --preload-file ../../../../.tmp/data@/config/ -sSINGLE_FILE -sUSE_ZLIB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=1500MB -sMAXIMUM_MEMORY=4GB' EXE_UNIXSDL="darkplaces-emscripten.html" DP_SSE=0 CFLAGS_EXTRA="-I../../../../misc/builddeps/emscripten/d0_blind_id/include -L../../../../misc/builddeps/emscripten/d0_blind_id/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/d0_blind_id/lib -I../../../../misc/builddeps/emscripten/gmp/include -L../../../../misc/builddeps/emscripten/gmp/lib -Wl,-rpath,../../../../misc/builddeps/emscripten/gmp/lib -L../../../../misc/builddeps/emscripten/jpeg/lib/ -Wl,-rpath,../../../../misc/builddeps/emscripten/jpeg/lib/ -I../../../../misc/builddeps/emscripten/jpeg/include/ -sUSE_SDL=2 -sUSE_ZLIB=1 -DUSE_GLES2" LIBM="" LIBZ="" LIB_JPEG="../../../../misc/builddeps/emscripten/jpeg/lib/libjpeg.a" STRIP=: "$@" "$T" done for T in $BAD_TARGETS; do $ECHO "Warning: discarded invalid client $T."