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:
24
linux
24
linux
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user