summaryrefslogtreecommitdiffstats
path: root/contrib/local/build-windows.expect
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/local/build-windows.expect')
-rwxr-xr-xcontrib/local/build-windows.expect202
1 files changed, 0 insertions, 202 deletions
diff --git a/contrib/local/build-windows.expect b/contrib/local/build-windows.expect
deleted file mode 100755
index 27ab7c0..0000000
--- a/contrib/local/build-windows.expect
+++ /dev/null
@@ -1,202 +0,0 @@
-#!/usr/bin/expect
-
-set timeout 600
-set USCXML_BUILD_HOST $::env(USCXML_BUILD_HOST)
-set USCXML_BUILD_ARCH $::env(USCXML_BUILD_ARCH)
-
-
-set local_prompt {sradomski$ }
-set initial_remote_prompt "C*>"
-# the default windows prompt is hard to recognize
-set remote_prompt "easy_to_recognize"
-
-eval spawn ping -c1 ${USCXML_BUILD_HOST}.local.
-expect "cannot resolve" { puts "Host ${USCXML_BUILD_HOST}.local. not found"; exit } \
- -re $local_prompt { }
-
-eval cd ~/Documents/TK/Code/
-
-##############################
-# prepare and deploy archive
-
-# check age of archive against modification date
-eval spawn find ./uscxml -newer uscxml-win.tar
-set redeploy 0;
-expect {
- "find:*No such file" { set redeploy 1; }
- -re ".cpp\r\n" { set redeploy 1; }
- -re "package\r\n" { set redeploy 1; }
- -re ".h\r\n" { set redeploy 1; }
- -re "CMakeLists.txt\r\n" { set redeploy 1; }
- -re $local_prompt { }
-}
-#set redeploy 0;
-
-if {$redeploy} {
-# eval spawn rm uscxml-win.tar
-# eval spawn tar --exclude='__*' --exclude=uscxml/contrib/prebuilt/darwin --exclude=uscxml/docs/html --exclude=uscxml/examples/ios --exclude=uscxml/contrib/archives --exclude=uscxml/.git --exclude=uscxml/build* --exclude=uscxml/lib/ios-5.0 --exclude=uscxml/lib/linux* --exclude=uscxml/lib/darwin* --exclude=uscxml/installer/uMundo* --exclude=uscxml/contrib/prebuilt/linux* --exclude=uscxml/contrib/prebuilt/ios -cf uscxml-win.tar uscxml/
-eval spawn rm uscxml-win.zip
-eval spawn zip -r uscxml-win.zip uscxml/ --exclude __\* uscxml/contrib/prebuilt/darwin\* uscxml/contrib/prebuilt/ios\* uscxml/contrib/prebuilt/linux\* uscxml/docs/html\* uscxml/examples/ios uscxml/contrib/archives\* uscxml/.git/\* uscxml/build\* uscxml/installer/uMundo* uscxml/contrib/prebuilt/linux*
- expect {
- "a uscxml/" { exp_continue }
- timeout { puts "Timeout when packaging source code"; exit; }
- -re $local_prompt { }
- }
-
-# eval spawn scp -4 uscxml-win.tar sradomski@${USCXML_BUILD_HOST}.local:\\uscxml-win.tar
- eval spawn scp -4 uscxml-win.zip sradomski@${USCXML_BUILD_HOST}.local:\\uscxml-win.zip
- expect {
- "ETA" { exp_continue }
- "The authenticity" { send "yes\n"; exp_continue; }
- timeout { puts "Timeout when uploading source code"; exit; }
- -re $local_prompt { }
- }
-}
-
-##############################
-# ssh into remote host
-
-eval spawn ssh -4 sradomski@${USCXML_BUILD_HOST}.local.
-expect {
- timeout { puts "Timeout when connecting to windows"; exit; }
- "The authenticity" { send "yes\n"; }
- -re $local_prompt { puts "Could not connect to remote host"; exit; }
- -re $initial_remote_prompt { }
-}
-
-send "set prompt=easy_to_recognize \r"
-expect -re $remote_prompt
-
-# unpack archive if required
-if {$redeploy} {
- send "rmdir \/S \/Q uscxml\r"
- expect -re $remote_prompt
-
-# send "tar xf uscxml-win.tar\r"
- send "unzip uscxml-win.zip\r"
- expect "uscxml/" { exp_continue } \
- -re $remote_prompt { }
-
-}
-
-# setup directories
-send "rmdir \/S \/Q build-uscxml\r"
-expect -re $remote_prompt
-send "mkdir build-uscxml\r"
-expect -re $remote_prompt
-send "cd build-uscxml\r"
-expect -re $remote_prompt
-
-##############################
-# start cmd.exe and prepare for compiling
-# send "cmd\n"
-# expect -re $cmd_prompt
-
-# "c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
-# send "\"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat x86_amd64\"\n"
-if { [string compare $USCXML_BUILD_ARCH 32] == 0 } {
- send "\"c:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\bin\\vcvars32.bat\"\r"
- expect -re $remote_prompt
-} else {
- send "\"c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\vcvarsall.bat\" x86_amd64\r"
- expect -re $remote_prompt
-}
-##############################
-# compile in debug configuration
-
-send "\"cmake.exe\" -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Debug -DDIST_PREPARE=ON ..\\uscxml\r"
-
-expect "download" { exp_continue } \
- -re $remote_prompt { }
-
-send "nmake\r"
-expect {
- "Building" { exp_continue; }
- "Linking" { exp_continue; }
- "fatal error" { exit }
- -re $remote_prompt { }
-}
-
-# send "nmake java\r"
-# expect {
-# "Building" { exp_continue; }
-# "Linking" { exp_continue; }
-# "fatal error" { exit }
-# -re $remote_prompt { }
-# }
-#
-# send "nmake csharp\r"
-# expect {
-# "Building" { exp_continue; }
-# "Linking" { exp_continue; }
-# "fatal error" { exit }
-# -re $remote_prompt { }
-# }
-
-##############################
-# compile in release configuration
-
-send "\"cmake\" -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Release -DDIST_PREPARE=ON ..\\uscxml\r"
-expect -re $remote_prompt
-
-send "nmake\n\r"
-expect {
- timeout { puts "Timeout when building"; exit; }
- "Building" { puts "Building"; exp_continue; }
- "Scanning" { puts "Scanning"; exp_continue; }
- "Linking" { puts "Linking"; exp_continue; }
- "fatal error" { puts "Dying"; exit; }
- -re $remote_prompt { puts "Continuing"; }
-}
-
-# send "nmake java\n\r"
-# expect {
-# timeout { puts "Timeout when building"; exit; }
-# "Building" { puts "Building"; exp_continue; }
-# "Scanning" { puts "Scanning"; exp_continue; }
-# "Linking" { puts "Linking"; exp_continue; }
-# "fatal error" { puts "Dying"; exit; }
-# -re $remote_prompt { puts "Continuing"; }
-# }
-#
-# send "nmake csharp\n\r"
-# expect {
-# timeout { puts "Timeout when building"; exit; }
-# "Building" { puts "Building"; exp_continue; }
-# "Scanning" { puts "Scanning"; exp_continue; }
-# "Linking" { puts "Linking"; exp_continue; }
-# "fatal error" { puts "Dying"; exit; }
-# -re $remote_prompt { puts "Continuing"; }
-# }
-
-send "cd ..\r"
-expect -re $remote_prompt
-
-if { [string compare $USCXML_BUILD_ARCH 32] == 0 } {
- send "zip -r win-package-x86.zip uscxml\\package\\windows-x86\r"
-} else {
- send "zip -r win-package-x86_64.zip uscxml\\package\\windows-x86_64\r"
-}
-
-send "exit\r"
-expect -re $local_prompt
-eval cd ~/Documents/TK/Code/
-
-if { [string compare $USCXML_BUILD_ARCH 32] == 0 } {
- eval spawn "scp epikur-win7.local:win-package-x86.zip ."
- expect -re $local_prompt
- eval spawn "unzip -o win-package-x86.zip"
- expect -re $local_prompt
- eval spawn "rm win-package-x86.zip"
- expect -re $local_prompt
-
-} else {
- eval spawn "scp epikur-win7-64.local:win-package-x86_64.zip ."
- expect -re $local_prompt
- eval spawn "unzip -o win-package-x86_64.zip"
- expect -re $local_prompt
- eval spawn "rm win-package-x86_64.zip"
- expect -re $local_prompt
-}
-
-exit