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 +