1 ; QGit installation script for Inno Setup compiler
3 ; QGit should be compiled with MSVC 2008, statically linked
4 ; to Qt4.3 or better Trolltech libraries and directory of
5 ; Visual C++ redistributable dll files copied under 'bin\'
10 AppVerName
=QGit version
2.1
11 DefaultDirName
={pf}\QGit
13 UninstallDisplayIcon
={app}\qgit
.exe
16 LicenseFile
=COPYING
.rtf
17 SetupIconFile
=src
\resources\qgit
.ico
18 SourceDir
=C
:\Users\Marco\Documenti\qgit
20 OutputBaseFilename
=qgit2
.1_win
23 Source
: "bin\qgit.exe"; DestDir
: "{app}"
24 Source
: "bin\qgit.exe.manifest"; DestDir
: "{app}"
25 Source
: "README_WIN.txt"; DestDir
: "{app}"; Flags
: isreadme
27 ; Directory of MSVC redistributable files must be copied under 'bin\'
28 ; before to run Inno Setup compiler or following line will error out
29 Source
: "bin\Microsoft.VC90.CRT\*"; DestDir
: "{app}\Microsoft.VC90.CRT"
32 Root
: HKCU
; Subkey
: "Software\qgit"; Flags
: uninsdeletekey
33 Root
: HKCU
; Subkey
: "Software\qgit\qgit4"; ValueType
: string; ValueName
: "msysgit_exec_dir"; ValueData
: "{code:GetMSysGitExecDir}";
36 Name
: {code:GetMSysGitExecDir}; Flags
: uninsneveruninstall
39 Name
: desktopicon; Description
: "Create a &desktop icon";
42 Name
: "{group}\QGit"; Filename
: "{app}\qgit.exe"; WorkingDir
: "{app}"
43 Name
: "{group}\Uninstall QGit"; Filename
: "{uninstallexe}"
44 Name
: "{commondesktop}\QGit"; Filename
: "{app}\qgit.exe"; WorkingDir
: "{app}"; Tasks
: desktopicon
48 MSysGitDirPage
: TInputDirWizardPage
;
50 procedure InitializeWizard
;
52 // Create msysgit directory find page
53 MSysGitDirPage
:= CreateInputDirPage(wpSelectProgramGroup
,
54 'Select MSYSGIT Location', 'Where is MSYSGIT directory located?',
55 'Select where MSYSGIT directory is located, then click Next.',
58 // Add
item (with an empty caption
)
59 MSysGitDirPage
.Add('');
62 MSysGitDirPage
.Values
[0] := ExpandConstant('{pf}\Git');
65 function NextButtonClick(CurPageID
: Integer): Boolean;
69 // Validate pages before allowing the user
to proceed }
70 if CurPageID
= MSysGitDirPage
.ID
then begin
72 BaseDir
:= MSysGitDirPage
.Values
[0];
74 if FileExists(ExpandFileName(BaseDir
+ '\bin\git.exe')) then begin
77 end else if FileExists(ExpandFileName(BaseDir
+ '\..\bin\git.exe')) then begin // sub dir selected
78 MSysGitDirPage
.Values
[0] := ExpandFileName(BaseDir
+ '\..');
82 MsgBox('Directory ''' + BaseDir
+ ''' does not seem the msysgit one, retry', mbError
, MB_OK
);
90 function GetMSysGitExecDir(Param
: String): String;
92 Result
:= MSysGitDirPage
.Values
[0] + '\bin'; // already validated