From c40ed08406f781a82e972d65ae5bf55a34613a93 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 1 Oct 2015 13:17:49 +0900 Subject: [PATCH 1/3] Fix sha256sum generation on OS X. --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index eb19e49d5e..cc556be8d6 100755 --- a/install.sh +++ b/install.sh @@ -197,7 +197,11 @@ fi download_libs # mind the gap (trailing space) -sha256sum $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile +if [[ `uname` == "Darwin" ]]; then + shasum -a 256 $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile +else + sha256sum $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile +fi echo "Downloaded library with sha256sum: $(cat $libVFile)" # Local libs are required for all targets install_local_libs From aa0ab945ce99e66e2ff8f3b38c887db6b7416301 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 4 Nov 2015 18:55:59 +0900 Subject: [PATCH 2/3] Replaced backticks with POSIX style commands. --- build.sh | 6 +++--- install.sh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index 90e2178542..6bdf0829f1 100755 --- a/build.sh +++ b/build.sh @@ -54,9 +54,9 @@ pushd build echo OPENRCT2_CMAKE_OPTS = $OPENRCT2_CMAKE_OPTS if [[ $TARGET == "docker32" ]] then - PARENT=`readlink -f ../` - chmod a+rwx `pwd` - chmod g+s `pwd` + PARENT=$(readlink -f ../) + chmod a+rwx $(pwd) + chmod g+s $(pwd) docker run -u travis -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:32bit-only bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && make" else cmake -DCMAKE_BUILD_TYPE=Debug $OPENRCT2_CMAKE_OPTS .. diff --git a/install.sh b/install.sh index cc556be8d6..fe2a71da27 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ cachedir=.cache liburl=https://openrct.net/launcher/libs/orctlibs.zip mkdir -p $cachedir -echo `uname` +echo $(uname) # Sets default target to "linux", if none specified TARGET=${TARGET-linux} @@ -104,7 +104,7 @@ function install_local_libs { echo TARGET = $TARGET -if [[ `uname` == "Darwin" ]]; then +if [[ $(uname) == "Darwin" ]]; then echo "Installation of OpenRCT2 assumes you have homebrew and use it to install packages." echo "Check if brew is installed" @@ -162,7 +162,7 @@ if [[ `uname` == "Darwin" ]]; then popd popd fi -elif [[ `uname` == "Linux" ]]; then +elif [[ $(uname) == "Linux" ]]; then if [[ -z "$TRAVIS" ]]; then sudo apt-get install -y binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 cmake if [[ -z "$DISABLE_G2_BUILD" ]]; then @@ -197,7 +197,7 @@ fi download_libs # mind the gap (trailing space) -if [[ `uname` == "Darwin" ]]; then +if [[ $(uname) == "Darwin" ]]; then shasum -a 256 $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile else sha256sum $cachedir/orctlibs.zip | cut -f1 -d\ > $libVFile From 36f5d089dfd6181cf495259a11b60e8c116d6b46 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 4 Nov 2015 18:57:13 +0900 Subject: [PATCH 3/3] Add OS X as a platform. --- src/rct2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rct2.h b/src/rct2.h index 0cc0d9c83a..9a98d84e81 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -91,6 +91,9 @@ typedef utf16* utf16string; #ifdef __linux__ #define OPENRCT2_PLATFORM "Linux" #endif +#ifdef __APPLE__ + #define OPENRCT2_PLATFORM "OS X" +#endif #ifndef OPENRCT2_PLATFORM #error Unknown platform! #endif