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