r20462 - gnucash/branches/2.4/packaging/win32 - [20452] Adapt the windows build system to deal with swapping mingw installations on one build machine
Geert Janssens
gjanssens at code.gnucash.org
Thu Mar 24 15:41:55 EDT 2011
Author: gjanssens
Date: 2011-03-24 15:41:55 -0400 (Thu, 24 Mar 2011)
New Revision: 20462
Trac: http://svn.gnucash.org/trac/changeset/20462
Added:
gnucash/branches/2.4/packaging/win32/weekly_build.bat
Modified:
gnucash/branches/2.4/packaging/win32/dist-impl.sh
gnucash/branches/2.4/packaging/win32/dist.sh
gnucash/branches/2.4/packaging/win32/functions.sh
gnucash/branches/2.4/packaging/win32/install-impl.sh
gnucash/branches/2.4/packaging/win32/install.sh
Log:
[20452] Adapt the windows build system to deal with swapping mingw installations on one build machine
Modified: gnucash/branches/2.4/packaging/win32/dist-impl.sh
===================================================================
--- gnucash/branches/2.4/packaging/win32/dist-impl.sh 2011-03-24 19:25:08 UTC (rev 20461)
+++ gnucash/branches/2.4/packaging/win32/dist-impl.sh 2011-03-24 19:41:55 UTC (rev 20462)
@@ -46,10 +46,14 @@
_INSTALL_UDIR=`unix_path $INSTALL_DIR`
_INNO_UDIR=`unix_path $INNO_DIR`
_WEBKIT_UDIR=`unix_path $WEBKIT_DIR`
- _ISOCODES_UDIR=`unix_path $ISOCODES_DIR`
+ _ISOCODES_UDIR=`unix_path $ISOCODES_DIR`
+ _MINGW_WFSDIR=`win_fs_path $MINGW_DIR`
add_to_env $_UNZIP_UDIR/bin PATH # unzip
add_to_env $_GNOME_UDIR/bin PATH # gconftool-2
add_to_env $_EXETYPE_UDIR/bin PATH # exetype
+
+ PID=$$
+ configure_msys "$PID" "$_MINGW_WFSDIR"
}
function dist_regex() {
Modified: gnucash/branches/2.4/packaging/win32/dist.sh
===================================================================
--- gnucash/branches/2.4/packaging/win32/dist.sh 2011-03-24 19:25:08 UTC (rev 20461)
+++ gnucash/branches/2.4/packaging/win32/dist.sh 2011-03-24 19:41:55 UTC (rev 20462)
@@ -43,6 +43,9 @@
eval $step
done
+setup Restore MSYS
+restore_msys "$PID"
+
qpopd
Modified: gnucash/branches/2.4/packaging/win32/functions.sh
===================================================================
--- gnucash/branches/2.4/packaging/win32/functions.sh 2011-03-24 19:25:08 UTC (rev 20461)
+++ gnucash/branches/2.4/packaging/win32/functions.sh 2011-03-24 19:41:55 UTC (rev 20462)
@@ -201,6 +201,24 @@
perl -pi.bak -e"s!\\r\\n\$!\\n!" $@
}
+function configure_msys() {
+ # Make sure msys will be using this mingw
+ SUFFIX=$1
+ _MINGW_WFSDIR=$2
+ echo "configuring msys to use this mingw. suffix=$SUFFIX, _MINGW_WFSDIR=$_MINGW_WFSDIR"
+ cp /etc/fstab /etc/fstab.$SUFFIX
+ sed '\,/mingw$, d' /etc/fstab > tmp
+ echo "$_MINGW_WFSDIR /mingw" >> tmp
+ mv tmp /etc/fstab
+}
+
+function restore_msys() {
+ SUFFIX=$1
+ echo "resetting msys to use original mingw."
+ rm /etc/fstab
+ mv /etc/fstab.$SUFFIX /etc/fstab
+}
+
### Local Variables: ***
### mode: shell-script ***
### sh-basic-offset: 4 ***
Modified: gnucash/branches/2.4/packaging/win32/install-impl.sh
===================================================================
--- gnucash/branches/2.4/packaging/win32/install-impl.sh 2011-03-24 19:25:08 UTC (rev 20461)
+++ gnucash/branches/2.4/packaging/win32/install-impl.sh 2011-03-24 19:41:55 UTC (rev 20462)
@@ -45,6 +45,9 @@
set_env "" PKG_CONFIG_PATH # registered
export PKG_CONFIG_LIBDIR="" # not registered
fi
+
+ # Save pid for use in temporary files
+ _PID=$$
}
function check_m4_version_ok() {
@@ -114,7 +117,7 @@
if quiet test_for_mingw
then
- echo "mingw already installed. skipping."
+ echo "mingw already installed."
else
mkdir -p $_MINGW_UDIR
if [ "$CROSS_COMPILE" != "yes" ]; then
@@ -130,6 +133,8 @@
fi
quiet test_for_mingw || die "mingw not installed correctly"
fi
+
+ configure_msys "$_PID" "$_MINGW_WFSDIR"
}
function inst_unzip() {
Modified: gnucash/branches/2.4/packaging/win32/install.sh
===================================================================
--- gnucash/branches/2.4/packaging/win32/install.sh 2011-03-24 19:25:08 UTC (rev 20461)
+++ gnucash/branches/2.4/packaging/win32/install.sh 2011-03-24 19:41:55 UTC (rev 20462)
@@ -119,6 +119,10 @@
for step in "${steps[@]}" ; do
eval $step
done
+
+setup Restore MSYS
+restore_msys "$_PID"
+
qpopd
echo -n "Build Finished at "
Added: gnucash/branches/2.4/packaging/win32/weekly_build.bat
===================================================================
--- gnucash/branches/2.4/packaging/win32/weekly_build.bat (rev 0)
+++ gnucash/branches/2.4/packaging/win32/weekly_build.bat 2011-03-24 19:41:55 UTC (rev 20462)
@@ -0,0 +1,6 @@
+rem This is the Windows Batch Script for the daily builds.
+rem It simply calls the actual MSYS Shell script to perform
+rem the daily build and then the tag builds.
+
+cd c:\soft-2.4\packaging
+c:\msys\1.0\bin\sh.exe --login c:\soft-2.4\packaging\daily_build.sh
More information about the gnucash-changes
mailing list