source: josm/trunk/native/windows/main.wxs@ 19159

Last change on this file since 19159 was 18164, checked in by Don-vip, 3 years ago

see #17083 - override WixUI default bitmaps with JOSM logo

  • Property svn:mime-type set to application/xml
File size: 5.6 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
3 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
4
5 <?ifdef JpIsSystemWide ?>
6 <?define JpInstallScope="perMachine"?>
7 <?else?>
8 <?define JpInstallScope="perUser"?>
9 <?endif?>
10
11 <?define JpProductLanguage=1033 ?>
12 <?define JpInstallerVersion=200 ?>
13 <?define JpCompressedMsi=yes ?>
14
15 <?ifdef JpAllowUpgrades ?>
16 <?define JpUpgradeVersionOnlyDetectUpgrade="no"?>
17 <?else?>
18 <?define JpUpgradeVersionOnlyDetectUpgrade="yes"?>
19 <?endif?>
20 <?ifdef JpAllowDowngrades ?>
21 <?define JpUpgradeVersionOnlyDetectDowngrade="no"?>
22 <?else?>
23 <?define JpUpgradeVersionOnlyDetectDowngrade="yes"?>
24 <?endif?>
25
26 <?include $(var.JpConfigDir)/overrides.wxi ?>
27
28 <Product
29 Id="$(var.JpProductCode)"
30 Name="$(var.JpAppName)"
31 Language="$(var.JpProductLanguage)"
32 Version="$(var.JpAppVersion)"
33 Manufacturer="$(var.JpAppVendor)"
34 UpgradeCode="$(var.JpProductUpgradeCode)">
35
36 <Package
37 Description="$(var.JpAppDescription)"
38 Manufacturer="$(var.JpAppVendor)"
39 InstallerVersion="$(var.JpInstallerVersion)"
40 Compressed="$(var.JpCompressedMsi)"
41 InstallScope="$(var.JpInstallScope)" Platform="x64"
42 />
43
44 <WixVariable Id="WixUIBannerBmp" Value="%josm-source-dir%/native/windows/WixUIBanner.bmp" />
45 <WixVariable Id="WixUIDialogBmp" Value="%josm-source-dir%/native/windows/WixUIDialog.bmp" />
46
47 <Media Id="1" Cabinet="Data.cab" EmbedCab="yes" />
48
49 <Upgrade Id="$(var.JpProductUpgradeCode)">
50 <UpgradeVersion
51 OnlyDetect="$(var.JpUpgradeVersionOnlyDetectUpgrade)"
52 Property="JP_UPGRADABLE_FOUND"
53 Maximum="$(var.JpAppVersion)"
54 MigrateFeatures="yes"
55 IncludeMaximum="$(var.JpUpgradeVersionOnlyDetectUpgrade)" />
56 <UpgradeVersion
57 OnlyDetect="$(var.JpUpgradeVersionOnlyDetectDowngrade)"
58 Property="JP_DOWNGRADABLE_FOUND"
59 Minimum="$(var.JpAppVersion)"
60 MigrateFeatures="yes"
61 IncludeMinimum="$(var.JpUpgradeVersionOnlyDetectDowngrade)" />
62 </Upgrade>
63
64 <?ifndef JpAllowUpgrades ?>
65 <CustomAction Id="JpDisallowUpgrade" Error="!(loc.DisallowUpgradeErrorMessage)" />
66 <?endif?>
67 <?ifndef JpAllowDowngrades ?>
68 <CustomAction Id="JpDisallowDowngrade" Error="!(loc.DowngradeErrorMessage)" />
69 <?endif?>
70
71 <!-- Standard required root -->
72 <Directory Id="TARGETDIR" Name="SourceDir"/>
73
74 <Feature Id="DefaultFeature" Title="!(loc.MainFeatureTitle)" Level="1">
75 <ComponentGroupRef Id="Shortcuts"/>
76 <ComponentGroupRef Id="Files"/>
77 <ComponentGroupRef Id="FileAssociations"/>
78 </Feature>
79
80 <?ifdef JpInstallDirChooser ?>
81 <Binary Id="JpCaDll" SourceFile="wixhelper.dll"/>
82 <CustomAction Id="JpCheckInstallDir" BinaryKey="JpCaDll" DllEntry="CheckInstallDir" />
83 <?endif?>
84
85 <CustomAction Id="JpSetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
86
87 <?ifdef JpIcon ?>
88 <Property Id="ARPPRODUCTICON" Value="JpARPPRODUCTICON"/>
89 <Icon Id="JpARPPRODUCTICON" SourceFile="$(var.JpIcon)"/>
90 <?endif?>
91
92 <UI>
93 <?ifdef JpInstallDirChooser ?>
94 <Dialog Id="JpInvalidInstallDir" Width="300" Height="85" Title="[ProductName] Setup" NoMinimize="yes">
95 <Control Id="JpInvalidInstallDirYes" Type="PushButton" X="100" Y="55" Width="50" Height="15" Default="no" Cancel="no" Text="Yes">
96 <Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
97 </Control>
98 <Control Id="JpInvalidInstallDirNo" Type="PushButton" X="150" Y="55" Width="50" Height="15" Default="yes" Cancel="yes" Text="No">
99 <Publish Event="NewDialog" Value="InstallDirDlg">1</Publish>
100 </Control>
101 <Control Id="Text" Type="Text" X="25" Y="15" Width="250" Height="30" TabSkip="no">
102 <Text>!(loc.message.install.dir.exist)</Text>
103 </Control>
104 </Dialog>
105
106 <!--
107 Run WixUI_InstallDir dialog in the default install directory.
108 -->
109 <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>
110 <UIRef Id="WixUI_InstallDir" />
111
112 <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="JpCheckInstallDir" Order="3">1</Publish>
113 <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="JpInvalidInstallDir" Order="5">INSTALLDIR_VALID="0"</Publish>
114 <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="5">INSTALLDIR_VALID="1"</Publish>
115
116 <?ifndef JpLicenseRtf ?>
117 <!--
118 No license file provided.
119 Override the dialog sequence in built-in dialog set "WixUI_InstallDir"
120 to exclude license dialog.
121 -->
122 <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Order="2">1</Publish>
123 <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">1</Publish>
124 <?endif?>
125
126 <?else?>
127
128 <?ifdef JpLicenseRtf ?>
129 <UIRef Id="WixUI_Minimal" />
130 <?endif?>
131
132 <?endif?>
133 </UI>
134
135 <?ifdef JpLicenseRtf ?>
136 <WixVariable Id="WixUILicenseRtf" Value="$(var.JpLicenseRtf)"/>
137 <?endif?>
138
139 <InstallExecuteSequence>
140 <Custom Action="JpSetARPINSTALLLOCATION" After="CostFinalize">Not Installed</Custom>
141 <?ifndef JpAllowUpgrades ?>
142 <Custom Action="JpDisallowUpgrade" After="FindRelatedProducts">JP_UPGRADABLE_FOUND</Custom>
143 <?endif?>
144 <?ifndef JpAllowDowngrades ?>
145 <Custom Action="JpDisallowDowngrade" After="FindRelatedProducts">JP_DOWNGRADABLE_FOUND</Custom>
146 <?endif?>
147 <RemoveExistingProducts Before="CostInitialize"/>
148 </InstallExecuteSequence>
149
150 </Product>
151</Wix>
Note: See TracBrowser for help on using the repository browser.