From 51b278c58a57a4a5b6b4f55281d8f07ad54b2921 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 20 Aug 2015 13:49:33 +0200 Subject: [PATCH 1/3] Add build_nonet to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9a83493328..9ec4db8c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ local.properties [Rr]elease/ x64/ build/ +build_nonet/ [Bb]in/ [Oo]bj/ From 27df5375591cbecda6d8b38554cf36668cc5ae49 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 20 Aug 2015 20:05:18 +0200 Subject: [PATCH 2/3] Use wildcard to include all differing build configurations --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9ec4db8c1b..5899e73e20 100644 --- a/.gitignore +++ b/.gitignore @@ -64,7 +64,7 @@ local.properties [Rr]elease/ x64/ build/ -build_nonet/ +build_*/ [Bb]in/ [Oo]bj/ From 903fba2747cf0ddf6bab0c622d2d301d16b7c38b Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 20 Aug 2015 20:48:22 +0200 Subject: [PATCH 3/3] Only build the nonet version if specified --- build.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/build.sh b/build.sh index baea40c003..8ad2585903 100755 --- a/build.sh +++ b/build.sh @@ -2,14 +2,22 @@ set -e +nonet=false; + +if [[ "$1" = "--include-nonet" ]]; then + nonet=true +fi + cachedir=.cache mkdir -p $cachedir if [[ ! -d build ]]; then mkdir -p build fi -if [[ ! -d build_nonet ]]; then - mkdir -p build_nonet +if [[ $nonet = true ]]; then + if [[ ! -d build_nonet ]]; then + mkdir -p build_nonet + fi fi libversion=2 @@ -61,10 +69,12 @@ pushd build cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Debug .. make popd -pushd build_nonet - cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON .. - make -popd +if [[ $nonet = true ]]; then + pushd build_nonet + cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Debug -DDISABLE_NETWORK=ON .. + make + popd +fi if [[ ! -h openrct2.dll ]]; then ln -s build/openrct2.dll openrct2.dll