81
81
ChangesEnvironment=yes
82
PrivilegesRequired=none
82
; MARKH: PrivilegesRequired=none means it can't be installed by a non-admin
83
; user - but sadly we still need admin - eg, tortoise overlays, installing
84
; into "\Program Files", installing COM objects etc all must be done by an
86
PrivilegesRequired=admin
86
Source: "*.*"; DestDir: "{app}"; Flags: ignoreversion;
87
Source: "lib\*.*"; DestDir: "{app}\lib"; Flags: createallsubdirs ignoreversion recursesubdirs;
88
Source: "doc\*.*"; DestDir: "{app}\doc"; Flags: createallsubdirs ignoreversion recursesubdirs;
89
Source: "plugins\*.*"; DestDir: "{app}\plugins"; Components: plugins; Flags: createallsubdirs ignoreversion recursesubdirs;
89
; Tortoise files - these are at the top as we use 'ExtractTemporaryFile' on
90
; the TortoiseOverlays MSI, and inno documents such files should be at the
91
; start for best performance.
93
; if "TBZR" in os.environ: # we need a more formal way of controlling this...
94
; tovmsi = os.environ["TORTOISE_OVERLAYS_MSI_WIN32"] # point at TortoiseOverlays .msi
95
; cog.outl('Source: "%s"; Flags: dontcopy ignoreversion ; Components: tortoise' % tovmsi)
96
; cog.outl('Source: "tbzrcache.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise')
97
; cog.outl('Source: "tbzrcachew.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise')
98
; cog.outl('Source: "tbzrcommand.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise')
99
; cog.outl('Source: "tbzrcommandw.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: tortoise')
100
; cog.outl('Source: "tbzr_tracer.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete; Components: debug')
101
; # Note 'regserver' here appears to run regsvr32 without elevation, which
102
; # is no good for us - so we have a [run] entry below.
103
; cog.outl('Source: "tbzr.dll"; DestDir: "{app}"; Flags: ignoreversion regserver restartreplace uninsrestartdelete; Components: tortoise')
104
; cog.outl(r'Source: "plugins\qbzr\*"; DestDir: "{app}\plugins\qbzr"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; Components: tortoise')
106
; cog.outl('Source: "%s\\doc\\index.html"; DestDir: "{app}\\doc\\tbzr"; Flags: ignoreversion; Components: tortoise' % os.environ['TBZR'])
110
; We can't say '*.*' due to optional components.
111
Source: "plugins\*.*"; DestDir: "{app}\\plugins"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete; Components: plugins
112
Source: "*.bat"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete;
113
Source: "*.url"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete;
114
Source: "msvc*.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete;
115
Source: "bz*.exe"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete;
116
Source: "Python*.dll"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete;
117
Source: "lib\*.*"; DestDir: "{app}\lib"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete;
118
Source: "doc\*.*"; DestDir: "{app}\doc"; Flags: createallsubdirs ignoreversion recursesubdirs restartreplace uninsrestartdelete;
138
Name: "typical"; Description: "A typical installation"
139
Name: "full"; Description: "Full Installation (typical installation plus test utilities)"
140
Name: "compact"; Description: "Compact installation"
141
Name: "custom"; Description: "Custom installation"; Flags: iscustom
110
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
111
Name: "plugins"; Description: "Default plugins"; Types: full custom;
144
Name: "main"; Description: "Main Files"; Types: full typical compact custom; Flags: fixed
145
Name: "plugins"; Description: "Default plugins"; Types: full typical custom;
114
148
; cog.outl('Name: "cabundle"; '
115
149
; 'Description: "CA certificates for SSL support"; '
116
; 'Types: full custom')
150
; 'Types: full typical custom')
151
; if "TBZR" in os.environ: # we need a more formal way of controlling this...
152
; cog.outl('Name: "tortoise"; Description: "Windows Shell Extensions (TortoiseBZR) - EXPERIMENTAL"; Types: full typical custom;')
153
; cog.outl('Name: "debug"; Description: "Test, diagnostic and debugging utilities"; Types: full custom;')
122
159
Name: "{userappdata}\bazaar\2.0"
123
160
Name: "{app}\plugins"; Flags: uninsalwaysuninstall
127
164
Name: "{group}\Documentation index"; Filename: "{app}\doc\index.html"; WorkingDir: "{app}\doc";
128
165
Name: "{group}\Bazaar Home Page"; Filename: "{app}\bazaar.url"; Comment: "http://www.bazaar-vcs.org";
129
166
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";
130
Name: "{group}\Uninstall Bazaar"; Filename: "{uninstallexe}"; IconFileName: "{sys}\shell32.dll"; IconIndex: 101; Comment: "Remove Bzr completely";
167
; NOTE: Intent is to change the log file location - the line below will need to change to reflect that.
168
Name: "{group}\Open Bzr log file"; Filename: "notepad.exe"; Parameters: "{userdocs}\.bzr.log"; Comment: "Launch notepad to view the bzr log file";
171
; if "TBZR" in os.environ:
172
; cog.outl(r'Name: "{group}\TortoiseBZR documentation"; Filename: "{app}\doc\tbzr\index.html"; Comment: "Launch TortoiseBZR documentation";')
175
; No Uninstall here - Control Panel will do
134
Name: Path; Description: "Add {app} directory to PATH environment variable";
179
Name: Path; Description: "Add {app} directory to PATH environment variable"
135
180
Name: Shell; Description: "Add Bzr context menu to shell"; Flags: unchecked
182
; if "TBZR" in os.environ:
183
; cog.outl('Name: TBZRReadme; Description: "View the TortoiseBZR Readme"; Components: tortoise')
139
189
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; Flags: noerror uninsdeletekey
140
190
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "InstallPath"; ValueType: string; ValueData: "{app}"; Flags: noerror
141
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "BzrlibPath"; ValueType: string; ValueData: "{app}\lib\library.zip\bzrlib"; Flags: noerror
142
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PluginsPath"; ValueType: string; ValueData: "{app}\plugins"; Flags: noerror
143
Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PythonPath"; ValueType: string; ValueData: "{app}\lib\library.zip"; Flags: noerror
191
; Don't write stuff that can be implied
192
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "BzrlibPath"; ValueType: string; ValueData: "{app}\lib\library.zip\bzrlib"; Flags: noerror
193
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PluginsPath"; ValueType: string; ValueData: "{app}\plugins"; Flags: noerror
194
;Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "PythonPath"; ValueType: string; ValueData: "{app}\lib\library.zip"; Flags: noerror
144
195
; [[[cog cog.outl('Root: HKLM; Subkey: "SOFTWARE\Bazaar"; ValueName: "Version"; ValueType: string; ValueData: "%s"; Flags: noerror' % VERSION) ]]]
149
200
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--start-bzr"; Flags: skipifdoesntexist runhidden;
152
; if os.path.isfile('win32_bzr.exe/lib/win32ui.pyd'): # pywin32 mfc wrapper
153
; cog.outl('Filename: "{app}\bzr_postinstall.exe"; '
154
; 'Parameters: "--check-mfc71"; '
155
; 'Flags: skipifdoesntexist skipifsilent runhidden;')
158
201
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--add-path"; Tasks: Path; Flags: skipifdoesntexist skipifsilent runhidden;
159
202
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--add-shell-menu"; Tasks: Shell; Flags: skipifdoesntexist skipifsilent runhidden;
204
; if "TBZR" in os.environ:
205
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/s tbzr.dll"; WorkingDir: "{app}"; Components: tortoise; Description: "Registering Tortoise"; StatusMsg: "Registering Tortoise"')
206
; cog.outl(r'Filename: "{app}\doc\tbzr\index.html"; Tasks: TBZRReadme; Flags: shellexec')
163
Filename: "{app}\bzr_postinstall.exe"; Parameters: "--delete-path --delete-shell-menu --silent"; Flags: skipifdoesntexist runhidden;
167
Type: filesandordirs; Name: "{app}\plugins\*"
213
; if "TBZR" in os.environ:
214
; cog.outl('Filename: "regsvr32.exe"; Parameters: "/u /s tbzr.dll"; WorkingDir: "{app}"; Components: tortoise; StatusMsg: "Unregistering Tortoise"; Flags: skipifdoesntexist')
220
SHCNF_IDLIST = $0000;
221
SHCNE_ASSOCCHANGED = $08000000;
224
procedure SHChangeNotify(wEventId, uFlags, dwItem1, dwItem2: Integer);
225
external 'SHChangeNotify@shell32.dll stdcall';
227
procedure ShutdownTBZR;
232
// if "TBZR" not in os.environ:
233
// cog.outl(' Exit; // No TSVN set - exit this procedure.')
236
// ask the cache process to shut-down.
237
hwnd := FindWindowByClassName('TBZRCache_Taskbar');
239
PostMessage(hwnd, WM_QUIT, 1, 0);
242
procedure CurStepChanged(CurStep: TSetupStep);
244
S, tovmsi, fqtovmsi, params: String;
247
if CurStep=ssInstall then begin
251
if CurStep=ssPostInstall then begin
252
// a couple of post-install tasks
253
if IsComponentSelected('tortoise') then begin
255
// msiexec /i TortoiseOverlays-1.X.X.XXXX-win32.msi /qn /norestart
257
// if "TBZR" in os.environ:
259
// cog.outl("tovmsi := '%s';" % os.path.basename(os.environ["TORTOISE_OVERLAYS_MSI_WIN32"]))
261
// cog.outl("tovmsi := '';")
264
ExtractTemporaryFile(tovmsi);
265
fqtovmsi := AddBackslash(ExpandConstant('{tmp}')) + tovmsi;
266
params := '/i "' + fqtovmsi + '" /qn /norestart';
267
if not ShellExec('', 'msiexec.exe', params, '', SW_HIDE,
268
ewWaitUntilTerminated, ErrorCode) then
269
MsgBox('Failed to install TortoiseOverlays: ' + SysErrorMessage(ErrorCode),
270
mbInformation, MB_OK);
271
// Ideally we could be bzr_postinstall.exe this way too, but
272
// its needed at uninstall time.
274
// cause explorer to re-fetch handlers.
275
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
280
function InitializeUninstall(): Boolean;