r20595 - gnucash/trunk/packaging/win32 - Win32 build: Additional tweaks for easier cross-compiling.

Christian Stimming cstim at code.gnucash.org
Sat Apr 23 16:33:10 EDT 2011


Author: cstim
Date: 2011-04-23 16:33:06 -0400 (Sat, 23 Apr 2011)
New Revision: 20595
Trac: http://svn.gnucash.org/trac/changeset/20595

Modified:
   gnucash/trunk/packaging/win32/defaults.sh
   gnucash/trunk/packaging/win32/install-impl.sh
Log:
Win32 build: Additional tweaks for easier cross-compiling.

Modified: gnucash/trunk/packaging/win32/defaults.sh
===================================================================
--- gnucash/trunk/packaging/win32/defaults.sh	2011-04-23 20:32:56 UTC (rev 20594)
+++ gnucash/trunk/packaging/win32/defaults.sh	2011-04-23 20:33:06 UTC (rev 20595)
@@ -84,6 +84,18 @@
 set_default MINGW_MAKE_URL "$SF_MIRROR/mingw/mingw32-make-3.81-20080326-3.tar.gz"
 set_default MINGW_DIR $GLOBAL_DIR\\mingw
 
+# The URLs for precompiled gcc/mingw binaries
+set_default BINUTILS_URL "$SF_MIRROR/mingw/binutils-2.21-2-mingw32-bin.tar.lzma"
+set_default GCC_CORE_URL "$SF_MIRROR/mingw/gcc-core-4.5.2-1-mingw32-bin.tar.lzma"
+set_default GCC_CORE_DLL_URL "$SF_MIRROR/mingw/libgcc-4.5.2-1-mingw32-dll-1.tar.lzma"
+set_default GCC_GPP_URL "$SF_MIRROR/mingw/gcc-c++-4.5.2-1-mingw32-bin.tar.lzma"
+set_default GCC_GPP_DLL_URL "$SF_MIRROR/mingw/libstdc++-4.5.2-1-mingw32-dll-6.tar.lzma"
+set_default GCC_GPP_PATCH "`pwd`/gcc-c++-4.4.0.patch"
+set_default GCC_MPC_URL "$SF_MIRROR/mingw/libmpc-0.8.1-1-mingw32-dll-2.tar.lzma"
+set_default GCC_MPFR_URL "$SF_MIRROR/mingw/libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma"
+set_default GCC_GMP_URL "$SF_MIRROR/mingw/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma"
+set_default GCC_PTHREADS_URL "$SF_MIRROR/mingw/libpthread-2.8.0-3-mingw32-dll-2.tar.lzma"
+
 if [ "$CROSS_COMPILE" != yes ]; then
     # Use native toolchain
     set_default LD ld
@@ -91,17 +103,9 @@
     set_default DLLTOOL dlltool
     set_default RANLIB ranlib
 
-    # For native build on Windows we can use precompiled binaries
-    set_default BINUTILS_URL "$SF_MIRROR/mingw/binutils-2.21-2-mingw32-bin.tar.lzma"
-    set_default GCC_CORE_URL "$SF_MIRROR/mingw/gcc-core-4.5.2-1-mingw32-bin.tar.lzma"
-    set_default GCC_CORE_DLL_URL "$SF_MIRROR/mingw/libgcc-4.5.2-1-mingw32-dll-1.tar.lzma"
-    set_default GCC_GPP_URL "$SF_MIRROR/mingw/gcc-c++-4.5.2-1-mingw32-bin.tar.lzma"
-    set_default GCC_GPP_DLL_URL "$SF_MIRROR/mingw/libstdc++-4.5.2-1-mingw32-dll-6.tar.lzma"
-    set_default GCC_GPP_PATCH "`pwd`/gcc-c++-4.4.0.patch"
-    set_default GCC_MPC_URL "$SF_MIRROR/mingw/libmpc-0.8.1-1-mingw32-dll-2.tar.lzma"
-    set_default GCC_MPFR_URL "$SF_MIRROR/mingw/libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma"
-    set_default GCC_GMP_URL "$SF_MIRROR/mingw/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma"
-    set_default GCC_PTHREADS_URL "$SF_MIRROR/mingw/libpthread-2.8.0-3-mingw32-dll-2.tar.lzma"
+    # For native build on Windows we can use the precompiled binaries
+    # defined above
+
 else
     # What flavor of GCC cross-compiler are we building?
     set_default TARGET "mingw32"

Modified: gnucash/trunk/packaging/win32/install-impl.sh
===================================================================
--- gnucash/trunk/packaging/win32/install-impl.sh	2011-04-23 20:32:56 UTC (rev 20594)
+++ gnucash/trunk/packaging/win32/install-impl.sh	2011-04-23 20:33:06 UTC (rev 20595)
@@ -154,19 +154,22 @@
         echo "mingw already installed in $_MINGW_UDIR.  skipping."
     else
         mkdir -p $_MINGW_UDIR
+
+        # Download the precompiled packages in any case to get their DLLs
+        wget_unpacked $BINUTILS_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_CORE_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_CORE_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_GPP_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_GPP_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_GMP_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_MPC_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_MPFR_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $GCC_PTHREADS_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $MINGW_RT_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $MINGW_RT_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
+        wget_unpacked $W32API_URL $DOWNLOAD_DIR $MINGW_DIR
+
         if [ "$CROSS_COMPILE" != "yes" ]; then
-            wget_unpacked $BINUTILS_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_CORE_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_CORE_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_GPP_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_GPP_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_GMP_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_MPC_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_MPFR_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $GCC_PTHREADS_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $MINGW_RT_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $MINGW_RT_DLL_URL $DOWNLOAD_DIR $MINGW_DIR
-            wget_unpacked $W32API_URL $DOWNLOAD_DIR $MINGW_DIR
             wget_unpacked $MINGW_MAKE_URL $DOWNLOAD_DIR $MINGW_DIR
             (echo "y"; echo "y"; echo "$_MINGW_WFSDIR"; echo "y") | sh pi.sh
         else
@@ -1527,7 +1530,7 @@
     make install
 
     qpushd $_INSTALL_UDIR/bin
-        [ "$CROSS_COMPILE" = "yes" ] && die "Cross-compile mingw is missing some parts for installation.  Install step unavailable in cross-compile."
+        if [ ! -f $_MINGW_UDIR/bin/libstdc++-6.dll ] ; then die "File $_MINGW_UDIR/bin/libstdc++-6.dll is missing.  Install step unavailable in cross-compile." ; fi
 
         # Copy libstdc++-6.dll and its dependency to gnucash bin directory
         # to prevent DLL loading errors
@@ -1649,7 +1652,7 @@
     fi
 
     mkdir -p $_DOCS_UDIR/repos
-    qpushd $DOCS_DIR/repos
+    qpushd $_DOCS_UDIR/repos
         if [ "$UPDATE_DOCS" = "yes" ]; then
             if [ -x .svn ]; then
                 setup "SVN update of docs"



More information about the gnucash-changes mailing list