]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Add isready function
authorLockl00p <97256723+Lockl00p@users.noreply.github.com>
Mon, 9 Oct 2023 15:26:52 +0000 (10:26 -0500)
committerLockl00p <97256723+Lockl00p@users.noreply.github.com>
Mon, 9 Oct 2023 15:26:52 +0000 (10:26 -0500)
misc/buildfiles/emscripten/prejs.js
misc/tools/all/xonotic.subr

index 9db82aaaec78fba10389fa10eb769ebabc826e43..ca4ce9a87718346c3d5e28a9c050739cda5d2cea 100644 (file)
@@ -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){
index 2cd7b5e8549675198cec491dc7c0a11522b0c70e..2fcfe99a1ec9177623df0cf62f8774dc6a703f98 100755 (executable)
@@ -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."