r15217 - gnucash/trunk/packaging/win32 - Improve Inno Setup Compiler script; should probably be able to package the outcome of dist.sh into one setup file.

Christian Stimming cstim at cvs.gnucash.org
Fri Dec 15 13:04:18 EST 2006


Author: cstim
Date: 2006-12-15 13:04:17 -0500 (Fri, 15 Dec 2006)
New Revision: 15217
Trac: http://svn.gnucash.org/trac/changeset/15217

Modified:
   gnucash/trunk/packaging/win32/custom.sh
   gnucash/trunk/packaging/win32/dist.sh
   gnucash/trunk/packaging/win32/gnucash.iss.in
Log:
Improve Inno Setup Compiler script; should probably be able to package the outcome of dist.sh into one setup file.

Modified: gnucash/trunk/packaging/win32/custom.sh
===================================================================
--- gnucash/trunk/packaging/win32/custom.sh	2006-12-15 15:10:43 UTC (rev 15216)
+++ gnucash/trunk/packaging/win32/custom.sh	2006-12-15 18:04:17 UTC (rev 15217)
@@ -159,8 +159,6 @@
 SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe"
 SVN_DIR=$GLOBAL_DIR\\svn
 
-DIST_DIR=$GLOBAL_DIR\\dist
-
 # There is no reason to ever need to comment these out!
 # * commented out glade, as it is not needed to run gnucash
 if test x$cross_compile != xyes ; then

Modified: gnucash/trunk/packaging/win32/dist.sh
===================================================================
--- gnucash/trunk/packaging/win32/dist.sh	2006-12-15 15:10:43 UTC (rev 15216)
+++ gnucash/trunk/packaging/win32/dist.sh	2006-12-15 18:04:17 UTC (rev 15217)
@@ -11,6 +11,7 @@
 . custom.sh
 
 function prepare() {
+    DIST_DIR=${GNUCASH_DIR}\\dist
     DIST_UDIR=`unix_path $DIST_DIR`
     DIST_WFSDIR=`win_fs_path $DIST_DIR`
     TMP_UDIR=`unix_path $TMP_DIR`

Modified: gnucash/trunk/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/trunk/packaging/win32/gnucash.iss.in	2006-12-15 15:10:43 UTC (rev 15216)
+++ gnucash/trunk/packaging/win32/gnucash.iss.in	2006-12-15 18:04:17 UTC (rev 15217)
@@ -15,7 +15,7 @@
 AppUpdatesURL=http://www.gnucash.org
 DefaultDirName={pf}\@PACKAGE@
 DefaultGroupName=GnuCash
-LicenseFile=..\..\COPYING
+LicenseFile=@prefix@\dist\share\@PACKAGE@\doc\COPYING
 Compression=lzma
 OutputDir=.
 OutputBaseFilename=@PACKAGE at -@VERSION at -setup
@@ -28,8 +28,8 @@
 
 [Components]
 Name: "main"; Description: "{cm:MainFiles}"; Types: full custom; Flags: fixed
-Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
-Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
+;Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
+;Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
 
 [Tasks]
 Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
@@ -49,26 +49,26 @@
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [Files]
 ; The main executables and DLLs
-Source: "@prefix@\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\lib\*"; DestDir: "{app}\lib"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\libexec\*"; DestDir: "{app}\libexec"; Flags: recursesubdirs; Components: main
-Source: "@prefix@\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\dist\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash.bat'))
+; Note: The above AfterInstall function will create the 
+; gnucash.bat file on-the-fly by the Pascal script below.
 
-; The translations (no idea why mingw installs them in prefix/lib/locale)
-Source: "@prefix@\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
+Source: "@prefix@\dist\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\dist\lib\*"; DestDir: "{app}\lib"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\dist\libexec\*"; DestDir: "{app}\libexec"; Flags: recursesubdirs; Components: main
+Source: "@prefix@\dist\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main
 
-; The account templates
-Source: "@prefix@\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
+;; The translations (no idea why mingw installs them in prefix/lib/locale)
+;Source: "@prefix@\dist\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
+;
+;; The account templates
+;Source: "@prefix@\dist\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
 
-; The loading shell script. It is post-processed by the Pascal script below.
-Source: "..\..\src\bin\gnucash.in"; DestDir: "{app}\bin"; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash'))
-
 ; And all the documentation
-Source: "..\..\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
-Source: "..\..\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
-Source: "..\..\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
-Source: "..\..\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\dist\share\@PACKAGE@\doc\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\dist\share\@PACKAGE@\doc\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
+Source: "@prefix@\dist\share\@PACKAGE@\doc\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
+Source: "@prefix@\dist\share\@PACKAGE@\doc\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
 
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -85,7 +85,7 @@
 ; Delete the created config script on uninstall
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [UninstallDelete]
-Type: files; Name: "{app}\bin\gnucash"
+Type: files; Name: "{app}\bin\gnucash.bat"
 
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; This large section is a Pascal scripting program that will modify
@@ -112,34 +112,25 @@
   Res: Boolean;
 begin
 
-  { Load the unchanged original file }
-  Res := LoadStringFromFile(Format('%s.in',[FileName]), FileString);
-  if Res = False then
-    MsgBox('Error on loading '+FileName+'.in for final adaptation', mbInformation, MB_OK);
-
-  { Insert the custom file header; #10 is the linefeed character }
-  Insert('#!/bin/sh '#10'dir="@prefix'+'@"'#10, FileString, 0);
-
   { Get the installation-specific paths }
-  appdir := MingwBacksl(ExpandConstant('{app}'));
-  libdir := appdir + '/lib';
-  pkglibdir := libdir + '/gnucash';
-  pkgdatadir := appdir + '/share/gnucash';
+  appdir := ExpandConstant('{app}');
+  libdir := appdir + '\lib';
+  pkglibdir := libdir + '\gnucash';
+  pkgdatadir := appdir + '\share\gnucash';
 
-  { Now make all the replacements }
-  { Explanation: StringChange(S,FromStr,ToStr): Change all occurances in S of FromStr to ToStr. }
-  StringChange(FileString, '@'+'-PATH_SEPARATOR-@', ';');
-  StringChange(FileString, '@'+'-BIN_DIR-@', appdir + '/bin');
-  StringChange(FileString, '@'+'-GNC_PKGLIB_INSTALLDIR-@', pkglibdir);
-  StringChange(FileString, '@'+'-GNC_MODULE_DIR-@', pkglibdir);
-  StringChange(FileString, '@'+'-GNC_LIB_INSTALLDIR-@', libdir);
-  StringChange(FileString, '@'+'-GNC_GUILE_MODULE_DIR-@', pkgdatadir + '/guile-modules');
-  StringChange(FileString, '@'+'-GNC_SCM_INSTALL_DIR-@', pkgdatadir + '/scm');
+  { Create the gnucash.bat file; #10 is the linefeed character and #13 CR }
+  FileString := 'set PATH=' + appdir + '\bin;' + libdir + '\bin;%PATH%'#13#10 ;
 
+  FileString := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ;
+  FileString := FileString + 'set GNC_MODULE_PATH=' + pkglibdir + ''#13#10 ;
+  FileString := FileString + 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + datadir + '\guile\1.6;%GUILE_LOAD_PATH%'#13#10 ;
+  FileString := FileString + 'set LTDL_LIBRARY_PATH=' + libdir + ''#13#10 ;
+  FileString := FileString + 'start gnucash-bin'#13#10 ;
+
   { Save the final file }
   Res := SaveStringToFile(FileName, FileString, False);
   if Res = False then
-    MsgBox('Error on saving '+FileName+' for final adaptation', mbInformation, MB_OK);
+    MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
 
 end;
 



More information about the gnucash-changes mailing list