Skip to content

Commit c166b63

Browse files
dont statically link raylib on windows, but do statically link vcruntime
1 parent 477d61c commit c166b63

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ cp -R lib/* gen/
1010
cp raylib.h gen/com/raylib
1111
cd gen
1212
echo "STEP 2 - compile Raylib.java"
13-
java -jar ../javacpp.jar -nodelete com/raylib/Raylib.java
13+
java -jar ../javacpp.jar -Dplatform.compiler.foo='// /Oi /O2 /EHsc /Gy /GL /MT /LD' -nodelete com/raylib/Raylib.java
14+
# /Oi /O2 /MD /LD /link /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /NODEFAULTLIB:MSVCRTD'
1415
cd ..
1516
echo "STEP 3 - move compilation results from gen folder to build folder"
1617
mkdir -p build/com/raylib
@@ -19,7 +20,7 @@ mkdir -p build/com/raylib/macosx-x86_64
1920
mkdir -p build/com/raylib/linux-x86_64
2021
# rm gen/com/raylib/Raylib.java
2122
mv -f gen/com/raylib/*.class build/com/raylib/
22-
mv -f gen/com/raylib/windows-x86_64/* build/com/raylib/windows-x86_64/
23+
mv -f gen/com/raylib/windows-x86_64/*.dll build/com/raylib/windows-x86_64/
2324
mv -f gen/com/raylib/macosx-x86_64/* build/com/raylib/macosx-x86_64/
2425
mv -f gen/com/raylib/linux-x86_64/* build/com/raylib/linux-x86_64/
2526
echo "STEP 4 - unzip javacpp.jar"
@@ -33,4 +34,3 @@ javac -cp ../build com/raylib/*.java -d ../build
3334
cd ..
3435
echo "STEP 6 - uber jar archive"
3536
jar cf jaylib.jar -C build .
36-
#sleep 100
165 KB
Binary file not shown.

src/com/raylib/RaylibConfig.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,22 @@
1212
@Platform(
1313
value = {"windows-x86_64"},
1414
linkpath = {"C:\\Users\\Richard\\jaylib\\lib\\windows"},
15+
//link = {"winmm", "OpenGL32","user32","shell32","gdi32","raylib_static"},
1516
link = {"raylib"},
16-
//preloadpath={"..\\lib\\windows"},
17-
//resource = {"jniRaylib.dll"},
1817
preloadpath = {"C:\\Users\\Richard\\jaylib\\lib\\windows"},
1918
includepath = {"C:\\Users\\Richard\\jaylib"},
2019
include = {"raylib.h"},
21-
preload={"raylib"}
20+
preload={"raylib"},
21+
compiler = {"!default","foo"}
2222
),
2323
@Platform(
2424
value = {"macosx-x86_64"},
2525
linkpath = {"/Users/richard/IdeaProjects/jaylib/lib/mac"},
2626
link = {"raylib"},
2727
includepath = {"/Users/richard/IdeaProjects/jaylib"},
28-
//preloadpath = {"/path/to/deps/"},
2928
include = {"raylib.h"}
30-
//preload = {"DependentLib"},
3129
),
3230

33-
3431
@Platform(
3532
value = {"linux-x86_64"},
3633
linkpath = {"/home/richard/jaylib/lib/linux", "/usr/lib/x86_64-linux-gnu"},

0 commit comments

Comments
 (0)