Added filesystem stuff on Linux

More includes for Linux
Update build script to copy assets and compile shaders
Added base code directory as include path
Added FS_SystemPath
Made asset loading work directory agnostic
This commit is contained in:
2025-10-04 23:46:13 +01:00
parent e4c1bc0a1c
commit dd316664f6
7 changed files with 278 additions and 18 deletions

24
linux
View File

@@ -12,6 +12,7 @@ pushd "build" > /dev/null
release=0
deps=0
assets=0
for a in $*
do
@@ -23,6 +24,11 @@ then
deps=1
fi
if [[ ! -d "assets" ]]
then
assets=1
fi
if [[ $deps == 1 ]]
then
# We don't build SDL3 like on windows, this assumes you have it installed instead. We can't
@@ -35,10 +41,24 @@ then
cp ../thirdparty/stb/*.h deps/stb
fi
if [[ $assets == 1 ]]
then
echo "[Copying assets]"
cp -r "../assets" .
fi
echo "[Building shaders]"
[[ ! -d "assets/shaders" ]] && mkdir "assets/shaders"
glslangValidator -o "assets/shaders/basic.vert.spv" --target-env "vulkan1.3" "../code/vulkan/shaders/basic.vert"
glslangValidator -o "assets/shaders/basic.frag.spv" --target-env "vulkan1.3" "../code/vulkan/shaders/basic.frag"
echo "[Building source]"
COMPILER_OPTS="-Wall -Wno-missing-braces -Wno-unused-function -I'deps/stb'"
LINKER_OPTS="-lSDL3"
COMPILER_OPTS="-Wall -Wno-missing-braces -Wno-unused-function -Ideps/stb -I../code"
LINKER_OPTS="-lSDL3 -lm"
if [[ $release == 1 ]]
then