source: raptor-distribution/MSIs/raptor-ica/trunk/raptor-ica.wxs @ 1710

Revision 1710, 11.3 KB checked in by rhyssmith, 5 years ago (diff)

Adding raptor-ica v1.0.1 MSI sources

  • Property svn:executable set to *
Line 
1<?xml version='1.0'?>
2<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
3
4    <Product Id='ba27b0d6-ad54-4755-866f-395b17eb2a91'
5      Name='Raptor ICA'
6      UpgradeCode='e5f71481-37a7-44ac-b315-7285a97561b4'
7      Manufacturer='Cardiff University'
8      Language='1033'
9      Codepage='1252'
10      Version='1.0.1'>
11
12        <Package Id='*'
13          Description='Raptor ICA'
14          Comments='Raptor ICA v1.0.1'
15          Manufacturer='Cardiff University'
16          InstallerVersion='301'
17          SummaryCodepage='1252'
18          AdminImage='yes'
19          InstallPrivileges='elevated'
20          InstallScope='perMachine'
21          Compressed='yes' />
22
23
24
25        <!--
26            #############
27            # MSI options
28            #############
29        -->
30
31        <!-- Allows upgrading of software. Schedule changed from default to not delete configured conf files on upgrade -->
32        <MajorUpgrade
33          Schedule='afterInstallExecute'
34          DowngradeErrorMessage='A later version of [ProductName] is already installed. Setup will now exit.'/>
35
36        <!-- Embeds all source into a single .cab file in the MSI -->
37        <Media Id='1' Cabinet='Product.cab' EmbedCab='yes' />
38
39
40
41        <!--
42            #####################################
43            # Figure out what the MSI is doing...
44            #####################################
45        -->
46
47        <CustomAction Id='SetInstalling' Property='Installing' Value='true' />
48        <CustomAction Id='SetUpgrading' Property='Upgrading' Value='true' />
49        <CustomAction Id='SetUninstalling' Property='Uninstalling' Value='true' />
50
51        <InstallExecuteSequence>
52            <Custom Action='SetInstalling' After='FindRelatedProducts'><![CDATA[NOT Installed AND NOT WIX_UPGRADE_DETECTED <>""]]></Custom>
53            <Custom Action='SetUpgrading' After='SetInstalling'><![CDATA[WIX_UPGRADE_DETECTED <>""]]></Custom>
54            <Custom Action='SetUninstalling' After='SetUpgrading'><![CDATA[(REMOVE="feaRaptorIca,Complete" OR REMOVE="ALL") AND NOT Upgrading]]></Custom>
55        </InstallExecuteSequence>
56
57        <InstallUISequence>
58            <Custom Action='SetInstalling' After='FindRelatedProducts'><![CDATA[NOT Installed AND NOT WIX_UPGRADE_DETECTED <>""]]></Custom>
59            <Custom Action='SetUpgrading' After='SetInstalling'><![CDATA[WIX_UPGRADE_DETECTED <>""]]></Custom>
60            <Custom Action='SetUninstalling' After='SetUpgrading'><![CDATA[(REMOVE="feaRaptorIca,Complete" OR REMOVE="ALL") AND NOT Upgrading]]></Custom>
61        </InstallUISequence>
62
63
64
65        <!--
66            #####################
67            # Requirements checks
68            #####################
69        -->
70
71        <!-- Only allow MSI to run if the user is an administrator (required to install/uninstall service through custom action) -->
72        <Property Id='MSIUSEREALADMINDETECTION' Value='1' />
73        <Condition Message='You need to be an administrator to install this product. Setup will now exit.'>Privileged</Condition>
74
75        <!-- Only allow MSI to run if Java is installed and we can get JAVA_HOME -->
76        <Property Id='JAVA_VERSION'>
77            <RegistrySearch Id='JavaVersionSearch' Root='HKLM' Key='SOFTWARE\JavaSoft\Java Runtime Environment' Name='CurrentVersion' Type='raw' />
78        </Property>
79        <Property Id='JAVA_HOME'>
80            <RegistrySearch Id='JavaHomeSearch' Root='HKLM' Key='SOFTWARE\JavaSoft\Java Runtime Environment\[JAVA_VERSION]' Name='JavaHome' Type='raw' />
81        </Property>
82        <Condition Message='You must install a Java JRE/JDK prior to installing this package. Setup will now exit.' ><![CDATA[JAVA_HOME <>""]]></Condition>
83
84
85
86        <!--
87            ################
88            # File Structure
89            ################
90        -->
91
92        <!-- Have to define the toplevel bit (do not even try to understand this line. It just always has to be here... -->
93        <Directory Id='TARGETDIR' Name='SourceDir'>
94
95            <!-- Install to the standard Program Files folder -->
96            <Directory Id='ProgramFilesFolder' Name='PFiles'>
97
98                <!-- Everything goes under \Program Files\Raptor -->
99                <Directory Id='RAPTORDIR' Name='Raptor'>
100
101                    <!-- Since this is the ICA, put it in \Program Files\Raptor\ICA -->
102                    <Directory Id='RAPTORICADIR' Name='ICA'>
103
104                        <!-- All files will be installed here! -->
105
106                        <!-- This component will set the Environmental Variables for Raptor -->
107                        <Component Id='cmpRaptorIcaEnvVarHome' Guid='ce1e1a9f-94ec-4d63-88b2-ff255a576d63'>
108                            <CreateFolder />
109                            <Environment Id='SetRaptorIcaEnvVarHome'
110                              Action='set'
111                              Part='all'
112                              Name='RAPTOR_ICA_HOME'
113                              Permanent='no'
114                              System='yes'
115                              Value='[RAPTORICADIR]' />
116                        </Component>
117
118                    </Directory>
119
120                </Directory>
121
122            </Directory>
123
124        </Directory>
125
126
127
128        <!--
129            ##########
130            # Features
131            ##########
132        -->
133
134        <Feature Id='Complete'
135          Title='Raptor ICA v1.0.1'
136          Description='The complete package for the Raptor ICA.'
137          Display='expand'
138          Level='1'
139          ConfigurableDirectory='RAPTORDIR'>
140
141            <Feature Id='feaRaptorIca' Title='Raptor ICA v1.0.1' Description='Raptor ICA v1.0.1' Level='1' AllowAdvertise='no' Absent='disallow'>
142                <ComponentGroupRef Id='cgrRaptorIcaRoot' />
143                <ComponentGroupRef Id='cgrRaptorIcaBin' />
144                <ComponentGroupRef Id='cgrRaptorIcaConf' />
145                <ComponentGroupRef Id='cgrRaptorIcaKeys' />
146                <ComponentGroupRef Id='cgrRaptorIcaLib' />
147                <ComponentGroupRef Id='cgrRaptorIcaLogs' />
148                <ComponentRef Id='cmpRaptorIcaEnvVarHome' />
149            </Feature>
150
151        </Feature>
152
153
154
155        <!--
156            ###########################################
157            # Custom Actions - Service install/unistall
158            ###########################################
159        -->
160
161        <!-- Run the batch file that installs/uninstalls the service. Cannot use normal WiX thing for this due to use of java wrapper -->
162        <CustomAction Id='InstallIcaService' FileKey='filRaptorIcaBinIcaBat' ExeCommand='install' />
163        <CustomAction Id='UninstallIcaService' FileKey='filRaptorIcaBinIcaBat' ExeCommand='remove' />
164
165        <!-- Run the same batch file to start/stop/restart the service. -->
166        <CustomAction Id='StartIcaService' FileKey='filRaptorIcaBinIcaBat' ExeCommand='start' />
167        <CustomAction Id='StopIcaService' FileKey='filRaptorIcaBinIcaBat' ExeCommand='stop' />
168        <CustomAction Id='RestartIcaService' FileKey='filRaptorIcaBinIcaBat' ExeCommand='restart' />
169
170        <!-- Horrible hack. When upgrading, the restarting happens twice. So this stops it happening the first time... -->
171        <CustomAction Id='SetAlreadyRun' Property='AlreadyRun' Value='true' />
172
173
174        <!-- When installing, install service and start it -->
175        <InstallExecuteSequence>
176            <Custom Action='InstallIcaService' After='RunKeytoolExportIcaPublicKey'>Installing</Custom>
177            <Custom Action='StartIcaService' After='InstallIcaService'>Installing</Custom>
178        </InstallExecuteSequence>
179
180        <!-- When uninstalling, uninstall service (automagically stops it first) -->
181        <InstallExecuteSequence>
182            <Custom Action='StopIcaService' After='UnpublishFeatures'>Uninstalling</Custom>
183            <Custom Action='UninstallIcaService' After='StopIcaService'>Uninstalling</Custom>
184        </InstallExecuteSequence>
185
186        <!-- When upgrading, restart service -->
187        <InstallExecuteSequence>
188            <Custom Action='RestartIcaService' After='StartServices'>Upgrading AND AlreadyRun</Custom>
189            <Custom Action='SetAlreadyRun' After='RestartIcaService'>Upgrading</Custom>
190        </InstallExecuteSequence>
191
192
193
194        <!--
195            ##############################
196            # Custom Actions - Java keygen
197            ##############################
198        -->
199
200        <!-- Set the path to the JRE keytool exe and how to run it -->
201        <CustomAction Id='SetKeytoolPath' Property='KeytoolPath' Value='[JAVA_HOME]\bin\keytool.exe' />
202
203        <!-- Create the java keystore with private key -->
204        <CustomAction Id='RunKeytoolCreateIcaPrivateKey' Property='KeytoolPath' ExeCommand='-genkey -alias raptorica -keystore "[RAPTORICADIR]keys\raptor-ica.jks" -storepass changeit -keypass changeit -dname "CN=[ComputerName],ou=ICA,o=Raptor" -validity 7300 -keyalg RSA -keysize 2048' Return='check' />
205
206        <!-- Export the public key from the keystore -->
207        <CustomAction Id='RunKeytoolExportIcaPublicKey' Property='KeytoolPath' ExeCommand='-export -alias raptorica -keystore "[RAPTORICADIR]keys\raptor-ica.jks" -storepass changeit -file "[RAPTORICADIR]keys\raptor-ica-public.crt"' Return='check' />
208
209
210        <!-- Schedule these CAs to run -->
211        <InstallExecuteSequence>
212            <Custom Action='SetKeytoolPath' After='AppSearch'>JAVA_HOME</Custom>
213            <Custom Action='RunKeytoolCreateIcaPrivateKey' After='InstallFinalize'>JAVA_HOME And Installing</Custom>
214            <Custom Action='RunKeytoolExportIcaPublicKey' After='RunKeytoolCreateIcaPrivateKey'>JAVA_HOME And Installing</Custom>
215        </InstallExecuteSequence>
216
217
218
219        <!--
220            ########################
221            # Guess at Config Values
222            ########################
223        -->
224
225        <!-- Metadata values -->
226        <Property Id='ICAENTITYID' Value='https://thisservername.example.com/raptor-ica' />
227        <Property Id='ICAORGANISATIONNAME' Value='Example University' />
228        <Property Id='ICASERVICENAME' Value='Shibboleth IdP' />
229        <Property Id='ICACONTACTEMAIL' Value='someone@example.com' />
230
231
232
233        <!--
234            ################
235            # User Interface
236            ################
237        -->
238
239        <!-- Add/Remove Programs Stuff -->
240        <Icon Id='Raptor.ico' SourceFile='source\installer\raptor.ico' />
241        <Property Id='ARPPRODUCTICON' Value='Raptor.ico' />
242        <Property Id='ARPHELPLINK' Value='http://iam.cf.ac.uk/Raptor' />
243
244        <!-- Variables for the UI -->
245        <WixVariable Id='WixUILicenseRtf' Value='source\installer\License.rtf' />
246        <WixVariable Id='WixUIBannerBmp' Value='source\installer\raptor-msi-banner.bmp' />
247        <WixVariable Id='WixUIDialogBmp' Value='source\installer\raptor-msi-dialog.bmp' />
248
249        <!-- Change to Mondo style -->
250        <UI Id='RaptorWixUI'>
251            <UIRef Id='WixUI_FeatureTree' />
252            <UIRef Id='WixUI_ErrorProgressText' />
253
254            <DialogRef Id='RaptorMsiDlgIcaMetadata' />
255
256            <Publish Dialog='CustomizeDlg' Control='Next' Event='NewDialog' Value='RaptorMsiDlgIcaMetadata'>Installing</Publish>
257            <Publish Dialog='VerifyReadyDlg' Control='Back' Event='NewDialog' Value='RaptorMsiDlgIcaMetadata'>Installing</Publish>
258        </UI>
259
260    </Product>
261</Wix>
Note: See TracBrowser for help on using the repository browser.