X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=build.sh;h=bb59b6faf6ff3f181f6d46a43ac738727559dc09;hb=d00b1df8f80e4714dc2f9aa2189d242bb4d09a2f;hp=d7ea276397084ac89b6e5144db45787f48d2e3f7;hpb=b8ce05b34d018f52a190b6be837f9693a983b771;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/build.sh b/build.sh index d7ea276..bb59b6f 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,12 @@ #!/bin/bash -# Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved - +# +# Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved +# +# Main cross-compiling build script for Skate Rift +# Supports Linux and Windows building from a Linux Host +# +# vg must be "ln -s"'d into this src folder as the only dependency +# # Compiler Presets # ============================================================================== @@ -66,23 +72,6 @@ delay_run_game(){ run_game } -#TODO: Make this a seperate script -# it should not be called compile, rename to 'generate' shader headers, -# its a code writing tool, not a compiling tool -# -target_shaders="" -shader(){ - target_shaders="$target_shaders $1 $2 $3" -} - -compile_shaders(){ - titleit "Compiling shaders" - source shaders.sh - cd shaders - ../bin/linux/tools/shader $target_shaders - cd .. -} - link_content(){ ln -sr bin/content/textures/ $1/textures ln -sr bin/content/models/ $1/models @@ -118,7 +107,6 @@ vg_command(){ _folder=$_linux_folder _ext="" vg_compile_tools - compile_shaders # Main build _link="$_linux_linkgraphics $_linux_linksteam" @@ -156,10 +144,12 @@ vg_command(){ # Dependencies cp vg/dep/steam/steamclient.so bin/linux_server/ + cp vg/dep/steam/libsteam_api.so bin/linux_server/ + cp vg/dep/steam/libsdkencryptedappticket.so bin/linux_server/ _compiler=$_linux_compiler _options=$_linux_options - _link="-lm $_linux_linksteam" + _link="-pthread -lm -lsdkencryptedappticket $_linux_linksteam" _src="server.c" _folder=$_linux_server_folder _dst="skaterift_server" @@ -167,6 +157,20 @@ vg_command(){ compile_x ;; + testaa) + titleit "Dev" + mkdir -p bin/aatest/cfg + + _compiler=$_linux_compiler + _options=$_linux_options + _link="-lm" + _src="testaa.c" + _folder=bin/aatest + _dst="testaa" + _ext="" + + compile_x + ;; #TODO: These are not cross platform in the build script, a full build # from source is therefore not possible on windows, only a linux @@ -217,15 +221,27 @@ vg_command(){ test) run_game ;; + testserver) + run_server + ;; testnet) delay_run_game & run_server wait ;; + aa) + run_command testaa + cd bin/aatest + ./testaa + cd ./../ + ;; *) echo "Unrecognised command $1" esac } +lsan_file=$(realpath ".lsan_suppress.txt") +export LSAN_OPTIONS="suppressions=$lsan_file" + vg_command debug source vg/vg_build.sh