use a different method for compiling linux binaries, to try to deal with #17. and update mac release script to reflect my convoluted process of building the binary on another machine, then copying it over

This commit is contained in:
Dustin Carlino 2019-12-15 11:32:27 -08:00
parent 97c8a84efb
commit 5089843a4e
2 changed files with 23 additions and 5 deletions

View File

@ -10,9 +10,6 @@ if [ "$version" == "" ]; then
fi
OUT="abstreet_linux_$version"
if [[ "$OSTYPE" == "darwin"* ]]; then
OUT="abstreet_mac_$version"
fi
source release/common.sh
common_release $OUT
@ -20,8 +17,8 @@ common_release $OUT
cp release/play_abstreet.sh $OUT
mkdir $OUT/game
cargo build --release --bin game
cp target/release/game $OUT/game
cross build --release --target x86_64-unknown-linux-gnu --bin game
cp target/x86_64-unknown-linux-gnu/release/game $OUT/game
cp -Rv game/assets $OUT/game
zip -r $OUT $OUT

21
release/mac.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Call from project root directory: ./release/mac.sh
set -e
version=$1;
if [ "$version" == "" ]; then
echo Gimme version number
exit 1
fi
OUT="abstreet_mac_$version"
dtrx abstreet_linux_$version.zip
mv abstreet_linux_$version $OUT
rm -fv $OUT/game/game
cp /media/dabreegster/PATRIOTUSB/game $OUT/game
chmod +x $OUT/game/game
zip -r $OUT $OUT
rm -rf $OUT