##// END OF EJS Templates
win32: add hgweb scripts to Inno Setup installer
Pascal Quantin -
r12081:787a5a71 stable
parent child Browse files
Show More
@@ -1,129 +1,131
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-2010 Matt Mackall and others
20 AppCopyright=Copyright 2005-2010 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-2010 Matt Mackall and others
36 VersionInfoCopyright=Copyright 2005-2010 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\bash_completion; DestDir: {app}/Contrib
49 Source: contrib\bash_completion; DestDir: {app}/Contrib
50 Source: contrib\tcsh_completion; DestDir: {app}/Contrib
50 Source: contrib\tcsh_completion; DestDir: {app}/Contrib
51 Source: contrib\tcsh_completion_build.sh; DestDir: {app}/Contrib
51 Source: contrib\tcsh_completion_build.sh; DestDir: {app}/Contrib
52 Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl
52 Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl
53 Source: contrib\xml.rnc; DestDir: {app}/Contrib
53 Source: contrib\xml.rnc; DestDir: {app}/Contrib
54 Source: contrib\shrink-revlog.py; DestDir: {app}/Contrib
54 Source: contrib\shrink-revlog.py; DestDir: {app}/Contrib
55 Source: contrib\mercurial.el; DestDir: {app}/Contrib
55 Source: contrib\mercurial.el; DestDir: {app}/Contrib
56 Source: contrib\mq.el; DestDir: {app}/Contrib
56 Source: contrib\mq.el; DestDir: {app}/Contrib
57 Source: contrib\hgweb.fcgi; DestDir: {app}/Contrib
58 Source: contrib\hgweb.wsgi; DestDir: {app}/Contrib
57 Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
59 Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
58 Source: contrib\mergetools.hgrc; DestDir: {tmp};
60 Source: contrib\mergetools.hgrc; DestDir: {tmp};
59 Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
61 Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
60 Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
62 Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
61 Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
63 Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
62 Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist
64 Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist
63 Source: dist\library.zip; DestDir: {app}
65 Source: dist\library.zip; DestDir: {app}
64 Source: dist\mfc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
66 Source: dist\mfc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
65 Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
67 Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
66 Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
68 Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
67 Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
69 Source: dist\Microsoft.VC*.MFC.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
68 Source: dist\w9xpopen.exe; DestDir: {app}
70 Source: dist\w9xpopen.exe; DestDir: {app}
69 Source: dist\add_path.exe; DestDir: {app}
71 Source: dist\add_path.exe; DestDir: {app}
70 Source: doc\*.html; DestDir: {app}\Docs
72 Source: doc\*.html; DestDir: {app}\Docs
71 Source: doc\style.css; DestDir: {app}\Docs
73 Source: doc\style.css; DestDir: {app}\Docs
72 Source: mercurial\help\*.txt; DestDir: {app}\help
74 Source: mercurial\help\*.txt; DestDir: {app}\help
73 Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs
75 Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs
74 Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
76 Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
75 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
77 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
76 Source: COPYING; DestDir: {app}; DestName: Copying.txt
78 Source: COPYING; DestDir: {app}; DestName: Copying.txt
77
79
78 [INI]
80 [INI]
79 Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/
81 Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/
80
82
81 [UninstallDelete]
83 [UninstallDelete]
82 Type: files; Name: {app}\Mercurial.url
84 Type: files; Name: {app}\Mercurial.url
83 Type: files; Name: {app}\Contrib\shrink-revlog.pyc
85 Type: files; Name: {app}\Contrib\shrink-revlog.pyc
84
86
85 [Icons]
87 [Icons]
86 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
88 Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
87 Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html
89 Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html
88 Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html
90 Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html
89 Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html
91 Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html
90 Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
92 Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
91
93
92 [Run]
94 [Run]
93 Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
95 Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
94
96
95 [UninstallRun]
97 [UninstallRun]
96 Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
98 Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
97
99
98 [UninstallDelete]
100 [UninstallDelete]
99 Type: files; Name: "{app}\hg.exe.local"
101 Type: files; Name: "{app}\hg.exe.local"
100 [Code]
102 [Code]
101 var
103 var
102 WriteFile: Boolean;
104 WriteFile: Boolean;
103 CheckDone: Boolean;
105 CheckDone: Boolean;
104
106
105 function CheckFile(): Boolean;
107 function CheckFile(): Boolean;
106 begin
108 begin
107 if not CheckDone then begin
109 if not CheckDone then begin
108 WriteFile := True;
110 WriteFile := True;
109 if FileExists(ExpandConstant(CurrentFileName)) then begin
111 if FileExists(ExpandConstant(CurrentFileName)) then begin
110 WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes;
112 WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes;
111 end;
113 end;
112 CheckDone := True;
114 CheckDone := True;
113 end;
115 end;
114 Result := WriteFile;
116 Result := WriteFile;
115 end;
117 end;
116
118
117 procedure ConcatenateFiles();
119 procedure ConcatenateFiles();
118 var
120 var
119 MergeConfigs: TArrayOfString;
121 MergeConfigs: TArrayOfString;
120 begin
122 begin
121 if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin
123 if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin
122 SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True);
124 SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True);
123 end;
125 end;
124 end;
126 end;
125
127
126 procedure Touch(fn: String);
128 procedure Touch(fn: String);
127 begin
129 begin
128 SaveStringToFile(ExpandConstant(fn), '', False);
130 SaveStringToFile(ExpandConstant(fn), '', False);
129 end;
131 end;
General Comments 0
You need to be logged in to leave comments. Login now