Read about our upcoming Code of Conduct on this issue

tortoisehg.wxs 23.8 KB
Newer Older
1
2
3
4
5
6
7
8
<?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. -->

Adrian Buehlmann's avatar
Adrian Buehlmann committed
9
  <?include guids.wxi ?>
Steve Borho's avatar
Steve Borho committed
10
  <?include defines.wxi ?>
11

12
  <?if $(var.Platform) = "x64" ?>
Steve Borho's avatar
Steve Borho committed
13
    <?define PFolder = ProgramFiles64Folder ?>
14
  <?else?>
Steve Borho's avatar
Steve Borho committed
15
    <?define PFolder = ProgramFilesFolder ?>
16
17
  <?endif?>

18
  <?define ProgramRegKey = Software\TortoiseHg ?>
19

20
  <?include TortoiseOverlaysDefines.wxi ?>
21

22
  <!-- shell extension CLSID's -->
23
  <?include ../../win32/shellext/ThgCLSIDs.wxi ?>
24

25
  <Product Name='TortoiseHg $(var.Version) ($(var.Platform))'
26
27
28
29
           Id='$(var.ProductId)'
           Version='$(var.Version)'
           UpgradeCode='$(var.ProductUpgradeCode)'
           Language='1033' Codepage='1252'
30
           Manufacturer='Steve Borho and others'>
31

32
33
    <Package Id='*' Keywords='Installer'
             Description="Windows shell extension for Mercurial DVCS (version $(var.Version))"
34
             Manufacturer='Steve Borho and others'
35
36
37
38
             InstallerVersion='300' Languages='1033' Compressed='yes'
             SummaryCodepage='1252' Platform='$(var.Platform)'
             Comments='$(var.Comments)'
    />
39

40
41
42
    <Media Id='1' Cabinet='tortoisehg.cab' EmbedCab='yes' CompressionLevel='high'
           DiskPrompt='CD-ROM #1'
    />
43
44
45
    <Property Id='DiskPrompt' Value="TortoiseHg $(var.Version) Installation [1]" />

    <Property Id='INSTALLDIR'>
46
47
48
      <ComponentSearch Id='SearchForMainExecutableComponent' 
                       Guid='$(var.ComponentMainExecutableGUID)'
      />
49
50
    </Property> 
    <Property Id='INNOSETUPINSTALL'>
51
52
53
54
55
56
57
        <RegistrySearch
          Id='SearchForOldInnoSetupTortoiseHg' Win64='$(var.IsX64)'
          Root='HKLM'
          Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\TortoiseHg_is1'
          Type='directory'
          Name='InstallLocation'
        />
58
59
    </Property>
    <?if $(var.Platform) = "x86" ?>
60
61
62
63
      <Condition Message =
        "The x86 installer may not be used on a x64 platform"
          >NOT VersionNT64
      </Condition>
64
    <?endif?>
65
66
67
68
69
70
71
    <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
72
73
74
75
76
77
78
79
80
81
82
83
84
    </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>

85
86
87
    <!--Auto-accept the license page-->
    <Property Id='LicenseAccepted'>1</Property>

88
    <Directory Id='TARGETDIR' Name='SourceDir'>
Steve Borho's avatar
Steve Borho committed
89
      <Directory Id='$(var.PFolder)' Name='PFiles'>
90
        <Directory Id='INSTALLDIR' Name='TortoiseHg'>
Steve Borho's avatar
Steve Borho committed
91
          <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)' Win64='$(var.IsX64)'>
Adrian Buehlmann's avatar
Adrian Buehlmann committed
92
93
94
            <File Id='thgEXE' Name='thg.exe' KeyPath='yes'
                  Source='dist\thg.exe'
            />
95
            <Environment Id="Environment" Name="PATH" Part="last" System="yes"
Steve Borho's avatar
Steve Borho committed
96
                         Permanent="no" Value="[INSTALLDIR]bin" Action="set"
97
            />
Steve Borho's avatar
Steve Borho committed
98
          </Component>
Steve Borho's avatar
Steve Borho committed
99
          <Component Id='WinExecutable' Guid='$(var.ComponentWinExecutableGUID)' Win64='$(var.IsX64)'>
Steve Borho's avatar
Steve Borho committed
100
101
102
103
104
            <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"
            />
105
          </Component>
Steve Borho's avatar
Steve Borho committed
106
          <Component Id='ExtensionVersions' Guid='$(var.ExtensionVersions.guid)' Win64='$(var.IsX64)'>
107
            <File Id='ExtensionVersions' Name='extension-versions.txt'
108
                  KeyPath='yes'
109
110
                  Source='..\extension-versions.txt'
            />
111
          </Component>
Steve Borho's avatar
Steve Borho committed
112
          <Component Id='OverlayServerEXE' Guid='$(var.OverlayServerEXE.guid)' Win64='$(var.IsX64)'>
113
            <File Id='OverlayServerEXE' Name='TortoiseHgOverlayServer.exe'
114
                  KeyPath='yes'
115
116
                  Source='dist\TortoiseHgOverlayServer.exe' >
              <Shortcut Id="OverlayServerEXEshortcut" Directory="ProgramMenuDir"
117
                        Name="TortoiseHg Overlay Icon Server"
118
119
                        Icon="thgIcon.ico" IconIndex="0" Advertise="yes"
              />
120
            </File>
121
            <RegistryValue
122
              Name='TortoiseHgOverlayIconServer' 
123
              Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Run'
124
              Type='string' Value='[INSTALLDIR]TortoiseHgOverlayServer.exe'
125
            />
126
          </Component>
Steve Borho's avatar
Steve Borho committed
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

          <?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'/>
              <?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>
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
          <?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'
              />
              <?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>
Steve Borho's avatar
Steve Borho committed
180
181
182
          <?endif?>

          <Component Id='COPYING' Guid='$(var.COPYING.guid)' Win64='$(var.IsX64)'>
183
            <File Id='COPYING' Name='COPYING.txt'
184
185
                  Source='COPYING.txt'
            />
186
          </Component>
Steve Borho's avatar
Steve Borho committed
187
          <Component Id='docdiffEXE' Guid='$(var.docdiffEXE.guid)' Win64='$(var.IsX64)'>
188
            <File Id='docdiffEXE' Name='docdiff.exe' KeyPath='yes'
189
190
                  Source='dist\docdiff.exe'
            />
191
          </Component>
192
193
194
195
196
197
198
199
200
201
202
203

          <?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?>
204

205
          <Directory Id='docFolder' Name='doc'>
Steve Borho's avatar
Steve Borho committed
206
            <Component Id='chmFile' Guid='$(var.chmFile.guid)' Win64='$(var.IsX64)'>
207
              <File Id='chmFile' Name='TortoiseHg.chm' KeyPath='yes'
208
209
210
211
212
                    Source='doc\build\chm\TortoiseHg.chm' >
                  <Shortcut Id="chmStartMenu" Directory="ProgramMenuDir"
                            Name="TortoiseHg Manual (CHM)"
                            Icon="thgIcon.ico" IconIndex="0" Advertise="yes"
                  />
213
214
              </File>
            </Component>
Steve Borho's avatar
Steve Borho committed
215
            <Component Id='pdfFile' Guid='$(var.pdfFile.guid)' Win64='$(var.IsX64)'>
216
              <File Id='pdfFile' Name='TortoiseHg.pdf' KeyPath='yes'
217
218
219
220
221
                    Source='doc\build\pdf\TortoiseHg.pdf'>
                  <Shortcut Id="pdfStartMenu" Directory="ProgramMenuDir"
                            Name="TortoiseHg Manual (PDF)"
                            Icon="thgIcon.ico" IconIndex="0" Advertise="yes"
                  />
222
223
              </File>
            </Component>
Steve Borho's avatar
Steve Borho committed
224
            <Component Id='hgbook' Guid='$(var.hgbook.guid)' Win64='$(var.IsX64)'>
225
              <File Id='hgbook' Name='hgbook.pdf' KeyPath='yes'
226
227
228
229
230
                    Source='..\misc\hgbook.pdf'>
                  <Shortcut Id="hgbookStartMenu" Directory="ProgramMenuDir"
                            Name="Mercurial - The Definitive Guide (PDF)"
                            Icon="hgIcon.ico" IconIndex="0" Advertise="yes"
                  />
231
232
233
234
              </File>
            </Component>
          </Directory>

Steve Borho's avatar
Steve Borho committed
235
          <Directory Id='binFolder' Name='bin'>
Steve Borho's avatar
Steve Borho committed
236
            <Component Id='TortoisePlinkEXE' Guid='$(var.TortoisePlinkEXE.guid)' Win64='$(var.IsX64)'>
Steve Borho's avatar
Steve Borho committed
237
238
239
240
              <File Id='TortoisePlinkEXE' Name='TortoisePlink.exe' KeyPath='yes'
                    Source='..\contrib\TortoisePlink.exe'
              />
            </Component>
Steve Borho's avatar
Steve Borho committed
241
            <Component Id='PageantEXE' Guid='$(var.PageantEXE.guid)' Win64='$(var.IsX64)'>
Steve Borho's avatar
Steve Borho committed
242
243
244
245
              <File Id='PageantEXE' Name='Pageant.exe' KeyPath='yes'
                    Source='..\contrib\Pageant.exe'
              />
            </Component>
Steve Borho's avatar
Steve Borho committed
246
            <Component Id='ThgCmd' Guid='$(var.thgcmd.guid)' Win64='$(var.IsX64)'>
Steve Borho's avatar
Steve Borho committed
247
248
249
250
              <File Id='Thg.Cmd' Name='thg.cmd' KeyPath='yes'
                    Source='win32\thg.cmd'
              />
            </Component>
Steve Borho's avatar
Steve Borho committed
251
            <Component Id='HgCmd' Guid='$(var.hgcmd.guid)' Win64='$(var.IsX64)'>
Steve Borho's avatar
Steve Borho committed
252
253
254
255
256
257
              <File Id='Hg.Cmd' Name='hg.cmd' KeyPath='yes'
                    Source='win32\hg.cmd'
              />
            </Component>
          </Directory>

258
          <Directory Id='HGRCD' Name='hgrc.d'>
Steve Borho's avatar
Steve Borho committed
259
            <Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)' Win64='$(var.IsX64)'>
260
              <File Id='mercurial.rc' Name='Mercurial.rc' ReadOnly='yes'
261
                    Source='win32\mercurial.rc'
262
              />
263
            </Component>
Steve Borho's avatar
Steve Borho committed
264
            <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'>
265
              <File Id='mergetools.rc' Name='MergeTools.rc' ReadOnly='yes'
266
267
                    Source='contrib\mergetools.rc'
              />
268
            </Component>
Steve Borho's avatar
Steve Borho committed
269
            <Component Id="mergepatterns.rc" Guid='$(var.mergepatterns.rc.guid)' Win64='$(var.IsX64)'>
270
              <File Id='mergepatterns.rc' Name='MergePatterns.rc'
271
                    ReadOnly='yes' KeyPath='yes'
272
                    Source='win32\mergepatterns.rc'
273
              />
274
            </Component>
275
276
277
278
279
280
281
282
283
            <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>
284
285
286
287
288
          </Directory>
        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder" Name="Programs">
289
        <Directory Id="ProgramMenuDir" Name="TortoiseHg">
290
          <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)">
291
            <RemoveFolder Id='ProgramMenuDir' On='uninstall' />
292
            <RegistryValue
293
              Root='HKCU' Key='$(var.ProgramRegKey)'
294
295
296
297
              Type='string' Value='[INSTALLDIR]' KeyPath='yes'
            />
            <Shortcut Id='UrlShortcut' Directory='ProgramMenuDir' Name='TortoiseHg Web Site'
                      Target='[ARPHELPLINK]' Icon="thgIcon.ico" IconIndex='0' />
298
            <!-- Shortcut Id="UninstallProduct" Name="Uninstall TortoiseHg"
299
300
                      Target="[System64Folder]msiexec.exe"
                      Arguments="/x [ProductCode]"
301
                      Description="Uninstalls TortoiseHg" /-->
302
303
304
305
          </Component>
        </Directory>
      </Directory>

306
307
308
309
310
311
312
313
314
      <?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)'
315
                Type='string' Value='[INSTALLDIR]'
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
              />
              <RegistryValue
                Root='HKCR' Key='CLSID\$(var.CLSID_TortoiseHgCmenu)\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?>

Steve Borho's avatar
Steve Borho committed
340
341
342
343
344
345
346
347
348
349
      <?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'/>
350
        <Merge Id='TortoiseOverlaysMergeX64' Language='0' DiskId='1' 
Steve Borho's avatar
Steve Borho committed
351
               SourceFile='$(var.TOverlaysSrcDir)\$(var.TOverlaysSrcFilenameX64)'/>
352
      <?endif?>
Steve Borho's avatar
Steve Borho committed
353
354
355
356

      <Merge Id='TortoiseOverlaysMergeX86' Language='0' DiskId='1' 
             SourceFile='$(var.TOverlaysSrcDir)\$(var.TOverlaysSrcFilenameX86)'/>

357
358
    </Directory>

359
    <Feature Id='Complete' Title='TortoiseHg'
360
361
362
363
             Display='expand' Level='1' ConfigurableDirectory='INSTALLDIR'
             Description='The complete package' >
      <Feature Id='MainProgram' Title='Program'
               Level='1' Absent='disallow' Display='hidden'
364
               Description='Command line applications: hg, thg' >
365
        <ComponentRef Id='MainExecutable' />
Steve Borho's avatar
Steve Borho committed
366
        <ComponentRef Id='WinExecutable' />
367
368
369
370
        <ComponentRef Id='ProgramMenuDir' />
        <ComponentRef Id='COPYING' />
        <ComponentRef Id='mercurial.rc' />
        <ComponentRef Id='mergetools.rc' />
371
372
        <ComponentRef Id='paths.rc' />
        <ComponentRef Id='cacert.pem' />
373
        <ComponentRef Id='ExtensionVersions' />
Adrian Buehlmann's avatar
Adrian Buehlmann committed
374
        <ComponentRef Id='helpFolder' />
375
        <ComponentRef Id='distOutput' />
376
        <ComponentRef Id='imageFormats' />
Steve Borho's avatar
Steve Borho committed
377
378
        <ComponentRef Id='ThgCmd' />
        <ComponentRef Id='HgCmd' />
379
        <ComponentGroupRef Id='templatesFolder' />
Adrian Buehlmann's avatar
Adrian Buehlmann committed
380
        <ComponentRef Id='Icons' />
381
      </Feature>
382
383
      <Feature Id='VCRedist' Title='Visual C++ 9.0 Runtime'
               AllowAdvertise='no' Display='hidden' Level='1'>
384
385
386
        <MergeRef Id='VCRedist'/>
        <MergeRef Id='VCRedistPolicy' />
      </Feature>
387
388
      <?if $(var.Platform) = "x64" ?>
          <Feature Id='ShellExtensionX64' Title='Shell Extension x64'
389
                   Level='1' AllowAdvertise='no'
390
                   Description='Context menu for 64-bit processes'>
391
            <ComponentRef Id='cmenuI18n' />
392
            <ComponentRef Id='thgshellx64dll' />
393
            <ComponentRef Id='CmenuShellRegistrationX64' />
394
            <Feature Id='OverlaysX64' Title='Overlay Icons'
Adrian Buehlmann's avatar
Adrian Buehlmann committed
395
396
                     Level='1' AllowAdvertise='no'
                     Description='Overlay icons for 64-bit processes'
397
            >
398
              <ComponentRef Id='OverlayServerEXE' />
399
400
              <MergeRef Id='TortoiseOverlaysMergeX64' />
              <ComponentRef Id='OverlaysShellRegistrationX64' />
401
402
403
            </Feature>
          </Feature>
      <?endif?>
404
405
406
407
408
      <?if $(var.Platform) = "x64" ?>
          <?define ShellExtensionX86level = 1000 ?>
      <?else?>
          <?define ShellExtensionX86level = 1 ?>
      <?endif?>
409
      <Feature Id='ShellExtensionX86' Title='Shell Extension x86'
410
411
               Level='$(var.ShellExtensionX86level)'
               Absent='allow' AllowAdvertise='no'
412
               Description='Context menu for 32-bit processes'>
413
        <ComponentRef Id='cmenuI18n' />
414
415
416
        <ComponentRef Id='thgshellx86dll' />
        <ComponentRef Id='CmenuShellRegistrationX86' />
        <Feature Id='OverlaysX86' Title='Overlay Icons'
Adrian Buehlmann's avatar
Adrian Buehlmann committed
417
                 Level='1' AllowAdvertise='no'
Steve Borho's avatar
Steve Borho committed
418
                 Description='Overlay icons for 32-bit processes'>
419
          <ComponentRef Id='OverlayServerEXE' />
420
421
422
423
          <MergeRef Id='TortoiseOverlaysMergeX86' />
          <ComponentRef Id='OverlaysShellRegistrationX86' />
        </Feature>
      </Feature>
424
425
426
      <Feature Id='Locales' Level='1'
               Title='Translations'
               Description='Mercurial and TortoiseHg Translations'>
427
        <ComponentGroupRef Id='localeFolder' />
Adrian Buehlmann's avatar
Adrian Buehlmann committed
428
        <ComponentRef Id='i18nFolder' />
429
        <ComponentGroupRef Id='thgLocaleFolder' />
Adrian Buehlmann's avatar
Adrian Buehlmann committed
430
        <ComponentRef Id='thgI18nFolder' />
431
      </Feature>
432
433
434
435
436
437
      <Feature Id='ThgDocumentation' Level='1'
               Title='Documentation'
               Description='TortoiseHg Manual and HTML man pages'>
        <Feature Id='CHM' Level='1'
                 Title='CHM' 
                 Description='Compiled HTML'>
438
439
          <ComponentRef Id='chmFile' />
        </Feature>
440
441
442
        <Feature Id='PDF' Level='1'
                 Title='PDF' 
                 Description='Portable Document Format'>
443
444
          <ComponentRef Id='pdfFile' />
        </Feature>
445
446
447
        <Feature Id='HgDocumentation' Level='1'
                 Title='Man Pages'
                 Description='Mercurial HTML man pages'>
448
449
          <ComponentGroupRef Id='docFolder' />
        </Feature>
450
451
452
        <Feature Id='HgBook'  Level='1'
                 Title='Mercurial: The Definitive Guide'
                 Description="Mercurial book by Bryan O'Sullivan">
453
454
455
          <ComponentRef Id='hgbook' />
        </Feature>
      </Feature>
456
457
458
      <Feature Id='KDiff3' Level='1'
               Title='KDiff3'
               Description='Diff/Merge Tool'>
459
460
        <ComponentRef Id='KDiff3EXE' />
      </Feature>
Sune Foldager's avatar
Sune Foldager committed
461
      <Feature Id='SSHUtils' Level='1'
462
463
               Title='SSH Utils'
               Description='TortoisePlink and Pageant key agent'>
464
465
466
        <ComponentRef Id='TortoisePlinkEXE' />
        <ComponentRef Id='PageantEXE' />
      </Feature>
467
468
469
470
471
472
      <Feature Id='Misc' Level='1'
               Title='Miscellaneous'
               Description='Contributed scripts'>
        <Feature Id='HGContrib' Level='1'
                 Title='Contrib' 
                 Description='Mercurial contrib/'>
473
474
          <ComponentGroupRef Id='contribFolder' />
        </Feature>
475
476
477
        <Feature Id='DocDiffFeature' Level='1'
                 Title='Doc Diff Scripts'
                 Description='TortoiseSVN scripts for comparing binary files'>
478
479
480
481
482
483
484
          <ComponentGroupRef Id='DiffScripts' />
          <ComponentRef Id='docdiffEXE' />
          <ComponentRef Id='mergepatterns.rc' />
        </Feature>
      </Feature>
    </Feature>

485
    <!-- terminate.dll terminates any running TortoiseHgOverlayServer.exe that supports the
486
         terminate command over the command pipe. Windows installer sometimes
487
488
         fails to shutdown TortoiseHgOverlayServer.exe, which occasionally leads to a crash
         of TortoiseHgOverlayServer.exe during install, which in turn pops up an ugly crash
489
         report dialog pointing to faulting module PYTHON26.DLL. -->
490
    <Binary Id='TerminateDLL' SourceFile='win32\terminate-x86.dll' />
491
    <CustomAction Id='CallTerminate'
492
      BinaryKey='TerminateDLL' DllEntry='TerminateIconServer'
493
    />
494

495
496
    <CustomAction Id='StartOverlayServerEXE'
      FileKey='OverlayServerEXE' ExeCommand='' Return='asyncNoWait'
497
    />
498
499

    <InstallExecuteSequence>
500
501
        <!-- AppSearch must be done before RemoveExistingProducts and before 
             FindRelatedProducts -->
502
        <AppSearch Sequence="1"></AppSearch>
503
504
505
506
507
508
        <Custom Action='CallTerminate' Before='InstallValidate'>
            INSTALLEDTORTOISEHGPRODUCTS
        </Custom>
        <RemoveExistingProducts After="InstallValidate">
            INSTALLEDTORTOISEHGPRODUCTS
        </RemoveExistingProducts>
509
        <?if $(var.Platform) = "x64" ?>
510
          <Custom Action='StartOverlayServerEXE' After='InstallFinalize'>
511
512
513
            <![CDATA[&OverlaysX86=3 OR &OverlaysX64=3]]>
          </Custom>
        <?else?>
514
          <Custom Action='StartOverlayServerEXE' After='InstallFinalize'>
515
516
517
            <![CDATA[&OverlaysX86=3]]>
          </Custom>
        <?endif?>
518
519
520
521
522
    </InstallExecuteSequence>

    <Upgrade Id='$(var.ProductUpgradeCode)'>
      <UpgradeVersion
        IncludeMinimum='yes' Minimum='0.0.0' IncludeMaximum='no' OnlyDetect='no'
523
524
        Property='INSTALLEDTORTOISEHGPRODUCTS'
      />
525
526
527
528
529
    </Upgrade>

    <UIRef Id="WixUI_FeatureTree" />
    <UIRef Id="WixUI_ErrorProgressText" />

530
531
532
    <Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value = 
      "NOTE: Logoff/logon or restarting explorer may be needed to start the overlay icons"
    />
533

534
535
    <SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />

536
537
538
    <WixVariable Id="WixUILicenseRtf" Value="win32\wix\COPYING.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="win32\wix\WixUIBannerBmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="win32\wix\WixUIDialogBmp.bmp" />
539
540
541
542
543

    <Icon Id="thgIcon.ico" SourceFile="icons\thg_logo.ico" />
    <Icon Id="hgIcon.ico" SourceFile="icons\hg.ico" />
  </Product>
</Wix>