Merge branch 'master' of stefanstefanov.eu:bersk/yaap

This commit is contained in:
Stefan Stefanov 2024-04-22 16:09:24 +03:00
commit 73202f5dfc
6 changed files with 16 additions and 7 deletions

3
.gitignore vendored
View file

@ -15,4 +15,5 @@ linux
build/
build_generator/
ols.json
ols.json
libtinyfiledialogs.a

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "src/aseprite"]
path = src/aseprite
url = https://github.com/bersK/odin-aseprite.git
[submodule "src/dialog/libtinyfiledialogs"]
path = src/dialog/libtinyfiledialogs
url = https://github.com/native-toolkit/libtinyfiledialogs.git

0
scripts/build_debug.sh Normal file → Executable file
View file

4
scripts/build_hot_reload.sh Normal file → Executable file
View file

@ -36,10 +36,10 @@ case $(uname) in
esac
# Build the game.
odin build . -use-separate-modules -extra-linker-flags:"$EXTRA_LINKER_FLAGS" -show-timings -define:RAYLIB_SHARED=true -build-mode:dll -out:build/game_tmp$DLL_EXT -debug $VET
odin build src -use-separate-modules -extra-linker-flags:"$EXTRA_LINKER_FLAGS" -show-timings -define:RAYLIB_SHARED=true -build-mode:dll -out:build/game_tmp$DLL_EXT -debug $VET
# Need to use a temp file on Linux because it first writes an empty `game.so`, which the game will load before it is actually fully written.
mv game_tmp$DLL_EXT game$DLL_EXT
mv ./build/game_tmp$DLL_EXT ./build/game$DLL_EXT
# Do not build the game.bin if it is already running.
if ! pgrep game.bin > /dev/null; then

7
src/dialog/build.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
gcc ./libtinyfiledialogs/tinyfiledialogs.c -c -o libtinyfiledialogs.o
ar rcs libtinyfiledialogs.a libtinyfiledialogs.o
rm libtinyfiledialogs.o

View file

@ -4,10 +4,8 @@ import "core:c"
when ODIN_OS == .Windows {
foreign import lib {"tinyfiledialogs.lib", "system:comdlg32.lib", "system:Ole32.lib"}
}
when ODIN_OS == .Linux {
foreign import lib {"libtinyfiledialogs.a"}
} else when ODIN_OS == .Linux || ODIN_OS == .Darwin {
foreign import lib "libtinyfiledialogs.a"
}
foreign lib {