Show More
@@ -1,119 +1,119 b'' | |||||
1 | ; Script generated by the Inno Setup Script Wizard. |
|
1 | ; Script generated by the Inno Setup Script Wizard. | |
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
|
2 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | |
3 |
|
3 | |||
4 | #ifndef VERSION |
|
4 | #ifndef VERSION | |
5 | #define FileHandle |
|
5 | #define FileHandle | |
6 | #define FileLine |
|
6 | #define FileLine | |
7 | #define VERSION = "unknown" |
|
7 | #define VERSION = "unknown" | |
8 | #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py") |
|
8 | #if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py") | |
9 | #expr FileLine = FileRead(FileHandle) |
|
9 | #expr FileLine = FileRead(FileHandle) | |
10 | #expr FileLine = FileRead(FileHandle) |
|
10 | #expr FileLine = FileRead(FileHandle) | |
11 | #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1) |
|
11 | #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1) | |
12 | #endif |
|
12 | #endif | |
13 | #if FileHandle |
|
13 | #if FileHandle | |
14 | #expr FileClose(FileHandle) |
|
14 | #expr FileClose(FileHandle) | |
15 | #endif |
|
15 | #endif | |
16 | #pragma message "Detected Version: " + VERSION |
|
16 | #pragma message "Detected Version: " + VERSION | |
17 | #endif |
|
17 | #endif | |
18 |
|
18 | |||
19 | [Setup] |
|
19 | [Setup] | |
20 | AppCopyright=Copyright 2005-2009 Matt Mackall and others |
|
20 | AppCopyright=Copyright 2005-2009 Matt Mackall and others | |
21 | AppName=Mercurial |
|
21 | AppName=Mercurial | |
22 | AppVerName=Mercurial {#VERSION} |
|
22 | AppVerName=Mercurial {#VERSION} | |
23 | InfoAfterFile=contrib/win32/postinstall.txt |
|
23 | InfoAfterFile=contrib/win32/postinstall.txt | |
24 | LicenseFile=COPYING |
|
24 | LicenseFile=COPYING | |
25 | ShowLanguageDialog=yes |
|
25 | ShowLanguageDialog=yes | |
26 | AppPublisher=Matt Mackall and others |
|
26 | AppPublisher=Matt Mackall and others | |
27 | AppPublisherURL=http://mercurial.selenic.com/ |
|
27 | AppPublisherURL=http://mercurial.selenic.com/ | |
28 | AppSupportURL=http://mercurial.selenic.com/ |
|
28 | AppSupportURL=http://mercurial.selenic.com/ | |
29 | AppUpdatesURL=http://mercurial.selenic.com/ |
|
29 | AppUpdatesURL=http://mercurial.selenic.com/ | |
30 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} |
|
30 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} | |
31 | AppContact=mercurial@selenic.com |
|
31 | AppContact=mercurial@selenic.com | |
32 | OutputBaseFilename=Mercurial-{#VERSION} |
|
32 | OutputBaseFilename=Mercurial-{#VERSION} | |
33 | DefaultDirName={pf}\Mercurial |
|
33 | DefaultDirName={pf}\Mercurial | |
34 | SourceDir=..\.. |
|
34 | SourceDir=..\.. | |
35 | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) |
|
35 | VersionInfoDescription=Mercurial distributed SCM (version {#VERSION}) | |
36 | VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others |
|
36 | VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others | |
37 | VersionInfoCompany=Matt Mackall and others |
|
37 | VersionInfoCompany=Matt Mackall and others | |
38 | InternalCompressLevel=max |
|
38 | InternalCompressLevel=max | |
39 | SolidCompression=true |
|
39 | SolidCompression=true | |
40 | SetupIconFile=contrib\win32\mercurial.ico |
|
40 | SetupIconFile=contrib\win32\mercurial.ico | |
41 | AllowNoIcons=true |
|
41 | AllowNoIcons=true | |
42 | DefaultGroupName=Mercurial |
|
42 | DefaultGroupName=Mercurial | |
43 | PrivilegesRequired=none |
|
43 | PrivilegesRequired=none | |
44 |
|
44 | |||
45 | [Files] |
|
45 | [Files] | |
46 | Source: contrib\mercurial.el; DestDir: {app}/Contrib |
|
46 | Source: contrib\mercurial.el; DestDir: {app}/Contrib | |
47 | Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim |
|
47 | Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim | |
48 | Source: contrib\zsh_completion; DestDir: {app}/Contrib |
|
48 | Source: contrib\zsh_completion; DestDir: {app}/Contrib | |
49 | Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl |
|
49 | Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl | |
50 | Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme |
|
50 | Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme | |
51 | Source: contrib\mergetools.hgrc; DestDir: {tmp}; |
|
51 | Source: contrib\mergetools.hgrc; DestDir: {tmp}; | |
52 | Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; |
|
52 | Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles; | |
53 | Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt |
|
53 | Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt | |
54 | Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') |
|
54 | Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local') | |
55 | Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist |
|
55 | Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist | |
56 | Source: dist\library.zip; DestDir: {app} |
|
56 | Source: dist\library.zip; DestDir: {app} | |
57 | Source: dist\mfc*.dll; DestDir: {app} |
|
57 | Source: dist\mfc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist | |
58 | Source: dist\msvc*.dll; DestDir: {app} |
|
58 | Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist | |
59 | Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist |
|
59 | Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist | |
60 | Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist |
|
60 | Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist | |
61 | Source: dist\w9xpopen.exe; DestDir: {app} |
|
61 | Source: dist\w9xpopen.exe; DestDir: {app} | |
62 | Source: dist\add_path.exe; DestDir: {app} |
|
62 | Source: dist\add_path.exe; DestDir: {app} | |
63 | Source: doc\*.html; DestDir: {app}\Docs |
|
63 | Source: doc\*.html; DestDir: {app}\Docs | |
64 | Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs |
|
64 | Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs | |
65 | Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs |
|
65 | Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs | |
66 | Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt |
|
66 | Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt | |
67 | Source: COPYING; DestDir: {app}; DestName: Copying.txt |
|
67 | Source: COPYING; DestDir: {app}; DestName: Copying.txt | |
68 |
|
68 | |||
69 | [INI] |
|
69 | [INI] | |
70 | Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/ |
|
70 | Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/ | |
71 |
|
71 | |||
72 | [UninstallDelete] |
|
72 | [UninstallDelete] | |
73 | Type: files; Name: {app}\Mercurial.url |
|
73 | Type: files; Name: {app}\Mercurial.url | |
74 |
|
74 | |||
75 | [Icons] |
|
75 | [Icons] | |
76 | Name: {group}\Uninstall Mercurial; Filename: {uninstallexe} |
|
76 | Name: {group}\Uninstall Mercurial; Filename: {uninstallexe} | |
77 | Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html |
|
77 | Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html | |
78 | Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html |
|
78 | Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html | |
79 | Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html |
|
79 | Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html | |
80 | Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url |
|
80 | Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url | |
81 |
|
81 | |||
82 | [Run] |
|
82 | [Run] | |
83 | Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path" |
|
83 | Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path" | |
84 |
|
84 | |||
85 | [UninstallRun] |
|
85 | [UninstallRun] | |
86 | Filename: "{app}\add_path.exe"; Parameters: "/del {app}" |
|
86 | Filename: "{app}\add_path.exe"; Parameters: "/del {app}" | |
87 |
|
87 | |||
88 | [UninstallDelete] |
|
88 | [UninstallDelete] | |
89 | Type: files; Name: "{app}\hg.exe.local" |
|
89 | Type: files; Name: "{app}\hg.exe.local" | |
90 | [Code] |
|
90 | [Code] | |
91 | var |
|
91 | var | |
92 | WriteFile: Boolean; |
|
92 | WriteFile: Boolean; | |
93 | CheckDone: Boolean; |
|
93 | CheckDone: Boolean; | |
94 |
|
94 | |||
95 | function CheckFile(): Boolean; |
|
95 | function CheckFile(): Boolean; | |
96 | begin |
|
96 | begin | |
97 | if not CheckDone then begin |
|
97 | if not CheckDone then begin | |
98 | WriteFile := True; |
|
98 | WriteFile := True; | |
99 | if FileExists(ExpandConstant(CurrentFileName)) then begin |
|
99 | if FileExists(ExpandConstant(CurrentFileName)) then begin | |
100 | WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; |
|
100 | WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; | |
101 | end; |
|
101 | end; | |
102 | CheckDone := True; |
|
102 | CheckDone := True; | |
103 | end; |
|
103 | end; | |
104 | Result := WriteFile; |
|
104 | Result := WriteFile; | |
105 | end; |
|
105 | end; | |
106 |
|
106 | |||
107 | procedure ConcatenateFiles(); |
|
107 | procedure ConcatenateFiles(); | |
108 | var |
|
108 | var | |
109 | MergeConfigs: TArrayOfString; |
|
109 | MergeConfigs: TArrayOfString; | |
110 | begin |
|
110 | begin | |
111 | if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin |
|
111 | if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin | |
112 | SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); |
|
112 | SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); | |
113 | end; |
|
113 | end; | |
114 | end; |
|
114 | end; | |
115 |
|
115 | |||
116 | procedure Touch(fn: String); |
|
116 | procedure Touch(fn: String); | |
117 | begin |
|
117 | begin | |
118 | SaveStringToFile(ExpandConstant(fn), '', False); |
|
118 | SaveStringToFile(ExpandConstant(fn), '', False); | |
119 | end; |
|
119 | end; |
General Comments 0
You need to be logged in to leave comments.
Login now