r15328 - gnucash/trunk/packaging/win32 - Make GnuCash work on Windows again.

Andreas Köhler andi5 at cvs.gnucash.org
Sun Jan 7 16:33:26 EST 2007


Author: andi5
Date: 2007-01-07 16:33:26 -0500 (Sun, 07 Jan 2007)
New Revision: 15328
Trac: http://svn.gnucash.org/trac/changeset/15328

Modified:
   gnucash/trunk/packaging/win32/dist.sh
   gnucash/trunk/packaging/win32/gnucash.iss.in
   gnucash/trunk/packaging/win32/install.sh
Log:
Make GnuCash work on Windows again.

* add $prefix/lib/gnucash to $PATH
* move all modules to $prefix/lib/gnucash, even if not compiled with
  '-module'. This happens in install.sh after 'make install', so add
  $prefix/lib/bin to PATH and GNC_MODULE_PATH or move the dlls manually
  if you run 'make install' yourself
* distribute only the .la files for the shared libraries
* shutdown gconfd-2 in dish.sh so that inno can access the schemas.


Modified: gnucash/trunk/packaging/win32/dist.sh
===================================================================
--- gnucash/trunk/packaging/win32/dist.sh	2007-01-07 15:42:22 UTC (rev 15327)
+++ gnucash/trunk/packaging/win32/dist.sh	2007-01-07 21:33:26 UTC (rev 15328)
@@ -134,10 +134,10 @@
     mkdir -p $DIST_UDIR/etc/gconf/schemas
     cp -a $_INSTALL_UDIR/etc/gconf/schemas/* $DIST_UDIR/etc/gconf/schemas
     mkdir -p $DIST_UDIR/lib
-    cp -a $_INSTALL_UDIR/lib/{bin,locale} $DIST_UDIR/lib
-    cp -a $_INSTALL_UDIR/lib/lib*.{dll,la} $DIST_UDIR/lib
+    cp -a $_INSTALL_UDIR/lib/locale $DIST_UDIR/lib
+    cp -a $_INSTALL_UDIR/lib/lib*.la $DIST_UDIR/lib
     mkdir -p $DIST_UDIR/lib/gnucash
-    cp -a $_INSTALL_UDIR/lib/gnucash/lib*.{dll,la} $DIST_UDIR/lib/gnucash
+    cp -a $_INSTALL_UDIR/lib/gnucash/lib*.dll $DIST_UDIR/lib/gnucash
     cp -a $_INSTALL_UDIR/libexec $DIST_UDIR
     mkdir -p $DIST_UDIR/share
     cp -a $_INSTALL_UDIR/share/{gnucash,pixmaps,xml} $DIST_UDIR/share
@@ -152,9 +152,10 @@
             --install-schema-file $file >/dev/null
         echo "done"
     done
+    gconftool-2 --shutdown
 
     # Strip redirections in distributed libtool .la files
-    for file in `find $DIST_UDIR/lib -name '*.la'`; do
+    for file in $DIST_UDIR/lib/*.la; do
         cat $file | sed 's,^libdir=,#libdir=,' > $file.new
         mv $file.new $file
     done

Modified: gnucash/trunk/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/trunk/packaging/win32/gnucash.iss.in	2007-01-07 15:42:22 UTC (rev 15327)
+++ gnucash/trunk/packaging/win32/gnucash.iss.in	2007-01-07 21:33:26 UTC (rev 15328)
@@ -126,7 +126,7 @@
 
   { Create the gnucash.bat file; #10 is the linefeed character and #13 CR }
   FileName := appdir + '\bin\gnucash.bat' ;
-  FileString := 'set PATH=' + appdir + '\bin;' + libdir + '\bin;%PATH%'#13#10 ;
+  FileString := 'set PATH=' + appdir + '\bin;' + libdir + ';' + libdir + '\gnucash;%PATH%'#13#10 ;
 
   FileString := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ;
   FileString := FileString + 'set GNC_MODULE_PATH=' + pkglibdir + ''#13#10 ;

Modified: gnucash/trunk/packaging/win32/install.sh
===================================================================
--- gnucash/trunk/packaging/win32/install.sh	2007-01-07 15:42:22 UTC (rev 15327)
+++ gnucash/trunk/packaging/win32/install.sh	2007-01-07 21:33:26 UTC (rev 15328)
@@ -683,7 +683,7 @@
         qpushd src/bin
             rm gnucash
             make PATH_SEPARATOR=";" \
-                bindir="${_INSTALL_UDIR}/bin:${_INSTALL_UDIR}/lib/bin:${_GOFFICE_UDIR}/bin:${_LIBGSF_UDIR}/bin:${_GNOME_UDIR}/bin:${_LIBXML2_UDIR}/bin:${_GUILE_UDIR}/bin:${_REGEX_UDIR}/bin:${_AUTOTOOLS_UDIR}/bin" \
+                bindir="${_INSTALL_UDIR}/bin:${_INSTALL_UDIR}/lib:${_INSTALL_UDIR}/lib/gnucash:${_GOFFICE_UDIR}/bin:${_LIBGSF_UDIR}/bin:${_GNOME_UDIR}/bin:${_LIBXML2_UDIR}/bin:${_GUILE_UDIR}/bin:${_REGEX_UDIR}/bin:${_AUTOTOOLS_UDIR}/bin" \
                 gnucash
         qpopd
 
@@ -691,9 +691,15 @@
     qpopd
 
     qpushd $_INSTALL_UDIR/lib/gnucash
-        # Remove the dependency_libs line from the installed .la files
-        # because otherwise loading the modules literally takes hours.
-        for A in *.la; do grep -v dependency_libs $A > tmp ; mv  tmp $A; done
+        # Move modules that are compiled without -module to lib/gnucash
+        mv ../bin/*.dll .
+
+        # In the installed .la files, remove the dependency_libs line and
+        # correct the 'dlname'. We do not use these files to dlopen the
+        # modules, so actually this is unneeded.
+        for A in *.la; do
+            sed '/dependency_libs/d;s#../bin/##' $A > tmp ; mv tmp $A
+        done
     qpopd
 
     qpushd $_INSTALL_UDIR/etc/gconf/schemas
@@ -707,7 +713,7 @@
 
     # Create a startup script that works without the msys shell
     qpushd $_INSTALL_UDIR/bin
-        echo "set PATH=${INSTALL_DIR}\\bin;${INSTALL_DIR}\\lib\\bin;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin;%PATH%" > gnucash.bat
+        echo "set PATH=${INSTALL_DIR}\\bin;${INSTALL_DIR}\\lib;${INSTALL_DIR}\\lib\\gnucash;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin;%PATH%" > gnucash.bat
         echo "set GUILE_WARN_DEPRECATED=no" >> gnucash.bat
         echo "set GNC_MODULE_PATH=${INSTALL_DIR}\\lib\\gnucash" >> gnucash.bat
         echo "set GUILE_LOAD_PATH=${INSTALL_DIR}\\share\\gnucash\\guile-modules;${INSTALL_DIR}\\share\\gnucash\\scm;%GUILE_LOAD_PATH%" >> gnucash.bat



More information about the gnucash-changes mailing list