From 71e79b5ed7d33f8e62d272a9c27cdc58e7bdd2b7 Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 3 May 2007 12:00:00 +0000 Subject: [PATCH] - New build thing --- src/build-unix-both.sh | 12 ---------- src/build.sh | 16 ++++++++++++++ ...universal.sh => subbuild-mac-universal.sh} | 10 +++++++-- src/subbuild-unix-both.sh | 22 +++++++++++++++++++ 4 files changed, 46 insertions(+), 14 deletions(-) delete mode 100755 src/build-unix-both.sh create mode 100755 src/build.sh rename src/{build-mac-universal.sh => subbuild-mac-universal.sh} (69%) create mode 100755 src/subbuild-unix-both.sh diff --git a/src/build-unix-both.sh b/src/build-unix-both.sh deleted file mode 100755 index 94103ba..0000000 --- a/src/build-unix-both.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# Default flags -CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release" - -# Make for windows and linux -cmake $CMFLAGS -D TARGETOS=Win32 . && make -cmake $CMFLAGS . && make - -# Copy to the correct locations -./copy2gui.sh - diff --git a/src/build.sh b/src/build.sh new file mode 100755 index 0000000..c68c94e --- /dev/null +++ b/src/build.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +PLATFORM=`uname` +echo $PLATFORM +if [ "$PLATFORM" = "Darwin" ] +then + ./subbuild-mac-universal.sh +else + if [ "$PLATFORM" = "Linux" ] + then + ./subbuild-unix-both.sh + else + echo "I don't know platform $PLATFORM, so I won't do anything" + fi +fi + diff --git a/src/build-mac-universal.sh b/src/subbuild-mac-universal.sh similarity index 69% rename from src/build-mac-universal.sh rename to src/subbuild-mac-universal.sh index 17ad051..cec54e9 100755 --- a/src/build-mac-universal.sh +++ b/src/subbuild-mac-universal.sh @@ -8,6 +8,12 @@ cmake $CMFLAGS -D TARGETOS=MacPPC . && make cmake $CMFLAGS -D TARGETOS=MacIntel . && make cmake $CMFLAGS . && make scyther-mac -# Copy to the correct locations -./copy2gui.sh +echo +echo +echo "Built the Mac universal binary" + +# Copy to the correct locations +cp scyther-mac ../gui/Scyther/Bin + +echo Copied the files to their respective locations diff --git a/src/subbuild-unix-both.sh b/src/subbuild-unix-both.sh new file mode 100755 index 0000000..ae906a2 --- /dev/null +++ b/src/subbuild-unix-both.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Default flags +CMFLAGS="-D CMAKE_BUILD_TYPE:STRING=Release" + +# Make for windows and linux +cmake $CMFLAGS -D TARGETOS=Win32 . && make +cmake $CMFLAGS . && make + +echo +echo +echo "Built the Linux and Windows binaries" + +# Copy to the correct locations +cp scyther-linux ../gui/Scyther/Bin +cp scyther-w32.exe ../gui/Scyther/Bin + +# bonus... +cp scyther-linux ~/bin + +echo Copied the files to their respective locations and ~/bin +