mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Improve Inno Setup Compiler script; should probably be able to package the outcome of dist.sh into one setup file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15217 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
b5a5086b67
commit
317f63e372
@ -159,8 +159,6 @@ GLADE_DIR=$GLOBAL_DIR\\glade
|
|||||||
SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe"
|
SVN_URL="http://subversion.tigris.org/files/documents/15/35379/svn-1.4.2-setup.exe"
|
||||||
SVN_DIR=$GLOBAL_DIR\\svn
|
SVN_DIR=$GLOBAL_DIR\\svn
|
||||||
|
|
||||||
DIST_DIR=$GLOBAL_DIR\\dist
|
|
||||||
|
|
||||||
# There is no reason to ever need to comment these out!
|
# There is no reason to ever need to comment these out!
|
||||||
# * commented out glade, as it is not needed to run gnucash
|
# * commented out glade, as it is not needed to run gnucash
|
||||||
if test x$cross_compile != xyes ; then
|
if test x$cross_compile != xyes ; then
|
||||||
|
@ -11,6 +11,7 @@ qpushd "$(dirname $(unix_path "$0"))"
|
|||||||
. custom.sh
|
. custom.sh
|
||||||
|
|
||||||
function prepare() {
|
function prepare() {
|
||||||
|
DIST_DIR=${GNUCASH_DIR}\\dist
|
||||||
DIST_UDIR=`unix_path $DIST_DIR`
|
DIST_UDIR=`unix_path $DIST_DIR`
|
||||||
DIST_WFSDIR=`win_fs_path $DIST_DIR`
|
DIST_WFSDIR=`win_fs_path $DIST_DIR`
|
||||||
TMP_UDIR=`unix_path $TMP_DIR`
|
TMP_UDIR=`unix_path $TMP_DIR`
|
||||||
|
@ -15,7 +15,7 @@ AppSupportURL=http://www.gnucash.org
|
|||||||
AppUpdatesURL=http://www.gnucash.org
|
AppUpdatesURL=http://www.gnucash.org
|
||||||
DefaultDirName={pf}\@PACKAGE@
|
DefaultDirName={pf}\@PACKAGE@
|
||||||
DefaultGroupName=GnuCash
|
DefaultGroupName=GnuCash
|
||||||
LicenseFile=..\..\COPYING
|
LicenseFile=@prefix@\dist\share\@PACKAGE@\doc\COPYING
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
OutputDir=.
|
OutputDir=.
|
||||||
OutputBaseFilename=@PACKAGE@-@VERSION@-setup
|
OutputBaseFilename=@PACKAGE@-@VERSION@-setup
|
||||||
@ -28,8 +28,8 @@ Name: "custom"; Description: "{cm:CustomInstall}"; Flags: iscustom
|
|||||||
|
|
||||||
[Components]
|
[Components]
|
||||||
Name: "main"; Description: "{cm:MainFiles}"; Types: full custom; Flags: fixed
|
Name: "main"; Description: "{cm:MainFiles}"; Types: full custom; Flags: fixed
|
||||||
Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
|
;Name: "translations"; Description: "{cm:TranslFiles}"; Types: full
|
||||||
Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
|
;Name: "templates"; Description: "{cm:TemplFiles}"; Types: full
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
|
Name: desktopicon; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
|
||||||
@ -49,26 +49,26 @@ Filename: "{app}\bin\gnucash.bat"; Description: "{cm:RunPrg}"; WorkingDir: "{app
|
|||||||
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
[Files]
|
[Files]
|
||||||
; The main executables and DLLs
|
; The main executables and DLLs
|
||||||
Source: "@prefix@\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main
|
Source: "@prefix@\dist\bin\*"; DestDir: "{app}\bin"; Flags: recursesubdirs; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash.bat'))
|
||||||
Source: "@prefix@\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
|
; Note: The above AfterInstall function will create the
|
||||||
Source: "@prefix@\lib\*"; DestDir: "{app}\lib"; Flags: recursesubdirs; Components: main
|
; gnucash.bat file on-the-fly by the Pascal script below.
|
||||||
Source: "@prefix@\libexec\*"; DestDir: "{app}\libexec"; Flags: recursesubdirs; Components: main
|
|
||||||
Source: "@prefix@\share\*"; DestDir: "{app}\share"; Flags: recursesubdirs; Components: main
|
|
||||||
|
|
||||||
; The translations (no idea why mingw installs them in prefix/lib/locale)
|
Source: "@prefix@\dist\etc\*"; DestDir: "{app}\etc"; Flags: recursesubdirs; Components: main
|
||||||
Source: "@prefix@\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
|
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
|
;; The translations (no idea why mingw installs them in prefix/lib/locale)
|
||||||
Source: "@prefix@\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
|
;Source: "@prefix@\dist\lib\locale\*"; DestDir: "{app}\lib\locale"; Flags: recursesubdirs; Components: translations
|
||||||
|
;
|
||||||
; The loading shell script. It is post-processed by the Pascal script below.
|
;; The account templates
|
||||||
Source: "..\..\src\bin\gnucash.in"; DestDir: "{app}\bin"; Components: main; AfterInstall: MyAfterInstallConfig(ExpandConstant('{app}\bin\gnucash'))
|
;Source: "@prefix@\dist\share\gnucash\accounts\*"; DestDir: "{app}\share\gnucash\accounts"; Flags: recursesubdirs; Components: templates
|
||||||
|
|
||||||
; And all the documentation
|
; And all the documentation
|
||||||
Source: "..\..\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
Source: "@prefix@\dist\share\@PACKAGE@\doc\README"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
||||||
Source: "..\..\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
|
Source: "@prefix@\dist\share\@PACKAGE@\doc\COPYING"; DestDir: "{app}\doc\@PACKAGE@"; Flags: ignoreversion; Components: main
|
||||||
Source: "..\..\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
Source: "@prefix@\dist\share\@PACKAGE@\doc\AUTHORS"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
||||||
Source: "..\..\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
Source: "@prefix@\dist\share\@PACKAGE@\doc\ChangeLog"; DestDir: "{app}\doc\@PACKAGE@"; Components: main
|
||||||
|
|
||||||
|
|
||||||
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@ -85,7 +85,7 @@ Root: HKCU; Subkey: "Software\GnuCash\Paths"; ValueType: string; ValueName: "loc
|
|||||||
; Delete the created config script on uninstall
|
; Delete the created config script on uninstall
|
||||||
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
[UninstallDelete]
|
[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
|
; This large section is a Pascal scripting program that will modify
|
||||||
@ -112,34 +112,25 @@ var
|
|||||||
Res: Boolean;
|
Res: Boolean;
|
||||||
begin
|
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 }
|
{ Get the installation-specific paths }
|
||||||
appdir := MingwBacksl(ExpandConstant('{app}'));
|
appdir := ExpandConstant('{app}');
|
||||||
libdir := appdir + '/lib';
|
libdir := appdir + '\lib';
|
||||||
pkglibdir := libdir + '/gnucash';
|
pkglibdir := libdir + '\gnucash';
|
||||||
pkgdatadir := appdir + '/share/gnucash';
|
pkgdatadir := appdir + '\share\gnucash';
|
||||||
|
|
||||||
{ Now make all the replacements }
|
{ Create the gnucash.bat file; #10 is the linefeed character and #13 CR }
|
||||||
{ Explanation: StringChange(S,FromStr,ToStr): Change all occurances in S of FromStr to ToStr. }
|
FileString := 'set PATH=' + appdir + '\bin;' + libdir + '\bin;%PATH%'#13#10 ;
|
||||||
StringChange(FileString, '@'+'-PATH_SEPARATOR-@', ';');
|
|
||||||
StringChange(FileString, '@'+'-BIN_DIR-@', appdir + '/bin');
|
FileString := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ;
|
||||||
StringChange(FileString, '@'+'-GNC_PKGLIB_INSTALLDIR-@', pkglibdir);
|
FileString := FileString + 'set GNC_MODULE_PATH=' + pkglibdir + ''#13#10 ;
|
||||||
StringChange(FileString, '@'+'-GNC_MODULE_DIR-@', pkglibdir);
|
FileString := FileString + 'set GUILE_LOAD_PATH=' + pkgdatadir + '\guile-modules;' + pkgdatadir + '\scm;' + datadir + '\guile\1.6;%GUILE_LOAD_PATH%'#13#10 ;
|
||||||
StringChange(FileString, '@'+'-GNC_LIB_INSTALLDIR-@', libdir);
|
FileString := FileString + 'set LTDL_LIBRARY_PATH=' + libdir + ''#13#10 ;
|
||||||
StringChange(FileString, '@'+'-GNC_GUILE_MODULE_DIR-@', pkgdatadir + '/guile-modules');
|
FileString := FileString + 'start gnucash-bin'#13#10 ;
|
||||||
StringChange(FileString, '@'+'-GNC_SCM_INSTALL_DIR-@', pkgdatadir + '/scm');
|
|
||||||
|
|
||||||
{ Save the final file }
|
{ Save the final file }
|
||||||
Res := SaveStringToFile(FileName, FileString, False);
|
Res := SaveStringToFile(FileName, FileString, False);
|
||||||
if Res = False then
|
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;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user