Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek wix: add keyboard hook to registry during setup

Changeset 7ac07220428c

Parent 8ee2db8769a2

by David Golub

Changes to 4 files · Browse files at 7ac07220428c Showing diff from parent 8ee2db8769a2 Diff from another changeset...

 
5
6
7
 
8
9
10
 
5
6
7
8
9
10
11
@@ -5,6 +5,7 @@
  <?define CLSID_TortoiseHgAdded = {AF42ADAB-8C2E-4285-B746-99B31094708E} ?>   <?define CLSID_TortoiseHgModified = {CDA1C89D-E9B5-4981-A857-82DD932EA2FD} ?>   <?define CLSID_TortoiseHgUnversioned = {9E3D4EC9-0624-4393-8B48-204C217ED1FF} ?> + <?define CLSID_TortoiseHgKeyboard = {36BFF16B-4EA0-4D91-9D2C-39941CF0BFE4} ?>   <?define OverlayCLSIDList =   {869C8877-2C3C-438D-844B-31B86BFE5E8A};{AF42ADAB-8C2E-4285-B746-99B31094708E};{CDA1C89D-E9B5-4981-A857-82DD932EA2FD};{9E3D4EC9-0624-4393-8B48-204C217ED1FF}   ?>
 
61
62
63
 
 
 
64
65
66
 
61
62
63
64
65
66
67
68
69
@@ -61,6 +61,9 @@
  <?define OverlaysShellRegistrationX64.guid = {9A678A1C-72D3-4713-AD8A-E7C08ED64DC9} ?>   <?define OverlayServerEXE.guid = {62C58746-BE5D-45F0-8AB7-2FE2AB9C57B0} ?>   + <?define KeyboardShellRegistrationX86.guid = {C179A394-03AF-4D3E-8C2E-3E4E00A7351B} ?> + <?define KeyboardShellRegistrationX64.guid = {992E4949-6F6E-4553-B8E1-723F770CCF81} ?> +   <?define ExtensionVersions.guid = {4ADF436B-9B25-4D95-B6AC-88717F5A037A} ?>   <?define COPYING.guid = {09DEF174-D0AB-4E8B-8A4E-1AD5B7E4C9BD} ?>  
Change 1 of 1 Show Entire File win32/​wix/​shell-register-keyboard.wxi Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@@ -0,0 +1,17 @@
+<Include> + <!-- keyboard hook component --> + <RegistryValue + Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgKeyboard)' + Type='string' Value='TortoiseHg' + /> + <RegistryValue + Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgKeyboard)\InProcServer32' + Type='string' Name='ThreadingModel' Value='Apartment' + /> + + <!-- register browser helper object --> + <RegistryValue + Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\${var.CLSID_TortoiseHgKeyboard}' + Type='string' Value='TortoiseHg' + /> +</Include>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
 
 
 
141
142
143
144
145
146
147
148
149
150
151
152
153
154
 
 
 
 
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
 
 
 
 
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
 
 
 
 
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
 
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
 
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
 <?xml version='1.0' encoding='windows-1252'?>  <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>     <!-- Copyright 2010 Steve Borho <steve@borho.org>     This software may be used and distributed according to the terms of the   GNU General Public License version 2 or any later version. -->     <?include guids.wxi ?>   <?include defines.wxi ?>     <?if $(var.Platform) = "x64" ?>   <?define PFolder = ProgramFiles64Folder ?>   <?else?>   <?define PFolder = ProgramFilesFolder ?>   <?endif?>     <?define ProgramRegKey = Software\TortoiseHg ?>     <?include TortoiseOverlaysDefines.wxi ?>     <!-- shell extension CLSID's -->   <?include ThgCLSIDs.wxi ?>     <Product Name='TortoiseHg $(var.Version) ($(var.Platform))'   Id='$(var.ProductId)'   Version='$(var.Version)'   UpgradeCode='$(var.ProductUpgradeCode)'   Language='1033' Codepage='1252'   Manufacturer='Steve Borho and others'>     <Package Id='*' Keywords='Installer'   Description="Windows shell extension for Mercurial DVCS (version $(var.Version))"   Manufacturer='Steve Borho and others'   InstallerVersion='300' Languages='1033' Compressed='yes'   SummaryCodepage='1252' Platform='$(var.Platform)'   Comments='$(var.Comments)'   />     <Media Id='1' Cabinet='tortoisehg.cab' EmbedCab='yes' CompressionLevel='high'   DiskPrompt='CD-ROM #1'   />   <Property Id='DiskPrompt' Value="TortoiseHg $(var.Version) Installation [1]" />     <Property Id='INSTALLDIR'>   <ComponentSearch Id='SearchForMainExecutableComponent'   Guid='$(var.ComponentMainExecutableGUID)'   />   </Property>   <Property Id='INNOSETUPINSTALL'>   <RegistrySearch   Id='SearchForOldInnoSetupTortoiseHg' Win64='$(var.IsX64)'   Root='HKLM'   Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\TortoiseHg_is1'   Type='directory'   Name='InstallLocation'   />   </Property>   <?if $(var.Platform) = "x86" ?>   <Condition Message =   "The x86 installer may not be used on a x64 platform"   >NOT VersionNT64   </Condition>   <?endif?>   <Condition Message =   "Backup your user Mercurial.ini file, then uninstall [INNOSETUPINSTALL] before installing this package."   >Installed OR NOT INNOSETUPINSTALL   </Condition>   <Condition Message=   'TortoiseHg requires Windows XP or higher'   >VersionNT >= 501   </Condition>     <!--Property Id='ARPCOMMENTS'>any comments</Property-->   <Property Id='ARPCONTACT'>tortoisehg-discuss@lists.sourceforge.net</Property>   <Property Id='ARPHELPLINK'>http://tortoisehg.org/</Property>   <Property Id='ARPURLINFOABOUT'>http://tortoisehg.org/about.html</Property>   <Property Id='ARPURLUPDATEINFO'>http://tortoisehg.org/</Property>   <Property Id='ARPHELPTELEPHONE'>http://mercurial.selenic.com/wiki/Support</Property>   <Property Id='ARPPRODUCTICON'>thgIcon.ico</Property>     <Property Id='INSTALLEDTORTOISEHGPRODUCTS' Secure='yes'></Property>   <Property Id='REINSTALLMODE'>amus</Property>     <!--Auto-accept the license page-->   <Property Id='LicenseAccepted'>1</Property>     <Directory Id='TARGETDIR' Name='SourceDir'>   <Directory Id='$(var.PFolder)' Name='PFiles'>   <Directory Id='INSTALLDIR' Name='TortoiseHg'>   <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)' Win64='$(var.IsX64)'>   <File Id='thgEXE' Name='thg.exe' KeyPath='yes'   Source='dist\thg.exe'   />   <Environment Id="Environment" Name="PATH" Part="last" System="yes"   Permanent="no" Value="[INSTALLDIR]" Action="set"   />   </Component>   <Component Id='WinExecutable' Guid='$(var.ComponentWinExecutableGUID)' Win64='$(var.IsX64)'>   <File Id='thgwEXE' Name='thgw.exe' Source='dist\thgw.exe' />   <Shortcut Id="thgStartMenu" Directory="ProgramMenuDir"   Name="TortoiseHg Workbench"   Icon="thgIcon.ico" IconIndex="0" Advertise="yes"   />   </Component>   <Component Id='ExtensionVersions' Guid='$(var.ExtensionVersions.guid)' Win64='$(var.IsX64)'>   <File Id='ExtensionVersions' Name='extension-versions.txt'   KeyPath='yes'   Source='..\extension-versions.txt'   />   </Component>   <Component Id='OverlayServerEXE' Guid='$(var.OverlayServerEXE.guid)' Win64='$(var.IsX64)'>   <File Id='OverlayServerEXE' Name='TortoiseHgOverlayServer.exe'   KeyPath='yes'   Source='dist\TortoiseHgOverlayServer.exe' >   <Shortcut Id="OverlayServerEXEshortcut" Directory="ProgramMenuDir"   Name="TortoiseHg Overlay Icon Server"   Icon="thgIcon.ico" IconIndex="0" Advertise="yes"   />   </File>   <RegistryValue   Name='TortoiseHgOverlayIconServer'   Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Run'   Type='string' Value='[INSTALLDIR]TortoiseHgOverlayServer.exe'   />   </Component>     <?if $(var.Platform) = "x64" ?>   <Component Id='thgshellx64dll' Guid='$(var.thgshellx64dll.guid)' Win64='yes'>   <File Id='thgshellx64dll' Name='ThgShellx64.dll' KeyPath='yes'   Source='win32\ThgShellx64.dll'/>   <RegistryValue   Root='HKLM' Key='$(var.ProgramRegKey)'   Type='string' Value='[INSTALLDIR]'/>   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgCmenu)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx64.dll'/>   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgDropHandler)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx64.dll'/> + <RegistryValue + Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgKeyboard)\InProcServer32' + Type='string' Value='[INSTALLDIR]ThgShellx64.dll'/>   <?foreach CLSID in $(var.OverlayCLSIDList) ?>   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx64.dll'/>   <?endforeach?>   </Component>   <Component Id='CmenuShellRegistrationX64' Win64='yes'   Guid='$(var.CmenuShellRegistrationX64.guid)'>   <?include shell-register-cmenu.wxi ?>   </Component>   <Component Id='OverlaysShellRegistrationX64' Win64='yes'   Guid='$(var.OverlaysShellRegistrationX64.guid)'>   <?include shell-register-overlays.wxi ?>   </Component> + <Component Id='KeyboardShellRegistration' Win64='yes' + Guid='$(var.KeyboardShellRegistrationX64.guid)'> + <?include shell-register-keyboard.wxi ?> + </Component>   <?else?>   <Component Id='thgshellx86dll' Guid='$(var.thgshellx86dll.guid)' Win64='no'>   <File Id='thgshellx86dll' Name='ThgShellx86.dll' KeyPath='yes'   Source='win32\ThgShellx86.dll'   />   <RegistryValue   Root='HKLM' Key='$(var.ProgramRegKey)'   Type='string' Value='[INSTALLDIR]'   />   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgCmenu)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgDropHandler)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   /> + <RegistryValue + Root='HKLM' Key='CLSID\$(var.CLSID_TortoiseHgKeyboard)\InProcServer32' + Type='string' Value='[INSTALLDIR]ThgShellx86.dll' + />   <?foreach CLSID in $(var.OverlayCLSIDList) ?>   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID)\InProcServer32'   Type='string' Value='[INSTALLDIR]ThgShellx86.dll'   />   <?endforeach?>   </Component>   <Component Id='CmenuShellRegistrationX86'   Guid='$(var.CmenuShellRegistrationX86.guid)' Win64='no'>   <?include shell-register-cmenu.wxi ?>   </Component>   <Component Id='OverlaysShellRegistrationX86'   Guid='$(var.OverlaysShellRegistrationX86.guid)' Win64='no'>   <?include shell-register-overlays.wxi ?>   </Component> + <Component Id='KeyboardShellRegistration' Win64='no' + Guid='$(var.KeyboardShellRegistrationX86.guid)'> + <?include shell-register-keyboard.wxi ?> + </Component>   <?endif?>     <Component Id='COPYING' Guid='$(var.COPYING.guid)' Win64='$(var.IsX64)'>   <File Id='COPYING' Name='COPYING.txt'   Source='COPYING.txt'   />   </Component>   <Component Id='docdiffEXE' Guid='$(var.docdiffEXE.guid)' Win64='$(var.IsX64)'>   <File Id='docdiffEXE' Name='docdiff.exe' KeyPath='yes'   Source='dist\docdiff.exe'   />   </Component>     <Component Id='TortoisePlinkEXE' Guid='$(var.TortoisePlinkEXE.guid)' Win64='$(var.IsX64)'>   <File Id='TortoisePlinkEXE' Name='TortoisePlink.exe' KeyPath='yes'   Source='..\contrib\TortoisePlink.exe'   />   </Component>   <Component Id='PageantEXE' Guid='$(var.PageantEXE.guid)' Win64='$(var.IsX64)'>   <File Id='PageantEXE' Name='Pageant.exe' KeyPath='yes'   Source='..\contrib\Pageant.exe'   />   </Component>     <?if $(var.Platform) = "x64" ?>   <Component Id='KDiff3EXE' Guid='$(var.KDiff3EXE.guid)' Win64='$(var.IsX64)'>   <File Id='KDiff3EXE' Name='kdiff3.exe' KeyPath='yes'   Source='..\contrib\kdiff3x64.exe'/>   </Component>   <?else?>   <Component Id='KDiff3EXE' Guid='$(var.KDiff3EXE.guid)' Win64='$(var.IsX64)'>   <File Id='KDiff3EXE' Name='kdiff3.exe' KeyPath='yes'   Source='..\contrib\kdiff3.exe'/>   </Component>   <?endif?>     <Directory Id='docFolder' Name='doc'>   <Component Id='chmFile' Guid='$(var.chmFile.guid)' Win64='$(var.IsX64)'>   <File Id='chmFile' Name='TortoiseHg.chm' KeyPath='yes'   Source='doc\build\chm\TortoiseHg.chm' >   <Shortcut Id="chmStartMenu" Directory="ProgramMenuDir"   Name="TortoiseHg Manual (CHM)"   Icon="thgIcon.ico" IconIndex="0" Advertise="yes"   />   </File>   </Component>   <Component Id='pdfFile' Guid='$(var.pdfFile.guid)' Win64='$(var.IsX64)'>   <File Id='pdfFile' Name='TortoiseHg.pdf' KeyPath='yes'   Source='doc\build\pdf\TortoiseHg.pdf'>   <Shortcut Id="pdfStartMenu" Directory="ProgramMenuDir"   Name="TortoiseHg Manual (PDF)"   Icon="thgIcon.ico" IconIndex="0" Advertise="yes"   />   </File>   </Component>   <Component Id='hgbook' Guid='$(var.hgbook.guid)' Win64='$(var.IsX64)'>   <File Id='hgbook' Name='hgbook.pdf' KeyPath='yes'   Source='..\misc\hgbook.pdf'>   <Shortcut Id="hgbookStartMenu" Directory="ProgramMenuDir"   Name="Mercurial - The Definitive Guide (PDF)"   Icon="hgIcon.ico" IconIndex="0" Advertise="yes"   />   </File>   </Component>   </Directory>     <Directory Id='HGRCD' Name='hgrc.d'>   <Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)' Win64='$(var.IsX64)'>   <File Id='mercurial.rc' Name='Mercurial.rc' ReadOnly='yes'   Source='win32\mercurial.rc'   />   </Component>   <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'>   <File Id='mergetools.rc' Name='MergeTools.rc' ReadOnly='yes'   Source='contrib\mergetools.rc'   />   </Component>   <Component Id="mergepatterns.rc" Guid='$(var.mergepatterns.rc.guid)' Win64='$(var.IsX64)'>   <File Id='mergepatterns.rc' Name='MergePatterns.rc'   ReadOnly='yes' KeyPath='yes'   Source='win32\mergepatterns.rc'   />   </Component>   <Component Id='paths.rc' Guid='$(var.paths.rc.guid)' Win64='$(var.IsX64)'>   <CreateFolder/>   <IniFile Id="ini0" Action="createLine" Directory="HGRCD" Name="Paths.rc"   Section="web" Key="cacerts" Value="[INSTALLDIR]hgrc.d\cacert.pem" />   </Component>   <Component Id='cacert.pem' Guid='$(var.cacert.pem.guid)' Win64='$(var.IsX64)'>   <File Id='cacert.pem' Name='cacert.pem' Source='..\misc\cacert.pem'   ReadOnly='yes' KeyPath='yes'/>   </Component>   </Directory>   </Directory>   </Directory>     <Directory Id="ProgramMenuFolder" Name="Programs">   <Directory Id="ProgramMenuDir" Name="TortoiseHg">   <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)">   <RemoveFolder Id='ProgramMenuDir' On='uninstall' />   <RegistryValue   Root='HKCU' Key='$(var.ProgramRegKey)'   Type='string' Value='[INSTALLDIR]' KeyPath='yes'   />   <Shortcut Id='UrlShortcut' Directory='ProgramMenuDir' Name='TortoiseHg Web Site'   Target='[ARPHELPLINK]' Icon="thgIcon.ico" IconIndex='0' />   <!-- Shortcut Id="UninstallProduct" Name="Uninstall TortoiseHg"   Target="[System64Folder]msiexec.exe"   Arguments="/x [ProductCode]"   Description="Uninstalls TortoiseHg" /-->   </Component>   </Directory>   </Directory>     <?if $(var.Platform) = "x64" ?>   <Directory Id="ProgramFilesFolder" Name="Programsx86">   <Directory Id='INSTALLDIRx86' Name='TortoiseHg'>   <Component Id='thgshellx86dll' Guid='$(var.thgshellx86dll.guid)' Win64='no'>   <File Id='thgshellx86dll' Name='ThgShellx86.dll' KeyPath='yes'   Source='win32\ThgShellx86.dll'   />   <RegistryValue   Root='HKLM' Key='$(var.ProgramRegKey)'   Type='string' Value='[INSTALLDIR]'   />   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgCmenu)\InProcServer32'   Type='string' Value='[INSTALLDIRx86]ThgShellx86.dll'   />   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgDropHandler)\InProcServer32'   Type='string' Value='[INSTALLDIRx86]ThgShellx86.dll'   />   <?foreach CLSID in $(var.OverlayCLSIDList) ?>   <RegistryValue   Root='HKCR' Key='CLSID\$(var.CLSID)\InProcServer32'   Type='string' Value='[INSTALLDIRx86]ThgShellx86.dll'   />   <?endforeach?>   </Component>   <Component Id='CmenuShellRegistrationX86'   Guid='$(var.CmenuShellRegistrationX86.guid)' Win64='no'>   <?include shell-register-cmenu.wxi ?>   </Component>   <Component Id='OverlaysShellRegistrationX86'   Guid='$(var.OverlaysShellRegistrationX86.guid)' Win64='no'>   <?include shell-register-overlays.wxi ?>   </Component>   </Directory>   </Directory>   <?endif?>     <?if $(var.Platform) = "x86" ?>   <Merge Id='VCRedist' DiskId='1' Language='1033'   SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x86_msm.msm'/>   <Merge Id='VCRedistPolicy' DiskId='1' Language='1033'   SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x86_msm.msm'/>   <?else?>   <Merge Id='VCRedist' DiskId='1' Language='1033'   SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x64_msm.msm'/>   <Merge Id='VCRedistPolicy' DiskId='1' Language='1033'   SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x64_msm.msm'/>   <Merge Id='TortoiseOverlaysMergeX64' Language='0' DiskId='1'   SourceFile='$(var.TOverlaysSrcDir)\$(var.TOverlaysSrcFilenameX64)'/>   <?endif?>     <Merge Id='TortoiseOverlaysMergeX86' Language='0' DiskId='1'   SourceFile='$(var.TOverlaysSrcDir)\$(var.TOverlaysSrcFilenameX86)'/>     </Directory>     <Feature Id='Complete' Title='TortoiseHg'   Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'   Description='The complete package' >   <Feature Id='MainProgram' Title='Program'   Level='1' Absent='disallow' Display='hidden'   Description='Command line applications: hg, thg' >   <ComponentRef Id='MainExecutable' />   <ComponentRef Id='WinExecutable' />   <ComponentRef Id='ProgramMenuDir' />   <ComponentRef Id='COPYING' />   <ComponentRef Id='mercurial.rc' />   <ComponentRef Id='mergetools.rc' />   <ComponentRef Id='paths.rc' />   <ComponentRef Id='cacert.pem' />   <ComponentRef Id='ExtensionVersions' />   <ComponentRef Id='helpFolder' />   <ComponentRef Id='distOutput' />   <ComponentRef Id='imageFormats' />   <ComponentGroupRef Id='templatesFolder' />   <ComponentRef Id='Icons' />   </Feature>   <Feature Id='VCRedist' Title='Visual C++ 9.0 Runtime'   AllowAdvertise='no' Display='hidden' Level='1'>   <MergeRef Id='VCRedist'/>   <MergeRef Id='VCRedistPolicy' />   </Feature>   <?if $(var.Platform) = "x64" ?>   <Feature Id='ShellExtensionX64' Title='Shell Extension x64'   Level='1' AllowAdvertise='no'   Description='Context menu for 64-bit processes'>   <ComponentRef Id='cmenuI18n' />   <ComponentRef Id='thgshellx64dll' />   <ComponentRef Id='CmenuShellRegistrationX64' />   <Feature Id='OverlaysX64' Title='Overlay Icons'   Level='1' AllowAdvertise='no'   Description='Overlay icons for 64-bit processes'   >   <ComponentRef Id='OverlayServerEXE' />   <MergeRef Id='TortoiseOverlaysMergeX64' />   <ComponentRef Id='OverlaysShellRegistrationX64' /> + <ComponentRef Id='KeyboardShellRegistrationX64' />   </Feature>   </Feature>   <?endif?>   <?if $(var.Platform) = "x64" ?>   <?define ShellExtensionX86level = 1000 ?>   <?else?>   <?define ShellExtensionX86level = 1 ?>   <?endif?>   <Feature Id='ShellExtensionX86' Title='Shell Extension x86'   Level='$(var.ShellExtensionX86level)'   Absent='allow' AllowAdvertise='no'   Description='Context menu for 32-bit processes'>   <ComponentRef Id='cmenuI18n' />   <ComponentRef Id='thgshellx86dll' />   <ComponentRef Id='CmenuShellRegistrationX86' />   <Feature Id='OverlaysX86' Title='Overlay Icons'   Level='1' AllowAdvertise='no'   Description='Overlay icons for 32-bit processes'>   <ComponentRef Id='OverlayServerEXE' />   <MergeRef Id='TortoiseOverlaysMergeX86' />   <ComponentRef Id='OverlaysShellRegistrationX86' /> + <ComponentRef Id='KeyboardShellRegistrationX86' />   </Feature>   </Feature>   <Feature Id='Locales' Level='1'   Title='Translations'   Description='Mercurial and TortoiseHg Translations'>   <ComponentGroupRef Id='localeFolder' />   <ComponentRef Id='i18nFolder' />   <ComponentGroupRef Id='thgLocaleFolder' />   <ComponentRef Id='thgI18nFolder' />   </Feature>   <Feature Id='ThgDocumentation' Level='1'   Title='Documentation'   Description='TortoiseHg Manual and HTML man pages'>   <Feature Id='CHM' Level='1'   Title='CHM'   Description='Compiled HTML'>   <ComponentRef Id='chmFile' />   </Feature>   <Feature Id='PDF' Level='1'   Title='PDF'   Description='Portable Document Format'>   <ComponentRef Id='pdfFile' />   </Feature>   <Feature Id='HgDocumentation' Level='1'   Title='Man Pages'   Description='Mercurial HTML man pages'>   <ComponentGroupRef Id='docFolder' />   </Feature>   <Feature Id='HgBook' Level='1'   Title='Mercurial: The Definitive Guide'   Description="Mercurial book by Bryan O'Sullivan">   <ComponentRef Id='hgbook' />   </Feature>   </Feature>   <Feature Id='KDiff3' Level='1'   Title='KDiff3'   Description='Diff/Merge Tool'>   <ComponentRef Id='KDiff3EXE' />   </Feature>   <Feature Id='SSHUtils' Level='1'   Title='SSH Utils'   Description='TortoisePlink and Pageant key agent'>   <ComponentRef Id='TortoisePlinkEXE' />   <ComponentRef Id='PageantEXE' />   </Feature>   <Feature Id='Misc' Level='1'   Title='Miscellaneous'   Description='Contributed scripts'>   <Feature Id='HGContrib' Level='1'   Title='Contrib'   Description='Mercurial contrib/'>   <ComponentGroupRef Id='contribFolder' />   </Feature>   <Feature Id='DocDiffFeature' Level='1'   Title='Doc Diff Scripts'   Description='TortoiseSVN scripts for comparing binary files'>   <ComponentGroupRef Id='DiffScripts' />   <ComponentRef Id='docdiffEXE' />   <ComponentRef Id='mergepatterns.rc' />   </Feature>   </Feature>   </Feature>     <!-- terminate.dll terminates any running TortoiseHgOverlayServer.exe that supports the   terminate command over the command pipe. Windows installer sometimes   fails to shutdown TortoiseHgOverlayServer.exe, which occasionally leads to a crash   of TortoiseHgOverlayServer.exe during install, which in turn pops up an ugly crash   report dialog pointing to faulting module PYTHON26.DLL. -->   <Binary Id='TerminateDLL' SourceFile='win32\terminate-x86.dll' />   <CustomAction Id='CallTerminate'   BinaryKey='TerminateDLL' DllEntry='TerminateIconServer'   />     <CustomAction Id='StartOverlayServerEXE'   FileKey='OverlayServerEXE' ExeCommand='' Return='asyncNoWait'   />     <InstallExecuteSequence>   <!-- AppSearch must be done before RemoveExistingProducts and before   FindRelatedProducts -->   <AppSearch Sequence="1"></AppSearch>   <Custom Action='CallTerminate' Before='InstallValidate'>   INSTALLEDTORTOISEHGPRODUCTS   </Custom>   <RemoveExistingProducts After="InstallValidate">   INSTALLEDTORTOISEHGPRODUCTS   </RemoveExistingProducts>   <?if $(var.Platform) = "x64" ?>   <Custom Action='StartOverlayServerEXE' After='InstallFinalize'>   <![CDATA[&OverlaysX86=3 OR &OverlaysX64=3]]>   </Custom>   <?else?>   <Custom Action='StartOverlayServerEXE' After='InstallFinalize'>   <![CDATA[&OverlaysX86=3]]>   </Custom>   <?endif?>   </InstallExecuteSequence>     <Upgrade Id='$(var.ProductUpgradeCode)'>   <UpgradeVersion   IncludeMinimum='yes' Minimum='0.0.0' IncludeMaximum='no' OnlyDetect='no'   Property='INSTALLEDTORTOISEHGPRODUCTS'   />   </Upgrade>     <UIRef Id="WixUI_FeatureTree" />   <UIRef Id="WixUI_ErrorProgressText" />     <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value =   "NOTE: Logoff/logon or restarting explorer may be needed to start the overlay icons"   />     <SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />     <WixVariable Id="WixUILicenseRtf" Value="win32\wix\COPYING.rtf" />   <WixVariable Id="WixUIBannerBmp" Value="win32\wix\WixUIBannerBmp.bmp" />   <WixVariable Id="WixUIDialogBmp" Value="win32\wix\WixUIDialogBmp.bmp" />     <Icon Id="thgIcon.ico" SourceFile="icons\thg_logo.ico" />   <Icon Id="hgIcon.ico" SourceFile="icons\hg.ico" />   </Product>  </Wix>