Skip to content

Commit

Permalink
wip9
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeodrippe committed Jul 23, 2024
1 parent 010f44a commit 316eb43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: run test
run: |
bash -c "bin/kaocha"
clojure -M:dev -m vybe.native.loader && clojure -M:test
build-linux:
runs-on: ubuntu-latest
Expand Down
10 changes: 9 additions & 1 deletion bin/jextract-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

set -ex

# WINDOWS OPTIONS
VYBE_GCC_RAYLIB="raylib/src/rcore.o raylib/src/rshapes.o raylib/src/rtextures.o raylib/src/rtext.o raylib/src/utils.o raylib/src/rglfw.o raylib/src/rmodels.o raylib/src/raudio.o raylib/src/raylib.dll.rc.data -Lraylib/src raylib/src/libraylibdll.a -static-libgcc -lopengl32 -lgdi32 -lwinmm"

VYBE_GCC_JOLT="-Wl,--out-implib,zig-gamedev/libs/zphysics/zig-out/lib/joltc.lib"
VYBE_JOLT_EXTENSION="lib"

VYBE_ZIG_BUILD="zig build-dll -dynamic"
# END OF WINDOWS OPTIONS

unameOut="$(uname -s)"
case "${unameOut}" in
Linux*)
Expand All @@ -17,6 +21,7 @@ case "${unameOut}" in
VYBE_GCC_RAYLIB="";
VYBE_GCC_JOLT="";
VYBE_JOLT_EXTENSION="so";
VYBE_ZIG_BUILD="zig build";
VYBE_LIB_PREFIX="lib";;
Darwin*)
VYBE_EXTENSION=dylib;
Expand All @@ -26,6 +31,7 @@ case "${unameOut}" in
VYBE_GCC_RAYLIB="";
VYBE_GCC_JOLT="";
VYBE_JOLT_EXTENSION="dylib";
VYBE_ZIG_BUILD="zig build";
VYBE_LIB_PREFIX="lib";;
CYGWIN*)
VYBE_EXTENSION=dll;
Expand Down Expand Up @@ -64,7 +70,7 @@ touch native/keep
echo "Extracting Jolt Physics"

cd zig-gamedev/libs/zphysics && \
zig build && \
$VYBE_ZIG_BUILD && \
cd - && \
ls zig-gamedev/libs/zphysics/zig-out/lib && \
cp "zig-gamedev/libs/zphysics/zig-out/lib/${VYBE_LIB_PREFIX}joltc.$VYBE_JOLT_EXTENSION" "native/${VYBE_LIB_PREFIX}joltc_zig.$VYBE_JOLT_EXTENSION"
Expand Down Expand Up @@ -124,3 +130,5 @@ $VYBE_JEXTRACT \
--output src-java \
--header-class-name raylib \
-t org.vybe.raylib bin/vybe_raylib.c

ls -lh native

0 comments on commit 316eb43

Please sign in to comment.