X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=build.sh;h=5c72dd35a66e20f4e36d67ace43c4e949d53fd9c;hb=5ecf9cca8b5b9bf876d7e7c7fde03d5b187bb42b;hp=55c61df67f3b2c81e0004a8d1f6e572d09aaed04;hpb=ef20eba54785473caa827c09acf27607f927b990;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/build.sh b/build.sh index 55c61df..5c72dd3 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,6 @@ #!/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 @@ -17,7 +18,7 @@ _linux_folder="bin/linux" _linux_server_folder="bin/linux_server" _windows_compiler="i686-w64-mingw32-gcc" -_windows_linkgraphics="-lglfw3dll -lopengl32 -lm -mwindows" +_windows_linkgraphics="-lglfw3dll -lopengl32 -lm -pthread -static -mwindows" _windows_asan="" _windows_linksteam="vg/dep/steam/steam_api.dll" _windows_folder="bin/win32" @@ -72,9 +73,13 @@ delay_run_game(){ } link_content(){ - ln -sr bin/content/textures/ $1/textures - ln -sr bin/content/models/ $1/models - ln -sr bin/content/sound/ $1/sound + unlink $1/textures + unlink $1/models + unlink $1/sound + + ln -srf bin/content/textures $1/textures + ln -srf bin/content/models $1/models + ln -srf bin/content/sound $1/sound } TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S` @@ -143,10 +148,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" @@ -154,6 +161,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 @@ -181,7 +202,7 @@ vg_command(){ run_command game run_command server ;; - distribution) + disb) mkdir -p ./dist run_command release run_command tools @@ -190,7 +211,9 @@ vg_command(){ run_command content run_command textures run_command server + ;; + distribution) titleit "Compressing distributions" logit "Linux" tar -chzvf dist/skaterift_linux__$TIMESTAMP.tar.gz bin/linux/ @@ -198,21 +221,34 @@ vg_command(){ tar -chzvf dist/skaterift_server__$TIMESTAMP.tar.gz bin/linux_server logit "Windows" tar -chzvf dist/skaterift_win32__$TIMESTAMP.tar.gz bin/win32/ + zip -r9 dist/skaterift_win32__$TIMESTAMP.zip bin/win32/ ;; # Runners # ======================================================================== 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