mirror of
https://github.com/2003scape/deep-c-rsc.git
synced 2024-03-22 05:49:51 -04:00
emscripten build
This commit is contained in:
parent
ea97265d0a
commit
092b3669d9
12
build-emscripten.sh
Executable file
12
build-emscripten.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
java -jar ./JCGO/jcgo.jar mudclient -src ./mudclient204-threadless \
|
||||||
|
@JCGO/stdpaths.in
|
||||||
|
|
||||||
|
patch -p0 -i sdl.diff
|
||||||
|
|
||||||
|
emcc -O2 -I ./JCGO/include -I ./JCGO/native -I \
|
||||||
|
-fno-strict-aliasing \
|
||||||
|
-DJCGO_NOGC -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \
|
||||||
|
-DJCGO_INTFIT -DJCGO_UNIX -D_FPU_CONTROL_H -D_IEEEFP_H -DJCGO_UNIFSYS \
|
||||||
|
-o mudclient.html jcgo_Out/Main.c -lm -lSDL2 \
|
||||||
|
-s ALLOW_MEMORY_GROWTH=1 -s USE_SDL=2 -s ASYNCIFY \
|
||||||
|
--preload-file ./data204
|
@ -6,7 +6,8 @@ patch -p0 -i sdl.diff
|
|||||||
x86_64-w64-mingw32-gcc -O2 -I ./JCGO/include -I ./JCGO/native \
|
x86_64-w64-mingw32-gcc -O2 -I ./JCGO/include -I ./JCGO/native \
|
||||||
-I ./JCGO/include/tinygc -I ./SDL2-2.0.14/x86_64-w64-mingw32/include \
|
-I ./JCGO/include/tinygc -I ./SDL2-2.0.14/x86_64-w64-mingw32/include \
|
||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-DGC_THREADS -DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \
|
-DGC_THREADS -DGC_GCJ_SUPPORT -DJCGO_USEGCJ -DJCGO_PARALLEL -DJCGO_FPFAST \
|
||||||
|
-DJCGO_FASTMATH -DJCGO_INET \
|
||||||
-DJCGO_INTFIT -DJCGO_THREADS -D_IEEEFP_H -DJCGO_WIN32 \
|
-DJCGO_INTFIT -DJCGO_THREADS -D_IEEEFP_H -DJCGO_WIN32 \
|
||||||
-o mudclient.exe jcgo_Out/Main.c -lm \
|
-o mudclient.exe jcgo_Out/Main.c -lm \
|
||||||
-L ./SDL2-2.0.14/x86_64-w64-mingw32/lib -lSDL2 -lwsock32 \
|
-L ./SDL2-2.0.14/x86_64-w64-mingw32/lib -lSDL2 -lwsock32 \
|
||||||
|
13
build-mingw32.sh
Executable file
13
build-mingw32.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#java -jar ./JCGO/jcgo.jar mudclient -src ./mudclient204-headless \
|
||||||
|
# @JCGO/stdpaths.in
|
||||||
|
|
||||||
|
#patch -p0 -i sdl.diff
|
||||||
|
|
||||||
|
#x86_64-w64-mingw32-gcc -g -I ./JCGO/include -I ./JCGO/native \
|
||||||
|
i686-w64-mingw32-gcc -g -I ./JCGO/include -I ./JCGO/native \
|
||||||
|
-I ./JCGO/include/boehmgc -I ./SDL2-2.0.14/i686-w64-mingw32/include \
|
||||||
|
-DJCGO_NOGC -DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \
|
||||||
|
-DJCGO_INTFIT -DJCGO_THREADS -D_IEEEFP_H -DJCGO_WIN32 \
|
||||||
|
-o mudclient.exe jcgo_Out/Main.c -lm \
|
||||||
|
-L ./SDL2-2.0.14/i686-w64-mingw32/lib -lSDL2 -lwsock32 \
|
||||||
|
./JCGO/libs/x86/mingw/libgcmt.a -no-pie
|
2
build.sh
2
build.sh
@ -7,7 +7,7 @@ patch -p0 -i sdl.diff
|
|||||||
#-DJCGO_NOGJ
|
#-DJCGO_NOGJ
|
||||||
gcc -O2 -I ./JCGO/include -I ./JCGO/native -I ./JCGO/include/boehmgc \
|
gcc -O2 -I ./JCGO/include -I ./JCGO/native -I ./JCGO/include/boehmgc \
|
||||||
-fno-strict-aliasing \
|
-fno-strict-aliasing \
|
||||||
-DJCGO_USEGCJ -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \
|
-DJCGO_USEGCJ -DJGCO_PARALLEL -DJCGO_FPFAST -DJCGO_FASTMATH -DJCGO_INET \
|
||||||
-DJCGO_INTFIT -DJCGO_THREADS -DJCGO_UNIX -D_IEEEFP_H -DJCGO_UNIFSYS \
|
-DJCGO_INTFIT -DJCGO_THREADS -DJCGO_UNIX -D_IEEEFP_H -DJCGO_UNIFSYS \
|
||||||
-o mudclient jcgo_Out/Main.c -lm -lpthread -lSDL2 \
|
-o mudclient jcgo_Out/Main.c -lm -lpthread -lSDL2 \
|
||||||
./JCGO/libs/amd64/linux/libgcmt.a -no-pie
|
./JCGO/libs/amd64/linux/libgcmt.a -no-pie
|
||||||
|
0
emscripten-sdl.diff
Normal file
0
emscripten-sdl.diff
Normal file
@ -3887,14 +3887,6 @@ public class mudclient extends GameConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void startGame() {
|
protected void startGame() {
|
||||||
/*
|
|
||||||
if (appletMode) {
|
|
||||||
String s = getDocumentBase().getHost().toLowerCase();
|
|
||||||
if (!s.endsWith("jagex.com") && !s.endsWith("jagex.co.uk") && !s.endsWith("runescape.com") && !s.endsWith("runescape.co.uk") && !s.endsWith("runescape.net") && !s.endsWith("runescape.org") && !s.endsWith("penguin") && !s.endsWith("puffin")) {
|
|
||||||
errorLoadingCodebase = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
int total_exp = 0;
|
int total_exp = 0;
|
||||||
for (int level = 0; level < 99; level++) {
|
for (int level = 0; level < 99; level++) {
|
||||||
int level_1 = level + 1;
|
int level_1 = level + 1;
|
||||||
@ -3903,35 +3895,11 @@ public class mudclient extends GameConnection {
|
|||||||
experienceArray[level] = total_exp & 0xffffffc;
|
experienceArray[level] = total_exp & 0xffffffc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
try {
|
|
||||||
String s1 = getParameter("referid");
|
|
||||||
referid = Integer.parseInt(s1);
|
|
||||||
} catch (Exception Ex) {
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
String s2 = getParameter("member");
|
|
||||||
int j1 = Integer.parseInt(s2);
|
|
||||||
if (j1 == 1)
|
|
||||||
members = true;
|
|
||||||
} catch (Exception Ex) {
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (appletMode)
|
if (appletMode)
|
||||||
super.port = 43594;
|
super.port = 43594;
|
||||||
|
|
||||||
maxReadTries = 1000;
|
maxReadTries = 1000;
|
||||||
clientVersion = Version.CLIENT;
|
clientVersion = Version.CLIENT;
|
||||||
/*
|
|
||||||
try {
|
|
||||||
String s3 = getParameter("poff");
|
|
||||||
int k1 = Integer.parseInt(s3);
|
|
||||||
super.port += k1;
|
|
||||||
System.out.println("Offset: " + k1);
|
|
||||||
} catch (Exception Ex) {
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
loadGameConfig();
|
loadGameConfig();
|
||||||
if (errorLoadingData)
|
if (errorLoadingData)
|
||||||
return;
|
return;
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user