Handle the move of openSSL from \opt. Call keygen.bat during install
[shibboleth/cpp-sp.git] / msi / WiX / ShibbolethSP-noarch.wxs
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 \r
3 <!-- Licensed to the University Corporation for Advanced Internet\r
4    Development, Inc. (UCAID) under one or more contributor license\r
5    agreements.  See the NOTICE file distributed with this work for\r
6    additional information regarding copyright ownership. The UCAID\r
7    licenses this file to You under the Apache License, Version 2.0\r
8    (the 'License'); you may not use this file except in compliance\r
9    with the License.  You may obtain a copy of the License at\r
10  \r
11      http://www.apache.org/licenses/LICENSE-2.0\r
12  \r
13    Unless required by applicable law or agreed to in writing, software\r
14    distributed under the License is distributed on an 'AS IS' BASIS,\r
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
16    implied.  See the License for the specific language governing\r
17    permissions and limitations under the License.  -->\r
18 \r
19 <?define BuildDirectory='G:\Downloads\shib\' ?>\r
20 <?define OpenSSLDirVersion='1.0.0a' ?>\r
21 \r
22 <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r
23   <!-- This is where we put all the architecture neutral bits of the\r
24        Shibboleth install.  It turns out that it may not be all the\r
25        architecture insenstive stuff since some GUIDS may have moved\r
26        -->\r
27   <Fragment>\r
28     <!-- Files First -->\r
29     <!-- Configuration, licenses and documentation -->\r
30 \r
31     <DirectoryRef Id='INSTALLDIR'>\r
32       <Directory Id='doc' Name='doc' >\r
33         <Directory Id='doc_shibboleth' Name='shibboleth' \r
34                    FileSource='$(var.BuildDirectory)\cvs\2.0\cpp-sp\doc' >\r
35           <Component Id='doc_shibboleth' Guid='{8239E994-8295-4E26-8708-DDF240B486BF}'>\r
36             <File Name='main.css' KeyPath='yes'/>\r
37             <File Name='logo.jpg' />\r
38             <File Name='CREDITS.txt' />\r
39             <File Name='LICENSE.txt' />\r
40             <File Name='NOTICE.txt' />\r
41             <File Name='README.txt'/>\r
42             <File Name='RELEASE.txt' />\r
43           </Component>\r
44         </Directory><!-- doc_shibboleth -->\r
45       </Directory><!-- doc -->\r
46       <Directory Id='etc' Name='etc' >\r
47         <Directory Id='etc_shibboleth' Name='shibboleth' \r
48                    FileSource='$(var.BuildDirectory)\cvs\2.0\cpp-sp\configs' >\r
49           <Component Id='etc_shibboleth_perm' Guid='{1F1B9F9B-6437-46F1-ACE8-8D135612336C}' Permanent='yes'>\r
50             <File KeyPath='yes' \r
51                   Source='$(var.BuildDirectory)\openssl-$(var.OpenSSLDirVersion)\apps\openssl.cnf' />\r
52             <File Name='upgrade.xsl' />\r
53             <File Name='example-metadata.xml' />\r
54             <File Name='example-shibboleth2.xml' />\r
55           </Component>\r
56           <Component Id='etc_shibboleth_nonperm' Guid='{A5BBCB8B-42B3-4402-B66D-66D2971F509F}'>\r
57             <File Name='keygen.bat' KeyPath='yes' Source='$(var.BuildDirectory)\cvs\2.0\cpp-sp\configs\keygen.bat-wix'/>\r
58             <File Name='xsltproc.js' />\r
59           </Component>\r
60           <Directory Id='etc_shibboleth_dist' Name='dist' \r
61                      FileSource='$(var.BuildDirectory)\cvs\2.0\cpp-sp\configs' >\r
62             <Component Id='dist_noperm' Guid='{6AEBA525-8F52-4D14-BAEE-0292A2E214D1}'>\r
63               <!-- Note that the dir creation here is an accident caused by the inhertited Installer -->\r
64               <CreateFolder Directory='var_run_shibboleth' />\r
65               <File Name='apache22.config.in' KeyPath='yes' />\r
66               <File Name='sslError.html' />\r
67               <File Name='bindingTemplate.html' />\r
68               <File Name='globalLogout.html' />\r
69               <File Name='localLogout.html' />\r
70               <File Name='attribute-map.xml' />\r
71               <File Name='attribute-policy.xml'/>\r
72               <File Name='shibboleth2.xml' />\r
73               <File Name='console.logger' />\r
74               <File Name='discoveryTemplate.html' />\r
75               <File Name='postTemplate.html' />\r
76               <File Name='partialLogout.html' />\r
77               <File Name='protocols.xml' />\r
78               <File Name='security-policy.xml' />\r
79             </Component>\r
80             <Component Id='accessError.html' Guid='{6FAA81A0-A020-4E60-A37D-1EC4D0D5FD06}' Permanent='yes'>\r
81               <File Name='accessError.html' />\r
82             </Component>\r
83             <Component Id='apache.config' Guid='{AF4EB2B1-2489-4E39-A89E-1CA7AC2B7483}' Permanent='yes'>\r
84               <File Name='apache.config.in' />\r
85             </Component>\r
86             <Component Id='apache2.config' Guid='{85BF72A1-FBA8-4955-ACCF-ABC83B1292C9}' Permanent='yes'>\r
87               <File Name='apache2.config.in' KeyPath='yes' />\r
88             </Component>\r
89             <Component Id='metadataError.html' Guid='{8C46D04A-A943-4FA4-AFCB-9B040306C2C0}' Permanent='yes'>\r
90               <File  Name='metadataError.html' KeyPath='yes' />\r
91             </Component>\r
92             <Component Id='native.logger' Guid='{8586D4C7-E237-4C7F-BC79-DE0B06473395}' Permanent='yes'>\r
93               <File Name='native.logger.in' KeyPath='yes' />\r
94             </Component>\r
95             <Component Id='sessionError.html' Guid='{8AA240B3-DC5D-4687-B321-4F5E1BAEA820}' Permanent='yes'>\r
96               <File Name='sessionError.html' KeyPath='yes' />\r
97             </Component>\r
98             <Component Id='shibd.logger' Guid='{D8DA3D14-F779-4691-A883-4995158D2A74}' Permanent='yes'>\r
99               <File Name='shibd.logger.in' KeyPath='yes' />\r
100             </Component>\r
101           </Directory><!-- etc_shibboleth_dist -->\r
102         </Directory><!-- etc_shibboleth -->\r
103       </Directory><!-- etc_dist -->\r
104       <Directory Id='var' Name='var'>\r
105         <Directory Id='var_log' Name='log'>\r
106           <Directory Id='var_log_shibboleth' Name='shibboleth'>\r
107             <Component Id='var_log_shibboleth_folder' Guid='{2BFC84E4-634B-4D70-910A-D5640739C8C8}' KeyPath='yes'>\r
108               <CreateFolder />\r
109             </Component>\r
110           </Directory><!-- var_log_shibboleth -->\r
111         </Directory><!-- var_log -->\r
112         <Directory Id='var_run' Name='run'>\r
113           <Directory Id='var_run_shibboleth' Name='shibboleth' />\r
114         </Directory><!-- var_run -->\r
115       </Directory><!-- var -->\r
116     </DirectoryRef>\r
117     <!-- Schemas -->\r
118     <DirectoryRef Id='SHARE_DIR'><!-- \opt\shibboleth-sp\share -->\r
119       <Directory Id='share_xml' Name='xml'>\r
120         <Directory Id='share_xml_shibboleth' Name='shibboleth'\r
121                    FileSource='$(var.BuildDirectory)\cvs\2.0\cpp-sp\schemas' >\r
122           <Component Id='share_xml_shibboleth' Guid='{69FCD385-B31D-43FB-B8A7-6F8D30391661}'>\r
123             <File Name='shibboleth-metadata-1.0.xsd' KeyPath='yes' />\r
124             <File Name='catalog.xml' Source='$(var.BuildDirectory)\cvs\2.0\cpp-sp\schemas\catalog.xml.in' />\r
125             <File Name='shibboleth-2.0-attribute-map.xsd' />\r
126             <File Name='shibboleth-2.0-afp.xsd' />\r
127             <File Name='shibboleth-2.0-afp-mf-saml.xsd' />\r
128             <File Name='WS-Trust.xsd' />\r
129             <File Name='shibboleth-2.0-sp-notify.xsd' />\r
130             <File Name='shibboleth-2.0-native-sp-config.xsd' />\r
131             <File Name='shibboleth-2.0-afp-mf-basic.xsd' />\r
132             <File Name='shibboleth-2.0-native-sp-protocols.xsd' />\r
133           </Component>\r
134           <Component Id='share_xml_shibboleth_xsd' Guid='{8C5B6416-5BE3-4D4D-BF8B-B677365DA58C}'>\r
135             <File Name='shibboleth.xsd' KeyPath='yes' />\r
136           </Component>\r
137         </Directory><!-- share_xml_shibboleth -->\r
138       </Directory><!-- share_xml -->\r
139     </DirectoryRef><!-- share -->\r
140     <!-- Previous version search -->\r
141     <Property Id='SHIB_OLDVERSION' Value='none' Secure='yes'>\r
142       <!-- 32 bit -->\r
143       <RegistrySearch Id='SP2_2_1' Root='HKLM' \r
144                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A19CDBC-E0DA-452C-8B38-1AA9DB4D579F}' \r
145                       Name='DisplayVersion' Type='raw' />\r
146       <RegistrySearch Id='SP2_4_1_32' Root='HKLM' \r
147                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A5D2DE8D-2A4A-4D74-98B5-BA448DD4DC39}' \r
148                       Name='DisplayVersion' Type='raw' />\r
149       <RegistrySearch Id='SP2_4_2_32' Root='HKLM' \r
150                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8280E58C-D290-42CD-9425-BCC0BA439649}' \r
151                       Name='DisplayVersion' Type='raw' />\r
152       <RegistrySearch Id='SP2_4_3_32' Root='HKLM' \r
153                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7B9F4513-3141-4270-B1F5-43A467235B6B}' \r
154                       Name='DisplayVersion' Type='raw' />\r
155       <RegistrySearch Id='SP2_2_0_32' Root='HKLM' \r
156                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{EAAAD296-3942-4535-B39B-81A57E94FCF7}' \r
157                       Name='DisplayVersion' Type='raw' />\r
158       <RegistrySearch Id='SP2_3_0_32' Root='HKLM' \r
159                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{790EE9BA-BB63-43D3-9080-F9AF7AC43114}' \r
160                       Name='DisplayVersion' Type='raw' />\r
161       <RegistrySearch Id='SP2_1_0_32' Root='HKLM' \r
162                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2E80BF81-72BC-4E9C-8A79-D7D7EA20AAE4}' \r
163                       Name='DisplayVersion' Type='raw' />\r
164       <RegistrySearch Id='AppReg2' Root='HKLM' \r
165                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A9A0D770-C658-4659-BC75-6F8289DDEAA3}' \r
166                       Name='DisplayVersion' Type='raw' />\r
167       <RegistrySearch Id='SP2_4_0_32' Root='HKLM' \r
168                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{56028A6A-D5A3-47C5-9494-092E1C840A8F}' \r
169                       Name='DisplayName' Type='raw' />\r
170       <RegistrySearch Id='AppReg1' Root='HKLM' \r
171                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6E62498D-162E-45AA-87C7-157308552043}' \r
172                       Name='DisplayVersion' Type='raw' />\r
173       <RegistrySearch Id='SP2_0_0_32' Root='HKLM' \r
174                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D62F990B-2A8A-442B-BF85-7FE075B2CE0C}' \r
175                       Name='DisplayVersion' Type='raw' />\r
176       <RegistrySearch Id='SP2_3_1' Root='HKLM' \r
177                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{E4FA3B6C-6347-4B58-A07D-F9E388B3944B}' \r
178                       Name='DisplayVersion' Type='raw' />\r
179 \r
180       <!-- 64 bit \r
181       <RegistrySearch Id='SP_2_2_1_64' Root='HKLM' \r
182                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5492935D-7D97-42FE-A916-5190C3F8C403}' \r
183                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
184       <RegistrySearch Id='SP2_4_1_64' Root='HKLM' \r
185                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3936DF1B-DFF2-4A02-8A2C-8AB893718397}' \r
186                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
187       <RegistrySearch Id='SP2_4_2_64' Root='HKLM' \r
188                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1081BC03-B61E-4F3C-ACD9-4C8C7D3E9928}' \r
189                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
190       <RegistrySearch Id='SP_2_4_3_64' Root='HKLM' \r
191                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9367CC0C-D76D-4DA8-AF51-0DD144430DD8}' \r
192                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
193       <RegistrySearch Id='SP2_3_0_64' Root='HKLM' \r
194                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{C7F88000-9E35-4B23-86AD-997F90B04DEE}' \r
195                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
196       <RegistrySearch Id='SP2_4_0_64' Root='HKLM' \r
197                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8F0834E5-A3C8-4B7F-B8DF-30BC90331C03}' \r
198                       Name='DisplayName' Type='raw' Win64='yes' />\r
199       <RegistrySearch Id='SP2_1_0_64' Root='HKLM' \r
200                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A8C641B8-0924-4264-BEBD-8D20F8B3EB79}' \r
201                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
202       <RegistrySearch Id='SP2_2_0_64' Root='HKLM' \r
203                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DDEEB7B2-A639-4513-8437-83564FECAFD3}' \r
204                       Name='DisplayVersion' Type='raw' Win64='yes' />\r
205       <RegistrySearch Id='SP2_3_1_64' Root='HKLM' \r
206                       Key='SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CFF81891-E7C4-47C3-B173-87CF1B947D05}' \r
207                       Name='DisplayVersion' Type='raw' Win64='yes' /> -->\r
208     </Property>\r
209 \r
210     <Property Id="SHIBD_PORT" Value="1600" Secure="yes" />\r
211 \r
212     <Condition Message='Shibboleth requires Windows XP SP2 or later.'>NOT VersionNT OR (VersionNT &gt;= 501)</Condition>\r
213     <Condition Message='Shibboleth requires a Windows NT-based operating system.'>NOT Version9X</Condition>\r
214     <Condition Message='You must uninstall recent versions of Shibboleth before using this installer. To uninstall, use the &quot;Change&quot; option from the Add/Remove dialog and then Remove. Attempting to uninstall directly causes the installer to hang on most systems.'>SHIB_OLDVERSION = "none"</Condition>\r
215 \r
216     <!-- The actions to perform after the files have been copied -->\r
217     <Binary Id='EditConfigFileSrc' SourceFile='$(var.BuildDirectory)\cvs\2.0\cpp-sp\msi\scripts\shib_edit_config_files.vbs-wix' />\r
218     <Binary Id='KeyGenSrc' SourceFile='$(var.BuildDirectory)\cvs\2.0\cpp-sp\msi\scripts\shib_keygen.vbs' />\r
219     <CustomAction Id='EditConfigFiles' \r
220                   BinaryKey='EditConfigFileSrc' VBScriptCall='' Execute='deferred' Impersonate='no' />\r
221     <CustomAction Id='SetEditConfigFiles' Property='EditConfigFiles' Value='[INSTALLDIR];@;[SHIBD_PORT];@;[ProgramFilesFolder]' />\r
222     <CustomAction Id='KeyGen' BinaryKey='KeyGenSrc' VBScriptCall='' Execute='deferred' Impersonate='no' />\r
223     <CustomAction Id='SetKeyGen' Property='KeyGen' Value='[INSTALLDIR]' />\r
224     <InstallExecuteSequence>\r
225       <Custom Action='SetEditConfigFiles' Before='CostInitialize'>NOT Installed</Custom>\r
226       <Custom Action='EditConfigFiles' After='InstallFiles'>NOT Installed</Custom>\r
227       <Custom Action='SetKeyGen' Before='CostInitialize'>NOT Installed</Custom>\r
228       <Custom Action='KeyGen' After='EditConfigFiles'>NOT Installed</Custom>\r
229     </InstallExecuteSequence>\r
230 \r
231     <!-- Components\r
232 \r
233          <ComponentRef Id='doc_shibboleth'/>\r
234          <ComponentRef Id='etc_shibboleth_perm'/>\r
235          <ComponentRef Id='etc_shibboleth_nonperm'/>\r
236          <ComponentRef Id='dist_noperm'/>\r
237          <ComponentRef Id='accessError.html'/>\r
238          <ComponentRef Id='apache.config'/>\r
239          <ComponentRef Id='apache2.config'/>\r
240          <ComponentRef Id='metadataError.html'/>\r
241          <ComponentRef Id='native.logger'/>\r
242          <ComponentRef Id='sessionError.html'/>\r
243          <ComponentRef Id='shibd.logger'/>\r
244          <ComponentRef Id='var_log_shibboleth_folder'/>\r
245          <ComponentRef Id='share_xml_shibboleth'/>\r
246          <ComponentRef Id='share_xml_shibboleth_xsd'/>\r
247          -->\r
248 \r
249   </Fragment>\r
250 </Wix>\r