added tinyfiledialogs as a submodule & updated the build scripts for linux/mac
This commit is contained in:
parent
04a472874d
commit
3dc7d72a50
6 changed files with 16 additions and 7 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -15,4 +15,5 @@ linux
|
|||
|
||||
build/
|
||||
build_generator/
|
||||
ols.json
|
||||
ols.json
|
||||
libtinyfiledialogs.a
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -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
0
scripts/build_debug.sh
Normal file → Executable file
4
scripts/build_hot_reload.sh
Normal file → Executable file
4
scripts/build_hot_reload.sh
Normal file → Executable 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
7
src/dialog/build.sh
Executable 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
|
||||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue