From 5089843a4e3e15d035312df8367ef4d81f8a1159 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sun, 15 Dec 2019 11:32:27 -0800 Subject: [PATCH] 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 --- release/{linux_or_mac.sh => linux.sh} | 7 ++----- release/mac.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) rename release/{linux_or_mac.sh => linux.sh} (71%) create mode 100755 release/mac.sh diff --git a/release/linux_or_mac.sh b/release/linux.sh similarity index 71% rename from release/linux_or_mac.sh rename to release/linux.sh index cd1d153e18..8563c869c1 100755 --- a/release/linux_or_mac.sh +++ b/release/linux.sh @@ -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 diff --git a/release/mac.sh b/release/mac.sh new file mode 100755 index 0000000000..4fd9067a29 --- /dev/null +++ b/release/mac.sh @@ -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