summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/linux-remote.bat5
-rw-r--r--build/linux-remote.expect49
-rw-r--r--build/pkg-debian.sh7
-rw-r--r--build/pkg-ubuntu-10.10-x64.sh7
-rw-r--r--build/pkg-ubuntu-10.10.sh7
-rw-r--r--build/pkg-win32.bat37
-rwxr-xr-xbuild/pkg-win32.sh (renamed from build/linux-remote.sh)8
7 files changed, 90 insertions, 30 deletions
diff --git a/build/linux-remote.bat b/build/linux-remote.bat
deleted file mode 100644
index bbf03d44..00000000
--- a/build/linux-remote.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-mkdir linux-remote
-cd linux-remote
-cmake ..\.. -G"Visual Studio 10"
-msbuild ALL_BUILD.vcxproj /p:Configuration=Release
-echo FINISHED_BUILD \ No newline at end of file
diff --git a/build/linux-remote.expect b/build/linux-remote.expect
index c694a755..18fcdc8b 100644
--- a/build/linux-remote.expect
+++ b/build/linux-remote.expect
@@ -16,25 +16,40 @@ expect {
return 1
}
+# procedure to do build stuff; result 0 if OK, 1 otherwise
+proc dobuild {} {
+ set timeout -1
+ send "pkg-win32.bat\r\n"
+ puts "\nBuilding...\n"
+expect {
+ "BUILD OK" {return 0}
+ "MSVC ERROR" {return 1}
+ "CMAKE ERROR" {return 1}
+ "ENV ERROR" {return 1}
+}
+}
+
spawn telnet win7
set rez [connect]
-if { $rez == 0 } {
- send "net use X: \\\\vboxsvr\\projects\r\n"
- expect "The command completed successfully."
- send "X:\r\n"
- expect "X:"
- send "cd X:\\dfhack\\build\r\n"
- expect "build"
- send "\"C:\\Program Files (x86)\\MSVC10\\VC\\vcvarsall.bat\" x86\r\n"
- expect "build"
- set timeout -1
- send "linux-remote.bat\r\n"
- # can detect build errors here, pass them out using 'exit'
- expect "FINISHED_BUILD"
- send "exit\r"
- expect eof
- exit 0
-}
+if { $rez == 1 } {
puts "\nError connecting to server!\n"
exit 1
+}
+
+send "net use X: \\\\vboxsvr\\projects\r\n"
+expect "The command completed successfully."
+send "X:\r\n"
+expect "X:"
+send "cd X:\\dfhack\\build\r\n"
+expect "build"
+
+set buildrez [dobuild]
+if { $buildrez == 1 } {
+ puts "\nThere was an error during build.\n"
+} else {
+ puts "\nAll OK.\n"
+}
+send "exit\r"
+expect eof
+exit $buildrez
diff --git a/build/pkg-debian.sh b/build/pkg-debian.sh
new file mode 100644
index 00000000..6d3bce5d
--- /dev/null
+++ b/build/pkg-debian.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+rm -r debian
+mkdir debian
+cd debian
+cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="debian" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
+make package
+mv *.deb ../ \ No newline at end of file
diff --git a/build/pkg-ubuntu-10.10-x64.sh b/build/pkg-ubuntu-10.10-x64.sh
new file mode 100644
index 00000000..5f4e17b3
--- /dev/null
+++ b/build/pkg-ubuntu-10.10-x64.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+rm -r ubuntu64
+mkdir ubuntu64
+cd ubuntu64
+cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="ubuntu-10.10" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DDFHACK_PACKAGE_DIR=".." -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
+make package
+mv *.deb ../ \ No newline at end of file
diff --git a/build/pkg-ubuntu-10.10.sh b/build/pkg-ubuntu-10.10.sh
new file mode 100644
index 00000000..01baab90
--- /dev/null
+++ b/build/pkg-ubuntu-10.10.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+rm -r ubuntu
+mkdir ubuntu
+cd ubuntu
+cmake ../.. -DCMAKE_BUILD_TYPE="Release" -DDFHACK_INSTALL="ubuntu-10.10" -DMEMXML_DATA_PATH="/usr/share/dfhack" -DDFHACK_PACKAGE_DIR=".." -DBUILD_DFHACK_C_BINDINGS=ON -DBUILD_DFHACK_DEVEL=ON -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=ON
+make package
+mv *.deb ../
diff --git a/build/pkg-win32.bat b/build/pkg-win32.bat
new file mode 100644
index 00000000..ff71e974
--- /dev/null
+++ b/build/pkg-win32.bat
@@ -0,0 +1,37 @@
+@ECHO OFF
+rd /S /Q MSVC10
+mkdir MSVC10
+cd MSVC10
+echo CLEANUP DONE
+
+cmake ..\.. -G"Visual Studio 10" -DDFHACK_INSTALL="portable" -DMEMXML_DATA_PATH="." -DBUILD_DFHACK_C_BINDINGS=OFF -DBUILD_DFHACK_DEVEL=OFF -DBUILD_DFHACK_DOXYGEN=OFF -DBUILD_DFHACK_EXAMPLES=OFF -DBUILD_DFHACK_PLAYGROUND=OFF -DBUILD_DFHACK_PYTHON_BINDINGS=OFF > ..\pkg-win32-cmake.log
+if errorlevel 1 goto cmakeerror
+echo CMAKE OK
+
+call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" > ..\pkg-win32-env.log
+if errorlevel 1 goto enverror
+echo ENV OK
+
+msbuild PACKAGE.vcxproj /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=..\pkg-win32-msbuild.log;encoding=utf-8 -noconsolelogger > NUL
+if errorlevel 1 goto msvcerror
+move /Y *.zip ..
+echo BUILD OK
+set errorlevel=0
+goto end
+
+:cmakeerror
+echo CMAKE ERROR
+set errorlevel=1
+goto end
+
+:enverror
+echo ENV ERROR
+set errorlevel=1
+goto end
+
+:msvcerror
+echo MSVC ERROR
+set errorlevel=1
+goto end
+
+:end \ No newline at end of file
diff --git a/build/linux-remote.sh b/build/pkg-win32.sh
index 333e682b..6e81264f 100755
--- a/build/linux-remote.sh
+++ b/build/pkg-win32.sh
@@ -12,11 +12,3 @@ VBoxManage startvm "7 Prof"
sleep 20
expect linux-remote.expect $TARGET
-echo "Creating package..."
-cd ../output/$TARGET
-rm -r $PKG
-rm $PKG.zip
-mkdir $PKG
-mv *.exe *.dll *.html *.txt *.xml $PKG
-zip -r $PKG.zip $PKG
-echo "DONE"