]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
Attempt to embed data folder
authorLock l00p <hakzstudios@gmail.com>
Sat, 30 Sep 2023 03:51:29 +0000 (03:51 +0000)
committerLock l00p <hakzstudios@gmail.com>
Sat, 30 Sep 2023 03:51:29 +0000 (03:51 +0000)
misc/buildfiles/emscripten/prejs.js
misc/buildfiles/emscripten/shell.html
misc/tools/all/xonotic.subr

index 836974aa586381900d3e474a98b14f4734dd5aa7..c911cf193c225f5764bbeafe50e4b65069aa9ef4 100644 (file)
@@ -10,9 +10,10 @@ cmd = function(input){
     }
     return 0
 }
+Module['preInit'] = function(){FS.mount(IDBFS,{},"/")}
 Module['arguments'] = ["-xonotic"]
 //pipes output to console
-Module['print'] = function(text){console.log(text)}
+Module['print'] = function(text){console.log(text); FS.syncfs()}
 Module['preRun'] = function(){
     function stdin(){
     //if current command is default, it just returns 0, code for null
index 4b3b1d2395c9048fb315f24ebc4c372f765d9a1c..b7d7f4e9bc69de84deffb8e6b9634ac70c5ef037 100644 (file)
@@ -4,6 +4,7 @@
 <head>
     <meta charset="utf-8">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>Xonotic</title>
 </head>
 
 <body>
index 108decc47805e3d9cf688d9d0fe8c9e94938264e..473604de5b6b838b31b67e641f089b0d448e0586 100755 (executable)
@@ -310,7 +310,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 --shell-file ../../../../misc/buildfiles/emscripten/shell.html  -sSINGLE_FILE -sFULL_ES2 -sUSE_ZLIB -sINITIAL_MEMORY=100MB' 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="" LIBJPEG="" STRIP=: "$@" "$T"
+                       verbose emmake make $MAKEFLAGS LDFLAGS_EXTRA='--pre-js ../../../../misc/buildfiles/emscripten/prejs.js --shell-file ../../../../misc/buildfiles/emscripten/shell.html  --embed-file ../../../../data@data -sSINGLE_FILE -sFULL_ES2 -sUSE_ZLIB -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=100MB' 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="" LIBJPEG="" STRIP=: "$@" "$T"
                done
                for T in $BAD_TARGETS; do
                        $ECHO "Warning: discarded invalid client $T."