From 5c16caedbfefa19282aa35f13d3763b8ae4a8dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Sun, 7 Jan 2007 21:33:26 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15328 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/dist.sh | 9 +++++---- packaging/win32/gnucash.iss.in | 2 +- packaging/win32/install.sh | 16 +++++++++++----- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packaging/win32/dist.sh b/packaging/win32/dist.sh index 243d3c7cb1..fe1f62bfa6 100644 --- a/packaging/win32/dist.sh +++ b/packaging/win32/dist.sh @@ -134,10 +134,10 @@ function dist_gnucash() { 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 @@ function finish() { --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 diff --git a/packaging/win32/gnucash.iss.in b/packaging/win32/gnucash.iss.in index ade21bae74..bc6611f0b3 100644 --- a/packaging/win32/gnucash.iss.in +++ b/packaging/win32/gnucash.iss.in @@ -126,7 +126,7 @@ begin { 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 ; diff --git a/packaging/win32/install.sh b/packaging/win32/install.sh index 00cc95a125..410d892f66 100644 --- a/packaging/win32/install.sh +++ b/packaging/win32/install.sh @@ -683,7 +683,7 @@ function inst_gnucash() { 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 @@ function inst_gnucash() { 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 @@ function inst_gnucash() { # 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