1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
1 |
; Script for Inno Setup installer |
2 |
; [[[cog cog.outl('; This script created by Cog from bzr.iss.cog source') ]]] |
|
3 |
; [[[end]]] |
|
4 |
; Cog is http://www.nedbatchelder.com/code/cog/ |
|
5 |
||
6 |
[Setup] |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
7 |
AppName=Bazaar |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
8 |
|
9 |
; [[[cog |
|
2231.1.1
by Alexander Belchenko
Python 2.5 fixes for win32 installer |
10 |
; # Python 2.5 compatibility code |
11 |
; import os |
|
12 |
; import sys |
|
13 |
; cwd = os.getcwd() |
|
14 |
; if cwd not in sys.path: |
|
15 |
; sys.path.insert(0, cwd) |
|
16 |
; #/Python 2.5 compatibility code |
|
17 |
;
|
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
18 |
; import bzrlib |
19 |
; try: |
|
20 |
; VERSION = bzrlib.__version__ |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
21 |
; AppVerName = 'Bazaar %s' % VERSION |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
22 |
; OutputBaseFilename = 'bzr-setup-%s' % VERSION |
23 |
; except: |
|
24 |
; VERSION = '' |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
25 |
; AppVerName = 'Bazaar' |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
26 |
; OutputBaseFilename = 'bzr-setup' |
27 |
;
|
|
28 |
; cog.outl('AppVerName=%s' % AppVerName) |
|
29 |
; cog.outl('OutputBaseFilename=%s' % OutputBaseFilename) |
|
30 |
; ]]] |
|
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
31 |
AppVerName=Bazaar |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
32 |
OutputBaseFilename=bzr-setup |
33 |
; [[[end]]] |
|
34 |
||
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
35 |
DefaultDirName={pf}\Bazaar |
36 |
DefaultGroupName=Bazaar |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
37 |
|
38 |
SolidCompression=yes |
|
39 |
||
40 |
OutputDir="..\" |
|
41 |
SourceDir="..\..\win32_bzr.exe" |
|
42 |
||
43 |
SetupIconFile="..\bzr.ico" |
|
2070.2.2
by Alexander Belchenko
win32 installer: make short info page instead of full GPL license text |
44 |
InfoBeforeFile="..\tools\win32\info.txt" |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
45 |
|
46 |
VersionInfoCompany="Canonical Ltd." |
|
3565.5.2
by Mark Hammond
merge inno script changes |
47 |
VersionInfoCopyright="Canonical Ltd., 2005-2008" |
48 |
VersionInfoDescription="Windows installer for Bazaar" |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
49 |
; [[[cog |
50 |
; import bzrlib |
|
51 |
; version_number = [] |
|
52 |
; for i in bzrlib.version_info[:3]: |
|
53 |
; try: |
|
54 |
; i = int(i) |
|
55 |
; except ValueError: |
|
56 |
; i = 0 |
|
57 |
; version_number.append(i) |
|
58 |
; # incremental build number |
|
59 |
; from tools.win32.file_version import * |
|
60 |
; try: |
|
61 |
; version_prev = get_file_version(OutputBaseFilename + '.exe') |
|
62 |
; except (FileNotFound, VersionNotAvailable): |
|
63 |
; pass |
|
64 |
; else: |
|
65 |
; if version_number == list(version_prev[:3]): |
|
66 |
; version_number.append((version_prev[-1]+1) % 65536) |
|
67 |
; version_str = '.'.join(str(i) for i in version_number) |
|
68 |
; cog.outl('VersionInfoVersion="%s"' % version_str) |
|
69 |
; ]]] |
|
70 |
; [[[end]]] |
|
71 |
||
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
72 |
AppComments="Bazaar: Friendly distributed version control system" |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
73 |
AppPublisher="Canonical Ltd." |
74 |
AppPublisherURL="http://www.bazaar-vcs.org" |
|
75 |
AppSupportURL="http://www.bazaar-vcs.org/BzrSupport" |
|
76 |
AppUpdatesURL="http://www.bazaar-vcs.org/WindowsDownloads" |
|
77 |
; [[[cog cog.outl('AppVersion=%s' % VERSION) ]]] |
|
78 |
; [[[end]]] |
|
79 |
||
80 |
ChangesEnvironment=yes |
|
3565.5.2
by Mark Hammond
merge inno script changes |
81 |
; MARKH: PrivilegesRequired=none means it can't be installed by a non-admin |
82 |
; user - but sadly we still need admin - eg, tortoise overlays, installing |
|
83 |
; into "\Program Files", installing COM objects etc all must be done by an |
|
84 |
; admin. |
|
85 |
PrivilegesRequired=admin |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
86 |
|
87 |
[Files] |
|
3565.5.2
by Mark Hammond
merge inno script changes |
88 |
; Tortoise files - these are at the top as we use 'ExtractTemporaryFile' on |
89 |
; the TortoiseOverlays MSI, and inno documents such files should be at the |
|
90 |
; start for best performance. |
|
91 |
; [[[cog |
|
92 |
; if "TBZR" in os.environ: # we need a more formal way of controlling this... |
|
3871.1.6
by Mark Hammond
remerge setup changes |
93 |
; tovmsi32 = os.environ["TORTOISE_OVERLAYS_MSI_WIN32"] # point at the 32bit TortoiseOverlays .msi |
94 |
; tovmsi64 = os.environ["TORTOISE_OVERLAYS_MSI_X64"] # point at the 64bit TortoiseOverlays .msi |
|
95 |
; cog.outl('Source: "%s"; Flags: dontcopy ignoreversion ; Components: tortoise' % tovmsi32) |
|
96 |
; cog.outl('Source: "%s"; Flags: dontcopy ignoreversion ; Components: tortoise' % tovmsi64) |
|
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
97 |
; cog.outl('Source: "tbzrcache.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
98 |
; cog.outl('Source: "tbzrcachew.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
|
99 |
; cog.outl('Source: "tbzrcommand.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
|
100 |
; cog.outl('Source: "tbzrcommandw.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
|
3871.1.6
by Mark Hammond
remerge setup changes |
101 |
; cog.outl('Source: "tbzrtrace.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: debug') |
3565.5.2
by Mark Hammond
merge inno script changes |
102 |
; # Note 'regserver' here appears to run regsvr32 without elevation, which |
103 |
; # is no good for us - so we have a [run] entry below. |
|
3871.1.6
by Mark Hammond
remerge setup changes |
104 |
; cog.outl('Source: "tbzr_old.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
105 |
; cog.outl('Source: "tbzrshellext_x86.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise') |
|
106 |
; cog.outl('Source: "tbzrshellext_x64.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise; Check: IsWin64;') |
|
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
107 |
; cog.outl(r'Source: "plugins\qbzr\*"; DestDir: "{app}\plugins\qbzr"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; Components: tortoise') |
3565.5.2
by Mark Hammond
merge inno script changes |
108 |
;
|
3932.6.1
by Mark Hammond
Include all .html files from the tortoise doc directory. |
109 |
; cog.outl('Source: "%s\\doc\\*.html"; DestDir: "{app}\\doc\\tbzr"; Flags: ignoreversion; Components: tortoise' % os.environ['TBZR']) |
3565.5.2
by Mark Hammond
merge inno script changes |
110 |
; ]]] |
111 |
; [[[end]]] |
|
112 |
||
113 |
; We can't say '*.*' due to optional components. |
|
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
114 |
Source: "plugins\*.*"; DestDir: "{app}\\plugins"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; Components: plugins |
115 |
Source: "*.bat"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; |
|
116 |
Source: "*.url"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; |
|
117 |
Source: "msvc*.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; |
|
118 |
Source: "bz*.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; |
|
119 |
Source: "Python*.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; |
|
120 |
Source: "lib\*.*"; DestDir: "{app}\lib"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; |
|
121 |
Source: "doc\*.*"; DestDir: "{app}\doc"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
122 |
; [[[cog |
123 |
; try: |
|
124 |
; import pycurl |
|
125 |
; except ImportError: |
|
126 |
; ca_path = None |
|
127 |
; else: |
|
128 |
; supported = pycurl.version_info()[8] |
|
129 |
; if 'https' in supported: |
|
130 |
; from bzrlib.transport.http.ca_bundle import get_ca_path |
|
131 |
; ca_path = get_ca_path() |
|
132 |
; if ca_path: |
|
133 |
; cog.outl('Source: "%s"; DestDir: "{app}"; Components: cabundle' % ca_path) |
|
134 |
; else: |
|
135 |
; cog.msg('You have pycurl with SSL support, ' |
|
136 |
; 'but CA Bundle (curl-ca-bundle.crt) not found!') |
|
137 |
; ]]] |
|
138 |
; [[[end]]] |
|
139 |
||
3565.5.2
by Mark Hammond
merge inno script changes |
140 |
[Types] |
141 |
Name: "typical"; Description: "A typical installation" |
|
142 |
Name: "full"; Description: "Full Installation (typical installation plus test utilities)" |
|
143 |
Name: "compact"; Description: "Compact installation" |
|
144 |
Name: "custom"; Description: "Custom installation"; Flags: iscustom |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
145 |
|
146 |
[Components] |
|
3565.5.2
by Mark Hammond
merge inno script changes |
147 |
Name: "main"; Description: "Main Files"; Types: full typical compact custom; Flags: fixed |
148 |
Name: "plugins"; Description: "Default plugins"; Types: full typical custom; |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
149 |
; [[[cog |
150 |
; if ca_path: |
|
151 |
; cog.outl('Name: "cabundle"; ' |
|
152 |
; 'Description: "CA certificates for SSL support"; ' |
|
3565.5.2
by Mark Hammond
merge inno script changes |
153 |
; 'Types: full typical custom') |
154 |
; if "TBZR" in os.environ: # we need a more formal way of controlling this... |
|
3871.1.6
by Mark Hammond
remerge setup changes |
155 |
; cog.outl('Name: "tortoise"; Description: "Windows Shell Extensions (TortoiseBZR)"; Types: full typical custom;') |
3565.5.2
by Mark Hammond
merge inno script changes |
156 |
; cog.outl('Name: "debug"; Description: "Test, diagnostic and debugging utilities"; Types: full custom;') |
157 |
;
|
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
158 |
; ]]] |
159 |
; [[[end]]] |
|
160 |
||
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
161 |
[Dirs] |
162 |
Name: "{userappdata}\bazaar\2.0" |
|
3010.4.3
by Alexander Belchenko
teach uninstaller to delete plugins subdirectory; NEWS entry. |
163 |
Name: "{app}\plugins"; Flags: uninsalwaysuninstall |
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
164 |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
165 |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
166 |
[Icons] |
2666.2.1
by Alexander Belchenko
change generated documentation extension from htm to html |
167 |
Name: "{group}\Documentation index"; Filename: "{app}\doc\index.html"; WorkingDir: "{app}\doc"; |
1861.2.6
by Alexander Belchenko
branding: change Bazaar-NG to Bazaar |
168 |
Name: "{group}\Bazaar Home Page"; Filename: "{app}\bazaar.url"; Comment: "http://www.bazaar-vcs.org"; |
2245.4.9
by Alexander Belchenko
Inno Setup script: using {cmd} macro instead of env varibale substitution (%COMSPEC%) |
169 |
Name: "{group}\Start Bzr in cmd shell"; Filename: "{cmd}"; Parameters: "/K start_bzr.bat"; WorkingDir: "{app}"; IconFilename: "{app}\bzr.exe"; Comment: "Open new Bzr session"; |
3565.5.2
by Mark Hammond
merge inno script changes |
170 |
; NOTE: Intent is to change the log file location - the line below will need to change to reflect that. |
171 |
Name: "{group}\Open Bzr log file"; Filename: "notepad.exe"; Parameters: "{userdocs}\.bzr.log"; Comment: "Launch notepad to view the bzr log file"; |
|
172 |
||
173 |
; [[[cog |
|
174 |
; if "TBZR" in os.environ: |
|
175 |
; cog.outl(r'Name: "{group}\TortoiseBZR documentation"; Filename: "{app}\doc\tbzr\index.html"; Comment: "Launch TortoiseBZR documentation";') |
|
176 |
; ]]] |
|
177 |
; [[[end]]] |
|
178 |
; No Uninstall here - Control Panel will do |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
179 |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
180 |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
181 |
[Tasks] |
3565.5.2
by Mark Hammond
merge inno script changes |
182 |
Name: Path; Description: "Add {app} directory to PATH environment variable" |
183 |
; [[[cog |
|
184 |
; if "TBZR" in os.environ: |
|
185 |
; cog.outl('Name: TBZRReadme; Description: "View the TortoiseBZR Readme"; Components: tortoise') |
|
186 |
; ]]] |
|
187 |
; [[[end]]] |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
188 |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
189 |
|
3010.4.2
by Alexander Belchenko
Windows standalone installer write to the registry some useful info about paths and bzr version |
190 |
[Registry] |
191 |
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; Flags: noerror uninsdeletekey |
|
192 |
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "InstallPath"; ValueType: string; ValueData: "{app}"; Flags: noerror |
|
3565.5.2
by Mark Hammond
merge inno script changes |
193 |
; Don't write stuff that can be implied |
194 |
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "BzrlibPath"; ValueType: string; ValueData: "{app}\lib\library.zip\bzrlib"; Flags: noerror |
|
195 |
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PluginsPath"; ValueType: string; ValueData: "{app}\plugins"; Flags: noerror |
|
196 |
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PythonPath"; ValueType: string; ValueData: "{app}\lib\library.zip"; Flags: noerror |
|
3010.4.2
by Alexander Belchenko
Windows standalone installer write to the registry some useful info about paths and bzr version |
197 |
; [[[cog cog.outl('Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "Version"; ValueType: string; ValueData: "%s"; Flags: noerror' % VERSION) ]]] |
198 |
; [[[end]]] |
|
199 |
||
200 |
||
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
201 |
[Run] |
202 |
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--start-bzr"; Flags: skipifdoesntexist runhidden; |
|
203 |
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--add-path"; Tasks: Path; Flags: skipifdoesntexist skipifsilent runhidden; |
|
3565.5.2
by Mark Hammond
merge inno script changes |
204 |
; [[[cog |
205 |
; if "TBZR" in os.environ: |
|
3871.1.6
by Mark Hammond
remerge setup changes |
206 |
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/s /i: /n tbzrshellext_x86.dll"; WorkingDir: "{app}"; Components: tortoise; Description: "Registering Tortoise"; StatusMsg: "Registering Tortoise"') |
207 |
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/s /i: /n tbzrshellext_x64.dll"; WorkingDir: "{app}"; Components: tortoise; Description: "Registering Tortoise"; StatusMsg: "Registering Tortoise"; Check: IsWin64') |
|
3565.5.2
by Mark Hammond
merge inno script changes |
208 |
; cog.outl(r'Filename: "{app}\doc\tbzr\index.html"; Tasks: TBZRReadme; Flags: shellexec') |
209 |
; ]]] |
|
210 |
; [[[end]]] |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
211 |
|
2321.2.7
by Alexander Belchenko
win32 standalone installer improvements: |
212 |
|
1821.1.1
by Alexander Belchenko
win32 installer for bzr.dev.0.9 |
213 |
[UninstallRun] |
3638.1.1
by Alexander Belchenko
remove out-of-date options from Windows standalone installer. |
214 |
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--delete-path --delete-shell-menu --silent"; Flags: skipifdoesntexist runhidden; |
3565.5.2
by Mark Hammond
merge inno script changes |
215 |
; [[[cog |
216 |
; if "TBZR" in os.environ: |
|
3871.1.6
by Mark Hammond
remerge setup changes |
217 |
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/u /s /i: tbzrshellext_x86.dll"; WorkingDir: "{app}"; Components: tortoise; StatusMsg: "Unregistering Tortoise"; Flags: skipifdoesntexist') |
218 |
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/u /s /i: tbzrshellext_x64.dll"; WorkingDir: "{app}"; Components: tortoise; StatusMsg: "Unregistering Tortoise"; Flags: skipifdoesntexist; Check: IsWin64') |
|
3565.5.2
by Mark Hammond
merge inno script changes |
219 |
; ]]] |
220 |
; [[[end]]] |
|
221 |
||
3638.1.1
by Alexander Belchenko
remove out-of-date options from Windows standalone installer. |
222 |
|
3565.5.2
by Mark Hammond
merge inno script changes |
223 |
[Code] |
224 |
const
|
|
225 |
SHCNF_IDLIST = $0000; |
|
226 |
SHCNE_ASSOCCHANGED = $08000000; |
|
227 |
WM_QUIT = 18; |
|
3871.1.6
by Mark Hammond
remerge setup changes |
228 |
MOVEFILE_DELAY_UNTIL_REBOOT = 4; |
3565.5.2
by Mark Hammond
merge inno script changes |
229 |
|
230 |
procedure SHChangeNotify(wEventId, uFlags, dwItem1, dwItem2: Integer); |
|
231 |
external 'SHChangeNotify@shell32.dll stdcall'; |
|
232 |
||
3871.1.6
by Mark Hammond
remerge setup changes |
233 |
function MoveFileEx(lpExistingFileName, lpNewFileName: String; dwFlags: Cardinal): Integer; |
234 |
external 'MoveFileExA@kernel32.dll stdcall'; |
|
235 |
||
236 |
procedure DeleteFileNowOrLater(filename: string); |
|
237 |
var
|
|
238 |
rc : Integer; |
|
239 |
begin
|
|
240 |
if FileExists(filename) and not DeleteFile(filename) then |
|
241 |
// can't work out to pass NULL to the API, but an empty string |
|
242 |
// seems to work OK. |
|
243 |
MoveFileEx(filename, '', MOVEFILE_DELAY_UNTIL_REBOOT); |
|
244 |
end; |
|
245 |
||
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
246 |
procedure ShutdownTBZR; |
247 |
var
|
|
248 |
hwnd: HWND; |
|
249 |
begin
|
|
250 |
// [[[cog |
|
251 |
// if "TBZR" not in os.environ: |
|
252 |
// cog.outl(' Exit; // No TSVN set - exit this procedure.') |
|
253 |
// ]]] |
|
254 |
// [[[end]]] |
|
255 |
// ask the cache process to shut-down. |
|
256 |
hwnd := FindWindowByClassName('TBZRCache_Taskbar'); |
|
257 |
if hwnd <> 0 then |
|
258 |
PostMessage(hwnd, WM_QUIT, 1, 0); |
|
259 |
end; |
|
260 |
||
3565.5.2
by Mark Hammond
merge inno script changes |
261 |
procedure CurStepChanged(CurStep: TSetupStep); |
262 |
var
|
|
263 |
S, tovmsi, fqtovmsi, params: String; |
|
264 |
ErrorCode: Integer; |
|
265 |
begin
|
|
266 |
if CurStep=ssInstall then begin |
|
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
267 |
ShutdownTBZR; |
3932.1.1
by Martin Pool
Merge Mark's Support for tbzr c++ implemented shell extension and fix typo |
268 |
// In case the user hasn't uninstalled the old version before |
3871.1.6
by Mark Hammond
remerge setup changes |
269 |
// upgrading, we unregister and delete some obsolete files |
270 |
// (regsvr32 remains silent even if the file doesn't exist) |
|
271 |
Exec('regsvr32.exe', '/s /u "' + ExpandConstant('{app}\tbzr.dll') + '"', |
|
272 |
'', SW_HIDE, ewWaitUntilTerminated, ErrorCode); |
|
273 |
DeleteFileNowOrLater(ExpandConstant('{app}\tbzr.dll')); |
|
274 |
DeleteFileNowOrLater(ExpandConstant('{app}\tbzrtest.exe')); |
|
275 |
DeleteFileNowOrLater(ExpandConstant('{app}\tbzr_tracer.exe')); |
|
3565.5.2
by Mark Hammond
merge inno script changes |
276 |
end; |
277 |
||
278 |
if CurStep=ssPostInstall then begin |
|
279 |
// a couple of post-install tasks |
|
280 |
if IsComponentSelected('tortoise') then begin |
|
281 |
// Need to execute: |
|
282 |
// msiexec /i TortoiseOverlays-1.X.X.XXXX-win32.msi /qn /norestart |
|
3871.1.6
by Mark Hammond
remerge setup changes |
283 |
// 64bit notes: |
284 |
// We are still primarily a 32bit application - the only 64bit binary is the |
|
285 |
// shell extension, but even then, we need to install the 32bit version too. |
|
286 |
// Thus, we keep tortoise in 32bit "install mode" - meaning we are installed |
|
287 |
// to "\Program Files (x86)". We don't bother trying to install our single |
|
288 |
// 64bit DLL into "\Program Files" - we use a different DLL name for 32 and |
|
289 |
// 64 bit versions, so nothing will conflict. |
|
290 |
// Note however that on a 64bit OS, we only need the 64bit TortoiseOverlays - |
|
291 |
// the 32bit apps using shell extensions still work fine with that. |
|
3565.5.2
by Mark Hammond
merge inno script changes |
292 |
// [[[cog |
293 |
// if "TBZR" in os.environ: |
|
294 |
// import os |
|
3871.1.6
by Mark Hammond
remerge setup changes |
295 |
// cog.outl("if IsWin64 then") |
296 |
// cog.outl(" tovmsi := '%s'" % os.path.basename(os.environ["TORTOISE_OVERLAYS_MSI_X64"])) |
|
297 |
// cog.outl("else") |
|
298 |
// cog.outl(" tovmsi := '%s'" % os.path.basename(os.environ["TORTOISE_OVERLAYS_MSI_WIN32"])) |
|
3565.5.2
by Mark Hammond
merge inno script changes |
299 |
// else: |
300 |
// cog.outl("tovmsi := '';") |
|
301 |
// ]]] |
|
302 |
// [[[end]]] |
|
303 |
ExtractTemporaryFile(tovmsi); |
|
304 |
fqtovmsi := AddBackslash(ExpandConstant('{tmp}')) + tovmsi; |
|
305 |
params := '/i "' + fqtovmsi + '" /qn /norestart'; |
|
306 |
if not ShellExec('', 'msiexec.exe', params, '', SW_HIDE, |
|
307 |
ewWaitUntilTerminated, ErrorCode) then |
|
308 |
MsgBox('Failed to install TortoiseOverlays: ' + SysErrorMessage(ErrorCode), |
|
309 |
mbInformation, MB_OK); |
|
310 |
// Ideally we could be bzr_postinstall.exe this way too, but |
|
311 |
// its needed at uninstall time. |
|
312 |
end; |
|
313 |
// cause explorer to re-fetch handlers. |
|
314 |
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0); |
|
315 |
end; |
|
316 |
end; |
|
317 |
||
3565.5.7
by Mark Hammond
install all files with 'restartreplace uninsrestartdelete' and close |
318 |
|
319 |
function InitializeUninstall(): Boolean; |
|
320 |
begin
|
|
321 |
ShutdownTBZR; |
|
322 |
result := True; |
|
323 |
end; |