r21817 - gnucash/branches/2.4/packaging/win32 - Add an environment variable so that slib will be able to find its files.

John Ralls jralls at code.gnucash.org
Sun Jan 1 18:00:44 EST 2012


Author: jralls
Date: 2012-01-01 18:00:44 -0500 (Sun, 01 Jan 2012)
New Revision: 21817
Trac: http://svn.gnucash.org/trac/changeset/21817

Modified:
   gnucash/branches/2.4/packaging/win32/gnucash.iss.in
Log:
Add an environment variable so that slib will be able to find its files.


Guile-1.8 carries its compiled-in prefix which needs to be overridden with
GUILE_IMPLEMENTATION_PATH when that directory doesn't exist.

Modified: gnucash/branches/2.4/packaging/win32/gnucash.iss.in
===================================================================
--- gnucash/branches/2.4/packaging/win32/gnucash.iss.in	2012-01-01 20:36:46 UTC (rev 21816)
+++ gnucash/branches/2.4/packaging/win32/gnucash.iss.in	2012-01-01 23:00:44 UTC (rev 21817)
@@ -53,7 +53,6 @@
 
 [Run]
 Filename: "{app}\bin\gnucash.exe"; Description: "{cm:RunPrg}"; WorkingDir: "{app}\bin"; OnlyBelowVersion: 0,6; Flags: postinstall skipifsilent
-Filename: "{app}\bin\guile.cmd"; Parameters: "-c ""(use-modules (ice-9 slib)) (require 'printf)"""; Flags: runhidden
 ;; The Windows firewall exceptions, see http://www.vincenzo.net/isxkb/index.php?title=Adding_a_rule_to_the_Windows_firewall
 Filename: "{sys}\netsh.exe"; Parameters: "firewall add allowedprogram ""{app}\bin\gnucash.exe"" ""GnuCash Free Finance Manager"" ENABLE ALL"; StatusMsg: "{cm:StatusMsgFirewall}"; Flags: runhidden; MinVersion: 0,5.01.2600sp2;
 Filename: "{sys}\netsh.exe"; Parameters: "firewall add allowedprogram ""{app}\bin\gconfd-2.exe"" ""GConf Settings Manager"" ENABLE ALL"; StatusMsg: "{cm:StatusMsgFirewall}"; Flags: runhidden; MinVersion: 0,5.01.2600sp2;
@@ -76,7 +75,7 @@
 ; environment config file on-the-fly by the Pascal script below.
 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
+Source: "@prefix@\..\dist\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig()
 
 ;;; Not needed with AQBANKING5!
 ;; Additionally, we ship the Qt DLLs because the Online-Banking-Wizard
@@ -162,7 +161,6 @@
 ; Delete the created config script on uninstall
 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 [UninstallDelete]
-Type: files; Name: "{app}\bin\guile.cmd"
 Type: files; Name: "{app}\etc\gnucash\environment"
 Type: files; Name: "{app}\share\guile\1.8\slibcat"
 Type: filesandordirs; Name: "{app}\share\guile"
@@ -306,30 +304,6 @@
   StringChange(Result, '\', '/');
 end;
 
-procedure MyAfterInstallConfig();
-var
-  FileName, FileString, appdir, libdir, pkglibdir, pkgdatadir: String;
-  Res: Boolean;
-begin
-
-  { Get the installation-specific paths }
-  appdir := ExpandConstant('{app}');
-  pkgdatadir := appdir + '\share\gnucash';
-
-  { Create the guile.cmd file; #10 is the linefeed character and #13 CR }
-
-  FileName := appdir + '\bin\guile.cmd' ;
-  FileString := 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + appdir + '\share\guile\1.8;%GUILE_LOAD_PATH%'#13#10 ;
-  FileString := FileString + 'start guile.exe %*'#13#10 ;
-
-  { Save the final file }
-
-  Res := SaveStringToFile(FileName, FileString, False);
-  if Res = False then
-    MsgBox('Error on saving '+FileName+' for completing the installation', mbInformation, MB_OK);
-
-end;
-
 function BackslashPath(const S: String): String;
 begin
   { Convert c:\soft to c:/soft }
@@ -364,7 +338,9 @@
       { Adapt GUILE_LOAD_PATH parameter and prevent cygwin interference in SCHEME_LIBRARY_PATH }
       if (Pos('GUILE_LOAD_PATH', EnvStrList[iLineCounter]) = 1) then
       begin
-        StringChangeEx(EnvStrList[iLineCounter], '{GUILE_LOAD_PATH}', '{GNC_HOME}/share/guile/1.8;{GUILE_LOAD_PATH}', True);
+        EnvStrList[iLineCounter - 1] := EnvStrList[iLineCounter - 1] + #13#10 + 'GUILE_HOME={GNC_HOME}/share/guile/1.8';
+        EnvStrList[iLineCounter - 1] := EnvStrList[iLineCounter - 1] + #13#10 + 'GUILE_IMPLEMENTATION_PATH={GUILE_HOME}';
+        StringChangeEx(EnvStrList[iLineCounter], '{GUILE_LOAD_PATH}', '{GUILE_HOME};{GUILE_LOAD_PATH}', True);
 
         EnvStrList[iLineCounter] := EnvStrList[iLineCounter] + #13#10 + '# Clear SCHEME_LIBRARY_PATH to prevent interference from other guile installations (like cygwin)' + #13#10;
         EnvStrList[iLineCounter] := EnvStrList[iLineCounter] + 'SCHEME_LIBRARY_PATH=' + #13#10;



More information about the gnucash-changes mailing list