Skip to content

Commit

Permalink
Script changes to make it better to locally use
Browse files Browse the repository at this point in the history
  • Loading branch information
steamport committed Mar 29, 2019
1 parent 0db0e18 commit e897c87
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions buildscripts/Travis/build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
#!/bin/bash
IFS=' ' read -r -a _KSPVERS <<< "$KSPVERS"
IFS=' ' read -r -a _KSPBINS <<< "$KSPBINS"

for element in "${!_KSPVERS[@]}"
do
rm -rf "src/DLLs"
current_kspvr="${_KSPVERS[$element]}"
current_kspbin="${_KSPBINS[$element]}"
echo "Building for $current_kspvr / $current_kspbin"
filename="KSP-$current_kspvr.7z"
wget "https://img.steamport.xyz/$filename"
mkdir "src/DLLs"
7za x $filename -osrc/DLLs -pgQn337XZBEFxzFuVwzKgc27ehZo7XLz485hh3erqF9
bash "buildscripts/Travis/avc_to_assembly.sh"
msbuild /p:DefineConstants="KSP${current_kspbin}" Kerbalism.sln /t:Build /p:Configuration="Release"
/bin/cp -rf "src/KerbalismBootstrap/obj/Release/KerbalismBootstrap.dll" "GameData/Kerbalism/KerbalismBootstrap.dll"
/bin/cp -rf "src/Kerbalism/obj/Release/Kerbalism.dll" "GameData/Kerbalism/Kerbalism${current_kspbin}.bin"
rm -rf $filename
#!/bin/bash
export _KSPVERS=${_KSPVERS:-"1.6.1 1.5.1 1.4.5 1.3.1"}
export _KSPBINS=${_KSPBINS:-"16 15 14 13"}
export TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
IFS=' ' read -r -a _KSPVERS <<< "$KSPVERS"
IFS=' ' read -r -a _KSPBINS <<< "$KSPBINS"

for element in "${!_KSPVERS[@]}"
do
rm -rf "src/DLLs"
current_kspvr="${_KSPVERS[$element]}"
current_kspbin="${_KSPBINS[$element]}"
echo "Building for $current_kspvr / $current_kspbin"
filename="KSP-$current_kspvr.7z"
wget "https://img.steamport.xyz/$filename"
mkdir "src/DLLs"
7za x $filename -osrc/DLLs -pgQn337XZBEFxzFuVwzKgc27ehZo7XLz485hh3erqF9
bash "buildscripts/Travis/avc_to_assembly.sh"
msbuild /p:DefineConstants="KSP${current_kspbin}" Kerbalism.sln /t:Build /p:Configuration="Release"
/bin/cp -rf "src/KerbalismBootstrap/obj/Release/KerbalismBootstrap.dll" "GameData/Kerbalism/KerbalismBootstrap.dll"
/bin/cp -rf "src/Kerbalism/obj/Release/Kerbalism.dll" "GameData/Kerbalism/Kerbalism${current_kspbin}.bin"
rm -rf $filename
done

0 comments on commit e897c87

Please sign in to comment.