r15251 - gnucash/trunk/packaging/win32 - Use `cp -a' in dist.sh. Let inno create guile.bat (which sets

Andreas Köhler andi5 at cvs.gnucash.org
Sat Dec 23 13:50:21 EST 2006


Author: andi5
Date: 2006-12-23 13:50:20 -0500 (Sat, 23 Dec 2006)
New Revision: 15251
Trac: http://svn.gnucash.org/trac/changeset/15251

Modified:
   gnucash/trunk/packaging/win32/dist.sh
   gnucash/trunk/packaging/win32/gnucash.iss.in
Log:
Use `cp -a' in dist.sh. Let inno create guile.bat (which sets
GUILE_LOAD_PATH) and slibcat, because the user running GnuCash later on
may not have the rights to do that.


Modified: gnucash/trunk/packaging/win32/dist.sh
===================================================================
--- gnucash/trunk/packaging/win32/dist.sh	2006-12-23 12:36:33 UTC (rev 15250)
+++ gnucash/trunk/packaging/win32/dist.sh	2006-12-23 18:50:20 UTC (rev 15251)
@@ -46,28 +46,29 @@
 function dist_autotools() {
     setup Autotools
     mkdir -p $DIST_UDIR/bin
-    cp $_AUTOTOOLS_UDIR/bin/*.dll $DIST_UDIR/bin
+    cp -a $_AUTOTOOLS_UDIR/bin/*.dll $DIST_UDIR/bin
 }
 
 function dist_guile() {
     setup Guile
     mkdir -p $DIST_UDIR/bin
     cp -a $_GUILE_UDIR/bin/libguile{.,-ltdl.,-srfi}*dll $DIST_UDIR/bin
+    cp -a $_GUILE_UDIR/bin/guile.exe $DIST_UDIR/bin
     mkdir -p $DIST_UDIR/share
-    cp -r $_GUILE_UDIR/share/guile $DIST_UDIR/share
+    cp -a $_GUILE_UDIR/share/guile $DIST_UDIR/share
     [ -f $DIST_UDIR/share/guile/1.6/slibcat ] && rm $DIST_UDIR/share/guile/1.6/slibcat
 }
 
 function dist_openssl() {
     setup OpenSSL
     mkdir -p $DIST_UDIR/bin
-    cp $_WIN_UDIR/system32/lib{eay,ssl}*.dll $DIST_UDIR/bin
+    cp -a $_WIN_UDIR/system32/lib{eay,ssl}*.dll $DIST_UDIR/bin
 }
 
 function dist_libxml2() {
     setup LibXML2
     mkdir -p $DIST_UDIR/bin
-    cp $_LIBXML2_UDIR/bin/libxml2.dll $DIST_UDIR/bin
+    cp -a $_LIBXML2_UDIR/bin/libxml2.dll $DIST_UDIR/bin
 }
 
 function dist_gnome() {
@@ -109,38 +110,38 @@
 function dist_libgsf() {
     setup libGSF
     mkdir -p $DIST_UDIR/bin
-    cp $_LIBGSF_UDIR/bin/libgsf*.dll $DIST_UDIR/bin
+    cp -a $_LIBGSF_UDIR/bin/libgsf*.dll $DIST_UDIR/bin
     mkdir -p $DIST_UDIR/etc/gconf/schemas
-    cp $_LIBGSF_UDIR/etc/gconf/schemas/* $DIST_UDIR/etc/gconf/schemas
+    cp -a $_LIBGSF_UDIR/etc/gconf/schemas/* $DIST_UDIR/etc/gconf/schemas
     mkdir -p $DIST_UDIR/lib
-    cp -r $_LIBGSF_UDIR/lib/locale $DIST_UDIR/lib
+    cp -a $_LIBGSF_UDIR/lib/locale $DIST_UDIR/lib
 }
 
 function dist_goffice() {
     setup GOffice
     mkdir -p $DIST_UDIR/bin
-    cp $_GOFFICE_UDIR/bin/libgoffice*.dll $DIST_UDIR/bin
+    cp -a $_GOFFICE_UDIR/bin/libgoffice*.dll $DIST_UDIR/bin
     mkdir -p $DIST_UDIR/lib
-    cp -r $_GOFFICE_UDIR/lib/{goffice,locale} $DIST_UDIR/lib
+    cp -a $_GOFFICE_UDIR/lib/{goffice,locale} $DIST_UDIR/lib
     mkdir -p $DIST_UDIR/share
-    cp -r $_GOFFICE_UDIR/share/{goffice,pixmaps} $DIST_UDIR/share
+    cp -a $_GOFFICE_UDIR/share/{goffice,pixmaps} $DIST_UDIR/share
 }
 
 function dist_gnucash() {
     setup GnuCash
     mkdir -p $DIST_UDIR/bin
-    cp $_INSTALL_UDIR/bin/* $DIST_UDIR/bin
+    cp -a $_INSTALL_UDIR/bin/* $DIST_UDIR/bin
     mkdir -p $DIST_UDIR/etc/gconf/schemas
-    cp $_INSTALL_UDIR/etc/gconf/schemas/* $DIST_UDIR/etc/gconf/schemas
+    cp -a $_INSTALL_UDIR/etc/gconf/schemas/* $DIST_UDIR/etc/gconf/schemas
     mkdir -p $DIST_UDIR/lib
-    cp -r $_INSTALL_UDIR/lib/{bin,locale} $DIST_UDIR/lib
-    cp $_INSTALL_UDIR/lib/lib*.{dll,la} $DIST_UDIR/lib
+    cp -a $_INSTALL_UDIR/lib/{bin,locale} $DIST_UDIR/lib
+    cp -a $_INSTALL_UDIR/lib/lib*.{dll,la} $DIST_UDIR/lib
     mkdir -p $DIST_UDIR/lib/gnucash
-    cp $_INSTALL_UDIR/lib/gnucash/lib*.{dll,la} $DIST_UDIR/lib/gnucash
-    cp -r $_INSTALL_UDIR/libexec $DIST_UDIR
+    cp -a $_INSTALL_UDIR/lib/gnucash/lib*.{dll,la} $DIST_UDIR/lib/gnucash
+    cp -a $_INSTALL_UDIR/libexec $DIST_UDIR
     mkdir -p $DIST_UDIR/share
-    cp -r $_INSTALL_UDIR/share/{gnucash,pixmaps,xml} $DIST_UDIR/share
-    cp $_BUILD_UDIR/packaging/win32/gnucash.iss $_GNUCASH_UDIR
+    cp -a $_INSTALL_UDIR/share/{gnucash,pixmaps,xml} $DIST_UDIR/share
+    cp -a $_BUILD_UDIR/packaging/win32/gnucash.iss $_GNUCASH_UDIR
 }
 
 function finish() {

Modified: gnucash/trunk/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/trunk/packaging/win32/gnucash.iss.in	2006-12-23 12:36:33 UTC (rev 15250)
+++ gnucash/trunk/packaging/win32/gnucash.iss.in	2006-12-23 18:50:20 UTC (rev 15251)
@@ -42,6 +42,7 @@
 
 [Run]
 Filename: "{app}\bin\gnucash.bat"; Description: "{cm:RunPrg}"; WorkingDir: "{app}\bin"; Flags: postinstall skipifsilent
+Filename: "{app}\bin\guile.bat"; Parameters: "-c ""(use-modules (ice-9 slib)) (require 'printf)"""; Flags: runhidden
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Here we configure the included files and the place of their
@@ -49,7 +50,7 @@
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [Files]
 ; The main executables and DLLs
-Source: "@prefix@\..\dist\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash.bat'))
+Source: "@prefix@\..\dist\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig()
 ; Note: The above AfterInstall function will create the 
 ; gnucash.bat file on-the-fly by the Pascal script below.
 
@@ -86,6 +87,8 @@
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [UninstallDelete]
 Type: files; Name: "{app}\bin\gnucash.bat"
+Type: files; Name: "{app}\bin\guile.bat"
+Type: files; Name: "{app}\share\guile\1.6\slibcat"
 Type: filesandordirs; Name: "{app}\etc\gconf"
 Type: dirifempty; Name: "{app}\etc"
 
@@ -108,9 +111,9 @@
   StringChange(Result, '\', '/');
 end;
 
-procedure MyAfterInstallConfig(FileName: String);
+procedure MyAfterInstallConfig();
 var
-  FileString, appdir, libdir, pkglibdir, pkgdatadir: String;
+  FileName, FileString, appdir, libdir, pkglibdir, pkgdatadir: String;
   Res: Boolean;
 begin
 
@@ -121,6 +124,7 @@
   pkgdatadir := appdir + '\share\gnucash';
 
   { 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 := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ;
@@ -134,6 +138,13 @@
   if Res = False then
     MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
 
+  FileName := appdir + '\bin\guile.bat' ;
+  FileString := 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + appdir + '\share\guile\1.6;%GUILE_LOAD_PATH%'#13#10 ;
+  FileString := FileString + 'start guile.exe %*'#13#10 ;
+  Res := SaveStringToFile(FileName, FileString, False);
+  if Res = False then
+    MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
+
 end;
 
 



More information about the gnucash-changes mailing list