aboutsummaryrefslogtreecommitdiffstats
path: root/resources/install/windows/installer-windows.wxs
blob: 99b0ab2b164504dc9fb297bdc8f14e1a458ae694 (plain)
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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!--
  SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.

  Distributable under LGPL license.
  See terms of license at gnu.org.
-->

<Product
    Id="*"
    Language="1033"
    Codepage='$(var.codepage)'
    Manufacturer="@APP_NAME@"
    Name="@APP_NAME@"
    UpgradeCode="@WIX_UPGRADE_CODE@"
    Version="1.0.0.0">

<!-- in Language we list all languages we support for localize -->
<Package
    Comments="@PKG_COMMENTS@"
    Compressed="yes"
    Description="@PKG_DESCRIPTION@"
    InstallerVersion="200"
    InstallScope="perMachine"
    Languages="1033,1036"
    Manufacturer="@APP_NAME@"
    Platform="$(var.Platform)"
    SummaryCodepage='$(var.codepage)' />

<Upgrade Id="@WIX_UPGRADE_CODE@">
  <UpgradeVersion
      IncludeMaximum="yes"
      IncludeMinimum="yes"
      Language="1033,1036"
      Maximum="1.0.0.0"
      Minimum="0.0.0.0"
      Property="UPGRADEFOUND" />
</Upgrade>

<Directory Id="TARGETDIR" Name="SourceDir">

  <!--
    The 64-bit MSI should default to "Program Files" and not
    "Program Files (x86)".
  -->
  <?ifndef ProgramFilesFolder ?>
    <?if $(var.Platform) = x64 ?>
      <?define ProgramFilesFolder = ProgramFiles64Folder ?>
    <?else ?>
      <?define ProgramFilesFolder = ProgramFilesFolder ?>
    <?endif ?>
  <?endif ?>

  <Directory Id="$(var.ProgramFilesFolder)" Name="PFiles">
    <Directory Id="INSTALLDIR" Name="@APP_NAME@">

      <!--
        The variable Win64 which is of YesNoType may be used in
        component-defines.wxi.
      -->
      <?if $(var.Platform) = x64 ?>
        <?define Win64 = yes ?>
      <?else ?>
        <?define Win64 = no ?>
      <?endif ?>

      <?include component-defines.wxi ?>
    </Directory>
  </Directory>

  <Directory Id="DesktopFolder" Name="Desktop">
    <Component Id="Component_DesktopShortcut" Guid="49BF78B5-155F-43F2-BCEC-3CABC0D9531E">
      <Condition><![CDATA[CREATE_DESKTOP_SHORTCUT = 1]]></Condition>
      <Shortcut
          Id="Shortcut_Desktop"
          Icon="Icon.ico"
          Name="@APP_NAME@"
          Target="[INSTALLDIR]run.exe"
          WorkingDirectory="INSTALLDIR" />
      <RegistryValue
          Key="Software\Microsoft\@APP_NAME@"
          KeyPath="yes"
          Name="DesktopShortcut"
          Root="HKCU"
          Type="integer"
          Value="1" />
    </Component>
  </Directory>
  <Directory Id="ProgramMenuFolder" Name="Programs">
    <Component Id="Component_StartMenuShortcut" Guid="6B8CDA4E-16C9-4AF4-B338-CBA4775ADD0D">
      <Condition><![CDATA[CREATE_START_MENU_SHORTCUT = 1]]></Condition>
      <Shortcut
          Id="Shortcut_StartMenu"
          Icon="Icon.ico"
          Name="@APP_NAME@"
          Target="[INSTALLDIR]run.exe"
          WorkingDirectory="INSTALLDIR" />
      <RegistryValue
          Key="Software\Microsoft\@APP_NAME@"
          KeyPath="yes"
          Name="StartMenuShortcut"
          Root="HKCU"
          Type="integer"
          Value="1" />
    </Component>
  </Directory>
  <Directory Id="StartupFolder" Name="Startup">
    <Component Id="Component_StartupShortcut" Guid="5059067F-16B1-435A-84B4-FC16CB5CEDA2">
      <Condition><![CDATA[CREATE_STARTUP_SHORTCUT = 1]]></Condition>
      <Shortcut
          Id="Shortcut_Startup"
          Icon="Icon.ico"
          Name="@APP_NAME@"
          Target="[INSTALLDIR]run.exe"
          WorkingDirectory="INSTALLDIR" />
      <RegistryValue
          Key="Software\Microsoft\@APP_NAME@"
          KeyPath="yes"
          Name="StartupShortcut"
          Root="HKCU"
          Type="integer"
          Value="1" />
    </Component>
  </Directory>
</Directory>

<Feature Id="Universe" Level="1" Title="@APP_NAME@">
  <?include component-refs.wxi ?>

  <ComponentRef Id="Component_DesktopShortcut" />
  <ComponentRef Id="Component_StartMenuShortcut" />
  <ComponentRef Id="Component_StartupShortcut" />

  <ComponentGroupRef Id="ComponentGroup_RegistryEntries" />
</Feature>

<!--
  If the Media is uncompressed, the (binary) patches on the resulting MSI will
  be smaller in comparison to the case of compressed Media. Of course, if the
  Media is uncompressed, the resulting MSI will be larger. In order to solve the
  latter problem, we will compress the resulting MSI upon embedding it into the
  setup bootstrapper.
-->
<Media Id="1" Cabinet="Data1.cab" CompressionLevel="@WIX_COMPRESS_LEVEL@" EmbedCab="yes" />

<UI>
  <UIRef Id="WixUI_CInstallDir" />

  <TextStyle Id="GreyText" Blue="127" FaceName="Ms Shell Dlg" Green="127" Red="127" Size="8" />
  <TextStyle Id="WhiteText" Blue="240" FaceName="Ms Shell Dlg" Green="240" Red="240" Size="9"/>

            <!-- Modified ExitDialog -->
            <Dialog Id="CExitDialog" Width="370" Height="270" Title="!(loc.ExitDialog_Title)">
                <Control Id="Finish" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" />
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ExitDialogBitmap)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="40" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" />
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" />
                <Control Id="OptionalText" Type="Text" X="135" Y="110" Width="220" Height="80" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="[WIXUI_EXITDIALOGOPTIONALTEXT]">
                    <Condition Action="show">WIXUI_EXITDIALOGOPTIONALTEXT AND NOT Installed</Condition>
                </Control>
                <Control Id="OptionalCheckBoxText" Type="Text" X="150" Y="190" Width="205" Height="40" Hidden="yes" Transparent="yes" NoPrefix="yes" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]">
                    <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
                </Control>
                <Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="190" Width="10" Height="10" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1">
                    <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition>
                </Control>
            </Dialog>

            <!-- Modified WelcomeDlg -->
            <Dialog Id="CWelcomeDlg" Width="370" Height="270" Title="!(loc.WelcomeDlg_Title)">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="WelcomeText1" Type="Text" X="135" Y="155" Width="220" Height="40" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeText1)" />
                <Control Id="WelcomeText2" Type="Text" X="135" Y="190" Width="220" Height="30" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeText2)" />
                <Control Id="WelcomeText3" Type="Text" X="135" Y="220" Width="220" Height="14" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeText3)" />
                <Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
            </Dialog>

            <Dialog Id="ShortcutsAndRegistryDlg" Width="370" Height="270" Title="!(loc.ShortcutsAndRegistryDlg_Title)">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>

                <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ShortcutsAndRegistryDlgDescription)" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ShortcutsAndRegistryDlgTitle)" />
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.ShortcutsAndRegistryDlgBannerBitmap)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />

                <Control Id="ShortcutGroup" Type="GroupBox" X="20" Y="60" Width="330" Height="65" Text="!(loc.ShortcutsAndRegistryDlg_CreateShortcuts)" />
                <Control Id="StartMenuShortcutCheckBox" Type="CheckBox" X="25" Y="75" Width="320" Height="15" Property="CREATE_START_MENU_SHORTCUT" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateStartMenu)" />
                <Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="25" Y="90" Width="320" Height="15" Property="CREATE_DESKTOP_SHORTCUT" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateDesktop)" />
                <Control Id="StartupShortcutCheckBox" Type="CheckBox" X="25" Y="105" Width="320" Height="15" Property="HAS_STARTUP_REGISTRY" CheckBoxValue="1" Text="!(loc.ShortcutsAndRegistryDlg_CreateAutoStart)" />

                <Control Id="RegistryGroup" Type="GroupBox" X="20" Y="130" Width="330" Height="50" Text="!(loc.ShortcutsAndRegistryDlg_AssociateProtocols)" />
                <Control Id="SipRegistryEntriesCheckBox" Type="CheckBox" X="25" Y="145" Width="320" Height="15" Property="CREATE_SIP_REGISTRY_ENTRIES" CheckBoxValue="1" Text="&amp;SIP" />
<!--
  The RSS plug-in has been removed from SIP Communicator so it no longer makes
  sense to associate SIP Communicator with the FEED protocol.

                <Control Id="FeedRegistryEntriesCheckBox" Type="CheckBox" X="25" Y="160" Width="320" Height="15" Property="CREATE_FEED_REGISTRY_ENTRIES" CheckBoxValue="1" Text="&amp;FEED" />
-->
                <Control Id="XmppRegistryEntriesCheckBox" Type="CheckBox" X="25" Y="160" Width="320" Height="15" Property="CREATE_XMPP_REGISTRY_ENTRIES" CheckBoxValue="1" Text="&amp;XMPP" />
            </Dialog>

            <Dialog Id="CleanSweepDlg" Width="370" Height="270" Title="!(loc.CleanSweepDlg_Title)">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                  <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>

                <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CleanSweepDlgDescription)" />
                <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CleanSweepDlgTitle)" />
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.CleanSweepDlgBannerBitmap)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />

                <Control Id="CleanSweepCheckBox" Type="CheckBox" X="20" Y="60" Width="330" Height="15" Property="CLEAN_SWEEP" CheckBoxValue="1" Text="&amp;Remove personal @APP_NAME@ data and preferences" />
            </Dialog>

  <Publish 
      Control="Finish"
      Dialog="CExitDialog"
      Event="DoAction"
      Value="LaunchApplication">
    <![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION >= "1.5" AND NOT Installed]]>
  </Publish>
<?ifdef JRESetup ?>
  <Publish
      Control="Finish"
      Dialog="CExitDialog"
      Event="DoAction"
      Value="InstallJRE">
    <![CDATA[WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 AND JRE_VERSION < "1.5" AND NOT Installed]]>
  </Publish>
<?endif?>

  <InstallUISequence>
    <Show Dialog="CExitDialog" OnExit="success">
      NOT (IS_AUTOUPDATE = 1)
    </Show>
    <Show Dialog="CWelcomeDlg" Before="CProgressDlg">
      NOT Installed AND NOT (IS_AUTOUPDATE = 1)
    </Show>

    <Show Dialog="CProgressDlg" Before="ExecuteAction">
      NOT (IS_AUTOUPDATE = 1)
    </Show>
    <Show Dialog="CAutoupdateProgressDlg" Before="ExecuteAction">
      IS_AUTOUPDATE = 1
    </Show>

    <Custom Action="LaunchApplication" After="ExecuteAction">
        IS_AUTOUPDATE = 1
    </Custom>
    <Custom Action="CleanSweep" After="ExecuteAction">
        <![CDATA[NOT (IS_AUTOUPDATE = 1) AND (CLEAN_SWEEP = 1)]]>
    </Custom>

    <Custom Action="SetIS_AUTOUPDATE" After="AppSearch">
      <![CDATA[NOT Installed AND SIP_COMMUNICATOR_AUTOUPDATE_INSTALLDIR <> ""]]>
    </Custom>
    <Custom Action="SetINSTALLDIR" After="SetIS_AUTOUPDATE">
      <![CDATA[IS_AUTOUPDATE = 1]]>
    </Custom>
    <Custom Action="SetCREATE_DESKTOP_SHORTCUT" After="SetINSTALLDIR">
      <![CDATA[(IS_AUTOUPDATE = 1) AND HAS_DESKTOP_SHORTCUT]]>
    </Custom>
    <Custom Action="UnsetCREATE_DESKTOP_SHORTCUT" After="SetINSTALLDIR">
      <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_DESKTOP_SHORTCUT AND NOT (HAS_DESKTOP_SHORTCUT = "#1")]]>
    </Custom>
    <Custom Action="SetCREATE_START_MENU_SHORTCUT" After="SetINSTALLDIR">
      <![CDATA[(IS_AUTOUPDATE = 1) AND HAS_START_MENU_SHORTCUT]]>
    </Custom>
    <Custom Action="UnsetCREATE_START_MENU_SHORTCUT" After="SetINSTALLDIR">
      <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_START_MENU_SHORTCUT AND NOT (HAS_START_MENU_SHORTCUT = "#1")]]>
    </Custom>
    <Custom Action="UnsetCREATE_STARTUP_SHORTCUT" After="SetINSTALLDIR">
      <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_STARTUP_SHORTCUT AND NOT (HAS_STARTUP_SHORTCUT = "#1")]]>
    </Custom>
    <Custom Action="SetCREATE_STARTUP_REGISTRY" After="SetINSTALLDIR">
      <![CDATA[HAS_STARTUP_REGISTRY OR HAS_STARTUP_SHORTCUT]]>
    </Custom>
    <Custom Action="UnsetCREATE_STARTUP_REGISTRY" After="SetINSTALLDIR">
      <![CDATA[NOT HAS_STARTUP_REGISTRY AND NOT (HAS_STARTUP_REGISTRY = "#1")]]>
    </Custom>

<?ifdef JRESetup ?>
    <Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
      <![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
    </Custom>
<?endif?>
  </InstallUISequence>

  <AdminUISequence>
    <Show Dialog="CExitDialog" OnExit="success">
      NOT (IS_AUTOUPDATE = 1)
    </Show>
  </AdminUISequence>
</UI>

<?ifdef JRESetup ?>
<CustomAction
    Id="InstallJRE"
    BinaryKey="JRESetup"
    ExeCommand=""
    Return="asyncNoWait" />
<?endif?>
<CustomAction
    Id="LaunchApplication"
    BinaryKey="WixCA"
    DllEntry="WixShellExec"
    Impersonate="yes" />
<CustomAction
    Id="SetCREATE_DESKTOP_SHORTCUT"
    Property="CREATE_DESKTOP_SHORTCUT"
    Value="1" />
<CustomAction
    Id="SetCREATE_START_MENU_SHORTCUT"
    Property="CREATE_START_MENU_SHORTCUT"
    Value="1" />
<CustomAction
    Id="SetCREATE_STARTUP_REGISTRY"
    Property="CREATE_STARTUP_REGISTRY"
    Value="1" />
<CustomAction
    Id="SetINSTALLDIR"
    Property="INSTALLDIR"
    Value="[SIP_COMMUNICATOR_AUTOUPDATE_INSTALLDIR]" />
<CustomAction
    Id="SetIS_AUTOUPDATE"
    Property="IS_AUTOUPDATE"
    Value="1" />
<?ifdef JRESetup ?>
<CustomAction
    Id="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
    Property="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT"
    Value="Install Java(TM) SE Runtime Environment" />
<?endif?>
<CustomAction
    Id="UnsetCREATE_DESKTOP_SHORTCUT"
    Property="CREATE_DESKTOP_SHORTCUT"
    Value="0" />
<CustomAction
    Id="UnsetCREATE_START_MENU_SHORTCUT"
    Property="CREATE_START_MENU_SHORTCUT"
    Value="0" />
<CustomAction
    Id="UnsetCREATE_STARTUP_SHORTCUT"
    Property="CREATE_STARTUP_SHORTCUT"
    Value="0" />
<CustomAction
    Id="UnsetCREATE_STARTUP_REGISTRY"
    Property="CREATE_STARTUP_REGISTRY"
    Value="0" />
<CustomAction
    BinaryKey="CleanSweepExe"
    ExeCommand=""
    Id="CleanSweep"
    Impersonate="yes"
    Return="ignore" />

<InstallExecuteSequence>
  <RemoveExistingProducts Before="InstallInitialize" />

  <Custom Action="SetIS_AUTOUPDATE" After="AppSearch">
    <![CDATA[NOT Installed AND SIP_COMMUNICATOR_AUTOUPDATE_INSTALLDIR <> ""]]>
  </Custom>
  <Custom Action="SetINSTALLDIR" After="SetIS_AUTOUPDATE">
    <![CDATA[IS_AUTOUPDATE = 1]]>
  </Custom>
  <Custom Action="SetCREATE_DESKTOP_SHORTCUT" After="SetINSTALLDIR">
    <![CDATA[(IS_AUTOUPDATE = 1) AND HAS_DESKTOP_SHORTCUT]]>
  </Custom>
  <Custom Action="UnsetCREATE_DESKTOP_SHORTCUT" After="SetINSTALLDIR">
    <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_DESKTOP_SHORTCUT AND NOT (HAS_DESKTOP_SHORTCUT = "#1")]]>
  </Custom>
  <Custom Action="SetCREATE_START_MENU_SHORTCUT" After="SetINSTALLDIR">
    <![CDATA[(IS_AUTOUPDATE = 1) AND HAS_START_MENU_SHORTCUT]]>
  </Custom>
  <Custom Action="UnsetCREATE_START_MENU_SHORTCUT" After="SetINSTALLDIR">
    <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_START_MENU_SHORTCUT AND NOT (HAS_START_MENU_SHORTCUT = "#1")]]>
  </Custom>
  <Custom Action="UnsetCREATE_STARTUP_SHORTCUT" After="SetINSTALLDIR">
    <![CDATA[(IS_AUTOUPDATE = 1) AND NOT HAS_STARTUP_SHORTCUT AND NOT (HAS_STARTUP_SHORTCUT = "#1")]]>
  </Custom>
  <Custom Action="SetCREATE_STARTUP_REGISTRY" After="SetINSTALLDIR">
    <![CDATA[HAS_STARTUP_REGISTRY OR HAS_STARTUP_SHORTCUT]]>
  </Custom>
  <Custom Action="UnsetCREATE_STARTUP_REGISTRY" After="SetINSTALLDIR">
    <![CDATA[NOT HAS_STARTUP_REGISTRY AND NOT (HAS_STARTUP_REGISTRY = "#1")]]>
  </Custom>

<?ifdef JRESetup ?>
  <Custom Action="SetWIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" After="AppSearch">
    <![CDATA[JRE_VERSION < "1.5" AND NOT Installed]]>
  </Custom>
<?endif?>
</InstallExecuteSequence>

<Property Id="HAS_DESKTOP_SHORTCUT">
  <RegistrySearch
      Id="RegistrySearch_HasDesktopShortcut"
      Key="Software\Microsoft\@APP_NAME@"
      Name="DesktopShortcut"
      Root="HKCU"
      Type="raw" />
</Property>
<Property Id="HAS_START_MENU_SHORTCUT">
  <RegistrySearch
      Id="RegistrySearch_HasStartMenuShortcut"
      Key="Software\Microsoft\@APP_NAME@"
      Name="StartMenuShortcut"
      Root="HKCU"
      Type="raw" />
</Property>
<Property Id="HAS_STARTUP_SHORTCUT">
  <RegistrySearch
      Id="RegistrySearch_HasStartupShortcut"
      Key="Software\Microsoft\@APP_NAME@"
      Name="StartupShortcut"
      Root="HKCU"
      Type="raw" />
</Property>
<Property Id="HAS_STARTUP_REGISTRY">
  <RegistrySearch
      Id="RegistrySearch_HasStartupRegistry"
      Key="Software\Microsoft\Windows\CurrentVersion\Run"
      Name="@APP_NAME@"
      Root="HKCU"
      Type="raw" />
</Property>
<SetProperty Id="HAS_STARTUP_REGISTRY" After="AppSearch" Value="[HAS_STARTUP_SHORTCUT]">
     HAS_STARTUP_SHORTCUT
</SetProperty>
<Property Id="JRE_VERSION">
<?ifdef JRESetup ?>
  <RegistrySearch
      Id="RegistrySearch_JREVersion"
      Key="Software\JavaSoft\Java Runtime Environment"
      Name="CurrentVersion"
      Root="HKLM"
      Type="raw"
      Win64="@WINDOWS_IS_64@" />
<?else?>
  1.5
<?endif?>
</Property>

<Property Id="ARPCONTACT" Value="@APP_EMAIL@" />
<Property Id="ARPHELPLINK" Value="@APP_WEB@" />
<Property Id="ARPPRODUCTICON" Value="Icon.ico" />
<Property Id="CLEAN_SWEEP" Secure="yes" />
<!--
    We've switched the startup from shortcut to registry so we'll always set
    CREATE_STARTUP_SHORTCUT to 0 in order to remove the old shortcut on update.
-->
<Property Id="CREATE_STARTUP_SHORTCUT" Value="0" />
<!--
  The RSS plug-in has been removed from SIP Communicator so it no longer makes
  sense to associate SIP Communicator with the FEED protocol.
-->
<Property Id="CREATE_FEED_REGISTRY_ENTRIES" Value="0" />
<Property Id="CREATE_SIP_REGISTRY_ENTRIES" Value="1" />
<Property Id="CREATE_XMPP_REGISTRY_ENTRIES" Value="1" />
<Property Id="IS_AUTOUPDATE" Value="0" Hidden="yes" />
<Property Id="WixShellExecTarget" Value="[#run.exe]" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.ExitDialogOptionaCheckBoxText)" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

<?include windows_shortcut_specification.wxi ?>

<WixVariable Id="WixUIBannerBmp" Value="wix-banner.jpg" />
<WixVariable Id="WixUIDialogBmp" Value="wix-dialog.jpg" />
<WixVariable Id='WixUILicenseRtf' Value="License.rtf" />

<Icon Id="Icon.ico" SourceFile="sc-logo.ico" />

<?ifdef JRESetup ?>
<Binary Id="JRESetup" SourceFile="$(var.JRESetup)" />
<?endif?>
<Binary Id="CleanSweepExe" SourceFile="cleansweep.exe" />

<!-- Includes any default translated Error or ProgressText elements -->
<UIRef Id="WixUI_ErrorProgressText" />

</Product>

    <!-- Modified ProgressDlg to not include InstallUISequence -->
    <Fragment>
        <UI>
            <Dialog Id="CProgressDlg" Width="370" Height="270" Title="!(loc.ProgressDlg_Title)" Modeless="yes">
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.ProgressDlgBannerBitmap)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUINext)" />
                <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <!-- mutually exclusive title and description strings overlap  -->
                <Control Id="TextInstalling" Type="Text" X="20" Y="65" Width="330" Height="35" Hidden="yes" NoPrefix="yes" Text="!(loc.ProgressDlgTextInstalling)">
                    <Condition Action="show">NOT Installed OR (Installed AND (RESUME OR Preselected) AND NOT PATCH)</Condition>
                </Control>
                <Control Id="TitleInstalling" Type="Text" X="20" Y="15" Width="330" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.ProgressDlgTitleInstalling)">
                    <Condition Action="show">NOT Installed OR (Installed AND (RESUME OR Preselected) AND NOT PATCH)</Condition>
                </Control>
                <Control Id="TextChanging" Type="Text" X="20" Y="65" Width="330" Height="35" Hidden="yes" NoPrefix="yes" Text="!(loc.ProgressDlgTextChanging)">
                    <Condition Action="show">WixUI_InstallMode = "Change"</Condition>
                </Control>
                <Control Id="TitleChanging" Type="Text" X="20" Y="15" Width="330" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.ProgressDlgTitleChanging)">
                    <Condition Action="show">WixUI_InstallMode = "Change"</Condition>
                </Control>
                <Control Id="TextRepairing" Type="Text" X="20" Y="65" Width="330" Height="35" Hidden="yes" NoPrefix="yes" Text="!(loc.ProgressDlgTextRepairing)">
                    <Condition Action="show">WixUI_InstallMode = "Repair"</Condition>
                </Control>
                <Control Id="TitleRepairing" Type="Text" X="20" Y="15" Width="330" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.ProgressDlgTitleRepairing)">
                    <Condition Action="show">WixUI_InstallMode = "Repair"</Condition>
                </Control>
                <Control Id="TextRemoving" Type="Text" X="20" Y="65" Width="330" Height="35" Hidden="yes" NoPrefix="yes" Text="!(loc.ProgressDlgTextRemoving)">
                    <Condition Action="show">WixUI_InstallMode = "Remove"</Condition>
                </Control>
                <Control Id="TitleRemoving" Type="Text" X="20" Y="15" Width="330" Height="15" Transparent="yes" NoPrefix="yes" Hidden="yes" Text="!(loc.ProgressDlgTitleRemoving)">
                    <Condition Action="show">WixUI_InstallMode = "Remove"</Condition>
                </Control>
                <Control Id="ActionText" Type="Text" X="70" Y="100" Width="285" Height="10">
                    <Subscribe Event="ActionText" Attribute="Text" />
                </Control>
                <Control Id="ProgressBar" Type="ProgressBar" X="20" Y="115" Width="330" Height="10" ProgressBlocks="yes" Text="!(loc.ProgressDlgProgressBar)">
                    <Subscribe Event="SetProgress" Attribute="Progress" />
                </Control>
                <Control Id="StatusLabel" Type="Text" X="20" Y="100" Width="50" Height="10" Text="!(loc.ProgressDlgStatusLabel)" />
            </Dialog>

            <Dialog Id="CAutoupdateProgressDlg" Width="370" Height="65" Title="!(loc.ProgressDlg_Title)" Modeless="yes">
                <Control Id="ActionText" Type="Text" X="70" Y="20" Width="285" Height="10">
                    <Subscribe Event="ActionText" Attribute="Text" />
                </Control>
                <Control Id="ProgressBar" Type="ProgressBar" X="20" Y="35" Width="330" Height="10" ProgressBlocks="yes" Text="!(loc.ProgressDlgProgressBar)">
                    <Subscribe Event="SetProgress" Attribute="Progress" />
                </Control>
                <Control TabSkip="no" Id="StatusLabel" Type="Text" X="20" Y="20" Width="50" Height="10" Text="!(loc.ProgressDlgStatusLabel)" />
            </Dialog>
        </UI>
    </Fragment>

    <!-- Modified MaintenanceWelcomeDlg to not reference ProgressDlg -->
    <Fragment>
        <UI>
            <Dialog Id="CMaintenanceWelcomeDlg" Width="370" Height="270" Title="!(loc.MaintenanceWelcomeDlg_Title)">
                <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
                    <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
                </Control>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.MaintenanceWelcomeDlgBitmap)" />
                <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.MaintenanceWelcomeDlgTitle)" />
                <Control Id="Description" Type="Text" X="135" Y="70" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.MaintenanceWelcomeDlgDescription)" />
            </Dialog>

            <InstallUISequence>
                <Show Dialog="CMaintenanceWelcomeDlg" Before="CProgressDlg">Installed AND NOT RESUME AND NOT Preselected</Show>
            </InstallUISequence>
        </UI>
    </Fragment>

    <!-- Modified ResumeDlg to not reference ProgressDlg -->
    <Fragment>
        <UI>
            <Dialog Id="CResumeDlg" Width="370" Height="270" Title="!(loc.ResumeDlg_Title)">
                <Control Id="Install" Type="PushButton" ElevationShield="yes" X="212" Y="243" Width="80" Height="17" Default="yes" Text="!(loc.ResumeDlgInstall)" Hidden="yes">
                    <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
                    <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
                    <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
                    <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                    <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                    <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
                    <Condition Action="show">ALLUSERS</Condition>
                </Control>
                <Control Id="InstallNoShield" Type="PushButton" ElevationShield="no" X="212" Y="243" Width="80" Height="17" Default="yes" Text="!(loc.ResumeDlgInstall)" Hidden="yes">
                    <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg">CostingComplete = 1</Publish>
                    <Publish Event="EndDialog" Value="Return"><![CDATA[OutOfDiskSpace <> 1]]></Publish>
                    <Publish Event="SpawnDialog" Value="OutOfRbDiskDlg">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)</Publish>
                    <Publish Event="EndDialog" Value="Return">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                    <Publish Event="EnableRollback" Value="False">OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"</Publish>
                    <Publish Event="SpawnDialog" Value="OutOfDiskDlg">(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")</Publish>
                    <Condition Action="show">NOT ALLUSERS</Condition>
                </Control>
                <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
                    <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
                </Control>
                <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.ResumeDlgBitmap)" />
                <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" />
                <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                <Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ResumeDlgDescription)" />
                <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.ResumeDlgTitle)" />
            </Dialog>

            <InstallUISequence>
                <Show Dialog="CResumeDlg" Before="CProgressDlg">Installed AND (RESUME OR Preselected)</Show>
            </InstallUISequence>
        </UI>
    </Fragment>

    <!-- Modified WixUI_InstallDir -->
    <Fragment>
        <UI Id="WixUI_CInstallDir">
            <TextStyle Id="WixUI_Font_Normal" FaceName="Ms Shell Dlg" Size="8" />
            <TextStyle Id="WixUI_Font_Bigger" FaceName="Ms Shell Dlg" Size="12" />
            <TextStyle Id="WixUI_Font_Title" FaceName="Ms Shell Dlg" Size="9" Bold="yes" />

            <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
            <Property Id="WixUI_Mode" Value="InstallDir" />

            <DialogRef Id="BrowseDlg" />
            <DialogRef Id="DiskCostDlg" />
            <DialogRef Id="ErrorDlg" />
            <DialogRef Id="FatalError" />
            <DialogRef Id="FilesInUse" />
            <DialogRef Id="MsiRMFilesInUse" />
            <DialogRef Id="PrepareDlg" />
            <DialogRef Id="CProgressDlg" />
            <DialogRef Id="CAutoupdateProgressDlg" />
            <DialogRef Id="CResumeDlg" />
            <DialogRef Id="UserExit" />
            
            <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish>
            <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>

            <Publish Dialog="CExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

            <Publish Dialog="CWelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>

            <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="CWelcomeDlg">1</Publish>
            <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg">LicenseAccepted = "1"</Publish>

            <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish>
            <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="ShortcutsAndRegistryDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID="1"]]></Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
            <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>

            <Publish Dialog="ShortcutsAndRegistryDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg">1</Publish>
            <Publish Dialog="ShortcutsAndRegistryDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>

            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ShortcutsAndRegistryDlg" Order="1">NOT Installed</Publish>
            <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>

            <Publish Dialog="CMaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

            <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="CleanSweepDlg">1</Publish>
            <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="CMaintenanceWelcomeDlg">1</Publish>

            <Publish Dialog="CleanSweepDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
            <Publish Dialog="CleanSweepDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>

            <!-- Property Id="ARPNOMODIFY" Value="1" /-->
            <Property Id="ARPNOREPAIR" Value="1" />
        </UI>

        <UIRef Id="WixUI_Common" />
    </Fragment>

<?include SCRegistrySpec.wxi ?>

</Wix>