summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-28 20:37:00 +0300
committerAndrei Karas <akaras@inbox.ru>2011-03-29 02:02:54 +0300
commit835db97c56850ad0ee9084c2b1f792f51006ae9b (patch)
tree45df0af5356fce55d7380a6f06fdd32638a44f70
parent4c1c22e62b8d713db30c2ac54fdb025bdfe53836 (diff)
downloadplus-835db97c56850ad0ee9084c2b1f792f51006ae9b.tar.gz
plus-835db97c56850ad0ee9084c2b1f792f51006ae9b.tar.bz2
plus-835db97c56850ad0ee9084c2b1f792f51006ae9b.tar.xz
plus-835db97c56850ad0ee9084c2b1f792f51006ae9b.zip
Add nightly build scripts.
-rwxr-xr-xnightly/buildlinux.sh22
-rwxr-xr-xnightly/buildwindows.sh18
-rwxr-xr-xnightly/runme.sh6
-rw-r--r--toolchain.nightly33
4 files changed, 79 insertions, 0 deletions
diff --git a/nightly/buildlinux.sh b/nightly/buildlinux.sh
new file mode 100755
index 000000000..78ac6a4c1
--- /dev/null
+++ b/nightly/buildlinux.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cd ..
+
+DIR=`pwd`
+DSTDIR=packaging/build/linux
+
+autoreconf -i
+#make clean
+./configure
+make
+
+if [ -e src/manaplus ];
+then
+ strip src/manaplus
+ rm -rf $DSTDIR
+ mkdir -p $DSTDIR
+ cp -r data $DSTDIR
+ mkdir -p $DSTDIR/bin
+ cp src/manaplus $DSTDIR/bin
+ cp nightly/runme.sh $DSTDIR
+fi
diff --git a/nightly/buildwindows.sh b/nightly/buildwindows.sh
new file mode 100755
index 000000000..ede9f0f04
--- /dev/null
+++ b/nightly/buildwindows.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+dir=`pwd`
+
+cd ..
+export PATH=/usr/i586-mingw32msvc/bin:$PATH
+CXXFLAGS="-Wall -g0 -O2" cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain.nightly .
+
+make -j5 2>make.log
+
+cd ./packaging/windows
+./make-translations.sh
+makensis -DDLLDIR=$dir/../packaging/windows/libs/dll/ \
+ -DPRODUCT_VERSION="nightly-$1" \
+ -DEXESUFFIX=/src \
+ -DUPX=true \
+ setup.nsi
+
diff --git a/nightly/runme.sh b/nightly/runme.sh
new file mode 100755
index 000000000..5f3f4abe8
--- /dev/null
+++ b/nightly/runme.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+DIR=$(dirname "$(readlink -f $0)")
+cd "$DIR"
+export LD_LIBRARY_PATH="$DIR"/libs/:$LD_LIBRARY_PATH
+./bin/manaplus
diff --git a/toolchain.nightly b/toolchain.nightly
new file mode 100644
index 000000000..c83d9b0c7
--- /dev/null
+++ b/toolchain.nightly
@@ -0,0 +1,33 @@
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# toolchain prefix, can be overridden by -DTOOLCHAIN=...
+# IF (NOT TOOLCHAIN)
+SET(TOOLCHAIN "i586-mingw32msvc-")
+# ENDIF()
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER ${TOOLCHAIN}gcc)
+SET(CMAKE_CXX_COMPILER ${TOOLCHAIN}g++)
+SET(CMAKE_RC_COMPILER ${TOOLCHAIN}windres)
+
+SET(CMAKE_INSTALL_PREFIX ./win)
+SET(CMAKE_BUILD_TYPE RelWithDebInfo)
+
+SET(SDLIMAGE_INCLUDE_DIR ./packaging/windows/libs/include/SDL)
+SET(SDLMIXER_INCLUDE_DIR ./packaging/windows/libs/include/SDL)
+SET(SDLNET_INCLUDE_DIR ./packaging/windows/libs/include/SDL)
+SET(SDLTTF_INCLUDE_DIR ./packaging/windows/libs/include/SDL)
+SET(SDL_INCLUDE_DIR ./packaging/windows/libs/include/SDL)
+SET(ENABLE_MANASERV ON)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc ./packaging/windows/ )
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+