diff options
Diffstat (limited to 'src/ext')
191 files changed, 1486 insertions, 4815 deletions
diff --git a/src/ext/Bal/Bal.wixext.sln b/src/ext/Bal/Bal.wixext.sln index be7149f4..f341a7be 100644 --- a/src/ext/Bal/Bal.wixext.sln +++ b/src/ext/Bal/Bal.wixext.sln | |||
@@ -1,45 +1,21 @@ | |||
1 |  | 1 |  |
2 | Microsoft Visual Studio Solution File, Format Version 12.00 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 |
3 | # Visual Studio Version 16 | 3 | # Visual Studio Version 17 |
4 | VisualStudioVersion = 16.0.29503.13 | 4 | VisualStudioVersion = 17.8.34408.163 |
5 | MinimumVisualStudioVersion = 10.0.40219.1 | 5 | MinimumVisualStudioVersion = 10.0.40219.1 |
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{C70E3534-A018-4D0A-A340-916C9777EEF7}" | ||
7 | EndProject | ||
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bafunctions", "Samples\bafunctions\bafunctions.vcxproj", "{EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}" | 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bafunctions", "Samples\bafunctions\bafunctions.vcxproj", "{EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}" |
9 | EndProject | 7 | EndProject |
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbahost", "mbahost\mbahost.vcxproj", "{12C87C77-3547-44F8-8134-29BC915CB19D}" | ||
11 | EndProject | ||
12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixiuiba", "wixiuiba\wixiuiba.vcxproj", "{0F73E566-925C-448D-99CB-3A7F5DF399C8}" | ||
13 | EndProject | ||
14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixstdba", "wixstdba\wixstdba.vcxproj", "{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}" | 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixstdba", "wixstdba\wixstdba.vcxproj", "{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}" |
15 | EndProject | 9 | EndProject |
16 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "bal", "wixlib\bal.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}" | 10 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "bal", "wixlib\bal.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}" |
17 | EndProject | 11 | EndProject |
18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Bal.wixext", "wixext\WixToolset.Bal.wixext.csproj", "{BF720A63-9D7B-456E-B60C-8122852D9FED}" | 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Bal.wixext", "wixext\WixToolset.Bal.wixext.csproj", "{BF720A63-9D7B-456E-B60C-8122852D9FED}" |
19 | EndProject | 13 | EndProject |
20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Dnc.HostGenerator", "WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj", "{D6A58B36-D47E-4020-A130-58B0CEAF01A2}" | ||
21 | EndProject | ||
22 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Mba.Host", "WixToolset.Mba.Host\WixToolset.Mba.Host.csproj", "{F2BA1935-70FA-4156-B161-FD03850B4FAA}" | ||
23 | EndProject | ||
24 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.FullFramework2MBA", "test\examples\FullFramework2MBA\Example.FullFramework2MBA.csproj", "{CC4236FC-226E-4232-AB50-24CBEC4D314D}" | ||
25 | EndProject | ||
26 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Example.TestEngine", "test\examples\TestEngine\Example.TestEngine.vcxproj", "{3D44B67D-A475-49BA-8310-E39F6C117CC9}" | ||
27 | EndProject | ||
28 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Dnc.HostGenerator", "test\WixToolsetTest.Dnc.HostGenerator\WixToolsetTest.Dnc.HostGenerator.csproj", "{38D80FC7-EBD4-4902-A114-C93AA75CFCA0}" | ||
29 | EndProject | ||
30 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.ManagedHost", "test\WixToolsetTest.ManagedHost\WixToolsetTest.ManagedHost.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}" | ||
31 | EndProject | ||
32 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.FullFramework4MBA", "test\examples\FullFramework4MBA\Example.FullFramework4MBA.csproj", "{44297646-706D-4508-8E96-1B35B109694C}" | ||
33 | EndProject | ||
34 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Bal", "test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}" | 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Bal", "test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}" |
35 | EndProject | 15 | EndProject |
36 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.EarliestCoreMBA", "test\examples\EarliestCoreMBA\Example.EarliestCoreMBA.csproj", "{1E86D8DF-DABD-4B6E-A812-64CD2040C73A}" | 16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixiuiba", "wixiuiba\wixiuiba.vcxproj", "{0F73E566-925C-448D-99CB-3A7F5DF399C8}" |
37 | EndProject | ||
38 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnchost", "dnchost\dnchost.vcxproj", "{B6F70281-6583-4138-BB7F-AABFEBBB3CA2}" | ||
39 | EndProject | ||
40 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.LatestCoreMBA", "test\examples\LatestCoreMBA\Example.LatestCoreMBA.csproj", "{A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}" | ||
41 | EndProject | 17 | EndProject |
42 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.WPFCoreMBA", "test\examples\WPFCoreMBA\Example.WPFCoreMBA.csproj", "{8E707BF2-FD72-4649-8727-BA5955D48D40}" | 18 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdbas", "stdbas\stdbas.vcxproj", "{DBBF5F32-BAEA-46A8-99A0-17277A906456}" |
43 | EndProject | 19 | EndProject |
44 | Global | 20 | Global |
45 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
@@ -69,38 +45,6 @@ Global | |||
69 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x64.Build.0 = Release|x64 | 45 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x64.Build.0 = Release|x64 |
70 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x86.ActiveCfg = Release|Win32 | 46 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x86.ActiveCfg = Release|Win32 |
71 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x86.Build.0 = Release|Win32 | 47 | {EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}.Release|x86.Build.0 = Release|Win32 |
72 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|Any CPU.ActiveCfg = Debug|Win32 | ||
73 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|Any CPU.Build.0 = Debug|Win32 | ||
74 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
75 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
76 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x64.ActiveCfg = Debug|x64 | ||
77 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x64.Build.0 = Debug|x64 | ||
78 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x86.ActiveCfg = Debug|Win32 | ||
79 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Debug|x86.Build.0 = Debug|Win32 | ||
80 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|Any CPU.ActiveCfg = Release|Win32 | ||
81 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|Any CPU.Build.0 = Release|Win32 | ||
82 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
83 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|ARM64.Build.0 = Release|ARM64 | ||
84 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x64.ActiveCfg = Release|x64 | ||
85 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x64.Build.0 = Release|x64 | ||
86 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x86.ActiveCfg = Release|Win32 | ||
87 | {12C87C77-3547-44F8-8134-29BC915CB19D}.Release|x86.Build.0 = Release|Win32 | ||
88 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|Any CPU.ActiveCfg = Debug|Win32 | ||
89 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|Any CPU.Build.0 = Debug|Win32 | ||
90 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
91 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
92 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x64.ActiveCfg = Debug|x64 | ||
93 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x64.Build.0 = Debug|x64 | ||
94 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x86.ActiveCfg = Debug|Win32 | ||
95 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x86.Build.0 = Debug|Win32 | ||
96 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|Any CPU.ActiveCfg = Release|Win32 | ||
97 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|Any CPU.Build.0 = Release|Win32 | ||
98 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
99 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|ARM64.Build.0 = Release|ARM64 | ||
100 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x64.ActiveCfg = Release|x64 | ||
101 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x64.Build.0 = Release|x64 | ||
102 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x86.ActiveCfg = Release|Win32 | ||
103 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x86.Build.0 = Release|Win32 | ||
104 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.ActiveCfg = Debug|Win32 | 48 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.ActiveCfg = Debug|Win32 |
105 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.Build.0 = Debug|Win32 | 49 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|Any CPU.Build.0 = Debug|Win32 |
106 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|ARM64.ActiveCfg = Debug|ARM64 | 50 | {41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}.Debug|ARM64.ActiveCfg = Debug|ARM64 |
@@ -145,118 +89,6 @@ Global | |||
145 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x64.Build.0 = Release|Any CPU | 89 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x64.Build.0 = Release|Any CPU |
146 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.ActiveCfg = Release|Any CPU | 90 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.ActiveCfg = Release|Any CPU |
147 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.Build.0 = Release|Any CPU | 91 | {BF720A63-9D7B-456E-B60C-8122852D9FED}.Release|x86.Build.0 = Release|Any CPU |
148 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
149 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
150 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|ARM64.ActiveCfg = Debug|AnyCPU | ||
151 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|ARM64.Build.0 = Debug|AnyCPU | ||
152 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|x64.ActiveCfg = Debug|AnyCPU | ||
153 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|x64.Build.0 = Debug|AnyCPU | ||
154 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|x86.ActiveCfg = Debug|AnyCPU | ||
155 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Debug|x86.Build.0 = Debug|AnyCPU | ||
156 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
157 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
158 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|ARM64.ActiveCfg = Release|AnyCPU | ||
159 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|ARM64.Build.0 = Release|AnyCPU | ||
160 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|x64.ActiveCfg = Release|AnyCPU | ||
161 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|x64.Build.0 = Release|AnyCPU | ||
162 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|x86.ActiveCfg = Release|AnyCPU | ||
163 | {D6A58B36-D47E-4020-A130-58B0CEAF01A2}.Release|x86.Build.0 = Release|AnyCPU | ||
164 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
165 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
166 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
167 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
168 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
169 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x64.Build.0 = Debug|Any CPU | ||
170 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
171 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x86.Build.0 = Debug|Any CPU | ||
172 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
173 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
174 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
175 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|ARM64.Build.0 = Release|Any CPU | ||
176 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x64.ActiveCfg = Release|Any CPU | ||
177 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x64.Build.0 = Release|Any CPU | ||
178 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x86.ActiveCfg = Release|Any CPU | ||
179 | {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x86.Build.0 = Release|Any CPU | ||
180 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
181 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
182 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
183 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
184 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
185 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|x64.Build.0 = Debug|Any CPU | ||
186 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
187 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Debug|x86.Build.0 = Debug|Any CPU | ||
188 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
189 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
190 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
191 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|ARM64.Build.0 = Release|Any CPU | ||
192 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|x64.ActiveCfg = Release|Any CPU | ||
193 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|x64.Build.0 = Release|Any CPU | ||
194 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|x86.ActiveCfg = Release|Any CPU | ||
195 | {CC4236FC-226E-4232-AB50-24CBEC4D314D}.Release|x86.Build.0 = Release|Any CPU | ||
196 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|Any CPU.ActiveCfg = Debug|x64 | ||
197 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|Any CPU.Build.0 = Debug|x64 | ||
198 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
199 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
200 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|x64.ActiveCfg = Debug|x64 | ||
201 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|x64.Build.0 = Debug|x64 | ||
202 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|x86.ActiveCfg = Debug|Win32 | ||
203 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Debug|x86.Build.0 = Debug|Win32 | ||
204 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|Any CPU.ActiveCfg = Release|x64 | ||
205 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|Any CPU.Build.0 = Release|x64 | ||
206 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
207 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|ARM64.Build.0 = Release|ARM64 | ||
208 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|x64.ActiveCfg = Release|x64 | ||
209 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|x64.Build.0 = Release|x64 | ||
210 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|x86.ActiveCfg = Release|Win32 | ||
211 | {3D44B67D-A475-49BA-8310-E39F6C117CC9}.Release|x86.Build.0 = Release|Win32 | ||
212 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
213 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
214 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
215 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
216 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
217 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|x64.Build.0 = Debug|Any CPU | ||
218 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
219 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Debug|x86.Build.0 = Debug|Any CPU | ||
220 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
221 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|Any CPU.Build.0 = Release|Any CPU | ||
222 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
223 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|ARM64.Build.0 = Release|Any CPU | ||
224 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|x64.ActiveCfg = Release|Any CPU | ||
225 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|x64.Build.0 = Release|Any CPU | ||
226 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|x86.ActiveCfg = Release|Any CPU | ||
227 | {38D80FC7-EBD4-4902-A114-C93AA75CFCA0}.Release|x86.Build.0 = Release|Any CPU | ||
228 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
229 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
230 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
231 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
232 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
233 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x64.Build.0 = Debug|Any CPU | ||
234 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
235 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Debug|x86.Build.0 = Debug|Any CPU | ||
236 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
237 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|Any CPU.Build.0 = Release|Any CPU | ||
238 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
239 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|ARM64.Build.0 = Release|Any CPU | ||
240 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.ActiveCfg = Release|Any CPU | ||
241 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x64.Build.0 = Release|Any CPU | ||
242 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.ActiveCfg = Release|Any CPU | ||
243 | {FED9D707-E5C3-4867-87B0-FABDB5EB0823}.Release|x86.Build.0 = Release|Any CPU | ||
244 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
245 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
246 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
247 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
248 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
249 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|x64.Build.0 = Debug|Any CPU | ||
250 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
251 | {44297646-706D-4508-8E96-1B35B109694C}.Debug|x86.Build.0 = Debug|Any CPU | ||
252 | {44297646-706D-4508-8E96-1B35B109694C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
253 | {44297646-706D-4508-8E96-1B35B109694C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
254 | {44297646-706D-4508-8E96-1B35B109694C}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
255 | {44297646-706D-4508-8E96-1B35B109694C}.Release|ARM64.Build.0 = Release|Any CPU | ||
256 | {44297646-706D-4508-8E96-1B35B109694C}.Release|x64.ActiveCfg = Release|Any CPU | ||
257 | {44297646-706D-4508-8E96-1B35B109694C}.Release|x64.Build.0 = Release|Any CPU | ||
258 | {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.ActiveCfg = Release|Any CPU | ||
259 | {44297646-706D-4508-8E96-1B35B109694C}.Release|x86.Build.0 = Release|Any CPU | ||
260 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 92 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
261 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.Build.0 = Debug|Any CPU | 93 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|Any CPU.Build.0 = Debug|Any CPU |
262 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|ARM64.ActiveCfg = Debug|Any CPU | 94 | {89D479FC-20DA-44D8-AE38-48F063223498}.Debug|ARM64.ActiveCfg = Debug|Any CPU |
@@ -273,82 +105,42 @@ Global | |||
273 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.Build.0 = Release|Any CPU | 105 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x64.Build.0 = Release|Any CPU |
274 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.ActiveCfg = Release|Any CPU | 106 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.ActiveCfg = Release|Any CPU |
275 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.Build.0 = Release|Any CPU | 107 | {89D479FC-20DA-44D8-AE38-48F063223498}.Release|x86.Build.0 = Release|Any CPU |
276 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | 108 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|Any CPU.ActiveCfg = Debug|x64 |
277 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|Any CPU.Build.0 = Debug|Any CPU | 109 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|Any CPU.Build.0 = Debug|x64 |
278 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|ARM64.ActiveCfg = Debug|Any CPU | 110 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|ARM64.ActiveCfg = Debug|ARM64 |
279 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|ARM64.Build.0 = Debug|Any CPU | 111 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|ARM64.Build.0 = Debug|ARM64 |
280 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|x64.ActiveCfg = Debug|Any CPU | 112 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x64.ActiveCfg = Debug|x64 |
281 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|x64.Build.0 = Debug|Any CPU | 113 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x64.Build.0 = Debug|x64 |
282 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|x86.ActiveCfg = Debug|Any CPU | 114 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x86.ActiveCfg = Debug|Win32 |
283 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Debug|x86.Build.0 = Debug|Any CPU | 115 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Debug|x86.Build.0 = Debug|Win32 |
284 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|Any CPU.ActiveCfg = Release|Any CPU | 116 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|Any CPU.ActiveCfg = Release|x64 |
285 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|Any CPU.Build.0 = Release|Any CPU | 117 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|Any CPU.Build.0 = Release|x64 |
286 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|ARM64.ActiveCfg = Release|Any CPU | 118 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|ARM64.ActiveCfg = Release|ARM64 |
287 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|ARM64.Build.0 = Release|Any CPU | 119 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|ARM64.Build.0 = Release|ARM64 |
288 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|x64.ActiveCfg = Release|Any CPU | 120 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x64.ActiveCfg = Release|x64 |
289 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|x64.Build.0 = Release|Any CPU | 121 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x64.Build.0 = Release|x64 |
290 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|x86.ActiveCfg = Release|Any CPU | 122 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x86.ActiveCfg = Release|Win32 |
291 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A}.Release|x86.Build.0 = Release|Any CPU | 123 | {0F73E566-925C-448D-99CB-3A7F5DF399C8}.Release|x86.Build.0 = Release|Win32 |
292 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|Any CPU.ActiveCfg = Debug|Win32 | 124 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|Any CPU.ActiveCfg = Debug|x64 |
293 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|Any CPU.Build.0 = Debug|Win32 | 125 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|Any CPU.Build.0 = Debug|x64 |
294 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|ARM64.ActiveCfg = Debug|ARM64 | 126 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|ARM64.ActiveCfg = Debug|ARM64 |
295 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|ARM64.Build.0 = Debug|ARM64 | 127 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|ARM64.Build.0 = Debug|ARM64 |
296 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|x64.ActiveCfg = Debug|x64 | 128 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|x64.ActiveCfg = Debug|x64 |
297 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|x64.Build.0 = Debug|x64 | 129 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|x64.Build.0 = Debug|x64 |
298 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|x86.ActiveCfg = Debug|Win32 | 130 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|x86.ActiveCfg = Debug|Win32 |
299 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Debug|x86.Build.0 = Debug|Win32 | 131 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Debug|x86.Build.0 = Debug|Win32 |
300 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|Any CPU.ActiveCfg = Release|Win32 | 132 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|Any CPU.ActiveCfg = Release|x64 |
301 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|Any CPU.Build.0 = Release|Win32 | 133 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|Any CPU.Build.0 = Release|x64 |
302 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|ARM64.ActiveCfg = Release|ARM64 | 134 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|ARM64.ActiveCfg = Release|ARM64 |
303 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|ARM64.Build.0 = Release|ARM64 | 135 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|ARM64.Build.0 = Release|ARM64 |
304 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|x64.ActiveCfg = Release|x64 | 136 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x64.ActiveCfg = Release|x64 |
305 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|x64.Build.0 = Release|x64 | 137 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x64.Build.0 = Release|x64 |
306 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|x86.ActiveCfg = Release|Win32 | 138 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.ActiveCfg = Release|Win32 |
307 | {B6F70281-6583-4138-BB7F-AABFEBBB3CA2}.Release|x86.Build.0 = Release|Win32 | 139 | {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.Build.0 = Release|Win32 |
308 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
309 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
310 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
311 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
312 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
313 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|x64.Build.0 = Debug|Any CPU | ||
314 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
315 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Debug|x86.Build.0 = Debug|Any CPU | ||
316 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
317 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|Any CPU.Build.0 = Release|Any CPU | ||
318 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
319 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|ARM64.Build.0 = Release|Any CPU | ||
320 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|x64.ActiveCfg = Release|Any CPU | ||
321 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|x64.Build.0 = Release|Any CPU | ||
322 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|x86.ActiveCfg = Release|Any CPU | ||
323 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618}.Release|x86.Build.0 = Release|Any CPU | ||
324 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
325 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
326 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|ARM64.ActiveCfg = Debug|Any CPU | ||
327 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|ARM64.Build.0 = Debug|Any CPU | ||
328 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
329 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|x64.Build.0 = Debug|Any CPU | ||
330 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
331 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Debug|x86.Build.0 = Debug|Any CPU | ||
332 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
333 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|Any CPU.Build.0 = Release|Any CPU | ||
334 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|ARM64.ActiveCfg = Release|Any CPU | ||
335 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|ARM64.Build.0 = Release|Any CPU | ||
336 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|x64.ActiveCfg = Release|Any CPU | ||
337 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|x64.Build.0 = Release|Any CPU | ||
338 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|x86.ActiveCfg = Release|Any CPU | ||
339 | {8E707BF2-FD72-4649-8727-BA5955D48D40}.Release|x86.Build.0 = Release|Any CPU | ||
340 | EndGlobalSection | 140 | EndGlobalSection |
341 | GlobalSection(SolutionProperties) = preSolution | 141 | GlobalSection(SolutionProperties) = preSolution |
342 | HideSolutionNode = FALSE | 142 | HideSolutionNode = FALSE |
343 | EndGlobalSection | 143 | EndGlobalSection |
344 | GlobalSection(NestedProjects) = preSolution | ||
345 | {CC4236FC-226E-4232-AB50-24CBEC4D314D} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
346 | {3D44B67D-A475-49BA-8310-E39F6C117CC9} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
347 | {44297646-706D-4508-8E96-1B35B109694C} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
348 | {1E86D8DF-DABD-4B6E-A812-64CD2040C73A} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
349 | {A4247D9D-3CC9-4BE1-B23A-BEC166AF3618} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
350 | {8E707BF2-FD72-4649-8727-BA5955D48D40} = {C70E3534-A018-4D0A-A340-916C9777EEF7} | ||
351 | EndGlobalSection | ||
352 | GlobalSection(ExtensibilityGlobals) = postSolution | 144 | GlobalSection(ExtensibilityGlobals) = postSolution |
353 | SolutionGuid = {74046961-48BF-467A-A6C2-F886C75CE0BE} | 145 | SolutionGuid = {74046961-48BF-467A-A6C2-F886C75CE0BE} |
354 | EndGlobalSection | 146 | EndGlobalSection |
diff --git a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp index 5383efbf..14a898e8 100644 --- a/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp +++ b/src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp | |||
@@ -51,10 +51,8 @@ public: | |||
51 | // Constructor - initialize member variables. | 51 | // Constructor - initialize member variables. |
52 | // | 52 | // |
53 | CWixSampleBAFunctions( | 53 | CWixSampleBAFunctions( |
54 | __in HMODULE hModule, | 54 | __in HMODULE hModule |
55 | __in IBootstrapperEngine* pEngine, | 55 | ) : CBalBaseBAFunctions(hModule) |
56 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
57 | ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) | ||
58 | { | 56 | { |
59 | } | 57 | } |
60 | 58 | ||
@@ -75,22 +73,22 @@ HRESULT WINAPI CreateBAFunctions( | |||
75 | { | 73 | { |
76 | HRESULT hr = S_OK; | 74 | HRESULT hr = S_OK; |
77 | CWixSampleBAFunctions* pBAFunctions = NULL; | 75 | CWixSampleBAFunctions* pBAFunctions = NULL; |
78 | IBootstrapperEngine* pEngine = NULL; | ||
79 | 76 | ||
80 | // This is required to enable logging functions. | 77 | // This is required to enable logging functions. |
81 | hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); | 78 | BalInitialize(pArgs->pEngine); |
82 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
83 | 79 | ||
84 | pBAFunctions = new CWixSampleBAFunctions(hModule, pEngine, pArgs); | 80 | pBAFunctions = new CWixSampleBAFunctions(hModule); |
85 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); | 81 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object."); |
86 | 82 | ||
83 | hr = pBAFunctions->OnCreate(pArgs->pEngine, pArgs->pCommand); | ||
84 | ExitOnFailure(hr, "Failed to call OnCreate CPrereqBaf."); | ||
85 | |||
87 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | 86 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; |
88 | pResults->pvBAFunctionsProcContext = pBAFunctions; | 87 | pResults->pvBAFunctionsProcContext = pBAFunctions; |
89 | pBAFunctions = NULL; | 88 | pBAFunctions = NULL; |
90 | 89 | ||
91 | LExit: | 90 | LExit: |
92 | ReleaseObject(pBAFunctions); | 91 | ReleaseObject(pBAFunctions); |
93 | ReleaseObject(pEngine); | ||
94 | 92 | ||
95 | return hr; | 93 | return hr; |
96 | } | 94 | } |
diff --git a/src/ext/Bal/Samples/bafunctions/bafunctions.cpp b/src/ext/Bal/Samples/bafunctions/bafunctions.cpp index fc9d1177..d26e7cce 100644 --- a/src/ext/Bal/Samples/bafunctions/bafunctions.cpp +++ b/src/ext/Bal/Samples/bafunctions/bafunctions.cpp | |||
@@ -26,13 +26,13 @@ extern "C" BOOL WINAPI DllMain( | |||
26 | } | 26 | } |
27 | 27 | ||
28 | extern "C" HRESULT WINAPI BAFunctionsCreate( | 28 | extern "C" HRESULT WINAPI BAFunctionsCreate( |
29 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | 29 | __in const BA_FUNCTIONS_CREATE_ARGS* /*pArgs*/, |
30 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | 30 | __inout BA_FUNCTIONS_CREATE_RESULTS* /*pResults*/ |
31 | ) | 31 | ) |
32 | { | 32 | { |
33 | HRESULT hr = S_OK; | 33 | HRESULT hr = S_OK; |
34 | 34 | ||
35 | hr = CreateBAFunctions(vhInstance, pArgs, pResults); | 35 | //hr = CreateBAFunctions(vhInstance, pArgs, pResults); |
36 | BalExitOnFailure(hr, "Failed to create BAFunctions interface."); | 36 | BalExitOnFailure(hr, "Failed to create BAFunctions interface."); |
37 | 37 | ||
38 | LExit: | 38 | LExit: |
diff --git a/src/ext/Bal/WixToolset.Dnc.HostGenerator/DncHostGenerator.cs b/src/ext/Bal/WixToolset.Dnc.HostGenerator/DncHostGenerator.cs deleted file mode 100644 index 088b2b49..00000000 --- a/src/ext/Bal/WixToolset.Dnc.HostGenerator/DncHostGenerator.cs +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Dnc.HostGenerator | ||
4 | { | ||
5 | using System; | ||
6 | using System.Diagnostics.CodeAnalysis; | ||
7 | using System.Text; | ||
8 | using Microsoft.CodeAnalysis; | ||
9 | using Microsoft.CodeAnalysis.Text; | ||
10 | |||
11 | [Generator] | ||
12 | public sealed class DncHostGenerator : ISourceGenerator | ||
13 | { | ||
14 | public static readonly string Version = String.Format($"{ThisAssembly.Git.SemVer.Major}.{ThisAssembly.Git.SemVer.Minor}.{ThisAssembly.Git.SemVer.Patch}{ThisAssembly.Git.SemVer.DashLabel}+{ThisAssembly.Git.Sha}"); | ||
15 | public static readonly string TargetAttributeFullName = "WixToolset.Mba.Core.BootstrapperApplicationFactoryAttribute"; | ||
16 | |||
17 | [SuppressMessage("MicrosoftCodeAnalysisReleaseTracking", "RS2008:Enable analyzer release tracking", Justification = "Tracking not needed")] | ||
18 | public static readonly DiagnosticDescriptor MissingFactoryAttributeDescriptor = new DiagnosticDescriptor( | ||
19 | "WIXBAL001", | ||
20 | $"Missing assembly level attribute {TargetAttributeFullName}.", | ||
21 | $"Add [assembly: {TargetAttributeFullName}(typeof(<your IBootstrapperApplicationFactory>)].", | ||
22 | "WixToolset.Bal.wixext", | ||
23 | DiagnosticSeverity.Error, | ||
24 | true | ||
25 | ); | ||
26 | |||
27 | public void Initialize(GeneratorInitializationContext context) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | public void Execute(GeneratorExecutionContext context) | ||
32 | { | ||
33 | var symbolDisplayFormat = new SymbolDisplayFormat(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces); | ||
34 | |||
35 | string baFactoryClassName = null; | ||
36 | foreach (var assemblyAttribute in context.Compilation.Assembly.GetAttributes()) | ||
37 | { | ||
38 | var fullAssemblyTypeName = assemblyAttribute.AttributeClass.ToDisplayString(symbolDisplayFormat); | ||
39 | |||
40 | if (fullAssemblyTypeName == TargetAttributeFullName && | ||
41 | assemblyAttribute.ConstructorArguments.Length == 1) | ||
42 | { | ||
43 | var arg = assemblyAttribute.ConstructorArguments[0]; | ||
44 | if (arg.Value is INamedTypeSymbol argValue) | ||
45 | { | ||
46 | baFactoryClassName = argValue.ToDisplayString(symbolDisplayFormat); | ||
47 | break; | ||
48 | } | ||
49 | } | ||
50 | } | ||
51 | |||
52 | if (baFactoryClassName == null) | ||
53 | { | ||
54 | context.ReportDiagnostic(Diagnostic.Create(MissingFactoryAttributeDescriptor, null)); | ||
55 | } | ||
56 | else | ||
57 | { | ||
58 | var source = String.Format(Template, Version, baFactoryClassName); | ||
59 | context.AddSource("WixToolset.Dnc.Host.g.cs", SourceText.From(source, Encoding.UTF8, SourceHashAlgorithm.Sha256)); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | public const string Template = @" | ||
64 | //------------------------------------------------------------------------------ | ||
65 | // <auto-generated> | ||
66 | // This code was generated by a tool. | ||
67 | // | ||
68 | // Changes to this file may cause incorrect behavior and will be lost if | ||
69 | // the code is regenerated. | ||
70 | // </auto-generated> | ||
71 | //------------------------------------------------------------------------------ | ||
72 | |||
73 | namespace WixToolset.Dnc.Host | ||
74 | {{ | ||
75 | using System; | ||
76 | using System.CodeDom.Compiler; | ||
77 | using System.Diagnostics.CodeAnalysis; | ||
78 | using System.Linq; | ||
79 | using System.Reflection; | ||
80 | using System.Runtime.CompilerServices; | ||
81 | using System.Runtime.InteropServices; | ||
82 | using WixToolset.Mba.Core; | ||
83 | |||
84 | [GeneratedCode(""WixToolset.Dnc.HostGenerator.DncHostGenerator"", ""{0}"")] | ||
85 | [CompilerGenerated] | ||
86 | delegate IBootstrapperApplicationFactory StaticEntryDelegate(); | ||
87 | |||
88 | /// <summary> | ||
89 | /// Entry point for the .NET Core host to create and return the BA to the engine. | ||
90 | /// </summary> | ||
91 | [GeneratedCode(""WixToolset.Dnc.HostGenerator.DncHostGenerator"", ""{0}"")] | ||
92 | [CompilerGenerated] | ||
93 | public sealed class BootstrapperApplicationFactory : IBootstrapperApplicationFactory | ||
94 | {{ | ||
95 | /// <summary> | ||
96 | /// Creates the bootstrapper application factory and calls its IBootstrapperApplicationFactory.Create method. | ||
97 | /// </summary> | ||
98 | /// <param name=""pArgs"">Pointer to BOOTSTRAPPER_CREATE_ARGS struct.</param> | ||
99 | /// <param name=""pResults"">Pointer to BOOTSTRAPPER_CREATE_RESULTS struct.</param> | ||
100 | public void Create(IntPtr pArgs, IntPtr pResults) | ||
101 | {{ | ||
102 | var baFactory = new {1}(); | ||
103 | baFactory.Create(pArgs, pResults); | ||
104 | }} | ||
105 | |||
106 | // Entry point for the DNC host. | ||
107 | public static IBootstrapperApplicationFactory CreateBAFactory() | ||
108 | {{ | ||
109 | return new BootstrapperApplicationFactory(); | ||
110 | }} | ||
111 | |||
112 | #if NET5_0_OR_GREATER | ||
113 | [ModuleInitializer] | ||
114 | [DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(BootstrapperApplicationFactory))] | ||
115 | #if NET5_0 | ||
116 | [DynamicDependency(""GetFunctionPointer(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)"", ""Internal.Runtime.InteropServices.ComponentActivator"", ""System.Private.CoreLib"")] | ||
117 | #endif | ||
118 | /// <summary> | ||
119 | /// Empty method to attach above attributes to support linker trimming. | ||
120 | /// </summary> | ||
121 | public static void ModuleInitialize() {{ }} | ||
122 | #endif | ||
123 | }} | ||
124 | }} | ||
125 | "; | ||
126 | } | ||
127 | } | ||
diff --git a/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.csproj b/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.csproj deleted file mode 100644 index 750db40e..00000000 --- a/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.csproj +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>netstandard2.0</TargetFramework> | ||
7 | <RootNamespace>WixToolset.Dnc.HostGenerator</RootNamespace> | ||
8 | <Description>WiX Toolset .NET Core BA Host Generator</Description> | ||
9 | <Title>WiX Toolset .NET Core BA Host Generator</Title> | ||
10 | <DebugType>embedded</DebugType> | ||
11 | <PlatformTarget>AnyCPU</PlatformTarget> | ||
12 | <IncludeThisAssembly>true</IncludeThisAssembly> | ||
13 | </PropertyGroup> | ||
14 | |||
15 | <ItemGroup> | ||
16 | <Content Include="build\$(AssemblyName).props" CopyToOutputDirectory="PreserveNewest" /> | ||
17 | <Content Include="build\$(AssemblyName).targets" CopyToOutputDirectory="PreserveNewest" /> | ||
18 | </ItemGroup> | ||
19 | |||
20 | <ItemGroup> | ||
21 | <PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" /> | ||
22 | <PackageReference Include="Microsoft.CodeAnalysis.Analyzers"> | ||
23 | <PrivateAssets>all</PrivateAssets> | ||
24 | <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
25 | </PackageReference> | ||
26 | </ItemGroup> | ||
27 | </Project> | ||
diff --git a/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.nuspec b/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.nuspec deleted file mode 100644 index 8f4de5e8..00000000 --- a/src/ext/Bal/WixToolset.Dnc.HostGenerator/WixToolset.Dnc.HostGenerator.nuspec +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
3 | <metadata> | ||
4 | <id>$id$</id> | ||
5 | <version>$version$</version> | ||
6 | <title>$title$</title> | ||
7 | <description>$description$</description> | ||
8 | <authors>$authors$</authors> | ||
9 | <icon>wix.png</icon> | ||
10 | <license type="expression">MS-RL</license> | ||
11 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
12 | <copyright>$copyright$</copyright> | ||
13 | <projectUrl>$projectUrl$</projectUrl> | ||
14 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | ||
15 | <dependencies> | ||
16 | <dependency id="WixToolset.Mba.Core" version="[$version$,5)" /> | ||
17 | </dependencies> | ||
18 | </metadata> | ||
19 | |||
20 | <files> | ||
21 | <file src="$projectFolder$\..\..\..\internal\images\wix.png" /> | ||
22 | <file src="$id$.dll" target="analyzers/dotnet/cs" /> | ||
23 | <file src="build\**\*" target="build" /> | ||
24 | </files> | ||
25 | </package> | ||
diff --git a/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.props b/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.props deleted file mode 100644 index f9306af7..00000000 --- a/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.props +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current"> | ||
5 | <PropertyGroup> | ||
6 | <BuiltInComInteropSupport>true</BuiltInComInteropSupport> | ||
7 | <EnableDynamicLoading>true</EnableDynamicLoading> | ||
8 | <_EnableConsumingManagedCodeFromNativeHosting>true</_EnableConsumingManagedCodeFromNativeHosting> | ||
9 | </PropertyGroup> | ||
10 | </Project> | ||
diff --git a/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.targets b/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.targets deleted file mode 100644 index d536ef5f..00000000 --- a/src/ext/Bal/WixToolset.Dnc.HostGenerator/build/WixToolset.Dnc.HostGenerator.targets +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current"> | ||
5 | <ItemGroup Condition=" '$(TrimMode)'=='CopyUsed' "> | ||
6 | <TrimmerRootAssembly Include="System.Diagnostics.Tools" /> | ||
7 | <TrimmerRootAssembly Include="System.Runtime" /> | ||
8 | <TrimmerRootAssembly Include="System.Runtime.InteropServices" /> | ||
9 | <TrimmerRootAssembly Include="System.Runtime.Loader" /> | ||
10 | </ItemGroup> | ||
11 | </Project> | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs b/src/ext/Bal/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs deleted file mode 100644 index 78e68bd9..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | using System.Reflection; | ||
8 | using System.Runtime.InteropServices; | ||
9 | using WixToolset.Mba.Core; | ||
10 | |||
11 | /// <summary> | ||
12 | /// Entry point for the managed host to create and return the BA to the engine. | ||
13 | /// </summary> | ||
14 | [ClassInterface(ClassInterfaceType.None)] | ||
15 | public sealed class BootstrapperApplicationFactory : MarshalByRefObject, IBootstrapperApplicationFactory | ||
16 | { | ||
17 | /// <summary> | ||
18 | /// Creates a new instance of the <see cref="BootstrapperApplicationFactory"/> class. | ||
19 | /// Entry point for the MBA host. | ||
20 | /// </summary> | ||
21 | public BootstrapperApplicationFactory() | ||
22 | { | ||
23 | } | ||
24 | |||
25 | /// <summary> | ||
26 | /// Loads the bootstrapper application assembly and calls its IBootstrapperApplicationFactory.Create method. | ||
27 | /// </summary> | ||
28 | /// <param name="pArgs">Pointer to BOOTSTRAPPER_CREATE_ARGS struct.</param> | ||
29 | /// <param name="pResults">Pointer to BOOTSTRAPPER_CREATE_RESULTS struct.</param> | ||
30 | /// <exception cref="MissingAttributeException">The bootstrapper application assembly | ||
31 | /// does not define the <see cref="BootstrapperApplicationFactoryAttribute"/>.</exception> | ||
32 | public void Create(IntPtr pArgs, IntPtr pResults) | ||
33 | { | ||
34 | // Get the wix.boostrapper section group to get the name of the bootstrapper application assembly to host. | ||
35 | var section = ConfigurationManager.GetSection("wix.bootstrapper/host") as HostSection; | ||
36 | if (null == section) | ||
37 | { | ||
38 | throw new MissingAttributeException(); // TODO: throw a more specific exception than this. | ||
39 | } | ||
40 | |||
41 | // Load the BA's IBootstrapperApplicationFactory. | ||
42 | var baFactoryType = BootstrapperApplicationFactory.GetBAFactoryTypeFromAssembly(section.AssemblyName); | ||
43 | var baFactory = (IBootstrapperApplicationFactory)Activator.CreateInstance(baFactoryType); | ||
44 | if (null == baFactory) | ||
45 | { | ||
46 | throw new InvalidBootstrapperApplicationFactoryException(); | ||
47 | } | ||
48 | |||
49 | baFactory.Create(pArgs, pResults); | ||
50 | } | ||
51 | |||
52 | /// <summary> | ||
53 | /// Locates the <see cref="BootstrapperApplicationFactoryAttribute"/> and returns the specified type. | ||
54 | /// </summary> | ||
55 | /// <param name="assemblyName">The assembly that defines the IBootstrapperApplicationFactory implementation.</param> | ||
56 | /// <returns>The bootstrapper application factory <see cref="Type"/>.</returns> | ||
57 | private static Type GetBAFactoryTypeFromAssembly(string assemblyName) | ||
58 | { | ||
59 | Type baFactoryType = null; | ||
60 | |||
61 | // Load the requested assembly. | ||
62 | Assembly asm = AppDomain.CurrentDomain.Load(assemblyName); | ||
63 | |||
64 | // If an assembly was loaded and is not the current assembly, check for the required attribute. | ||
65 | // This is done to avoid using the BootstrapperApplicationFactoryAttribute which we use at build time | ||
66 | // to specify the BootstrapperApplicationFactory assembly in the manifest. | ||
67 | if (!Assembly.GetExecutingAssembly().Equals(asm)) | ||
68 | { | ||
69 | // There must be one and only one BootstrapperApplicationFactoryAttribute. | ||
70 | // The attribute prevents multiple declarations already. | ||
71 | var attrs = (BootstrapperApplicationFactoryAttribute[])asm.GetCustomAttributes(typeof(BootstrapperApplicationFactoryAttribute), false); | ||
72 | if (null != attrs) | ||
73 | { | ||
74 | baFactoryType = attrs[0].BootstrapperApplicationFactoryType; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | if (null == baFactoryType) | ||
79 | { | ||
80 | throw new MissingAttributeException(); | ||
81 | } | ||
82 | |||
83 | return baFactoryType; | ||
84 | } | ||
85 | } | ||
86 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/BootstrapperSectionGroup.cs b/src/ext/Bal/WixToolset.Mba.Host/BootstrapperSectionGroup.cs deleted file mode 100644 index 5cf1bc9c..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/BootstrapperSectionGroup.cs +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Handler for the wix.bootstrapper configuration section group. | ||
10 | /// </summary> | ||
11 | public class BootstrapperSectionGroup : ConfigurationSectionGroup | ||
12 | { | ||
13 | /// <summary> | ||
14 | /// Creates a new instance of the <see cref="BootstrapperSectionGroup"/> class. | ||
15 | /// </summary> | ||
16 | public BootstrapperSectionGroup() | ||
17 | { | ||
18 | } | ||
19 | |||
20 | /// <summary> | ||
21 | /// Gets the <see cref="HostSection"/> handler for the mba configuration section. | ||
22 | /// </summary> | ||
23 | [ConfigurationProperty("host")] | ||
24 | public HostSection Host | ||
25 | { | ||
26 | get { return (HostSection)base.Sections["host"]; } | ||
27 | } | ||
28 | } | ||
29 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/Exceptions.cs b/src/ext/Bal/WixToolset.Mba.Host/Exceptions.cs deleted file mode 100644 index c68951f0..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/Exceptions.cs +++ /dev/null | |||
@@ -1,145 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.Serialization; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Base class for exception returned to the bootstrapper application host. | ||
10 | /// </summary> | ||
11 | [Serializable] | ||
12 | public abstract class BootstrapperException : Exception | ||
13 | { | ||
14 | /// <summary> | ||
15 | /// Creates an instance of the <see cref="BootstrapperException"/> base class with the given HRESULT. | ||
16 | /// </summary> | ||
17 | /// <param name="hr">The HRESULT for the exception that is used by the bootstrapper application host.</param> | ||
18 | public BootstrapperException(int hr) | ||
19 | { | ||
20 | this.HResult = hr; | ||
21 | } | ||
22 | |||
23 | /// <summary> | ||
24 | /// Initializes a new instance of the <see cref="BootstrapperException"/> class. | ||
25 | /// </summary> | ||
26 | /// <param name="message">Exception message.</param> | ||
27 | public BootstrapperException(string message) | ||
28 | : base(message) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | /// <summary> | ||
33 | /// Initializes a new instance of the <see cref="BootstrapperException"/> class. | ||
34 | /// </summary> | ||
35 | /// <param name="message">Exception message</param> | ||
36 | /// <param name="innerException">Inner exception associated with this one</param> | ||
37 | public BootstrapperException(string message, Exception innerException) | ||
38 | : base(message, innerException) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | /// <summary> | ||
43 | /// Initializes a new instance of the <see cref="BootstrapperException"/> class. | ||
44 | /// </summary> | ||
45 | /// <param name="info">Serialization information for this exception</param> | ||
46 | /// <param name="context">Streaming context to serialize to</param> | ||
47 | protected BootstrapperException(SerializationInfo info, StreamingContext context) | ||
48 | : base(info, context) | ||
49 | { | ||
50 | } | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// The bootstrapper application assembly loaded by the host does not contain exactly one instance of the | ||
55 | /// <see cref="Core.BootstrapperApplicationFactoryAttribute"/> class. | ||
56 | /// </summary> | ||
57 | /// <seealso cref="Core.BootstrapperApplicationFactoryAttribute"/> | ||
58 | [Serializable] | ||
59 | public class MissingAttributeException : BootstrapperException | ||
60 | { | ||
61 | /// <summary> | ||
62 | /// Creates a new instance of the <see cref="MissingAttributeException"/> class. | ||
63 | /// </summary> | ||
64 | public MissingAttributeException() | ||
65 | : base(NativeMethods.E_NOTFOUND) | ||
66 | { | ||
67 | } | ||
68 | |||
69 | /// <summary> | ||
70 | /// Initializes a new instance of the <see cref="MissingAttributeException"/> class. | ||
71 | /// </summary> | ||
72 | /// <param name="message">Exception message.</param> | ||
73 | public MissingAttributeException(string message) | ||
74 | : base(message) | ||
75 | { | ||
76 | } | ||
77 | |||
78 | /// <summary> | ||
79 | /// Initializes a new instance of the <see cref="MissingAttributeException"/> class. | ||
80 | /// </summary> | ||
81 | /// <param name="message">Exception message</param> | ||
82 | /// <param name="innerException">Inner exception associated with this one</param> | ||
83 | public MissingAttributeException(string message, Exception innerException) | ||
84 | : base(message, innerException) | ||
85 | { | ||
86 | } | ||
87 | |||
88 | /// <summary> | ||
89 | /// Initializes a new instance of the <see cref="MissingAttributeException"/> class. | ||
90 | /// </summary> | ||
91 | /// <param name="info">Serialization information for this exception</param> | ||
92 | /// <param name="context">Streaming context to serialize to</param> | ||
93 | protected MissingAttributeException(SerializationInfo info, StreamingContext context) | ||
94 | : base(info, context) | ||
95 | { | ||
96 | } | ||
97 | } | ||
98 | |||
99 | /// <summary> | ||
100 | /// The bootstrapper application factory specified by the <see cref="Core.BootstrapperApplicationFactoryAttribute"/> | ||
101 | /// does not extend the <see cref="Core.IBootstrapperApplicationFactory"/> base class. | ||
102 | /// </summary> | ||
103 | /// <seealso cref="Core.BaseBootstrapperApplicationFactory"/> | ||
104 | /// <seealso cref="Core.BootstrapperApplicationFactoryAttribute"/> | ||
105 | [Serializable] | ||
106 | public class InvalidBootstrapperApplicationFactoryException : BootstrapperException | ||
107 | { | ||
108 | /// <summary> | ||
109 | /// Creates a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class. | ||
110 | /// </summary> | ||
111 | public InvalidBootstrapperApplicationFactoryException() | ||
112 | : base(NativeMethods.E_UNEXPECTED) | ||
113 | { | ||
114 | } | ||
115 | |||
116 | /// <summary> | ||
117 | /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class. | ||
118 | /// </summary> | ||
119 | /// <param name="message">Exception message.</param> | ||
120 | public InvalidBootstrapperApplicationFactoryException(string message) | ||
121 | : base(message) | ||
122 | { | ||
123 | } | ||
124 | |||
125 | /// <summary> | ||
126 | /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class. | ||
127 | /// </summary> | ||
128 | /// <param name="message">Exception message</param> | ||
129 | /// <param name="innerException">Inner exception associated with this one</param> | ||
130 | public InvalidBootstrapperApplicationFactoryException(string message, Exception innerException) | ||
131 | : base(message, innerException) | ||
132 | { | ||
133 | } | ||
134 | |||
135 | /// <summary> | ||
136 | /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class. | ||
137 | /// </summary> | ||
138 | /// <param name="info">Serialization information for this exception</param> | ||
139 | /// <param name="context">Streaming context to serialize to</param> | ||
140 | protected InvalidBootstrapperApplicationFactoryException(SerializationInfo info, StreamingContext context) | ||
141 | : base(info, context) | ||
142 | { | ||
143 | } | ||
144 | } | ||
145 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/HostSection.cs b/src/ext/Bal/WixToolset.Mba.Host/HostSection.cs deleted file mode 100644 index 632025c7..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/HostSection.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Handler for the Host configuration section. | ||
10 | /// </summary> | ||
11 | public sealed class HostSection : ConfigurationSection | ||
12 | { | ||
13 | private static readonly ConfigurationProperty assemblyNameProperty = new ConfigurationProperty("assemblyName", typeof(string), null, ConfigurationPropertyOptions.IsRequired); | ||
14 | private static readonly ConfigurationProperty supportedFrameworksProperty = new ConfigurationProperty("", typeof(SupportedFrameworkElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); | ||
15 | |||
16 | /// <summary> | ||
17 | /// Creates a new instance of the <see cref="HostSection"/> class. | ||
18 | /// </summary> | ||
19 | public HostSection() | ||
20 | { | ||
21 | } | ||
22 | |||
23 | /// <summary> | ||
24 | /// Gets the name of the assembly that contians the <see cref="Core.IBootstrapperApplicationFactory"/> child class. | ||
25 | /// </summary> | ||
26 | /// <remarks> | ||
27 | /// The assembly specified by this name must contain the <see cref="Core.BootstrapperApplicationFactoryAttribute"/> to identify | ||
28 | /// the type of the <see cref="Core.IBootstrapperApplicationFactory"/> child class. | ||
29 | /// </remarks> | ||
30 | [ConfigurationProperty("assemblyName", IsRequired = true)] | ||
31 | public string AssemblyName | ||
32 | { | ||
33 | get { return (string)base[assemblyNameProperty]; } | ||
34 | set { base[assemblyNameProperty] = value; } | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
38 | /// Gets the <see cref="SupportedFrameworkElementCollection"/> of supported frameworks for the host configuration. | ||
39 | /// </summary> | ||
40 | [ConfigurationProperty("", IsDefaultCollection = true)] | ||
41 | [ConfigurationCollection(typeof(SupportedFrameworkElement))] | ||
42 | public SupportedFrameworkElementCollection SupportedFrameworks | ||
43 | { | ||
44 | get { return (SupportedFrameworkElementCollection)base[supportedFrameworksProperty]; } | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/NativeMethods.cs b/src/ext/Bal/WixToolset.Mba.Host/NativeMethods.cs deleted file mode 100644 index b9fc85a0..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/NativeMethods.cs +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.InteropServices; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Contains native constants, functions, and structures for this assembly. | ||
10 | /// </summary> | ||
11 | internal static class NativeMethods | ||
12 | { | ||
13 | #region Error Constants | ||
14 | internal const int E_NOTFOUND = unchecked((int)0x80070490); | ||
15 | internal const int E_UNEXPECTED = unchecked((int)0x8000ffff); | ||
16 | #endregion | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElement.cs b/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElement.cs deleted file mode 100644 index fe7fd2eb..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElement.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Handler for the supportedFramework configuration section. | ||
10 | /// </summary> | ||
11 | public sealed class SupportedFrameworkElement : ConfigurationElement | ||
12 | { | ||
13 | private static readonly ConfigurationProperty versionProperty = new ConfigurationProperty("version", typeof(string), null, ConfigurationPropertyOptions.IsRequired); | ||
14 | private static readonly ConfigurationProperty runtimeVersionProperty = new ConfigurationProperty("runtimeVersion", typeof(string)); | ||
15 | |||
16 | /// <summary> | ||
17 | /// Creates a new instance of the <see cref="SupportedFrameworkElement"/> class. | ||
18 | /// </summary> | ||
19 | public SupportedFrameworkElement() | ||
20 | { | ||
21 | } | ||
22 | |||
23 | /// <summary> | ||
24 | /// Gets the version of the supported framework. | ||
25 | /// </summary> | ||
26 | /// <remarks> | ||
27 | /// The assembly specified by this name must contain a value matching the NETFX version registry key under | ||
28 | /// "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP". | ||
29 | /// </remarks> | ||
30 | [ConfigurationProperty("version", IsRequired = true)] | ||
31 | public string Version | ||
32 | { | ||
33 | get { return (string)base[versionProperty]; } | ||
34 | set { base[versionProperty] = value; } | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
38 | /// Gets the runtime version required by this supported framework. | ||
39 | /// </summary> | ||
40 | [ConfigurationProperty("runtimeVersion", IsRequired = false)] | ||
41 | public string RuntimeVersion | ||
42 | { | ||
43 | get { return (string)base[runtimeVersionProperty]; } | ||
44 | set { base[runtimeVersionProperty] = value; } | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs b/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs deleted file mode 100644 index 12c7cf3e..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | using System.Diagnostics.CodeAnalysis; | ||
8 | |||
9 | /// <summary> | ||
10 | /// Handler for the supportedFramework collection. | ||
11 | /// </summary> | ||
12 | [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] | ||
13 | [ConfigurationCollection(typeof(SupportedFrameworkElement), AddItemName = "supportedFramework", CollectionType = ConfigurationElementCollectionType.BasicMap)] | ||
14 | public sealed class SupportedFrameworkElementCollection : ConfigurationElementCollection | ||
15 | { | ||
16 | public override ConfigurationElementCollectionType CollectionType | ||
17 | { | ||
18 | get { return ConfigurationElementCollectionType.BasicMap; } | ||
19 | } | ||
20 | |||
21 | protected override string ElementName | ||
22 | { | ||
23 | get { return "supportedFramework"; } | ||
24 | } | ||
25 | |||
26 | protected override ConfigurationElement CreateNewElement() | ||
27 | { | ||
28 | return new SupportedFrameworkElement(); | ||
29 | } | ||
30 | |||
31 | protected override object GetElementKey(ConfigurationElement element) | ||
32 | { | ||
33 | return (element as SupportedFrameworkElement).Version; | ||
34 | } | ||
35 | } | ||
36 | } | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.config b/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.config deleted file mode 100644 index 91280739..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.config +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup useLegacyV2RuntimeActivationPolicy="true"> | ||
12 | <supportedRuntime version="v4.0" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | <!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. --> | ||
16 | <!-- | ||
17 | <supportedFramework version="v4\Client" /> | ||
18 | <supportedFramework version="v3.5" /> | ||
19 | <supportedFramework version="v3.0" /> | ||
20 | --> | ||
21 | |||
22 | <!-- Example only. Replace the host/@assemblyName attribute with assembly that implements IBootstrapperApplicationFactory. --> | ||
23 | <host assemblyName="AssemblyWithClassThatInheritsFromBootstrapperApplicationFactory" /> | ||
24 | </wix.bootstrapper> | ||
25 | </configuration> | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj b/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj deleted file mode 100644 index 242c4d14..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <AssemblyName>WixToolset.Mba.Host</AssemblyName> | ||
7 | <RootNamespace>WixToolset.Mba.Host</RootNamespace> | ||
8 | <TargetFrameworks>net462</TargetFrameworks> | ||
9 | <Description>Managed Bootstrapper Application entry point</Description> | ||
10 | <DebugType>embedded</DebugType> | ||
11 | <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile> | ||
12 | <PlatformTarget>AnyCPU</PlatformTarget> | ||
13 | </PropertyGroup> | ||
14 | |||
15 | <ItemGroup> | ||
16 | <None Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | ||
17 | </ItemGroup> | ||
18 | |||
19 | <ItemGroup> | ||
20 | <Reference Include="System.Configuration" /> | ||
21 | </ItemGroup> | ||
22 | |||
23 | <ItemGroup> | ||
24 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
25 | </ItemGroup> | ||
26 | |||
27 | <ItemGroup> | ||
28 | <HeaderPath Include="$(BaseOutputPath)obj\$(AssemblyName).h"> | ||
29 | <Visible>False</Visible> | ||
30 | </HeaderPath> | ||
31 | </ItemGroup> | ||
32 | |||
33 | <Target Name="GenerateIdentityHeader" AfterTargets="Build" Inputs="$(TargetPath)" Outputs="@(HeaderPath)"> | ||
34 | <GetAssemblyIdentity AssemblyFiles="$(TargetPath)"> | ||
35 | <Output TaskParameter="Assemblies" ItemName="AssemblyIdentity" /> | ||
36 | </GetAssemblyIdentity> | ||
37 | <ItemGroup> | ||
38 | <Line Include='#define MBA_ASSEMBLY_FULL_NAME L"%(AssemblyIdentity.Identity)"' /> | ||
39 | <Line Include='#define MBA_CONFIG_FILE_NAME L"$(AssemblyName).config"' /> | ||
40 | <Line Include='#define MBA_ENTRY_TYPE L"$(RootNamespace).BootstrapperApplicationFactory"' /> | ||
41 | </ItemGroup> | ||
42 | <Message Importance="normal" Text="Generating identity definitions into @(HeaderPath->'%(FullPath)')" /> | ||
43 | <WriteLinesToFile File="@(HeaderPath)" Lines="@(Line)" Overwrite="True" /> | ||
44 | <ItemGroup> | ||
45 | <FileWrites Include="@(HeaderPath)" /> | ||
46 | </ItemGroup> | ||
47 | </Target> | ||
48 | </Project> | ||
diff --git a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec b/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec deleted file mode 100644 index b1f00ebd..00000000 --- a/src/ext/Bal/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
3 | <metadata> | ||
4 | <id>$id$</id> | ||
5 | <version>$version$</version> | ||
6 | <title>$title$</title> | ||
7 | <description>$description$</description> | ||
8 | <authors>$authors$</authors> | ||
9 | <icon>wix.png</icon> | ||
10 | <license type="expression">MS-RL</license> | ||
11 | <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
12 | <copyright>$copyright$</copyright> | ||
13 | <projectUrl>$projectUrl$</projectUrl> | ||
14 | <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" /> | ||
15 | <dependencies> | ||
16 | <group targetFramework=".NETFramework4.6.2" /> | ||
17 | </dependencies> | ||
18 | </metadata> | ||
19 | |||
20 | <files> | ||
21 | <file src="$projectFolder$\..\..\..\internal\images\wix.png" /> | ||
22 | <file src="net462\$id$.config" target="samples" /> | ||
23 | <file src="net462\$id$.dll" target="lib\net462" /> | ||
24 | </files> | ||
25 | </package> | ||
diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index 2759d499..23a53a91 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd | |||
@@ -20,37 +20,28 @@ | |||
20 | @echo Building ext\Bal %_C% using %_N% | 20 | @echo Building ext\Bal %_C% using %_N% |
21 | 21 | ||
22 | :: Restore | 22 | :: Restore |
23 | nuget restore dnchost\packages.config || exit /b | ||
24 | 23 | ||
25 | :: Build | 24 | :: Build |
26 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\ext_bal_build.binlog || exit /b | 25 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj -bl:%_L%\ext_bal_build.binlog || exit /b |
27 | 26 | ||
28 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\examples\examples.proj -m -bl:%_L%\bal_examples_build.binlog || exit /b | 27 | msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\examples\examples.proj -bl:%_L%\bal_examples_build.binlog || exit /b |
29 | 28 | ||
30 | :: Test | 29 | :: Test |
31 | dotnet test ^ | 30 | dotnet test ^ |
32 | %_B%\net6.0\WixToolsetTest.Dnc.HostGenerator.dll ^ | 31 | %_B%\net6.0\WixToolsetTest.Bal.dll ^ |
33 | %_B%\net6.0\WixToolsetTest.Bal.dll ^ | 32 | --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b |
34 | %_B%\net6.0\WixToolsetTest.ManagedHost.dll ^ | ||
35 | --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b | ||
36 | 33 | ||
37 | :: Pack | 34 | :: Pack |
38 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.Bal.wixext.csproj || exit /b | 35 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.Bal.wixext.csproj || exit /b |
39 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj || exit /b | ||
40 | msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true WixToolset.Mba.Host\WixToolset.Mba.Host.csproj || exit /b | ||
41 | 36 | ||
42 | @goto :end | 37 | @goto :end |
43 | 38 | ||
44 | :clean | 39 | :clean |
45 | @rd /s/q "..\..\..\build\Bal.wixext" 2> nul | 40 | @rd /s/q "..\..\..\build\Bal.wixext" 2> nul |
46 | @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul | 41 | @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul |
47 | @del "..\..\..\build\artifacts\WixToolset.Dnc.HostGenerator.*.nupkg" 2> nul | ||
48 | @del "..\..\..\build\artifacts\WixToolset.Mba.Host.*.nupkg" 2> nul | ||
49 | @del "%_L%\ext_bal_build.binlog" 2> nul | 42 | @del "%_L%\ext_bal_build.binlog" 2> nul |
50 | @del "%_L%\TestResults\bal.wixext.trx" 2> nul | 43 | @del "%_L%\TestResults\bal.wixext.trx" 2> nul |
51 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul | 44 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul |
52 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.dnc.hostgenerator" 2> nul | ||
53 | @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.mba.host" 2> nul | ||
54 | @exit /b | 45 | @exit /b |
55 | 46 | ||
56 | :end | 47 | :end |
diff --git a/src/ext/Bal/dnchost/dnchost.cpp b/src/ext/Bal/dnchost/dnchost.cpp deleted file mode 100644 index 1868e3f8..00000000 --- a/src/ext/Bal/dnchost/dnchost.cpp +++ /dev/null | |||
@@ -1,328 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | #include "precomp.h" | ||
4 | |||
5 | static DNCSTATE vstate = { }; | ||
6 | |||
7 | |||
8 | // internal function declarations | ||
9 | |||
10 | static HRESULT LoadModulePaths( | ||
11 | __in DNCSTATE* pState | ||
12 | ); | ||
13 | static HRESULT LoadDncConfiguration( | ||
14 | __in DNCSTATE* pState, | ||
15 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs | ||
16 | ); | ||
17 | static HRESULT LoadRuntime( | ||
18 | __in DNCSTATE* pState | ||
19 | ); | ||
20 | static HRESULT LoadManagedBootstrapperApplicationFactory( | ||
21 | __in DNCSTATE* pState | ||
22 | ); | ||
23 | static HRESULT CreatePrerequisiteBA( | ||
24 | __in DNCSTATE* pState, | ||
25 | __in IBootstrapperEngine* pEngine, | ||
26 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
27 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
28 | ); | ||
29 | |||
30 | |||
31 | // function definitions | ||
32 | |||
33 | extern "C" BOOL WINAPI DllMain( | ||
34 | IN HINSTANCE hInstance, | ||
35 | IN DWORD dwReason, | ||
36 | IN LPVOID /* pvReserved */ | ||
37 | ) | ||
38 | { | ||
39 | switch (dwReason) | ||
40 | { | ||
41 | case DLL_PROCESS_ATTACH: | ||
42 | ::DisableThreadLibraryCalls(hInstance); | ||
43 | vstate.hInstance = hInstance; | ||
44 | break; | ||
45 | |||
46 | case DLL_PROCESS_DETACH: | ||
47 | vstate.hInstance = NULL; | ||
48 | break; | ||
49 | } | ||
50 | |||
51 | return TRUE; | ||
52 | } | ||
53 | |||
54 | extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | ||
55 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
56 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
57 | ) | ||
58 | { | ||
59 | HRESULT hr = S_OK; | ||
60 | IBootstrapperEngine* pEngine = NULL; | ||
61 | |||
62 | hr = BalInitializeFromCreateArgs(pArgs, &pEngine); | ||
63 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
64 | |||
65 | if (!vstate.fInitialized) | ||
66 | { | ||
67 | hr = XmlInitialize(); | ||
68 | BalExitOnFailure(hr, "Failed to initialize XML."); | ||
69 | |||
70 | hr = LoadModulePaths(&vstate); | ||
71 | BalExitOnFailure(hr, "Failed to get the host base path."); | ||
72 | |||
73 | hr = LoadDncConfiguration(&vstate, pArgs); | ||
74 | BalExitOnFailure(hr, "Failed to get the dnc configuration."); | ||
75 | |||
76 | vstate.fInitialized = TRUE; | ||
77 | } | ||
78 | |||
79 | if (vstate.prereqData.fAlwaysInstallPrereqs && !vstate.prereqData.fCompleted) | ||
80 | { | ||
81 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application since it's configured to always run before loading the runtime."); | ||
82 | |||
83 | hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults); | ||
84 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); | ||
85 | |||
86 | ExitFunction(); | ||
87 | } | ||
88 | |||
89 | if (!vstate.fInitializedRuntime) | ||
90 | { | ||
91 | hr = LoadRuntime(&vstate); | ||
92 | |||
93 | vstate.fInitializedRuntime = SUCCEEDED(hr); | ||
94 | } | ||
95 | |||
96 | if (vstate.fInitializedRuntime) | ||
97 | { | ||
98 | if (!vstate.pAppFactory) | ||
99 | { | ||
100 | hr = LoadManagedBootstrapperApplicationFactory(&vstate); | ||
101 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application factory."); | ||
102 | } | ||
103 | |||
104 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading .NET Core %ls bootstrapper application.", DNCHOSTTYPE_FDD == vstate.type ? L"FDD" : L"SCD"); | ||
105 | |||
106 | hr = vstate.pAppFactory->Create(pArgs, pResults); | ||
107 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application."); | ||
108 | } | ||
109 | else // fallback to the prerequisite BA. | ||
110 | { | ||
111 | if (DNCHOSTTYPE_SCD == vstate.type) | ||
112 | { | ||
113 | vstate.prereqData.hrFatalError = E_DNCHOST_SCD_RUNTIME_FAILURE; | ||
114 | BalLogError(hr, "The self-contained .NET Core runtime failed to load. This is an unrecoverable error."); | ||
115 | } | ||
116 | else if (vstate.prereqData.fCompleted) | ||
117 | { | ||
118 | hr = E_PREREQBA_INFINITE_LOOP; | ||
119 | BalLogError(hr, "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop."); | ||
120 | vstate.prereqData.hrFatalError = hr; | ||
121 | } | ||
122 | else | ||
123 | { | ||
124 | vstate.prereqData.hrFatalError = S_OK; | ||
125 | } | ||
126 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x%08x.", hr); | ||
127 | |||
128 | hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults); | ||
129 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); | ||
130 | } | ||
131 | |||
132 | LExit: | ||
133 | ReleaseNullObject(pEngine); | ||
134 | |||
135 | return hr; | ||
136 | } | ||
137 | |||
138 | extern "C" void WINAPI BootstrapperApplicationDestroy( | ||
139 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
140 | __in BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
141 | ) | ||
142 | { | ||
143 | BOOTSTRAPPER_DESTROY_RESULTS childResults = { }; | ||
144 | |||
145 | childResults.cbSize = sizeof(BOOTSTRAPPER_DESTROY_RESULTS); | ||
146 | |||
147 | if (vstate.hMbapreqModule) | ||
148 | { | ||
149 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = reinterpret_cast<PFN_BOOTSTRAPPER_APPLICATION_DESTROY>(::GetProcAddress(vstate.hMbapreqModule, "PrereqBootstrapperApplicationDestroy")); | ||
150 | if (pfnDestroy) | ||
151 | { | ||
152 | (*pfnDestroy)(pArgs, &childResults); | ||
153 | } | ||
154 | |||
155 | ::FreeLibrary(vstate.hMbapreqModule); | ||
156 | vstate.hMbapreqModule = NULL; | ||
157 | } | ||
158 | |||
159 | BalUninitialize(); | ||
160 | |||
161 | // Need to keep track of state between reloads. | ||
162 | pResults->fDisableUnloading = TRUE; | ||
163 | } | ||
164 | |||
165 | static HRESULT LoadModulePaths( | ||
166 | __in DNCSTATE* pState | ||
167 | ) | ||
168 | { | ||
169 | HRESULT hr = S_OK; | ||
170 | |||
171 | hr = PathForCurrentProcess(&pState->sczModuleFullPath, pState->hInstance); | ||
172 | BalExitOnFailure(hr, "Failed to get the full host path."); | ||
173 | |||
174 | hr = PathGetDirectory(pState->sczModuleFullPath, &pState->sczAppBase); | ||
175 | BalExitOnFailure(hr, "Failed to get the directory of the full process path."); | ||
176 | |||
177 | LExit: | ||
178 | return hr; | ||
179 | } | ||
180 | |||
181 | static HRESULT LoadDncConfiguration( | ||
182 | __in DNCSTATE* pState, | ||
183 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs | ||
184 | ) | ||
185 | { | ||
186 | HRESULT hr = S_OK; | ||
187 | IXMLDOMDocument* pixdManifest = NULL; | ||
188 | IXMLDOMNode* pixnHost = NULL; | ||
189 | LPWSTR sczPayloadName = NULL; | ||
190 | DWORD dwBool = 0; | ||
191 | BOOL fXmlFound = FALSE; | ||
192 | |||
193 | hr = XmlLoadDocumentFromFile(pArgs->pCommand->wzBootstrapperApplicationDataPath, &pixdManifest); | ||
194 | BalExitOnFailure(hr, "Failed to load BalManifest '%ls'", pArgs->pCommand->wzBootstrapperApplicationDataPath); | ||
195 | |||
196 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixBalBAFactoryAssembly", &pixnHost); | ||
197 | BalExitOnRequiredXmlQueryFailure(hr, "Failed to get WixBalBAFactoryAssembly element."); | ||
198 | |||
199 | hr = XmlGetAttributeEx(pixnHost, L"FilePath", &sczPayloadName); | ||
200 | BalExitOnRequiredXmlQueryFailure(hr, "Failed to get WixBalBAFactoryAssembly/@FilePath."); | ||
201 | |||
202 | hr = PathConcatRelativeToBase(pArgs->pCommand->wzBootstrapperWorkingFolder, sczPayloadName, &pState->sczBaFactoryAssemblyPath); | ||
203 | BalExitOnFailure(hr, "Failed to create BaFactoryAssemblyPath."); | ||
204 | |||
205 | LPCWSTR wzFileName = PathFile(pState->sczBaFactoryAssemblyPath); | ||
206 | LPCWSTR wzExtension = PathExtension(pState->sczBaFactoryAssemblyPath); | ||
207 | if (!wzExtension) | ||
208 | { | ||
209 | BalExitOnFailure(hr = E_FAIL, "BaFactoryAssemblyPath has no extension."); | ||
210 | } | ||
211 | |||
212 | hr = StrAllocString(&pState->sczBaFactoryAssemblyName, wzFileName, wzExtension - wzFileName); | ||
213 | BalExitOnFailure(hr, "Failed to copy BAFactoryAssembly payload Name."); | ||
214 | |||
215 | hr = StrAllocString(&pState->sczBaFactoryDepsJsonPath, pState->sczBaFactoryAssemblyPath, wzExtension - pState->sczBaFactoryAssemblyPath); | ||
216 | BalExitOnFailure(hr, "Failed to initialize deps json path."); | ||
217 | |||
218 | hr = StrAllocString(&pState->sczBaFactoryRuntimeConfigPath, pState->sczBaFactoryDepsJsonPath, 0); | ||
219 | BalExitOnFailure(hr, "Failed to initialize runtime config path."); | ||
220 | |||
221 | hr = StrAllocConcat(&pState->sczBaFactoryDepsJsonPath, L".deps.json", 0); | ||
222 | BalExitOnFailure(hr, "Failed to concat extension to deps json path."); | ||
223 | |||
224 | hr = StrAllocConcat(&pState->sczBaFactoryRuntimeConfigPath, L".runtimeconfig.json", 0); | ||
225 | BalExitOnFailure(hr, "Failed to concat extension to runtime config path."); | ||
226 | |||
227 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqOptions", &pixnHost); | ||
228 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to find WixMbaPrereqOptions element in bootstrapper application config."); | ||
229 | |||
230 | if (fXmlFound) | ||
231 | { | ||
232 | hr = XmlGetAttributeNumber(pixnHost, L"AlwaysInstallPrereqs", reinterpret_cast<DWORD*>(&pState->prereqData.fAlwaysInstallPrereqs)); | ||
233 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get AlwaysInstallPrereqs value."); | ||
234 | } | ||
235 | |||
236 | pState->prereqData.fPerformHelp = !pState->prereqData.fAlwaysInstallPrereqs; | ||
237 | |||
238 | pState->type = DNCHOSTTYPE_FDD; | ||
239 | |||
240 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixDncOptions", &pixnHost); | ||
241 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to find WixDncOptions element in bootstrapper application config."); | ||
242 | |||
243 | if (!fXmlFound) | ||
244 | { | ||
245 | ExitFunction(); | ||
246 | } | ||
247 | |||
248 | hr = XmlGetAttributeNumber(pixnHost, L"SelfContainedDeployment", &dwBool); | ||
249 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get SelfContainedDeployment value."); | ||
250 | |||
251 | if (fXmlFound && dwBool) | ||
252 | { | ||
253 | pState->type = DNCHOSTTYPE_SCD; | ||
254 | } | ||
255 | |||
256 | LExit: | ||
257 | ReleaseStr(sczPayloadName); | ||
258 | ReleaseObject(pixnHost); | ||
259 | ReleaseObject(pixdManifest); | ||
260 | |||
261 | return hr; | ||
262 | } | ||
263 | |||
264 | static HRESULT LoadRuntime( | ||
265 | __in DNCSTATE* pState | ||
266 | ) | ||
267 | { | ||
268 | HRESULT hr = S_OK; | ||
269 | |||
270 | hr = DnchostLoadRuntime( | ||
271 | &pState->hostfxrState, | ||
272 | pState->sczModuleFullPath, | ||
273 | pState->sczBaFactoryAssemblyPath, | ||
274 | pState->sczBaFactoryDepsJsonPath, | ||
275 | pState->sczBaFactoryRuntimeConfigPath); | ||
276 | |||
277 | return hr; | ||
278 | } | ||
279 | |||
280 | static HRESULT LoadManagedBootstrapperApplicationFactory( | ||
281 | __in DNCSTATE* pState | ||
282 | ) | ||
283 | { | ||
284 | HRESULT hr = S_OK; | ||
285 | |||
286 | hr = DnchostCreateFactory( | ||
287 | &pState->hostfxrState, | ||
288 | pState->sczBaFactoryAssemblyName, | ||
289 | &pState->pAppFactory); | ||
290 | |||
291 | return hr; | ||
292 | } | ||
293 | |||
294 | static HRESULT CreatePrerequisiteBA( | ||
295 | __in DNCSTATE* pState, | ||
296 | __in IBootstrapperEngine* pEngine, | ||
297 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
298 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
299 | ) | ||
300 | { | ||
301 | HRESULT hr = S_OK; | ||
302 | LPWSTR sczDncpreqPath = NULL; | ||
303 | HMODULE hModule = NULL; | ||
304 | |||
305 | hr = PathConcat(pState->sczAppBase, L"dncpreq.dll", &sczDncpreqPath); | ||
306 | BalExitOnFailure(hr, "Failed to get path to pre-requisite BA."); | ||
307 | |||
308 | hModule = ::LoadLibraryExW(sczDncpreqPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | ||
309 | BalExitOnNullWithLastError(hModule, hr, "Failed to load pre-requisite BA DLL."); | ||
310 | |||
311 | PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = reinterpret_cast<PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE>(::GetProcAddress(hModule, "PrereqBootstrapperApplicationCreate")); | ||
312 | BalExitOnNullWithLastError(pfnCreate, hr, "Failed to get PrereqBootstrapperApplicationCreate entry-point from: %ls", sczDncpreqPath); | ||
313 | |||
314 | hr = pfnCreate(&pState->prereqData, pEngine, pArgs, pResults); | ||
315 | BalExitOnFailure(hr, "Failed to create prequisite bootstrapper app."); | ||
316 | |||
317 | pState->hMbapreqModule = hModule; | ||
318 | hModule = NULL; | ||
319 | |||
320 | LExit: | ||
321 | if (hModule) | ||
322 | { | ||
323 | ::FreeLibrary(hModule); | ||
324 | } | ||
325 | ReleaseStr(sczDncpreqPath); | ||
326 | |||
327 | return hr; | ||
328 | } | ||
diff --git a/src/ext/Bal/dnchost/dnchost.def b/src/ext/Bal/dnchost/dnchost.def deleted file mode 100644 index 4488df94..00000000 --- a/src/ext/Bal/dnchost/dnchost.def +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | ; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | |||
4 | EXPORTS | ||
5 | BootstrapperApplicationCreate | ||
6 | BootstrapperApplicationDestroy | ||
diff --git a/src/ext/Bal/dnchost/dnchost.h b/src/ext/Bal/dnchost/dnchost.h deleted file mode 100644 index 000cf43d..00000000 --- a/src/ext/Bal/dnchost/dnchost.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | enum DNCHOSTTYPE | ||
6 | { | ||
7 | DNCHOSTTYPE_UNKNOWN, | ||
8 | DNCHOSTTYPE_FDD, | ||
9 | DNCHOSTTYPE_SCD, | ||
10 | }; | ||
11 | |||
12 | struct DNCSTATE | ||
13 | { | ||
14 | BOOL fInitialized; | ||
15 | BOOL fInitializedRuntime; | ||
16 | HINSTANCE hInstance; | ||
17 | LPWSTR sczModuleFullPath; | ||
18 | LPWSTR sczAppBase; | ||
19 | LPWSTR sczBaFactoryAssemblyName; | ||
20 | LPWSTR sczBaFactoryAssemblyPath; | ||
21 | LPWSTR sczBaFactoryDepsJsonPath; | ||
22 | LPWSTR sczBaFactoryRuntimeConfigPath; | ||
23 | DNCHOSTTYPE type; | ||
24 | HOSTFXR_STATE hostfxrState; | ||
25 | IBootstrapperApplicationFactory* pAppFactory; | ||
26 | HMODULE hMbapreqModule; | ||
27 | PREQBA_DATA prereqData; | ||
28 | }; | ||
diff --git a/src/ext/Bal/dnchost/dncutil.cpp b/src/ext/Bal/dnchost/dncutil.cpp deleted file mode 100644 index d00b0ce6..00000000 --- a/src/ext/Bal/dnchost/dncutil.cpp +++ /dev/null | |||
@@ -1,216 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | #include "precomp.h" | ||
4 | |||
5 | #define DNC_ENTRY_TYPEW L"WixToolset.Dnc.Host.BootstrapperApplicationFactory" | ||
6 | #define DNC_STATIC_ENTRY_METHODW L"CreateBAFactory" | ||
7 | #define DNC_STATIC_ENTRY_DELEGATEW L"WixToolset.Dnc.Host.StaticEntryDelegate" | ||
8 | |||
9 | // https://github.com/dotnet/runtime/blob/master/src/installer/corehost/error_codes.h | ||
10 | #define InvalidArgFailure 0x80008081 | ||
11 | #define HostApiBufferTooSmall 0x80008098 | ||
12 | #define HostApiUnsupportedVersion 0x800080a2 | ||
13 | |||
14 | // internal function declarations | ||
15 | |||
16 | static HRESULT GetHostfxrPath( | ||
17 | __in HOSTFXR_STATE* pState, | ||
18 | __in LPCWSTR wzNativeHostPath | ||
19 | ); | ||
20 | static HRESULT LoadHostfxr( | ||
21 | __in HOSTFXR_STATE* pState | ||
22 | ); | ||
23 | static HRESULT InitializeHostfxr( | ||
24 | __in HOSTFXR_STATE* pState, | ||
25 | __in LPCWSTR wzManagedHostPath, | ||
26 | __in LPCWSTR wzDepsJsonPath, | ||
27 | __in LPCWSTR wzRuntimeConfigPath | ||
28 | ); | ||
29 | static HRESULT InitializeCoreClr( | ||
30 | __in HOSTFXR_STATE* pState | ||
31 | ); | ||
32 | |||
33 | |||
34 | // function definitions | ||
35 | |||
36 | HRESULT DnchostLoadRuntime( | ||
37 | __in HOSTFXR_STATE* pState, | ||
38 | __in LPCWSTR wzNativeHostPath, | ||
39 | __in LPCWSTR wzManagedHostPath, | ||
40 | __in LPCWSTR wzDepsJsonPath, | ||
41 | __in LPCWSTR wzRuntimeConfigPath | ||
42 | ) | ||
43 | { | ||
44 | HRESULT hr = S_OK; | ||
45 | |||
46 | hr = GetHostfxrPath(pState, wzNativeHostPath); | ||
47 | BalExitOnFailure(hr, "Failed to find hostfxr."); | ||
48 | |||
49 | hr = LoadHostfxr(pState); | ||
50 | BalExitOnFailure(hr, "Failed to load hostfxr."); | ||
51 | |||
52 | hr = InitializeHostfxr(pState, wzManagedHostPath, wzDepsJsonPath, wzRuntimeConfigPath); | ||
53 | BalExitOnFailure(hr, "Failed to initialize hostfxr."); | ||
54 | |||
55 | hr = InitializeCoreClr(pState); | ||
56 | BalExitOnFailure(hr, "Failed to initialize coreclr."); | ||
57 | |||
58 | LExit: | ||
59 | return hr; | ||
60 | } | ||
61 | |||
62 | HRESULT DnchostCreateFactory( | ||
63 | __in HOSTFXR_STATE* pState, | ||
64 | __in LPCWSTR wzBaFactoryAssemblyName, | ||
65 | __out IBootstrapperApplicationFactory** ppAppFactory | ||
66 | ) | ||
67 | { | ||
68 | HRESULT hr = S_OK; | ||
69 | PFNCREATEBAFACTORY pfnCreateBAFactory = NULL; | ||
70 | LPWSTR sczEntryType = NULL; | ||
71 | LPWSTR sczEntryDelegate = NULL; | ||
72 | LPSTR sczBaFactoryAssemblyName = NULL; | ||
73 | |||
74 | hr = StrAllocFormatted(&sczEntryType, L"%ls,%ls", DNC_ENTRY_TYPEW, wzBaFactoryAssemblyName); | ||
75 | BalExitOnFailure(hr, "Failed to format entry type."); | ||
76 | |||
77 | hr = StrAllocFormatted(&sczEntryDelegate, L"%ls,%ls", DNC_STATIC_ENTRY_DELEGATEW, wzBaFactoryAssemblyName); | ||
78 | BalExitOnFailure(hr, "Failed to format entry delegate."); | ||
79 | |||
80 | hr = pState->pfnGetFunctionPointer( | ||
81 | sczEntryType, | ||
82 | DNC_STATIC_ENTRY_METHODW, | ||
83 | sczEntryDelegate, | ||
84 | NULL, | ||
85 | NULL, | ||
86 | reinterpret_cast<void**>(&pfnCreateBAFactory)); | ||
87 | BalExitOnFailure(hr, "Failed to create delegate through GetFunctionPointer."); | ||
88 | |||
89 | *ppAppFactory = pfnCreateBAFactory(); | ||
90 | |||
91 | LExit: | ||
92 | ReleaseStr(sczEntryType); | ||
93 | ReleaseStr(sczEntryDelegate); | ||
94 | ReleaseStr(sczBaFactoryAssemblyName); | ||
95 | |||
96 | return hr; | ||
97 | } | ||
98 | |||
99 | static HRESULT GetHostfxrPath( | ||
100 | __in HOSTFXR_STATE* pState, | ||
101 | __in LPCWSTR wzNativeHostPath | ||
102 | ) | ||
103 | { | ||
104 | HRESULT hr = S_OK; | ||
105 | get_hostfxr_parameters getHostfxrParameters = { }; | ||
106 | int nrc = 0; | ||
107 | size_t cchHostFxrPath = MAX_PATH; | ||
108 | |||
109 | getHostfxrParameters.size = sizeof(get_hostfxr_parameters); | ||
110 | getHostfxrParameters.assembly_path = wzNativeHostPath; | ||
111 | |||
112 | // get_hostfxr_path does a full search on every call, so | ||
113 | // minimize the number of calls | ||
114 | // need to loop | ||
115 | for (;;) | ||
116 | { | ||
117 | cchHostFxrPath *= 2; | ||
118 | hr = StrAlloc(&pState->sczHostfxrPath, cchHostFxrPath); | ||
119 | BalExitOnFailure(hr, "Failed to allocate hostFxrPath."); | ||
120 | |||
121 | nrc = get_hostfxr_path(pState->sczHostfxrPath, &cchHostFxrPath, &getHostfxrParameters); | ||
122 | if (HostApiBufferTooSmall != nrc) | ||
123 | { | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | if (0 != nrc) | ||
128 | { | ||
129 | BalExitOnFailure(hr = nrc, "GetHostfxrPath failed"); | ||
130 | } | ||
131 | |||
132 | LExit: | ||
133 | return hr; | ||
134 | } | ||
135 | |||
136 | static HRESULT LoadHostfxr( | ||
137 | __in HOSTFXR_STATE* pState | ||
138 | ) | ||
139 | { | ||
140 | HRESULT hr = S_OK; | ||
141 | HMODULE hHostfxr; | ||
142 | |||
143 | hHostfxr = ::LoadLibraryExW(pState->sczHostfxrPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | ||
144 | BalExitOnNullWithLastError(hHostfxr, hr, "Failed to load hostfxr from '%ls'.", pState->sczHostfxrPath); | ||
145 | |||
146 | pState->pfnHostfxrInitializeForApp = reinterpret_cast<hostfxr_initialize_for_dotnet_command_line_fn>(::GetProcAddress(hHostfxr, "hostfxr_initialize_for_dotnet_command_line")); | ||
147 | BalExitOnNullWithLastError(pState->pfnHostfxrInitializeForApp, hr, "Failed to get procedure address for hostfxr_initialize_for_dotnet_command_line."); | ||
148 | |||
149 | pState->pfnHostfxrSetErrorWriter = reinterpret_cast<hostfxr_set_error_writer_fn>(::GetProcAddress(hHostfxr, "hostfxr_set_error_writer")); | ||
150 | BalExitOnNullWithLastError(pState->pfnHostfxrSetErrorWriter, hr, "Failed to get procedure address for hostfxr_set_error_writer."); | ||
151 | |||
152 | pState->pfnHostfxrClose = reinterpret_cast<hostfxr_close_fn>(::GetProcAddress(hHostfxr, "hostfxr_close")); | ||
153 | BalExitOnNullWithLastError(pState->pfnHostfxrClose, hr, "Failed to get procedure address for hostfxr_close."); | ||
154 | |||
155 | pState->pfnHostfxrGetRuntimeDelegate = reinterpret_cast<hostfxr_get_runtime_delegate_fn>(::GetProcAddress(hHostfxr, "hostfxr_get_runtime_delegate")); | ||
156 | BalExitOnNullWithLastError(pState->pfnHostfxrGetRuntimeDelegate, hr, "Failed to get procedure address for hostfxr_get_runtime_delegate."); | ||
157 | |||
158 | LExit: | ||
159 | // Never unload the module since it isn't meant to be unloaded. | ||
160 | |||
161 | return hr; | ||
162 | } | ||
163 | |||
164 | static void HOSTFXR_CALLTYPE DnchostErrorWriter( | ||
165 | __in LPCWSTR wzMessage | ||
166 | ) | ||
167 | { | ||
168 | BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "error from hostfxr: %ls", wzMessage); | ||
169 | } | ||
170 | |||
171 | static HRESULT InitializeHostfxr( | ||
172 | __in HOSTFXR_STATE* pState, | ||
173 | __in LPCWSTR wzManagedHostPath, | ||
174 | __in LPCWSTR wzDepsJsonPath, | ||
175 | __in LPCWSTR wzRuntimeConfigPath | ||
176 | ) | ||
177 | { | ||
178 | HRESULT hr = S_OK; | ||
179 | |||
180 | pState->pfnHostfxrSetErrorWriter(static_cast<hostfxr_error_writer_fn>(&DnchostErrorWriter)); | ||
181 | |||
182 | LPCWSTR argv[] = { | ||
183 | L"exec", | ||
184 | L"--depsfile", | ||
185 | wzDepsJsonPath, | ||
186 | L"--runtimeconfig", | ||
187 | wzRuntimeConfigPath, | ||
188 | wzManagedHostPath, | ||
189 | }; | ||
190 | hr = pState->pfnHostfxrInitializeForApp(sizeof(argv)/sizeof(LPWSTR), argv, NULL, &pState->hostContextHandle); | ||
191 | BalExitOnFailure(hr, "HostfxrInitializeForApp failed"); | ||
192 | |||
193 | LExit: | ||
194 | return hr; | ||
195 | } | ||
196 | |||
197 | static HRESULT InitializeCoreClr( | ||
198 | __in HOSTFXR_STATE* pState | ||
199 | ) | ||
200 | { | ||
201 | HRESULT hr = S_OK; | ||
202 | |||
203 | hr = pState->pfnHostfxrGetRuntimeDelegate(pState->hostContextHandle, hdt_get_function_pointer, reinterpret_cast<void**>(&pState->pfnGetFunctionPointer)); | ||
204 | if (InvalidArgFailure == hr || // old versions of hostfxr don't allow calling GetRuntimeDelegate from InitializeForApp. | ||
205 | HostApiUnsupportedVersion == hr) // hdt_get_function_pointer was added in .NET 5. | ||
206 | { | ||
207 | BalExitOnFailure(hr, "HostfxrGetRuntimeDelegate failed, most likely because the target framework is older than .NET 5."); | ||
208 | } | ||
209 | else | ||
210 | { | ||
211 | BalExitOnFailure(hr, "HostfxrGetRuntimeDelegate failed"); | ||
212 | } | ||
213 | |||
214 | LExit: | ||
215 | return hr; | ||
216 | } | ||
diff --git a/src/ext/Bal/dnchost/dncutil.h b/src/ext/Bal/dnchost/dncutil.h deleted file mode 100644 index 3fa81364..00000000 --- a/src/ext/Bal/dnchost/dncutil.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | typedef IBootstrapperApplicationFactory* (STDMETHODCALLTYPE* PFNCREATEBAFACTORY)(); | ||
5 | |||
6 | struct HOSTFXR_STATE | ||
7 | { | ||
8 | LPWSTR sczHostfxrPath; | ||
9 | hostfxr_handle hostContextHandle; | ||
10 | hostfxr_initialize_for_dotnet_command_line_fn pfnHostfxrInitializeForApp; | ||
11 | hostfxr_set_error_writer_fn pfnHostfxrSetErrorWriter; | ||
12 | hostfxr_close_fn pfnHostfxrClose; | ||
13 | hostfxr_get_runtime_delegate_fn pfnHostfxrGetRuntimeDelegate; | ||
14 | get_function_pointer_fn pfnGetFunctionPointer; | ||
15 | }; | ||
16 | |||
17 | HRESULT DnchostLoadRuntime( | ||
18 | __in HOSTFXR_STATE* pState, | ||
19 | __in LPCWSTR wzNativeHostPath, | ||
20 | __in LPCWSTR wzManagedHostPath, | ||
21 | __in LPCWSTR wzDepsJsonPath, | ||
22 | __in LPCWSTR wzRuntimeConfigPath | ||
23 | ); | ||
24 | |||
25 | HRESULT DnchostCreateFactory( | ||
26 | __in HOSTFXR_STATE* pState, | ||
27 | __in LPCWSTR wzBaFactoryAssemblyName, | ||
28 | __out IBootstrapperApplicationFactory** ppAppFactory | ||
29 | ); | ||
diff --git a/src/ext/Bal/dnchost/packages.config b/src/ext/Bal/dnchost/packages.config deleted file mode 100644 index 1c7505e7..00000000 --- a/src/ext/Bal/dnchost/packages.config +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="runtime.win-arm64.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> | ||
4 | <package id="runtime.win-x64.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> | ||
5 | <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> | ||
6 | </packages> \ No newline at end of file | ||
diff --git a/src/ext/Bal/dnchost/precomp.h b/src/ext/Bal/dnchost/precomp.h deleted file mode 100644 index 2166a23d..00000000 --- a/src/ext/Bal/dnchost/precomp.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | #include <windows.h> | ||
5 | #include <msiquery.h> | ||
6 | #include <corerror.h> | ||
7 | #include <Shlwapi.h> | ||
8 | |||
9 | #include <dutil.h> | ||
10 | #include <memutil.h> | ||
11 | #include <pathutil.h> | ||
12 | #include <strutil.h> | ||
13 | #include <xmlutil.h> | ||
14 | |||
15 | #include <BootstrapperEngine.h> | ||
16 | #include <BootstrapperApplication.h> | ||
17 | |||
18 | #include <IBootstrapperEngine.h> | ||
19 | #include <IBootstrapperApplication.h> | ||
20 | #include <IBootstrapperApplicationFactory.h> | ||
21 | #include <balutil.h> | ||
22 | |||
23 | #define NETHOST_USE_AS_STATIC | ||
24 | #include <nethost.h> | ||
25 | #include <hostfxr.h> | ||
26 | #include <coreclr_delegates.h> | ||
27 | |||
28 | #include <preqba.h> | ||
29 | |||
30 | #include "dncutil.h" | ||
31 | #include "dnchost.h" | ||
diff --git a/src/ext/Bal/mbahost/mbahost.cpp b/src/ext/Bal/mbahost/mbahost.cpp deleted file mode 100644 index 9d8acc8a..00000000 --- a/src/ext/Bal/mbahost/mbahost.cpp +++ /dev/null | |||
@@ -1,693 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | #include "precomp.h" | ||
4 | |||
5 | static const DWORD NET452_RELEASE = 379893; | ||
6 | |||
7 | using namespace mscorlib; | ||
8 | |||
9 | extern "C" typedef HRESULT (WINAPI *PFN_CORBINDTOCURRENTRUNTIME)( | ||
10 | __in LPCWSTR pwszFileName, | ||
11 | __in REFCLSID rclsid, | ||
12 | __in REFIID riid, | ||
13 | __out LPVOID *ppv | ||
14 | ); | ||
15 | |||
16 | static MBASTATE vstate = { }; | ||
17 | |||
18 | |||
19 | // internal function declarations | ||
20 | |||
21 | static HRESULT GetAppDomain( | ||
22 | __in MBASTATE* pState | ||
23 | ); | ||
24 | static HRESULT LoadModulePaths( | ||
25 | __in MBASTATE* pState | ||
26 | ); | ||
27 | static HRESULT LoadMbaConfiguration( | ||
28 | __in MBASTATE* pState, | ||
29 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs | ||
30 | ); | ||
31 | static HRESULT CheckSupportedFrameworks( | ||
32 | __in LPCWSTR wzConfigPath | ||
33 | ); | ||
34 | static HRESULT UpdateSupportedRuntime( | ||
35 | __in IXMLDOMDocument* pixdManifest, | ||
36 | __in IXMLDOMNode* pixnSupportedFramework, | ||
37 | __out BOOL* pfUpdatedManifest | ||
38 | ); | ||
39 | static HRESULT LoadRuntime( | ||
40 | __in MBASTATE* pState | ||
41 | ); | ||
42 | static HRESULT CreateManagedBootstrapperApplication( | ||
43 | __in _AppDomain* pAppDomain, | ||
44 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
45 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
46 | ); | ||
47 | static HRESULT CreateManagedBootstrapperApplicationFactory( | ||
48 | __in _AppDomain* pAppDomain, | ||
49 | __out IBootstrapperApplicationFactory** ppAppFactory | ||
50 | ); | ||
51 | static HRESULT CreatePrerequisiteBA( | ||
52 | __in MBASTATE* pState, | ||
53 | __in IBootstrapperEngine* pEngine, | ||
54 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
55 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
56 | ); | ||
57 | static HRESULT VerifyNET4RuntimeIsSupported( | ||
58 | ); | ||
59 | |||
60 | |||
61 | // function definitions | ||
62 | |||
63 | extern "C" BOOL WINAPI DllMain( | ||
64 | IN HINSTANCE hInstance, | ||
65 | IN DWORD dwReason, | ||
66 | IN LPVOID /* pvReserved */ | ||
67 | ) | ||
68 | { | ||
69 | switch (dwReason) | ||
70 | { | ||
71 | case DLL_PROCESS_ATTACH: | ||
72 | ::DisableThreadLibraryCalls(hInstance); | ||
73 | vstate.hInstance = hInstance; | ||
74 | break; | ||
75 | |||
76 | case DLL_PROCESS_DETACH: | ||
77 | vstate.hInstance = NULL; | ||
78 | break; | ||
79 | } | ||
80 | |||
81 | return TRUE; | ||
82 | } | ||
83 | |||
84 | // Note: This function assumes that COM was already initialized on the thread. | ||
85 | extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | ||
86 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
87 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
88 | ) | ||
89 | { | ||
90 | HRESULT hr = S_OK; | ||
91 | IBootstrapperEngine* pEngine = NULL; | ||
92 | |||
93 | if (vstate.fStoppedRuntime) | ||
94 | { | ||
95 | BalExitWithRootFailure(hr, E_INVALIDSTATE, "Reloaded mbahost after stopping .NET runtime."); | ||
96 | } | ||
97 | |||
98 | hr = BalInitializeFromCreateArgs(pArgs, &pEngine); | ||
99 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
100 | |||
101 | if (!vstate.fInitialized) | ||
102 | { | ||
103 | hr = XmlInitialize(); | ||
104 | BalExitOnFailure(hr, "Failed to initialize XML."); | ||
105 | |||
106 | hr = LoadModulePaths(&vstate); | ||
107 | BalExitOnFailure(hr, "Failed to load the module paths."); | ||
108 | |||
109 | hr = LoadMbaConfiguration(&vstate, pArgs); | ||
110 | BalExitOnFailure(hr, "Failed to get the mba configuration."); | ||
111 | |||
112 | vstate.fInitialized = TRUE; | ||
113 | } | ||
114 | |||
115 | if (vstate.prereqData.fAlwaysInstallPrereqs && !vstate.prereqData.fCompleted) | ||
116 | { | ||
117 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application since it's configured to always run before loading the runtime."); | ||
118 | |||
119 | hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults); | ||
120 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); | ||
121 | |||
122 | ExitFunction(); | ||
123 | } | ||
124 | |||
125 | if (!vstate.fInitializedRuntime) | ||
126 | { | ||
127 | hr = LoadRuntime(&vstate); | ||
128 | |||
129 | vstate.fInitializedRuntime = SUCCEEDED(hr); | ||
130 | } | ||
131 | |||
132 | if (vstate.fInitializedRuntime) | ||
133 | { | ||
134 | hr = GetAppDomain(&vstate); | ||
135 | BalExitOnFailure(hr, "Failed to create the AppDomain for the managed bootstrapper application."); | ||
136 | |||
137 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading managed bootstrapper application."); | ||
138 | |||
139 | hr = CreateManagedBootstrapperApplication(vstate.pAppDomain, pArgs, pResults); | ||
140 | BalExitOnFailure(hr, "Failed to create the managed bootstrapper application."); | ||
141 | } | ||
142 | else // fallback to the prerequisite BA. | ||
143 | { | ||
144 | if (E_MBAHOST_NET452_ON_WIN7RTM == hr) | ||
145 | { | ||
146 | BalLogError(hr, "The Burn engine cannot run with an MBA under the .NET 4 CLR on Windows 7 RTM with .NET 4.5.2 (or greater) installed."); | ||
147 | vstate.prereqData.hrFatalError = hr; | ||
148 | } | ||
149 | else if (vstate.prereqData.fCompleted) | ||
150 | { | ||
151 | hr = E_PREREQBA_INFINITE_LOOP; | ||
152 | BalLogError(hr, "The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop."); | ||
153 | vstate.prereqData.hrFatalError = hr; | ||
154 | } | ||
155 | else | ||
156 | { | ||
157 | vstate.prereqData.hrFatalError = S_OK; | ||
158 | } | ||
159 | |||
160 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x%08x.", hr); | ||
161 | |||
162 | hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults); | ||
163 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); | ||
164 | } | ||
165 | |||
166 | LExit: | ||
167 | ReleaseNullObject(pEngine); | ||
168 | |||
169 | return hr; | ||
170 | } | ||
171 | |||
172 | extern "C" void WINAPI BootstrapperApplicationDestroy( | ||
173 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
174 | __in BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
175 | ) | ||
176 | { | ||
177 | BOOTSTRAPPER_DESTROY_RESULTS childResults = { }; | ||
178 | |||
179 | if (vstate.pAppDomain) | ||
180 | { | ||
181 | HRESULT hr = vstate.pCLRHost->UnloadDomain(vstate.pAppDomain); | ||
182 | if (FAILED(hr)) | ||
183 | { | ||
184 | BalLogError(hr, "Failed to unload app domain."); | ||
185 | } | ||
186 | |||
187 | vstate.pAppDomain->Release(); | ||
188 | vstate.pAppDomain = NULL; | ||
189 | } | ||
190 | |||
191 | // pCLRHost can only be stopped once per process. | ||
192 | if (vstate.pCLRHost && !pArgs->fReload) | ||
193 | { | ||
194 | vstate.pCLRHost->Stop(); | ||
195 | vstate.pCLRHost->Release(); | ||
196 | vstate.pCLRHost = NULL; | ||
197 | vstate.fStoppedRuntime = TRUE; | ||
198 | } | ||
199 | |||
200 | if (vstate.hMbapreqModule) | ||
201 | { | ||
202 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = reinterpret_cast<PFN_BOOTSTRAPPER_APPLICATION_DESTROY>(::GetProcAddress(vstate.hMbapreqModule, "PrereqBootstrapperApplicationDestroy")); | ||
203 | if (pfnDestroy) | ||
204 | { | ||
205 | (*pfnDestroy)(pArgs, &childResults); | ||
206 | } | ||
207 | |||
208 | ::FreeLibrary(vstate.hMbapreqModule); | ||
209 | vstate.hMbapreqModule = NULL; | ||
210 | } | ||
211 | |||
212 | BalUninitialize(); | ||
213 | |||
214 | // Need to keep track of state between reloads. | ||
215 | pResults->fDisableUnloading = TRUE; | ||
216 | } | ||
217 | |||
218 | // Gets the custom AppDomain for loading managed BA. | ||
219 | static HRESULT GetAppDomain( | ||
220 | __in MBASTATE* pState | ||
221 | ) | ||
222 | { | ||
223 | HRESULT hr = S_OK; | ||
224 | IUnknown *pUnk = NULL; | ||
225 | IAppDomainSetup* pAppDomainSetup = NULL; | ||
226 | BSTR bstrAppBase = NULL; | ||
227 | BSTR bstrConfigPath = NULL; | ||
228 | |||
229 | // Create the setup information for a new AppDomain to set the app base and config. | ||
230 | hr = pState->pCLRHost->CreateDomainSetup(&pUnk); | ||
231 | BalExitOnRootFailure(hr, "Failed to create the AppDomainSetup object."); | ||
232 | |||
233 | hr = pUnk->QueryInterface(__uuidof(IAppDomainSetup), reinterpret_cast<LPVOID*>(&pAppDomainSetup)); | ||
234 | BalExitOnRootFailure(hr, "Failed to query for the IAppDomainSetup interface."); | ||
235 | ReleaseNullObject(pUnk); | ||
236 | |||
237 | // Set properties on the AppDomainSetup object. | ||
238 | bstrAppBase = ::SysAllocString(pState->sczAppBase); | ||
239 | BalExitOnNull(bstrAppBase, hr, E_OUTOFMEMORY, "Failed to allocate the application base path for the AppDomainSetup."); | ||
240 | |||
241 | hr = pAppDomainSetup->put_ApplicationBase(bstrAppBase); | ||
242 | BalExitOnRootFailure(hr, "Failed to set the application base path for the AppDomainSetup."); | ||
243 | |||
244 | bstrConfigPath = ::SysAllocString(pState->sczConfigPath); | ||
245 | BalExitOnNull(bstrConfigPath, hr, E_OUTOFMEMORY, "Failed to allocate the application configuration file for the AppDomainSetup."); | ||
246 | |||
247 | hr = pAppDomainSetup->put_ConfigurationFile(bstrConfigPath); | ||
248 | BalExitOnRootFailure(hr, "Failed to set the configuration file path for the AppDomainSetup."); | ||
249 | |||
250 | // Create the AppDomain to load the factory type. | ||
251 | hr = pState->pCLRHost->CreateDomainEx(L"MBA", pAppDomainSetup, NULL, &pUnk); | ||
252 | BalExitOnRootFailure(hr, "Failed to create the MBA AppDomain."); | ||
253 | |||
254 | hr = pUnk->QueryInterface(__uuidof(_AppDomain), reinterpret_cast<LPVOID*>(&pState->pAppDomain)); | ||
255 | BalExitOnRootFailure(hr, "Failed to query for the _AppDomain interface."); | ||
256 | |||
257 | LExit: | ||
258 | ReleaseBSTR(bstrConfigPath); | ||
259 | ReleaseBSTR(bstrAppBase); | ||
260 | ReleaseNullObject(pUnk); | ||
261 | |||
262 | return hr; | ||
263 | } | ||
264 | |||
265 | static HRESULT LoadModulePaths( | ||
266 | __in MBASTATE* pState | ||
267 | ) | ||
268 | { | ||
269 | HRESULT hr = S_OK; | ||
270 | LPWSTR sczFullPath = NULL; | ||
271 | |||
272 | hr = PathForCurrentProcess(&sczFullPath, pState->hInstance); | ||
273 | BalExitOnFailure(hr, "Failed to get the full host path."); | ||
274 | |||
275 | hr = PathGetDirectory(sczFullPath, &pState->sczAppBase); | ||
276 | BalExitOnFailure(hr, "Failed to get the directory of the full process path."); | ||
277 | |||
278 | hr = PathConcat(pState->sczAppBase, MBA_CONFIG_FILE_NAME, &pState->sczConfigPath); | ||
279 | BalExitOnFailure(hr, "Failed to get the full path to the application configuration file."); | ||
280 | |||
281 | LExit: | ||
282 | ReleaseStr(sczFullPath); | ||
283 | |||
284 | return hr; | ||
285 | } | ||
286 | |||
287 | static HRESULT LoadMbaConfiguration( | ||
288 | __in MBASTATE* pState, | ||
289 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs | ||
290 | ) | ||
291 | { | ||
292 | HRESULT hr = S_OK; | ||
293 | IXMLDOMDocument* pixdManifest = NULL; | ||
294 | IXMLDOMNode* pixnHost = NULL; | ||
295 | BOOL fXmlFound = FALSE; | ||
296 | |||
297 | hr = XmlLoadDocumentFromFile(pArgs->pCommand->wzBootstrapperApplicationDataPath, &pixdManifest); | ||
298 | BalExitOnFailure(hr, "Failed to load BalManifest '%ls'", pArgs->pCommand->wzBootstrapperApplicationDataPath); | ||
299 | |||
300 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqOptions", &pixnHost); | ||
301 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to find WixMbaPrereqOptions element in bootstrapper application config."); | ||
302 | |||
303 | if (fXmlFound) | ||
304 | { | ||
305 | hr = XmlGetAttributeNumber(pixnHost, L"AlwaysInstallPrereqs", reinterpret_cast<DWORD*>(&pState->prereqData.fAlwaysInstallPrereqs)); | ||
306 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get AlwaysInstallPrereqs value."); | ||
307 | } | ||
308 | |||
309 | pState->prereqData.fPerformHelp = !pState->prereqData.fAlwaysInstallPrereqs; | ||
310 | |||
311 | LExit: | ||
312 | ReleaseObject(pixnHost); | ||
313 | ReleaseObject(pixdManifest); | ||
314 | |||
315 | return hr; | ||
316 | } | ||
317 | |||
318 | // Checks whether at least one of required supported frameworks is installed via the NETFX registry keys. | ||
319 | static HRESULT CheckSupportedFrameworks( | ||
320 | __in LPCWSTR wzConfigPath | ||
321 | ) | ||
322 | { | ||
323 | HRESULT hr = S_OK; | ||
324 | IXMLDOMDocument* pixdManifest = NULL; | ||
325 | IXMLDOMNodeList* pNodeList = NULL; | ||
326 | IXMLDOMNode* pNode = NULL; | ||
327 | DWORD cSupportedFrameworks = 0; | ||
328 | LPWSTR sczSupportedFrameworkVersion = NULL; | ||
329 | LPWSTR sczFrameworkRegistryKey = NULL; | ||
330 | HKEY hkFramework = NULL; | ||
331 | DWORD dwFrameworkInstalled = 0; | ||
332 | BOOL fUpdatedManifest = FALSE; | ||
333 | |||
334 | hr = XmlLoadDocumentFromFile(wzConfigPath, &pixdManifest); | ||
335 | BalExitOnFailure(hr, "Failed to load bootstrapper config file from path: %ls", wzConfigPath); | ||
336 | |||
337 | hr = XmlSelectNodes(pixdManifest, L"/configuration/wix.bootstrapper/host/supportedFramework", &pNodeList); | ||
338 | BalExitOnFailure(hr, "Failed to select all supportedFramework elements."); | ||
339 | |||
340 | hr = pNodeList->get_length(reinterpret_cast<long*>(&cSupportedFrameworks)); | ||
341 | BalExitOnFailure(hr, "Failed to get the supported framework count."); | ||
342 | |||
343 | if (cSupportedFrameworks) | ||
344 | { | ||
345 | while (S_OK == (hr = XmlNextElement(pNodeList, &pNode, NULL))) | ||
346 | { | ||
347 | hr = XmlGetAttributeEx(pNode, L"version", &sczSupportedFrameworkVersion); | ||
348 | BalExitOnRequiredXmlQueryFailure(hr, "Failed to get supportedFramework/@version."); | ||
349 | |||
350 | hr = StrAllocFormatted(&sczFrameworkRegistryKey, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\%ls", sczSupportedFrameworkVersion); | ||
351 | BalExitOnFailure(hr, "Failed to allocate path to supported framework Install registry key."); | ||
352 | |||
353 | hr = RegOpen(HKEY_LOCAL_MACHINE, sczFrameworkRegistryKey, KEY_READ, &hkFramework); | ||
354 | if (SUCCEEDED(hr)) | ||
355 | { | ||
356 | hr = RegReadNumber(hkFramework, L"Install", &dwFrameworkInstalled); | ||
357 | if (dwFrameworkInstalled) | ||
358 | { | ||
359 | hr = S_OK; | ||
360 | break; | ||
361 | } | ||
362 | } | ||
363 | |||
364 | ReleaseNullObject(pNode); | ||
365 | } | ||
366 | |||
367 | // If we looped through all the supported frameworks but didn't find anything, ensure we return a failure. | ||
368 | if (S_FALSE == hr) | ||
369 | { | ||
370 | BalExitWithRootFailure(hr, E_NOTFOUND, "Failed to find a supported framework."); | ||
371 | } | ||
372 | |||
373 | hr = UpdateSupportedRuntime(pixdManifest, pNode, &fUpdatedManifest); | ||
374 | BalExitOnFailure(hr, "Failed to update supportedRuntime."); | ||
375 | } | ||
376 | // else no supported frameworks specified, so the startup/supportedRuntime must be enough. | ||
377 | |||
378 | if (fUpdatedManifest) | ||
379 | { | ||
380 | hr = XmlSaveDocument(pixdManifest, wzConfigPath); | ||
381 | BalExitOnFailure(hr, "Failed to save updated manifest over config file: %ls", wzConfigPath); | ||
382 | } | ||
383 | |||
384 | LExit: | ||
385 | ReleaseRegKey(hkFramework); | ||
386 | ReleaseStr(sczFrameworkRegistryKey); | ||
387 | ReleaseStr(sczSupportedFrameworkVersion); | ||
388 | ReleaseObject(pNode); | ||
389 | ReleaseObject(pNodeList); | ||
390 | ReleaseObject(pixdManifest); | ||
391 | |||
392 | return hr; | ||
393 | } | ||
394 | |||
395 | // Fixes the supportedRuntime element if necessary. | ||
396 | static HRESULT UpdateSupportedRuntime( | ||
397 | __in IXMLDOMDocument* pixdManifest, | ||
398 | __in IXMLDOMNode* pixnSupportedFramework, | ||
399 | __out BOOL* pfUpdatedManifest | ||
400 | ) | ||
401 | { | ||
402 | HRESULT hr = S_OK; | ||
403 | LPWSTR sczSupportedRuntimeVersion = NULL; | ||
404 | IXMLDOMNode* pixnStartup = NULL; | ||
405 | IXMLDOMNode* pixnSupportedRuntime = NULL; | ||
406 | BOOL fXmlFound = FALSE; | ||
407 | |||
408 | *pfUpdatedManifest = FALSE; | ||
409 | |||
410 | // If the runtime version attribute is not specified, don't update the manifest. | ||
411 | hr = XmlGetAttributeEx(pixnSupportedFramework, L"runtimeVersion", &sczSupportedRuntimeVersion); | ||
412 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get supportedFramework/@runtimeVersion."); | ||
413 | |||
414 | if (!fXmlFound) | ||
415 | { | ||
416 | ExitFunction(); | ||
417 | } | ||
418 | |||
419 | // Get the startup element. Fail if we can't find it since it'll be necessary to load the | ||
420 | // correct runtime. | ||
421 | hr = XmlSelectSingleNode(pixdManifest, L"/configuration/startup", &pixnStartup); | ||
422 | BalExitOnRequiredXmlQueryFailure(hr, "Failed to get startup element."); | ||
423 | |||
424 | // Remove any pre-existing supported runtimes because they'll just get in the way and create our new one. | ||
425 | hr = XmlRemoveChildren(pixnStartup, L"supportedRuntime"); | ||
426 | BalExitOnFailure(hr, "Failed to remove pre-existing supportedRuntime elements."); | ||
427 | |||
428 | hr = XmlCreateChild(pixnStartup, L"supportedRuntime", &pixnSupportedRuntime); | ||
429 | BalExitOnFailure(hr, "Failed to create supportedRuntime element."); | ||
430 | |||
431 | hr = XmlSetAttribute(pixnSupportedRuntime, L"version", sczSupportedRuntimeVersion); | ||
432 | BalExitOnFailure(hr, "Failed to set supportedRuntime/@version to '%ls'.", sczSupportedRuntimeVersion); | ||
433 | |||
434 | *pfUpdatedManifest = TRUE; | ||
435 | |||
436 | LExit: | ||
437 | ReleaseObject(pixnSupportedRuntime); | ||
438 | ReleaseObject(pixnStartup); | ||
439 | ReleaseStr(sczSupportedRuntimeVersion); | ||
440 | |||
441 | return hr; | ||
442 | } | ||
443 | |||
444 | // Gets the CLR host and caches it. | ||
445 | static HRESULT LoadRuntime( | ||
446 | __in MBASTATE* pState | ||
447 | ) | ||
448 | { | ||
449 | HRESULT hr = S_OK; | ||
450 | UINT uiMode = 0; | ||
451 | HMODULE hModule = NULL; | ||
452 | BOOL fFallbackToCorBindToCurrentRuntime = TRUE; | ||
453 | CLRCreateInstanceFnPtr pfnCLRCreateInstance = NULL; | ||
454 | ICLRMetaHostPolicy* pCLRMetaHostPolicy = NULL; | ||
455 | IStream* pCfgStream = NULL; | ||
456 | LPWSTR pwzVersion = NULL; | ||
457 | DWORD cchVersion = 0; | ||
458 | DWORD dwConfigFlags = 0; | ||
459 | ICLRRuntimeInfo* pCLRRuntimeInfo = NULL; | ||
460 | PFN_CORBINDTOCURRENTRUNTIME pfnCorBindToCurrentRuntime = NULL; | ||
461 | |||
462 | // Always set the error mode because we will always restore it below. | ||
463 | uiMode = ::SetErrorMode(0); | ||
464 | |||
465 | // Check that the supported framework is installed. | ||
466 | hr = CheckSupportedFrameworks(pState->sczConfigPath); | ||
467 | BalExitOnFailure(hr, "Failed to find supported framework."); | ||
468 | |||
469 | // Cache the CLR host to be shutdown later. This can occur on a different thread. | ||
470 | // Disable message boxes from being displayed on error and blocking execution. | ||
471 | ::SetErrorMode(uiMode | SEM_FAILCRITICALERRORS); | ||
472 | |||
473 | hr = LoadSystemLibrary(L"mscoree.dll", &hModule); | ||
474 | BalExitOnFailure(hr, "Failed to load mscoree.dll"); | ||
475 | |||
476 | pfnCLRCreateInstance = reinterpret_cast<CLRCreateInstanceFnPtr>(::GetProcAddress(hModule, "CLRCreateInstance")); | ||
477 | |||
478 | if (pfnCLRCreateInstance) | ||
479 | { | ||
480 | hr = pfnCLRCreateInstance(CLSID_CLRMetaHostPolicy, IID_ICLRMetaHostPolicy, reinterpret_cast<LPVOID*>(&pCLRMetaHostPolicy)); | ||
481 | if (E_NOTIMPL != hr) | ||
482 | { | ||
483 | BalExitOnRootFailure(hr, "Failed to create instance of ICLRMetaHostPolicy."); | ||
484 | |||
485 | fFallbackToCorBindToCurrentRuntime = FALSE; | ||
486 | } | ||
487 | } | ||
488 | |||
489 | if (fFallbackToCorBindToCurrentRuntime) | ||
490 | { | ||
491 | pfnCorBindToCurrentRuntime = reinterpret_cast<PFN_CORBINDTOCURRENTRUNTIME>(::GetProcAddress(hModule, "CorBindToCurrentRuntime")); | ||
492 | BalExitOnNullWithLastError(pfnCorBindToCurrentRuntime, hr, "Failed to get procedure address for CorBindToCurrentRuntime."); | ||
493 | |||
494 | hr = pfnCorBindToCurrentRuntime(pState->sczConfigPath, CLSID_CorRuntimeHost, IID_ICorRuntimeHost, reinterpret_cast<LPVOID*>(&pState->pCLRHost)); | ||
495 | BalExitOnRootFailure(hr, "Failed to create the CLR host using the application configuration file path."); | ||
496 | } | ||
497 | else | ||
498 | { | ||
499 | |||
500 | hr = SHCreateStreamOnFileEx(pState->sczConfigPath, STGM_READ | STGM_SHARE_DENY_WRITE, 0, FALSE, NULL, &pCfgStream); | ||
501 | BalExitOnFailure(hr, "Failed to load bootstrapper config file from path: %ls", pState->sczConfigPath); | ||
502 | |||
503 | hr = pCLRMetaHostPolicy->GetRequestedRuntime(METAHOST_POLICY_HIGHCOMPAT, NULL, pCfgStream, NULL, &cchVersion, NULL, NULL, &dwConfigFlags, IID_ICLRRuntimeInfo, reinterpret_cast<LPVOID*>(&pCLRRuntimeInfo)); | ||
504 | BalExitOnRootFailure(hr, "Failed to get the CLR runtime info using the application configuration file path."); | ||
505 | |||
506 | // .NET 4 RTM had a bug where it wouldn't set pcchVersion if pwzVersion was NULL. | ||
507 | if (!cchVersion) | ||
508 | { | ||
509 | hr = pCLRRuntimeInfo->GetVersionString(NULL, &cchVersion); | ||
510 | if (HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) != hr) | ||
511 | { | ||
512 | BalExitOnFailure(hr, "Failed to get the length of the CLR version string."); | ||
513 | } | ||
514 | } | ||
515 | |||
516 | hr = StrAlloc(&pwzVersion, cchVersion); | ||
517 | ExitOnFailure(hr, "Failed to allocate the CLR version string."); | ||
518 | |||
519 | hr = pCLRRuntimeInfo->GetVersionString(pwzVersion, &cchVersion); | ||
520 | ExitOnFailure(hr, "Failed to get the CLR version string."); | ||
521 | |||
522 | if (CSTR_EQUAL == CompareString(LOCALE_NEUTRAL, 0, L"v4.0.30319", -1, pwzVersion, cchVersion)) | ||
523 | { | ||
524 | hr = VerifyNET4RuntimeIsSupported(); | ||
525 | BalExitOnFailure(hr, "Found unsupported .NET 4 Runtime."); | ||
526 | } | ||
527 | |||
528 | if (METAHOST_CONFIG_FLAGS_LEGACY_V2_ACTIVATION_POLICY_TRUE == (METAHOST_CONFIG_FLAGS_LEGACY_V2_ACTIVATION_POLICY_MASK & dwConfigFlags)) | ||
529 | { | ||
530 | hr = pCLRRuntimeInfo->BindAsLegacyV2Runtime(); | ||
531 | BalExitOnRootFailure(hr, "Failed to bind as legacy V2 runtime."); | ||
532 | } | ||
533 | |||
534 | hr = pCLRRuntimeInfo->GetInterface(CLSID_CorRuntimeHost, IID_ICorRuntimeHost, reinterpret_cast<LPVOID*>(&pState->pCLRHost)); | ||
535 | BalExitOnRootFailure(hr, "Failed to get instance of ICorRuntimeHost."); | ||
536 | } | ||
537 | |||
538 | hr = pState->pCLRHost->Start(); | ||
539 | BalExitOnRootFailure(hr, "Failed to start the CLR host."); | ||
540 | |||
541 | LExit: | ||
542 | ReleaseStr(pwzVersion); | ||
543 | ReleaseNullObject(pCLRRuntimeInfo); | ||
544 | ReleaseNullObject(pCfgStream); | ||
545 | ReleaseNullObject(pCLRMetaHostPolicy); | ||
546 | |||
547 | // Unload the module so it's not in use when we install .NET. | ||
548 | if (FAILED(hr)) | ||
549 | { | ||
550 | ::FreeLibrary(hModule); | ||
551 | } | ||
552 | |||
553 | ::SetErrorMode(uiMode); // restore the previous error mode. | ||
554 | |||
555 | return hr; | ||
556 | } | ||
557 | |||
558 | // Creates the bootstrapper app and returns it for the engine. | ||
559 | static HRESULT CreateManagedBootstrapperApplication( | ||
560 | __in _AppDomain* pAppDomain, | ||
561 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
562 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
563 | ) | ||
564 | { | ||
565 | HRESULT hr = S_OK; | ||
566 | IBootstrapperApplicationFactory* pAppFactory = NULL; | ||
567 | |||
568 | hr = CreateManagedBootstrapperApplicationFactory(pAppDomain, &pAppFactory); | ||
569 | BalExitOnFailure(hr, "Failed to create the factory to create the bootstrapper application."); | ||
570 | |||
571 | hr = pAppFactory->Create(pArgs, pResults); | ||
572 | BalExitOnFailure(hr, "Failed to create the bootstrapper application."); | ||
573 | |||
574 | LExit: | ||
575 | ReleaseNullObject(pAppFactory); | ||
576 | |||
577 | return hr; | ||
578 | } | ||
579 | |||
580 | // Creates the app factory to create the managed app in the default AppDomain. | ||
581 | static HRESULT CreateManagedBootstrapperApplicationFactory( | ||
582 | __in _AppDomain* pAppDomain, | ||
583 | __out IBootstrapperApplicationFactory** ppAppFactory | ||
584 | ) | ||
585 | { | ||
586 | HRESULT hr = S_OK; | ||
587 | BSTR bstrAssemblyName = NULL; | ||
588 | BSTR bstrTypeName = NULL; | ||
589 | _ObjectHandle* pObj = NULL; | ||
590 | VARIANT vtBAFactory; | ||
591 | |||
592 | ::VariantInit(&vtBAFactory); | ||
593 | |||
594 | bstrAssemblyName = ::SysAllocString(MBA_ASSEMBLY_FULL_NAME); | ||
595 | BalExitOnNull(bstrAssemblyName, hr, E_OUTOFMEMORY, "Failed to allocate the full assembly name for the bootstrapper application factory."); | ||
596 | |||
597 | bstrTypeName = ::SysAllocString(MBA_ENTRY_TYPE); | ||
598 | BalExitOnNull(bstrTypeName, hr, E_OUTOFMEMORY, "Failed to allocate the full type name for the BA factory."); | ||
599 | |||
600 | hr = pAppDomain->CreateInstance(bstrAssemblyName, bstrTypeName, &pObj); | ||
601 | BalExitOnRootFailure(hr, "Failed to create the BA factory object."); | ||
602 | |||
603 | hr = pObj->Unwrap(&vtBAFactory); | ||
604 | BalExitOnRootFailure(hr, "Failed to unwrap the BA factory object into the host domain."); | ||
605 | BalExitOnNull(vtBAFactory.punkVal, hr, E_UNEXPECTED, "The variant did not contain the expected IUnknown pointer."); | ||
606 | |||
607 | hr = vtBAFactory.punkVal->QueryInterface(__uuidof(IBootstrapperApplicationFactory), reinterpret_cast<LPVOID*>(ppAppFactory)); | ||
608 | BalExitOnRootFailure(hr, "Failed to query for the bootstrapper app factory interface."); | ||
609 | |||
610 | LExit: | ||
611 | ReleaseVariant(vtBAFactory); | ||
612 | ReleaseNullObject(pObj); | ||
613 | ReleaseBSTR(bstrTypeName); | ||
614 | ReleaseBSTR(bstrAssemblyName); | ||
615 | |||
616 | return hr; | ||
617 | } | ||
618 | |||
619 | static HRESULT CreatePrerequisiteBA( | ||
620 | __in MBASTATE* pState, | ||
621 | __in IBootstrapperEngine* pEngine, | ||
622 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
623 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
624 | ) | ||
625 | { | ||
626 | HRESULT hr = S_OK; | ||
627 | LPWSTR sczMbapreqPath = NULL; | ||
628 | HMODULE hModule = NULL; | ||
629 | |||
630 | hr = PathConcat(pState->sczAppBase, L"mbapreq.dll", &sczMbapreqPath); | ||
631 | BalExitOnFailure(hr, "Failed to get path to pre-requisite BA."); | ||
632 | |||
633 | hModule = ::LoadLibraryExW(sczMbapreqPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | ||
634 | BalExitOnNullWithLastError(hModule, hr, "Failed to load pre-requisite BA DLL."); | ||
635 | |||
636 | PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = reinterpret_cast<PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE>(::GetProcAddress(hModule, "PrereqBootstrapperApplicationCreate")); | ||
637 | BalExitOnNullWithLastError(pfnCreate, hr, "Failed to get PrereqBootstrapperApplicationCreate entry-point from: %ls", sczMbapreqPath); | ||
638 | |||
639 | hr = pfnCreate(&pState->prereqData, pEngine, pArgs, pResults); | ||
640 | BalExitOnFailure(hr, "Failed to create prequisite bootstrapper app."); | ||
641 | |||
642 | pState->hMbapreqModule = hModule; | ||
643 | hModule = NULL; | ||
644 | |||
645 | LExit: | ||
646 | if (hModule) | ||
647 | { | ||
648 | ::FreeLibrary(hModule); | ||
649 | } | ||
650 | ReleaseStr(sczMbapreqPath); | ||
651 | |||
652 | return hr; | ||
653 | } | ||
654 | |||
655 | static HRESULT VerifyNET4RuntimeIsSupported( | ||
656 | ) | ||
657 | { | ||
658 | HRESULT hr = S_OK; | ||
659 | OS_VERSION osv = OS_VERSION_UNKNOWN; | ||
660 | DWORD dwServicePack = 0; | ||
661 | HKEY hKey = NULL; | ||
662 | DWORD er = ERROR_SUCCESS; | ||
663 | DWORD dwRelease = 0; | ||
664 | DWORD cchRelease = sizeof(dwRelease); | ||
665 | |||
666 | OsGetVersion(&osv, &dwServicePack); | ||
667 | if (OS_VERSION_WIN7 == osv && 0 == dwServicePack) | ||
668 | { | ||
669 | hr = RegOpen(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full", KEY_QUERY_VALUE, &hKey); | ||
670 | if (E_FILENOTFOUND == hr) | ||
671 | { | ||
672 | ExitFunction1(hr = S_OK); | ||
673 | } | ||
674 | BalExitOnFailure(hr, "Failed to open registry key for .NET 4."); | ||
675 | |||
676 | er = ::RegQueryValueExW(hKey, L"Release", NULL, NULL, reinterpret_cast<LPBYTE>(&dwRelease), &cchRelease); | ||
677 | if (ERROR_FILE_NOT_FOUND == er) | ||
678 | { | ||
679 | ExitFunction1(hr = S_OK); | ||
680 | } | ||
681 | BalExitOnWin32Error(er, hr, "Failed to get Release value."); | ||
682 | |||
683 | if (NET452_RELEASE <= dwRelease) | ||
684 | { | ||
685 | hr = E_MBAHOST_NET452_ON_WIN7RTM; | ||
686 | } | ||
687 | } | ||
688 | |||
689 | LExit: | ||
690 | ReleaseRegKey(hKey); | ||
691 | |||
692 | return hr; | ||
693 | } | ||
diff --git a/src/ext/Bal/mbahost/mbahost.def b/src/ext/Bal/mbahost/mbahost.def deleted file mode 100644 index 4488df94..00000000 --- a/src/ext/Bal/mbahost/mbahost.def +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | ; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | |||
4 | EXPORTS | ||
5 | BootstrapperApplicationCreate | ||
6 | BootstrapperApplicationDestroy | ||
diff --git a/src/ext/Bal/mbahost/mbahost.h b/src/ext/Bal/mbahost/mbahost.h deleted file mode 100644 index 19cf8311..00000000 --- a/src/ext/Bal/mbahost/mbahost.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | struct MBASTATE | ||
6 | { | ||
7 | BOOL fInitialized; | ||
8 | BOOL fInitializedRuntime; | ||
9 | BOOL fStoppedRuntime; | ||
10 | HINSTANCE hInstance; | ||
11 | LPWSTR sczAppBase; | ||
12 | LPWSTR sczConfigPath; | ||
13 | mscorlib::_AppDomain* pAppDomain; | ||
14 | ICorRuntimeHost* pCLRHost; | ||
15 | HMODULE hMbapreqModule; | ||
16 | PREQBA_DATA prereqData; | ||
17 | }; | ||
diff --git a/src/ext/Bal/mbahost/precomp.h b/src/ext/Bal/mbahost/precomp.h deleted file mode 100644 index a07f2fc0..00000000 --- a/src/ext/Bal/mbahost/precomp.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #include <windows.h> | ||
6 | #include <msiquery.h> | ||
7 | #include <metahost.h> | ||
8 | #include <shlwapi.h> | ||
9 | |||
10 | #import <mscorlib.tlb> raw_interfaces_only rename("ReportEvent", "mscorlib_ReportEvent") | ||
11 | |||
12 | #include <dutil.h> | ||
13 | #include <osutil.h> | ||
14 | #include <pathutil.h> | ||
15 | #include <regutil.h> | ||
16 | #include <strutil.h> | ||
17 | #include <xmlutil.h> | ||
18 | |||
19 | #include <BootstrapperEngine.h> | ||
20 | #include <BootstrapperApplication.h> | ||
21 | #include <IBootstrapperEngine.h> | ||
22 | #include <IBootstrapperApplication.h> | ||
23 | #include <IBootstrapperApplicationFactory.h> | ||
24 | |||
25 | #include <balutil.h> | ||
26 | |||
27 | #include <preqba.h> | ||
28 | #include <WixToolset.Mba.Host.h> // includes the generated assembly name macros. | ||
29 | |||
30 | #include "mbahost.h" | ||
diff --git a/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl index 1ab287e4..1ab287e4 100644 --- a/src/ext/Bal/wixstdba/Resources/1028/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1028/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl index e60c92cb..e60c92cb 100644 --- a/src/ext/Bal/wixstdba/Resources/1029/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1029/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl index b895bb76..b895bb76 100644 --- a/src/ext/Bal/wixstdba/Resources/1030/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1030/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl index 760b1ceb..760b1ceb 100644 --- a/src/ext/Bal/wixstdba/Resources/1031/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1031/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl index a9cd7a5b..a9cd7a5b 100644 --- a/src/ext/Bal/wixstdba/Resources/1032/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1032/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl index b54476bd..b54476bd 100644 --- a/src/ext/Bal/wixstdba/Resources/1035/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1035/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl index cd17ae34..cd17ae34 100644 --- a/src/ext/Bal/wixstdba/Resources/1036/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1036/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl index 6cbb1d34..6cbb1d34 100644 --- a/src/ext/Bal/wixstdba/Resources/1038/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1038/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl index 66940e85..66940e85 100644 --- a/src/ext/Bal/wixstdba/Resources/1040/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1040/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl index c830072e..c830072e 100644 --- a/src/ext/Bal/wixstdba/Resources/1041/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1041/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl index df6e9b31..df6e9b31 100644 --- a/src/ext/Bal/wixstdba/Resources/1042/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1042/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl index c9d7b8e4..c9d7b8e4 100644 --- a/src/ext/Bal/wixstdba/Resources/1043/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1043/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl index 9a5f8ea1..9a5f8ea1 100644 --- a/src/ext/Bal/wixstdba/Resources/1044/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1044/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl index f7d0de6a..f7d0de6a 100644 --- a/src/ext/Bal/wixstdba/Resources/1045/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1045/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl index dc8d22d1..dc8d22d1 100644 --- a/src/ext/Bal/wixstdba/Resources/1046/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1046/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl index 0614da9e..0614da9e 100644 --- a/src/ext/Bal/wixstdba/Resources/1049/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1049/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl index 0dd75159..0dd75159 100644 --- a/src/ext/Bal/wixstdba/Resources/1051/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1051/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl index 068f5519..068f5519 100644 --- a/src/ext/Bal/wixstdba/Resources/1053/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1053/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl index f4d98354..f4d98354 100644 --- a/src/ext/Bal/wixstdba/Resources/1055/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1055/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl index d24231db..d24231db 100644 --- a/src/ext/Bal/wixstdba/Resources/1060/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/1060/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl index 43ed19fe..43ed19fe 100644 --- a/src/ext/Bal/wixstdba/Resources/2052/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/2052/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl index 1e57ec2f..1e57ec2f 100644 --- a/src/ext/Bal/wixstdba/Resources/2070/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/2070/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl b/src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl index cd835913..cd835913 100644 --- a/src/ext/Bal/wixstdba/Resources/3082/mbapreq.wxl +++ b/src/ext/Bal/stdbas/Resources/3082/wixpreq.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/HyperlinkLargeTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml index 6e7b69ee..6e7b69ee 100644 --- a/src/ext/Bal/wixstdba/Resources/HyperlinkLargeTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkLargeTheme.xml | |||
diff --git a/src/ext/Bal/wixstdba/Resources/HyperlinkSidebarTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml index 59a03ad0..59a03ad0 100644 --- a/src/ext/Bal/wixstdba/Resources/HyperlinkSidebarTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkSidebarTheme.xml | |||
diff --git a/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.wxl b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl index 24e7b728..24e7b728 100644 --- a/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.wxl +++ b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.xml b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml index c82e1b9f..c82e1b9f 100644 --- a/src/ext/Bal/wixstdba/Resources/HyperlinkTheme.xml +++ b/src/ext/Bal/stdbas/Resources/HyperlinkTheme.xml | |||
diff --git a/src/ext/Bal/wixstdba/Resources/LoremIpsumLicense.rtf b/src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtf index 1a183236..1a183236 100644 --- a/src/ext/Bal/wixstdba/Resources/LoremIpsumLicense.rtf +++ b/src/ext/Bal/stdbas/Resources/LoremIpsumLicense.rtf | |||
Binary files differ | |||
diff --git a/src/ext/Bal/wixstdba/Resources/RtfLargeTheme.xml b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml index b30fe3cd..b30fe3cd 100644 --- a/src/ext/Bal/wixstdba/Resources/RtfLargeTheme.xml +++ b/src/ext/Bal/stdbas/Resources/RtfLargeTheme.xml | |||
diff --git a/src/ext/Bal/wixstdba/Resources/RtfTheme.wxl b/src/ext/Bal/stdbas/Resources/RtfTheme.wxl index a827d1a9..a827d1a9 100644 --- a/src/ext/Bal/wixstdba/Resources/RtfTheme.wxl +++ b/src/ext/Bal/stdbas/Resources/RtfTheme.wxl | |||
diff --git a/src/ext/Bal/wixstdba/Resources/RtfTheme.xml b/src/ext/Bal/stdbas/Resources/RtfTheme.xml index e1a486c8..e1a486c8 100644 --- a/src/ext/Bal/wixstdba/Resources/RtfTheme.xml +++ b/src/ext/Bal/stdbas/Resources/RtfTheme.xml | |||
diff --git a/src/ext/Bal/wixstdba/Resources/dncpreq.wxl b/src/ext/Bal/stdbas/Resources/dncpreq.wxl index 42c8fa63..a1f63d43 100644 --- a/src/ext/Bal/wixstdba/Resources/dncpreq.wxl +++ b/src/ext/Bal/stdbas/Resources/dncpreq.wxl | |||
@@ -14,7 +14,7 @@ | |||
14 | <String Id="ProgressHeader" Value="Setup Progress" /> | 14 | <String Id="ProgressHeader" Value="Setup Progress" /> |
15 | <String Id="ProgressLabel" Value="Processing:" /> | 15 | <String Id="ProgressLabel" Value="Processing:" /> |
16 | <String Id="ProgressCancelButton" Value="&Cancel" /> | 16 | <String Id="ProgressCancelButton" Value="&Cancel" /> |
17 | <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" /> | 17 | <String Id="SuccessHeader" Value="Microsoft .NET Core Setup Successful" /> |
18 | <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." /> | 18 | <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." /> |
19 | <String Id="SuccessRestartButton" Value="&Restart" /> | 19 | <String Id="SuccessRestartButton" Value="&Restart" /> |
20 | <String Id="SuccessCloseButton" Value="&Close" /> | 20 | <String Id="SuccessCloseButton" Value="&Close" /> |
@@ -23,7 +23,6 @@ | |||
23 | <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." /> | 23 | <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." /> |
24 | <String Id="FailureRestartButton" Value="&Restart" /> | 24 | <String Id="FailureRestartButton" Value="&Restart" /> |
25 | <String Id="FailureCloseButton" Value="&Close" /> | 25 | <String Id="FailureCloseButton" Value="&Close" /> |
26 | <String Id="SCDRUNTIMEFAILUREErrorMessage" Value="[WixBundleName] cannot run on this machine. Install the latest updates and/or the latest OS to run in a supported environment." /> | ||
27 | <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Core runtime even though all of the prerequisites are installed." /> | 26 | <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Core runtime even though all of the prerequisites are installed." /> |
28 | <String Id="FilesInUseTitle" Value="Files In Use" /> | 27 | <String Id="FilesInUseTitle" Value="Files In Use" /> |
29 | <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" /> | 28 | <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" /> |
diff --git a/src/ext/Bal/wixstdba/Resources/iuipreq.thm b/src/ext/Bal/stdbas/Resources/iuipreq.thm index 5429b3d2..83425841 100644 --- a/src/ext/Bal/wixstdba/Resources/iuipreq.thm +++ b/src/ext/Bal/stdbas/Resources/iuipreq.thm | |||
@@ -6,7 +6,7 @@ | |||
6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | 6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> |
7 | 7 | ||
8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> | 8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> |
9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/> | 9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="wixpreq.png" Visible="yes"/> |
10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes"> | 10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes"> |
11 | <Text>#(loc.Title)</Text> | 11 | <Text>#(loc.Title)</Text> |
12 | <Text Condition="WixBundleAction = 2 OR WixBundleCommandLineAction = 1">#(loc.NonPrereqTitle)</Text> | 12 | <Text Condition="WixBundleAction = 2 OR WixBundleCommandLineAction = 1">#(loc.NonPrereqTitle)</Text> |
diff --git a/src/ext/Bal/wixstdba/Resources/logo.png b/src/ext/Bal/stdbas/Resources/logo.png index 7adc6e11..7adc6e11 100644 --- a/src/ext/Bal/wixstdba/Resources/logo.png +++ b/src/ext/Bal/stdbas/Resources/logo.png | |||
Binary files differ | |||
diff --git a/src/ext/Bal/wixstdba/Resources/logoSide.png b/src/ext/Bal/stdbas/Resources/logoSide.png index 308841c5..308841c5 100644 --- a/src/ext/Bal/wixstdba/Resources/logoSide.png +++ b/src/ext/Bal/stdbas/Resources/logoSide.png | |||
Binary files differ | |||
diff --git a/src/ext/Bal/wixstdba/Resources/mbapreq.png b/src/ext/Bal/stdbas/Resources/wixpreq.png index c6e9527b..c6e9527b 100644 --- a/src/ext/Bal/wixstdba/Resources/mbapreq.png +++ b/src/ext/Bal/stdbas/Resources/wixpreq.png | |||
Binary files differ | |||
diff --git a/src/ext/Bal/wixstdba/Resources/mbapreq.thm b/src/ext/Bal/stdbas/Resources/wixpreq.thm index fda84004..a49c3ee7 100644 --- a/src/ext/Bal/wixstdba/Resources/mbapreq.thm +++ b/src/ext/Bal/stdbas/Resources/wixpreq.thm | |||
@@ -6,7 +6,7 @@ | |||
6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | 6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> |
7 | 7 | ||
8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> | 8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> |
9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/> | 9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="wixpreq.png" Visible="yes"/> |
10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label> | 10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label> |
11 | 11 | ||
12 | <Page Name="Help"> | 12 | <Page Name="Help"> |
diff --git a/src/ext/Bal/wixstdba/Resources/iuipreq.wxl b/src/ext/Bal/stdbas/Resources/wixpreq.wxl index fb3d0cc2..f4725121 100644 --- a/src/ext/Bal/wixstdba/Resources/iuipreq.wxl +++ b/src/ext/Bal/stdbas/Resources/wixpreq.wxl | |||
@@ -7,7 +7,7 @@ | |||
7 | <String Id="NonPrereqTitle" Value="[WixBundleName] setup" /> | 7 | <String Id="NonPrereqTitle" Value="[WixBundleName] setup" /> |
8 | <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" /> | 8 | <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" /> |
9 | <String Id="HelpHeader" Value="Setup Help" /> | 9 | <String Id="HelpHeader" Value="Setup Help" /> |
10 | <String Id="HelpText" Value="/passive | /quiet - displays minimal UI with no prompts or displays no UI and
 no prompts. By default UI and all prompts are displayed.

/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." /> | 10 | <String Id="HelpText" Value="/passive | /quiet - displays minimal UI with no prompts or displays no UI and
 no prompts. By default UI and all prompts are displayed.

/norestart - suppress any attempts to restart. By default UI will prompt before restart.
/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." /> |
11 | <String Id="HelpCloseButton" Value="&Close" /> | 11 | <String Id="HelpCloseButton" Value="&Close" /> |
12 | <String Id="InstallLicenseTerms" Value="Click the "Accept and Install" button to accept the prerequisite <a href="#">license terms</a>." /> | 12 | <String Id="InstallLicenseTerms" Value="Click the "Accept and Install" button to accept the prerequisite <a href="#">license terms</a>." /> |
13 | <String Id="InstallAcceptAndInstallButton" Value="&Accept and Install" /> | 13 | <String Id="InstallAcceptAndInstallButton" Value="&Accept and Install" /> |
@@ -26,6 +26,7 @@ | |||
26 | <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." /> | 26 | <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." /> |
27 | <String Id="FailureRestartButton" Value="&Restart" /> | 27 | <String Id="FailureRestartButton" Value="&Restart" /> |
28 | <String Id="FailureCloseButton" Value="&Close" /> | 28 | <String Id="FailureCloseButton" Value="&Close" /> |
29 | <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to start even though all of the prerequisites are installed." /> | ||
29 | <String Id="FilesInUseTitle" Value="Files In Use" /> | 30 | <String Id="FilesInUseTitle" Value="Files In Use" /> |
30 | <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" /> | 31 | <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" /> |
31 | <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &applications." /> | 32 | <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &applications." /> |
diff --git a/src/ext/Bal/wixiuiba/WixInternalUIBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp index 6ff6559b..a8967a31 100644 --- a/src/ext/Bal/wixiuiba/WixInternalUIBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp | |||
@@ -1,7 +1,6 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | #include "BalBaseBootstrapperApplicationProc.h" | ||
5 | #include "BalBaseBootstrapperApplication.h" | 4 | #include "BalBaseBootstrapperApplication.h" |
6 | 5 | ||
7 | static const LPCWSTR WIXIUIBA_WINDOW_CLASS = L"WixInternalUIBA"; | 6 | static const LPCWSTR WIXIUIBA_WINDOW_CLASS = L"WixInternalUIBA"; |
@@ -19,6 +18,26 @@ enum WM_WIXIUIBA | |||
19 | class CWixInternalUIBootstrapperApplication : public CBalBaseBootstrapperApplication | 18 | class CWixInternalUIBootstrapperApplication : public CBalBaseBootstrapperApplication |
20 | { | 19 | { |
21 | public: // IBootstrapperApplication | 20 | public: // IBootstrapperApplication |
21 | STDMETHODIMP OnCreate( | ||
22 | __in IBootstrapperEngine* pEngine, | ||
23 | __in BOOTSTRAPPER_COMMAND* pCommand | ||
24 | ) | ||
25 | { | ||
26 | HRESULT hr = S_OK; | ||
27 | |||
28 | hr = __super::OnCreate(pEngine, pCommand); | ||
29 | BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); | ||
30 | |||
31 | m_commandAction = pCommand->action; | ||
32 | m_commandDisplay = pCommand->display; | ||
33 | |||
34 | hr = InitializeData(); | ||
35 | BalExitOnFailure(hr, "Failed to initialize data in internal UI bootstrapper application."); | ||
36 | |||
37 | LExit: | ||
38 | return hr; | ||
39 | } | ||
40 | |||
22 | virtual STDMETHODIMP OnStartup() | 41 | virtual STDMETHODIMP OnStartup() |
23 | { | 42 | { |
24 | HRESULT hr = S_OK; | 43 | HRESULT hr = S_OK; |
@@ -50,7 +69,8 @@ public: // IBootstrapperApplication | |||
50 | if (m_fFailedToLoadPackage) | 69 | if (m_fFailedToLoadPackage) |
51 | { | 70 | { |
52 | Assert(FAILED(m_hrFinal)); | 71 | Assert(FAILED(m_hrFinal)); |
53 | m_pPrereqData->hrFatalError = m_hrFinal; | 72 | // TODO: Should we really do what this error message says? Going back to the prereq BA |
73 | // to show the error dialog is pretty overkill vs. showing an error dialog in this BA. | ||
54 | BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load primary package as the BA. The bootstrapper application will be reloaded to show the error."); | 74 | BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load primary package as the BA. The bootstrapper application will be reloaded to show the error."); |
55 | *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; | 75 | *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; |
56 | } | 76 | } |
@@ -74,13 +94,13 @@ public: // IBootstrapperApplication | |||
74 | BOOL fInstalled = BOOTSTRAPPER_PACKAGE_STATE_ABSENT < state; | 94 | BOOL fInstalled = BOOTSTRAPPER_PACKAGE_STATE_ABSENT < state; |
75 | 95 | ||
76 | // Maybe modify the action state if the primary package is or is not already installed. | 96 | // Maybe modify the action state if the primary package is or is not already installed. |
77 | if (fInstalled && BOOTSTRAPPER_ACTION_INSTALL == m_command.action) | 97 | if (fInstalled && BOOTSTRAPPER_ACTION_INSTALL == m_commandAction) |
78 | { | 98 | { |
79 | m_command.action = BOOTSTRAPPER_ACTION_MODIFY; | 99 | m_commandAction = BOOTSTRAPPER_ACTION_MODIFY; |
80 | } | 100 | } |
81 | else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_command.action || BOOTSTRAPPER_ACTION_REPAIR == m_command.action)) | 101 | else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_commandAction || BOOTSTRAPPER_ACTION_REPAIR == m_commandAction)) |
82 | { | 102 | { |
83 | m_command.action = BOOTSTRAPPER_ACTION_INSTALL; | 103 | m_commandAction = BOOTSTRAPPER_ACTION_INSTALL; |
84 | } | 104 | } |
85 | 105 | ||
86 | if (m_fApplied && !fInstalled && fCached) | 106 | if (m_fApplied && !fInstalled && fCached) |
@@ -111,7 +131,7 @@ public: // IBootstrapperApplication | |||
111 | 131 | ||
112 | // If we're performing an action that modifies machine state then evaluate conditions. | 132 | // If we're performing an action that modifies machine state then evaluate conditions. |
113 | BOOL fEvaluateConditions = SUCCEEDED(hrStatus) && | 133 | BOOL fEvaluateConditions = SUCCEEDED(hrStatus) && |
114 | (BOOTSTRAPPER_ACTION_LAYOUT < m_command.action && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_command.action); | 134 | (BOOTSTRAPPER_ACTION_LAYOUT < m_commandAction && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_commandAction); |
115 | 135 | ||
116 | if (fEvaluateConditions) | 136 | if (fEvaluateConditions) |
117 | { | 137 | { |
@@ -120,7 +140,7 @@ public: // IBootstrapperApplication | |||
120 | 140 | ||
121 | if (SUCCEEDED(hrStatus)) | 141 | if (SUCCEEDED(hrStatus)) |
122 | { | 142 | { |
123 | ::PostMessageW(m_hWnd, WM_WIXIUIBA_PLAN_PACKAGES, 0, m_command.action); | 143 | ::PostMessageW(m_hWnd, WM_WIXIUIBA_PLAN_PACKAGES, 0, m_commandAction); |
124 | } | 144 | } |
125 | else | 145 | else |
126 | { | 146 | { |
@@ -163,7 +183,7 @@ public: // IBootstrapperApplication | |||
163 | 183 | ||
164 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; | 184 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE; |
165 | } | 185 | } |
166 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display && !m_fAutomaticRemoval) | 186 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay && !m_fAutomaticRemoval) |
167 | { | 187 | { |
168 | // Make sure the MSI UI is shown regardless of the current state of the package. | 188 | // Make sure the MSI UI is shown regardless of the current state of the package. |
169 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; | 189 | *pRequestState = BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT; |
@@ -192,7 +212,7 @@ public: // IBootstrapperApplication | |||
192 | ExitFunction(); | 212 | ExitFunction(); |
193 | } | 213 | } |
194 | 214 | ||
195 | switch (m_command.display) | 215 | switch (m_commandDisplay) |
196 | { | 216 | { |
197 | case BOOTSTRAPPER_DISPLAY_FULL: | 217 | case BOOTSTRAPPER_DISPLAY_FULL: |
198 | uiLevel = INSTALLUILEVEL_FULL; | 218 | uiLevel = INSTALLUILEVEL_FULL; |
@@ -304,32 +324,6 @@ public: // IBootstrapperApplication | |||
304 | } | 324 | } |
305 | 325 | ||
306 | 326 | ||
307 | public: //CBalBaseBootstrapperApplication | ||
308 | virtual STDMETHODIMP Initialize( | ||
309 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs | ||
310 | ) | ||
311 | { | ||
312 | HRESULT hr = S_OK; | ||
313 | |||
314 | hr = __super::Initialize(pCreateArgs); | ||
315 | BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); | ||
316 | |||
317 | memcpy_s(&m_command, sizeof(m_command), pCreateArgs->pCommand, sizeof(BOOTSTRAPPER_COMMAND)); | ||
318 | memcpy_s(&m_createArgs, sizeof(m_createArgs), pCreateArgs, sizeof(BOOTSTRAPPER_CREATE_ARGS)); | ||
319 | m_createArgs.pCommand = &m_command; | ||
320 | |||
321 | LExit: | ||
322 | return hr; | ||
323 | } | ||
324 | |||
325 | void Uninitialize( | ||
326 | __in const BOOTSTRAPPER_DESTROY_ARGS* /*pArgs*/, | ||
327 | __in BOOTSTRAPPER_DESTROY_RESULTS* /*pResults*/ | ||
328 | ) | ||
329 | { | ||
330 | } | ||
331 | |||
332 | |||
333 | private: | 327 | private: |
334 | // | 328 | // |
335 | // UiThreadProc - entrypoint for UI thread. | 329 | // UiThreadProc - entrypoint for UI thread. |
@@ -345,17 +339,14 @@ private: | |||
345 | MSG msg = { }; | 339 | MSG msg = { }; |
346 | DWORD dwQuit = 0; | 340 | DWORD dwQuit = 0; |
347 | 341 | ||
348 | // Initialize COM and theme. | 342 | // Initialize COM. |
349 | hr = ::CoInitialize(NULL); | 343 | hr = ::CoInitialize(NULL); |
350 | BalExitOnFailure(hr, "Failed to initialize COM."); | 344 | BalExitOnFailure(hr, "Failed to initialize COM."); |
351 | fComInitialized = TRUE; | 345 | fComInitialized = TRUE; |
352 | 346 | ||
353 | hr = pThis->InitializeData(); | ||
354 | BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application."); | ||
355 | |||
356 | // Create main window. | 347 | // Create main window. |
357 | hr = pThis->CreateMainWindow(); | 348 | hr = pThis->CreateMainWindow(); |
358 | BalExitOnFailure(hr, "Failed to create main window."); | 349 | BalExitOnFailure(hr, "Failed to create internal UI bootstrapper application main window."); |
359 | 350 | ||
360 | ::PostMessageW(pThis->m_hWnd, WM_WIXIUIBA_DETECT_PACKAGES, 0, 0); | 351 | ::PostMessageW(pThis->m_hWnd, WM_WIXIUIBA_DETECT_PACKAGES, 0, 0); |
361 | 352 | ||
@@ -428,6 +419,9 @@ private: | |||
428 | HRESULT hr = S_OK; | 419 | HRESULT hr = S_OK; |
429 | IXMLDOMDocument* pixdManifest = NULL; | 420 | IXMLDOMDocument* pixdManifest = NULL; |
430 | 421 | ||
422 | hr = XmlInitialize(); | ||
423 | BalExitOnFailure(hr, "Failed to initialize XML."); | ||
424 | |||
431 | hr = BalManifestLoad(m_hModule, &pixdManifest); | 425 | hr = BalManifestLoad(m_hModule, &pixdManifest); |
432 | BalExitOnFailure(hr, "Failed to load bootstrapper application manifest."); | 426 | BalExitOnFailure(hr, "Failed to load bootstrapper application manifest."); |
433 | 427 | ||
@@ -580,13 +574,13 @@ private: | |||
580 | 574 | ||
581 | // If the UI should be visible, allow it to be visible and activated so we are the foreground window. | 575 | // If the UI should be visible, allow it to be visible and activated so we are the foreground window. |
582 | // This allows the UAC prompt and MSI UI to automatically be activated. | 576 | // This allows the UAC prompt and MSI UI to automatically be activated. |
583 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 577 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
584 | { | 578 | { |
585 | dwWindowStyle |= WS_VISIBLE; | 579 | dwWindowStyle |= WS_VISIBLE; |
586 | } | 580 | } |
587 | 581 | ||
588 | m_hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, dwWindowStyle, 0, 0, 0, 0, HWND_DESKTOP, NULL, m_hModule, this); | 582 | m_hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, dwWindowStyle, 0, 0, 0, 0, HWND_DESKTOP, NULL, m_hModule, this); |
589 | ExitOnNullWithLastError(m_hWnd, hr, "Failed to create window."); | 583 | ExitOnNullWithLastError(m_hWnd, hr, "Failed to create internal UI main window."); |
590 | 584 | ||
591 | LExit: | 585 | LExit: |
592 | return hr; | 586 | return hr; |
@@ -799,14 +793,12 @@ public: | |||
799 | // Constructor - initialize member variables. | 793 | // Constructor - initialize member variables. |
800 | // | 794 | // |
801 | CWixInternalUIBootstrapperApplication( | 795 | CWixInternalUIBootstrapperApplication( |
802 | __in HMODULE hModule, | 796 | __in HMODULE hModule |
803 | __in_opt PREQBA_DATA* pPrereqData, | 797 | ) : CBalBaseBootstrapperApplication(3, 3000) |
804 | __in IBootstrapperEngine* pEngine | ||
805 | ) : CBalBaseBootstrapperApplication(pEngine, 3, 3000) | ||
806 | { | 798 | { |
807 | m_hModule = hModule; | 799 | m_hModule = hModule; |
808 | m_command = { }; | 800 | m_commandAction = BOOTSTRAPPER_ACTION_UNKNOWN; |
809 | m_createArgs = { }; | 801 | m_commandDisplay = BOOTSTRAPPER_DISPLAY_UNKNOWN; |
810 | 802 | ||
811 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; | 803 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; |
812 | 804 | ||
@@ -827,10 +819,6 @@ public: | |||
827 | m_fApplied = FALSE; | 819 | m_fApplied = FALSE; |
828 | m_fAutomaticRemoval = FALSE; | 820 | m_fAutomaticRemoval = FALSE; |
829 | m_fFailedToLoadPackage = FALSE; | 821 | m_fFailedToLoadPackage = FALSE; |
830 | m_pPrereqData = pPrereqData; | ||
831 | |||
832 | pEngine->AddRef(); | ||
833 | m_pEngine = pEngine; | ||
834 | } | 822 | } |
835 | 823 | ||
836 | 824 | ||
@@ -849,9 +837,9 @@ public: | |||
849 | 837 | ||
850 | private: | 838 | private: |
851 | HMODULE m_hModule; | 839 | HMODULE m_hModule; |
852 | BOOTSTRAPPER_CREATE_ARGS m_createArgs; | 840 | BOOTSTRAPPER_ACTION m_commandAction; |
853 | BOOTSTRAPPER_COMMAND m_command; | 841 | BOOTSTRAPPER_DISPLAY m_commandDisplay; |
854 | IBootstrapperEngine* m_pEngine; | 842 | |
855 | BOOTSTRAPPER_ACTION m_plannedAction; | 843 | BOOTSTRAPPER_ACTION m_plannedAction; |
856 | 844 | ||
857 | BAL_INFO_BUNDLE m_Bundle; | 845 | BAL_INFO_BUNDLE m_Bundle; |
@@ -871,48 +859,27 @@ private: | |||
871 | BOOL m_fApplied; | 859 | BOOL m_fApplied; |
872 | BOOL m_fAutomaticRemoval; | 860 | BOOL m_fAutomaticRemoval; |
873 | BOOL m_fFailedToLoadPackage; | 861 | BOOL m_fFailedToLoadPackage; |
874 | PREQBA_DATA* m_pPrereqData; | ||
875 | }; | 862 | }; |
876 | 863 | ||
877 | 864 | ||
878 | // | 865 | // |
879 | // CreateBootstrapperApplication - creates a new IBootstrapperApplication object. | 866 | // CreateBootstrapperApplication - creates a new IBootstrapperApplication object. |
880 | // | 867 | // |
881 | HRESULT CreateBootstrapperApplication( | 868 | EXTERN_C HRESULT CreateWixInternalUIBootstrapperApplication( |
882 | __in HMODULE hModule, | 869 | __in HMODULE hInstance, |
883 | __in_opt PREQBA_DATA* pPrereqData, | ||
884 | __in IBootstrapperEngine* pEngine, | ||
885 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
886 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
887 | __out IBootstrapperApplication** ppApplication | 870 | __out IBootstrapperApplication** ppApplication |
888 | ) | 871 | ) |
889 | { | 872 | { |
890 | HRESULT hr = S_OK; | 873 | HRESULT hr = S_OK; |
891 | CWixInternalUIBootstrapperApplication* pApplication = NULL; | ||
892 | 874 | ||
893 | pApplication = new CWixInternalUIBootstrapperApplication(hModule, pPrereqData, pEngine); | 875 | CWixInternalUIBootstrapperApplication* pApplication = new CWixInternalUIBootstrapperApplication(hInstance); |
894 | BalExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new InternalUI bootstrapper application object."); | 876 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new internal UI bootstrapper application."); |
895 | 877 | ||
896 | hr = pApplication->Initialize(pArgs); | 878 | hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication)); |
897 | ExitOnFailure(hr, "CWixInternalUIBootstrapperApplication initialization failed."); | 879 | ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication."); |
898 | |||
899 | pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; | ||
900 | pResults->pvBootstrapperApplicationProcContext = pApplication; | ||
901 | *ppApplication = pApplication; | ||
902 | pApplication = NULL; | ||
903 | 880 | ||
904 | LExit: | 881 | LExit: |
905 | ReleaseObject(pApplication); | 882 | ReleaseObject(pApplication); |
906 | return hr; | ||
907 | } | ||
908 | |||
909 | 883 | ||
910 | void DestroyBootstrapperApplication( | 884 | return hr; |
911 | __in IBootstrapperApplication* pApplication, | ||
912 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
913 | __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
914 | ) | ||
915 | { | ||
916 | CWixInternalUIBootstrapperApplication* pBA = (CWixInternalUIBootstrapperApplication*)pApplication; | ||
917 | pBA->Uninitialize(pArgs, pResults); | ||
918 | } | 885 | } |
diff --git a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index e4eee002..233cabbc 100644 --- a/src/ext/Bal/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | |||
@@ -1,7 +1,6 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | #include "BalBaseBootstrapperApplicationProc.h" | ||
5 | #include "BalBaseBootstrapperApplication.h" | 4 | #include "BalBaseBootstrapperApplication.h" |
6 | 5 | ||
7 | static const LPCWSTR WIXBUNDLE_VARIABLE_CANRESTART = L"WixCanRestart"; | 6 | static const LPCWSTR WIXBUNDLE_VARIABLE_CANRESTART = L"WixCanRestart"; |
@@ -182,7 +181,66 @@ static LPCSTR LoggingMsiFeatureStateToString( | |||
182 | class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication | 181 | class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication |
183 | { | 182 | { |
184 | public: // IBootstrapperApplication | 183 | public: // IBootstrapperApplication |
185 | virtual STDMETHODIMP OnStartup() | 184 | STDMETHODIMP OnCreate( |
185 | __in IBootstrapperEngine* pEngine, | ||
186 | __in BOOTSTRAPPER_COMMAND* pCommand | ||
187 | ) | ||
188 | { | ||
189 | HRESULT hr = S_OK; | ||
190 | |||
191 | hr = __super::OnCreate(pEngine, pCommand); | ||
192 | BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); | ||
193 | |||
194 | m_commandAction = pCommand->action; | ||
195 | m_commandDisplay = pCommand->display; | ||
196 | m_commandResumeType = pCommand->resumeType; | ||
197 | m_commandRelationType = pCommand->relationType; | ||
198 | m_hwndSplashScreen = pCommand->hwndSplashScreen; | ||
199 | |||
200 | hr = BalGetStringVariable(L"WixBundleVersion", &m_sczBundleVersion); | ||
201 | BalExitOnFailure(hr, "CWixStandardBootstrapperApplication initialization failed."); | ||
202 | |||
203 | hr = InitializeData(pCommand); | ||
204 | BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application."); | ||
205 | |||
206 | LExit: | ||
207 | return hr; | ||
208 | } | ||
209 | |||
210 | STDMETHODIMP OnDestroy( | ||
211 | __in BOOL fReload | ||
212 | ) | ||
213 | { | ||
214 | if (m_hBAFModule) | ||
215 | { | ||
216 | BA_FUNCTIONS_DESTROY_ARGS args = { }; | ||
217 | BA_FUNCTIONS_DESTROY_RESULTS results = { }; | ||
218 | |||
219 | args.cbSize = sizeof(BA_FUNCTIONS_DESTROY_ARGS); | ||
220 | args.fReload = fReload; | ||
221 | |||
222 | results.cbSize = sizeof(BA_FUNCTIONS_DESTROY_RESULTS); | ||
223 | |||
224 | PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy")); | ||
225 | if (pfnBAFunctionsDestroy) | ||
226 | { | ||
227 | pfnBAFunctionsDestroy(&args, &results); | ||
228 | } | ||
229 | |||
230 | if (!results.fDisableUnloading) | ||
231 | { | ||
232 | m_pfnBAFunctionsProc = NULL; | ||
233 | m_pvBAFunctionsProcContext = NULL; | ||
234 | |||
235 | ::FreeLibrary(m_hBAFModule); | ||
236 | m_hBAFModule = NULL; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | return __super::OnDestroy(fReload); | ||
241 | } | ||
242 | |||
243 | STDMETHODIMP OnStartup() | ||
186 | { | 244 | { |
187 | HRESULT hr = S_OK; | 245 | HRESULT hr = S_OK; |
188 | DWORD dwUIThreadId = 0; | 246 | DWORD dwUIThreadId = 0; |
@@ -199,7 +257,7 @@ public: // IBootstrapperApplication | |||
199 | } | 257 | } |
200 | 258 | ||
201 | 259 | ||
202 | virtual STDMETHODIMP OnShutdown( | 260 | STDMETHODIMP OnShutdown( |
203 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction | 261 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction |
204 | ) | 262 | ) |
205 | { | 263 | { |
@@ -233,7 +291,6 @@ public: // IBootstrapperApplication | |||
233 | ? "The prerequisites were successfully installed. The bootstrapper application will be reloaded." | 291 | ? "The prerequisites were successfully installed. The bootstrapper application will be reloaded." |
234 | : "The prerequisites were already installed. The bootstrapper application will be reloaded."); | 292 | : "The prerequisites were already installed. The bootstrapper application will be reloaded."); |
235 | *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; | 293 | *pAction = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; |
236 | m_pPrereqData->fCompleted = TRUE; | ||
237 | } | 294 | } |
238 | else if (m_fPrereq) | 295 | else if (m_fPrereq) |
239 | { | 296 | { |
@@ -255,38 +312,24 @@ public: // IBootstrapperApplication | |||
255 | 312 | ||
256 | if (m_fPrereq) | 313 | if (m_fPrereq) |
257 | { | 314 | { |
258 | if (m_pPrereqData->fPerformLayout && BOOTSTRAPPER_ACTION_LAYOUT == m_command.action) | 315 | // Pre-requisite command action is set during initialization. |
259 | { | ||
260 | // The parent BA has requested that this BA be in charge of layout. | ||
261 | m_fPrereq = FALSE; | ||
262 | } | ||
263 | else | ||
264 | { | ||
265 | m_fPreplanPrereqs = m_pPrereqData->fAlwaysInstallPrereqs; | ||
266 | |||
267 | // Pre-req BA should only show help or do an install (to launch the parent BA which can then do the right action). | ||
268 | if (BOOTSTRAPPER_ACTION_HELP != m_command.action) | ||
269 | { | ||
270 | m_command.action = BOOTSTRAPPER_ACTION_INSTALL; | ||
271 | } | ||
272 | } | ||
273 | } | 316 | } |
274 | else if (BOOTSTRAPPER_DISPLAY_FULL <= m_command.display) // only modify the action state if showing full UI. | 317 | else if (BOOTSTRAPPER_DISPLAY_FULL <= m_commandDisplay) // only modify the action state if showing full UI. |
275 | { | 318 | { |
276 | // Maybe modify the action state if the bundle is or is not already installed. | 319 | // Maybe modify the action state if the bundle is or is not already installed. |
277 | if (fInstalled && BOOTSTRAPPER_RESUME_TYPE_REBOOT != m_command.resumeType && BOOTSTRAPPER_ACTION_INSTALL == m_command.action) | 320 | if (fInstalled && BOOTSTRAPPER_RESUME_TYPE_REBOOT != m_commandResumeType && BOOTSTRAPPER_ACTION_INSTALL == m_commandAction) |
278 | { | 321 | { |
279 | m_command.action = BOOTSTRAPPER_ACTION_MODIFY; | 322 | m_commandAction = BOOTSTRAPPER_ACTION_MODIFY; |
280 | } | 323 | } |
281 | else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_command.action || BOOTSTRAPPER_ACTION_REPAIR == m_command.action)) | 324 | else if (!fInstalled && (BOOTSTRAPPER_ACTION_MODIFY == m_commandAction || BOOTSTRAPPER_ACTION_REPAIR == m_commandAction)) |
282 | { | 325 | { |
283 | m_command.action = BOOTSTRAPPER_ACTION_INSTALL; | 326 | m_commandAction = BOOTSTRAPPER_ACTION_INSTALL; |
284 | } | 327 | } |
285 | } | 328 | } |
286 | 329 | ||
287 | // When resuming from restart doing some install-like operation, try to find the package that forced the | 330 | // When resuming from restart doing some install-like operation, try to find the package that forced the |
288 | // restart. We'll use this information during planning. | 331 | // restart. We'll use this information during planning. |
289 | if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType && BOOTSTRAPPER_ACTION_UNINSTALL < m_command.action) | 332 | if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType && BOOTSTRAPPER_ACTION_UNINSTALL < m_commandAction) |
290 | { | 333 | { |
291 | // Ensure the forced restart package variable is null when it is an empty string. | 334 | // Ensure the forced restart package variable is null when it is an empty string. |
292 | hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &m_sczAfterForcedRestartPackage); | 335 | hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &m_sczAfterForcedRestartPackage); |
@@ -301,7 +344,7 @@ public: // IBootstrapperApplication | |||
301 | if (!m_fPreplanPrereqs) | 344 | if (!m_fPreplanPrereqs) |
302 | { | 345 | { |
303 | // If the UI should be visible, display it now and hide the splash screen | 346 | // If the UI should be visible, display it now and hide the splash screen |
304 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 347 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
305 | { | 348 | { |
306 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); | 349 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); |
307 | } | 350 | } |
@@ -330,7 +373,7 @@ public: // IBootstrapperApplication | |||
330 | // Best effort | 373 | // Best effort |
331 | } | 374 | } |
332 | 375 | ||
333 | if (BOOTSTRAPPER_ACTION_INSTALL == m_command.action && BOOTSTRAPPER_RELATION_UPGRADE != m_command.relationType && BOOTSTRAPPER_RELATION_UPGRADE == relationType) | 376 | if (BOOTSTRAPPER_ACTION_INSTALL == m_commandAction && BOOTSTRAPPER_RELATION_UPGRADE != m_commandRelationType && BOOTSTRAPPER_RELATION_UPGRADE == relationType) |
334 | { | 377 | { |
335 | int nResult = 0; | 378 | int nResult = 0; |
336 | HRESULT hr = VerCompareStringVersions(m_sczBundleVersion, wzVersion, TRUE/*fStrict*/, &nResult); | 379 | HRESULT hr = VerCompareStringVersions(m_sczBundleVersion, wzVersion, TRUE/*fStrict*/, &nResult); |
@@ -362,7 +405,7 @@ public: // IBootstrapperApplication | |||
362 | // Try update detection only if we have a potential update source and are in full UI mode. | 405 | // Try update detection only if we have a potential update source and are in full UI mode. |
363 | *pfSkip = !wzUpdateLocation | 406 | *pfSkip = !wzUpdateLocation |
364 | || !*wzUpdateLocation | 407 | || !*wzUpdateLocation |
365 | || BOOTSTRAPPER_DISPLAY_FULL != m_command.display; | 408 | || BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay; |
366 | 409 | ||
367 | ThemeShowControl(m_pControlCheckingForUpdatesLabel, *pfSkip ? SW_HIDE : SW_SHOW); | 410 | ThemeShowControl(m_pControlCheckingForUpdatesLabel, *pfSkip ? SW_HIDE : SW_SHOW); |
368 | 411 | ||
@@ -390,6 +433,9 @@ public: // IBootstrapperApplication | |||
390 | 433 | ||
391 | HRESULT hr = S_OK; | 434 | HRESULT hr = S_OK; |
392 | int nResult = 0; | 435 | int nResult = 0; |
436 | UUID guid = { }; | ||
437 | WCHAR wzUpdatePackageId[39]; | ||
438 | RPC_STATUS rs = RPC_S_OK; | ||
393 | 439 | ||
394 | hr = VerCompareStringVersions(m_sczBundleVersion, wzUpdateVersion, TRUE/*fStrict*/, &nResult); | 440 | hr = VerCompareStringVersions(m_sczBundleVersion, wzUpdateVersion, TRUE/*fStrict*/, &nResult); |
395 | BalExitOnFailure(hr, "Failed to compare bundle version: %ls to update version: %ls.", m_sczBundleVersion, wzUpdateVersion); | 441 | BalExitOnFailure(hr, "Failed to compare bundle version: %ls to update version: %ls.", m_sczBundleVersion, wzUpdateVersion); |
@@ -405,11 +451,23 @@ public: // IBootstrapperApplication | |||
405 | { | 451 | { |
406 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: Update v%ls for bundle v%ls available from: %ls.", wzUpdateVersion, m_sczBundleVersion, wzUpdateLocation); | 452 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: Update v%ls for bundle v%ls available from: %ls.", wzUpdateVersion, m_sczBundleVersion, wzUpdateLocation); |
407 | 453 | ||
454 | rs = ::UuidCreate(&guid); | ||
455 | hr = HRESULT_FROM_RPC(rs); | ||
456 | ExitOnFailure(hr, "Failed to generate bundle update package id."); | ||
457 | |||
458 | if (!::StringFromGUID2(guid, wzUpdatePackageId, countof(wzUpdatePackageId))) | ||
459 | { | ||
460 | hr = E_OUTOFMEMORY; | ||
461 | ExitOnRootFailure(hr, "Failed to create string from bundle update package id."); | ||
462 | } | ||
463 | |||
408 | hr = BalSetVersionVariable(WIXSTDBA_VARIABLE_UPDATE_AVAILABLE, wzUpdateVersion); | 464 | hr = BalSetVersionVariable(WIXSTDBA_VARIABLE_UPDATE_AVAILABLE, wzUpdateVersion); |
409 | BalExitOnFailure(hr, "Failed to set WixStdBAUpdateAvailable value: %ls.", wzUpdateVersion); | 465 | BalExitOnFailure(hr, "Failed to set WixStdBAUpdateAvailable value: %ls.", wzUpdateVersion); |
410 | 466 | ||
411 | hr = m_pEngine->SetUpdate(NULL, wzUpdateLocation, dw64Size, hashAlgorithm, wzHash); | 467 | hr = m_pEngine->SetUpdate(NULL, wzUpdateLocation, dw64Size, hashAlgorithm, wzHash, wzUpdatePackageId); |
412 | BalExitOnFailure(hr, "Failed to set update location: %ls.", wzUpdateLocation); | 468 | BalExitOnFailure(hr, "Failed to set update location: %ls.", wzUpdateLocation); |
469 | |||
470 | BalInfoAddUpdateBundleAsPackage(&m_Bundle.packages, wzUpdatePackageId, NULL); | ||
413 | } | 471 | } |
414 | 472 | ||
415 | LExit: | 473 | LExit: |
@@ -447,15 +505,15 @@ public: // IBootstrapperApplication | |||
447 | // If we're not interacting with the user or we're doing a layout or we're resuming just after a force restart | 505 | // If we're not interacting with the user or we're doing a layout or we're resuming just after a force restart |
448 | // then automatically start planning. | 506 | // then automatically start planning. |
449 | BOOL fSkipToPlan = SUCCEEDED(hrStatus) && | 507 | BOOL fSkipToPlan = SUCCEEDED(hrStatus) && |
450 | (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || | 508 | (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || |
451 | BOOTSTRAPPER_ACTION_LAYOUT == m_command.action || | 509 | BOOTSTRAPPER_ACTION_LAYOUT == m_commandAction || |
452 | BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType); | 510 | BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType); |
453 | 511 | ||
454 | // If we're requiring user input (which currently means Install, Repair, or Uninstall) | 512 | // If we're requiring user input (which currently means Install, Repair, or Uninstall) |
455 | // or if we're skipping to an action that modifies machine state | 513 | // or if we're skipping to an action that modifies machine state |
456 | // then evaluate conditions. | 514 | // then evaluate conditions. |
457 | BOOL fEvaluateConditions = SUCCEEDED(hrStatus) && | 515 | BOOL fEvaluateConditions = SUCCEEDED(hrStatus) && |
458 | (!fSkipToPlan || BOOTSTRAPPER_ACTION_LAYOUT < m_command.action && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_command.action); | 516 | (!fSkipToPlan || BOOTSTRAPPER_ACTION_LAYOUT < m_commandAction && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > m_commandAction); |
459 | 517 | ||
460 | if (fEvaluateConditions) | 518 | if (fEvaluateConditions) |
461 | { | 519 | { |
@@ -472,7 +530,7 @@ public: // IBootstrapperApplication | |||
472 | } | 530 | } |
473 | else if (fSkipToPlan) | 531 | else if (fSkipToPlan) |
474 | { | 532 | { |
475 | ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PACKAGES, 0, m_command.action); | 533 | ::PostMessageW(m_hWnd, WM_WIXSTDBA_PLAN_PACKAGES, 0, m_commandAction); |
476 | } | 534 | } |
477 | } | 535 | } |
478 | 536 | ||
@@ -596,7 +654,7 @@ public: // IBootstrapperApplication | |||
596 | BOOL fShowInternalUI = FALSE; | 654 | BOOL fShowInternalUI = FALSE; |
597 | INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE; | 655 | INSTALLUILEVEL uiLevel = INSTALLUILEVEL_NOCHANGE; |
598 | 656 | ||
599 | switch (m_command.display) | 657 | switch (m_commandDisplay) |
600 | { | 658 | { |
601 | case BOOTSTRAPPER_DISPLAY_FULL: | 659 | case BOOTSTRAPPER_DISPLAY_FULL: |
602 | uiLevel = INSTALLUILEVEL_FULL; | 660 | uiLevel = INSTALLUILEVEL_FULL; |
@@ -662,7 +720,7 @@ public: // IBootstrapperApplication | |||
662 | SetState(WIXSTDBA_STATE_APPLIED, S_OK); | 720 | SetState(WIXSTDBA_STATE_APPLIED, S_OK); |
663 | ExitFunction(); | 721 | ExitFunction(); |
664 | } | 722 | } |
665 | else if (BOOTSTRAPPER_ACTION_HELP == m_command.action) | 723 | else if (BOOTSTRAPPER_ACTION_HELP == m_commandAction) |
666 | { | 724 | { |
667 | // If prereq packages were planned then the managed BA probably can't be loaded, so show the help from this BA. | 725 | // If prereq packages were planned then the managed BA probably can't be loaded, so show the help from this BA. |
668 | 726 | ||
@@ -687,15 +745,15 @@ public: // IBootstrapperApplication | |||
687 | if (fPreplannedPrereqs) | 745 | if (fPreplannedPrereqs) |
688 | { | 746 | { |
689 | // If the UI should be visible, display it now and hide the splash screen | 747 | // If the UI should be visible, display it now and hide the splash screen |
690 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 748 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
691 | { | 749 | { |
692 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); | 750 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); |
693 | } | 751 | } |
694 | 752 | ||
695 | m_pEngine->CloseSplashScreen(); | 753 | m_pEngine->CloseSplashScreen(); |
696 | 754 | ||
697 | fApply = BOOTSTRAPPER_DISPLAY_FULL > m_command.display || | 755 | fApply = BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || |
698 | BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_command.resumeType; | 756 | BOOTSTRAPPER_RESUME_TYPE_REBOOT == m_commandResumeType; |
699 | } | 757 | } |
700 | 758 | ||
701 | if (fApply) | 759 | if (fApply) |
@@ -958,7 +1016,7 @@ public: // IBootstrapperApplication | |||
958 | int nResult = *pResult; | 1016 | int nResult = *pResult; |
959 | LPWSTR sczError = NULL; | 1017 | LPWSTR sczError = NULL; |
960 | 1018 | ||
961 | if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_command.display) | 1019 | if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_commandDisplay) |
962 | { | 1020 | { |
963 | hr = m_pEngine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult); | 1021 | hr = m_pEngine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult); |
964 | if (FAILED(hr)) | 1022 | if (FAILED(hr)) |
@@ -966,7 +1024,7 @@ public: // IBootstrapperApplication | |||
966 | nResult = IDERROR; | 1024 | nResult = IDERROR; |
967 | } | 1025 | } |
968 | } | 1026 | } |
969 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) | 1027 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) |
970 | { | 1028 | { |
971 | // If this is an authentication failure, let the engine try to handle it for us. | 1029 | // If this is an authentication failure, let the engine try to handle it for us. |
972 | if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) | 1030 | if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) |
@@ -1029,7 +1087,7 @@ public: // IBootstrapperApplication | |||
1029 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage); | 1087 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "WIXSTDBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage); |
1030 | #endif | 1088 | #endif |
1031 | 1089 | ||
1032 | if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display && (INSTALLMESSAGE_WARNING == messageType || INSTALLMESSAGE_USER == messageType)) | 1090 | if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay && (INSTALLMESSAGE_WARNING == messageType || INSTALLMESSAGE_USER == messageType)) |
1033 | { | 1091 | { |
1034 | if (!m_fShowingInternalUiThisPackage) | 1092 | if (!m_fShowingInternalUiThisPackage) |
1035 | { | 1093 | { |
@@ -1174,7 +1232,7 @@ public: // IBootstrapperApplication | |||
1174 | __inout int* pResult | 1232 | __inout int* pResult |
1175 | ) | 1233 | ) |
1176 | { | 1234 | { |
1177 | 1235 | ||
1178 | if (!m_fShowingInternalUiThisPackage && wzPackageId && *wzPackageId) | 1236 | if (!m_fShowingInternalUiThisPackage && wzPackageId && *wzPackageId) |
1179 | { | 1237 | { |
1180 | BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Package %ls has %d applications holding files in use.", wzPackageId, cFiles); | 1238 | BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Package %ls has %d applications holding files in use.", wzPackageId, cFiles); |
@@ -1273,7 +1331,7 @@ public: // IBootstrapperApplication | |||
1273 | HRESULT hr = S_OK; | 1331 | HRESULT hr = S_OK; |
1274 | LPWSTR sczPath = NULL; | 1332 | LPWSTR sczPath = NULL; |
1275 | 1333 | ||
1276 | if (BOOTSTRAPPER_CACHE_RESOLVE_NONE == *pAction && BOOTSTRAPPER_DISPLAY_FULL == m_command.display) // prompt to change the source location. | 1334 | if (BOOTSTRAPPER_CACHE_RESOLVE_NONE == *pAction && BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) // prompt to change the source location. |
1277 | { | 1335 | { |
1278 | static COMDLG_FILTERSPEC vrgFilters[] = | 1336 | static COMDLG_FILTERSPEC vrgFilters[] = |
1279 | { | 1337 | { |
@@ -1318,7 +1376,7 @@ public: // IBootstrapperApplication | |||
1318 | m_fShouldRestart = m_fRestartRequired && BAL_INFO_RESTART_NEVER < m_BalInfoCommand.restart; | 1376 | m_fShouldRestart = m_fRestartRequired && BAL_INFO_RESTART_NEVER < m_BalInfoCommand.restart; |
1319 | 1377 | ||
1320 | // Automatically restart if we're not displaying a UI or the command line said to always allow restarts. | 1378 | // Automatically restart if we're not displaying a UI or the command line said to always allow restarts. |
1321 | m_fAllowRestart = m_fShouldRestart && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BAL_INFO_RESTART_PROMPT < m_BalInfoCommand.restart); | 1379 | m_fAllowRestart = m_fShouldRestart && (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || BAL_INFO_RESTART_PROMPT < m_BalInfoCommand.restart); |
1322 | 1380 | ||
1323 | if (m_fPrereq) | 1381 | if (m_fPrereq) |
1324 | { | 1382 | { |
@@ -1326,7 +1384,7 @@ public: // IBootstrapperApplication | |||
1326 | } | 1384 | } |
1327 | 1385 | ||
1328 | // If we are showing UI, wait a beat before moving to the final screen. | 1386 | // If we are showing UI, wait a beat before moving to the final screen. |
1329 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 1387 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
1330 | { | 1388 | { |
1331 | ::Sleep(250); | 1389 | ::Sleep(250); |
1332 | } | 1390 | } |
@@ -1359,23 +1417,6 @@ public: // IBootstrapperApplication | |||
1359 | return hr; | 1417 | return hr; |
1360 | } | 1418 | } |
1361 | 1419 | ||
1362 | virtual STDMETHODIMP OnSetUpdateComplete( | ||
1363 | __in HRESULT hrStatus, | ||
1364 | __in_z_opt LPCWSTR wzPreviousPackageId, | ||
1365 | __in_z_opt LPCWSTR wzNewPackageId | ||
1366 | ) | ||
1367 | { | ||
1368 | BAL_INFO_PACKAGE* pPackage = NULL; | ||
1369 | |||
1370 | if (SUCCEEDED(hrStatus) && wzNewPackageId) | ||
1371 | { | ||
1372 | BalInfoAddUpdateBundleAsPackage(&m_Bundle.packages, wzNewPackageId, wzPreviousPackageId, &pPackage); | ||
1373 | // Best effort | ||
1374 | } | ||
1375 | |||
1376 | return S_OK; | ||
1377 | } | ||
1378 | |||
1379 | 1420 | ||
1380 | virtual STDMETHODIMP OnElevateComplete( | 1421 | virtual STDMETHODIMP OnElevateComplete( |
1381 | __in HRESULT hrStatus | 1422 | __in HRESULT hrStatus |
@@ -1402,9 +1443,8 @@ public: // IBootstrapperApplication | |||
1402 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | 1443 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, |
1403 | __in const LPVOID pvArgs, | 1444 | __in const LPVOID pvArgs, |
1404 | __inout LPVOID pvResults, | 1445 | __inout LPVOID pvResults, |
1405 | __inout HRESULT* phr, | 1446 | __inout HRESULT* phr |
1406 | __in_opt LPVOID /*pvContext*/ | 1447 | ) |
1407 | ) | ||
1408 | { | 1448 | { |
1409 | if (!m_pfnBAFunctionsProc || FAILED(*phr)) | 1449 | if (!m_pfnBAFunctionsProc || FAILED(*phr)) |
1410 | { | 1450 | { |
@@ -1414,6 +1454,18 @@ public: // IBootstrapperApplication | |||
1414 | // Always log before and after so we don't get blamed when BAFunctions changes something. | 1454 | // Always log before and after so we don't get blamed when BAFunctions changes something. |
1415 | switch (message) | 1455 | switch (message) |
1416 | { | 1456 | { |
1457 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE: | ||
1458 | // Functions do not get ONCREATE, they get these parameters when created directly. | ||
1459 | break; | ||
1460 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY: | ||
1461 | OnDestroyFallback(reinterpret_cast<BA_ONDESTROY_ARGS*>(pvArgs), reinterpret_cast<BA_ONDESTROY_RESULTS*>(pvResults)); | ||
1462 | break; | ||
1463 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP: | ||
1464 | OnStartupFallback(reinterpret_cast<BA_ONSTARTUP_ARGS*>(pvArgs), reinterpret_cast<BA_ONSTARTUP_RESULTS*>(pvResults)); | ||
1465 | break; | ||
1466 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN: | ||
1467 | OnShutdownFallback(reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults)); | ||
1468 | break; | ||
1417 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN: | 1469 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN: |
1418 | OnDetectBeginFallback(reinterpret_cast<BA_ONDETECTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTBEGIN_RESULTS*>(pvResults)); | 1470 | OnDetectBeginFallback(reinterpret_cast<BA_ONDETECTBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTBEGIN_RESULTS*>(pvResults)); |
1419 | break; | 1471 | break; |
@@ -1426,11 +1478,6 @@ public: // IBootstrapperApplication | |||
1426 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE: | 1478 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE: |
1427 | OnPlanCompleteFallback(reinterpret_cast<BA_ONPLANCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPLETE_RESULTS*>(pvResults)); | 1479 | OnPlanCompleteFallback(reinterpret_cast<BA_ONPLANCOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANCOMPLETE_RESULTS*>(pvResults)); |
1428 | break; | 1480 | break; |
1429 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP: // BAFunctions is loaded during this event on a separate thread so it's not possible to forward it. | ||
1430 | break; | ||
1431 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN: | ||
1432 | OnShutdownFallback(reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults)); | ||
1433 | break; | ||
1434 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: | 1481 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: |
1435 | OnDetectForwardCompatibleBundleFallback(reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); | 1482 | OnDetectForwardCompatibleBundleFallback(reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); |
1436 | break; | 1483 | break; |
@@ -1626,12 +1673,6 @@ public: // IBootstrapperApplication | |||
1626 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY: | 1673 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY: |
1627 | OnPlanRollbackBoundaryFallback(reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_RESULTS*>(pvResults)); | 1674 | OnPlanRollbackBoundaryFallback(reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANROLLBACKBOUNDARY_RESULTS*>(pvResults)); |
1628 | break; | 1675 | break; |
1629 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSETUPDATEBEGIN: | ||
1630 | OnSetUpdateBeginFallback(reinterpret_cast<BA_ONSETUPDATEBEGIN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSETUPDATEBEGIN_RESULTS*>(pvResults)); | ||
1631 | break; | ||
1632 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSETUPDATECOMPLETE: | ||
1633 | OnSetUpdateCompleteFallback(reinterpret_cast<BA_ONSETUPDATECOMPLETE_ARGS*>(pvArgs), reinterpret_cast<BA_ONSETUPDATECOMPLETE_RESULTS*>(pvResults)); | ||
1634 | break; | ||
1635 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE: | 1676 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE: |
1636 | OnDetectCompatibleMsiPackageFallback(reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS*>(pvResults)); | 1677 | OnDetectCompatibleMsiPackageFallback(reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS*>(pvResults)); |
1637 | break; | 1678 | break; |
@@ -1670,6 +1711,30 @@ public: // IBootstrapperApplication | |||
1670 | 1711 | ||
1671 | 1712 | ||
1672 | private: // privates | 1713 | private: // privates |
1714 | void OnDestroyFallback( | ||
1715 | __in BA_ONDESTROY_ARGS* pArgs, | ||
1716 | __inout BA_ONDESTROY_RESULTS* pResults | ||
1717 | ) | ||
1718 | { | ||
1719 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONDESTROY, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
1720 | } | ||
1721 | |||
1722 | void OnStartupFallback( | ||
1723 | __in BA_ONSTARTUP_ARGS* pArgs, | ||
1724 | __inout BA_ONSTARTUP_RESULTS* pResults | ||
1725 | ) | ||
1726 | { | ||
1727 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSTARTUP, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
1728 | } | ||
1729 | |||
1730 | void OnShutdownFallback( | ||
1731 | __in BA_ONSHUTDOWN_ARGS* pArgs, | ||
1732 | __inout BA_ONSHUTDOWN_RESULTS* pResults | ||
1733 | ) | ||
1734 | { | ||
1735 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSHUTDOWN, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
1736 | } | ||
1737 | |||
1673 | void OnDetectBeginFallback( | 1738 | void OnDetectBeginFallback( |
1674 | __in BA_ONDETECTBEGIN_ARGS* pArgs, | 1739 | __in BA_ONDETECTBEGIN_ARGS* pArgs, |
1675 | __inout BA_ONDETECTBEGIN_RESULTS* pResults | 1740 | __inout BA_ONDETECTBEGIN_RESULTS* pResults |
@@ -1702,14 +1767,6 @@ private: // privates | |||
1702 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext); | 1767 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext); |
1703 | } | 1768 | } |
1704 | 1769 | ||
1705 | void OnShutdownFallback( | ||
1706 | __in BA_ONSHUTDOWN_ARGS* pArgs, | ||
1707 | __inout BA_ONSHUTDOWN_RESULTS* pResults | ||
1708 | ) | ||
1709 | { | ||
1710 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSHUTDOWN, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
1711 | } | ||
1712 | |||
1713 | void OnDetectForwardCompatibleBundleFallback( | 1770 | void OnDetectForwardCompatibleBundleFallback( |
1714 | __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, | 1771 | __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, |
1715 | __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults | 1772 | __inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults |
@@ -2272,22 +2329,6 @@ private: // privates | |||
2272 | BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_ROLLBACK_BOUNDARY, m_hModule, pArgs->wzRollbackBoundaryId, LoggingBoolToString(fTransaction), LoggingBoolToString(pResults->fTransaction)); | 2329 | BalLogId(BOOTSTRAPPER_LOG_LEVEL_STANDARD, MSG_WIXSTDBA_PLANNED_ROLLBACK_BOUNDARY, m_hModule, pArgs->wzRollbackBoundaryId, LoggingBoolToString(fTransaction), LoggingBoolToString(pResults->fTransaction)); |
2273 | } | 2330 | } |
2274 | 2331 | ||
2275 | void OnSetUpdateBeginFallback( | ||
2276 | __in BA_ONSETUPDATEBEGIN_ARGS* pArgs, | ||
2277 | __inout BA_ONSETUPDATEBEGIN_RESULTS* pResults | ||
2278 | ) | ||
2279 | { | ||
2280 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSETUPDATEBEGIN, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
2281 | } | ||
2282 | |||
2283 | void OnSetUpdateCompleteFallback( | ||
2284 | __in BA_ONSETUPDATECOMPLETE_ARGS* pArgs, | ||
2285 | __inout BA_ONSETUPDATECOMPLETE_RESULTS* pResults | ||
2286 | ) | ||
2287 | { | ||
2288 | m_pfnBAFunctionsProc(BA_FUNCTIONS_MESSAGE_ONSETUPDATECOMPLETE, pArgs, pResults, m_pvBAFunctionsProcContext); | ||
2289 | } | ||
2290 | |||
2291 | void OnDetectCompatibleMsiPackageFallback( | 2332 | void OnDetectCompatibleMsiPackageFallback( |
2292 | __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs, | 2333 | __in BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS* pArgs, |
2293 | __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults | 2334 | __inout BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS* pResults |
@@ -2375,7 +2416,7 @@ private: // privates | |||
2375 | { | 2416 | { |
2376 | nResult = m_nLastMsiFilesInUseResult; | 2417 | nResult = m_nLastMsiFilesInUseResult; |
2377 | } | 2418 | } |
2378 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) // Only show files in use when using full display mode. | 2419 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) // Only show files in use when using full display mode. |
2379 | { | 2420 | { |
2380 | // See https://docs.microsoft.com/en-us/windows/win32/msi/sending-messages-to-windows-installer-using-msiprocessmessage for details. | 2421 | // See https://docs.microsoft.com/en-us/windows/win32/msi/sending-messages-to-windows-installer-using-msiprocessmessage for details. |
2381 | for (DWORD i = 1; i < cFiles; i += 2) | 2422 | for (DWORD i = 1; i < cFiles; i += 2) |
@@ -2404,7 +2445,7 @@ private: // privates | |||
2404 | } | 2445 | } |
2405 | else | 2446 | else |
2406 | { | 2447 | { |
2407 | // Silent UI level installations always shut down applications and services, | 2448 | // Silent UI level installations always shut down applications and services, |
2408 | // and on Windows Vista and later, use Restart Manager unless disabled. | 2449 | // and on Windows Vista and later, use Restart Manager unless disabled. |
2409 | nResult = IDOK; | 2450 | nResult = IDOK; |
2410 | } | 2451 | } |
@@ -2562,7 +2603,7 @@ private: // privates | |||
2562 | { | 2603 | { |
2563 | nResult = m_nLastNetfxFilesInUseResult; | 2604 | nResult = m_nLastNetfxFilesInUseResult; |
2564 | } | 2605 | } |
2565 | else if (BOOTSTRAPPER_DISPLAY_FULL != m_command.display) // Only show files in use when using full display mode. | 2606 | else if (BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay) // Only show files in use when using full display mode. |
2566 | { | 2607 | { |
2567 | nResult = IDYES; | 2608 | nResult = IDYES; |
2568 | } | 2609 | } |
@@ -2658,58 +2699,6 @@ private: // privates | |||
2658 | return hr; | 2699 | return hr; |
2659 | } | 2700 | } |
2660 | 2701 | ||
2661 | |||
2662 | public: //CBalBaseBootstrapperApplication | ||
2663 | virtual STDMETHODIMP Initialize( | ||
2664 | __in const BOOTSTRAPPER_CREATE_ARGS* pCreateArgs | ||
2665 | ) | ||
2666 | { | ||
2667 | HRESULT hr = S_OK; | ||
2668 | |||
2669 | hr = __super::Initialize(pCreateArgs); | ||
2670 | BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); | ||
2671 | |||
2672 | memcpy_s(&m_command, sizeof(m_command), pCreateArgs->pCommand, sizeof(BOOTSTRAPPER_COMMAND)); | ||
2673 | memcpy_s(&m_createArgs, sizeof(m_createArgs), pCreateArgs, sizeof(BOOTSTRAPPER_CREATE_ARGS)); | ||
2674 | m_createArgs.pCommand = &m_command; | ||
2675 | |||
2676 | hr = BalGetStringVariable(L"WixBundleVersion", &m_sczBundleVersion); | ||
2677 | BalExitOnFailure(hr, "CWixStandardBootstrapperApplication initialization failed."); | ||
2678 | |||
2679 | LExit: | ||
2680 | return hr; | ||
2681 | } | ||
2682 | |||
2683 | void Uninitialize( | ||
2684 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
2685 | __in BOOTSTRAPPER_DESTROY_RESULTS* /*pResults*/ | ||
2686 | ) | ||
2687 | { | ||
2688 | if (m_hBAFModule) | ||
2689 | { | ||
2690 | BA_FUNCTIONS_DESTROY_ARGS args = { }; | ||
2691 | BA_FUNCTIONS_DESTROY_RESULTS results = { }; | ||
2692 | |||
2693 | args.cbSize = sizeof(BA_FUNCTIONS_DESTROY_ARGS); | ||
2694 | args.fReload = pArgs->fReload; | ||
2695 | |||
2696 | results.cbSize = sizeof(BA_FUNCTIONS_DESTROY_RESULTS); | ||
2697 | |||
2698 | PFN_BA_FUNCTIONS_DESTROY pfnBAFunctionsDestroy = reinterpret_cast<PFN_BA_FUNCTIONS_DESTROY>(::GetProcAddress(m_hBAFModule, "BAFunctionsDestroy")); | ||
2699 | if (pfnBAFunctionsDestroy) | ||
2700 | { | ||
2701 | pfnBAFunctionsDestroy(&args, &results); | ||
2702 | } | ||
2703 | |||
2704 | if (!results.fDisableUnloading) | ||
2705 | { | ||
2706 | ::FreeLibrary(m_hBAFModule); | ||
2707 | m_hBAFModule = NULL; | ||
2708 | } | ||
2709 | } | ||
2710 | } | ||
2711 | |||
2712 | |||
2713 | private: | 2702 | private: |
2714 | // | 2703 | // |
2715 | // UiThreadProc - entrypoint for UI thread. | 2704 | // UiThreadProc - entrypoint for UI thread. |
@@ -2731,16 +2720,13 @@ private: | |||
2731 | BalExitOnFailure(hr, "Failed to initialize COM."); | 2720 | BalExitOnFailure(hr, "Failed to initialize COM."); |
2732 | fComInitialized = TRUE; | 2721 | fComInitialized = TRUE; |
2733 | 2722 | ||
2734 | hr = ThemeInitialize(pThis->m_hModule); | 2723 | hr = pThis->InitializeTheme(); |
2735 | BalExitOnFailure(hr, "Failed to initialize theme manager."); | 2724 | BalExitOnFailure(hr, "Failed to initialize theme."); |
2736 | |||
2737 | hr = pThis->InitializeData(); | ||
2738 | BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application."); | ||
2739 | 2725 | ||
2740 | // Create main window. | 2726 | // Create main window. |
2741 | pThis->InitializeTaskbarButton(); | 2727 | pThis->InitializeTaskbarButton(); |
2742 | hr = pThis->CreateMainWindow(); | 2728 | hr = pThis->CreateMainWindow(); |
2743 | BalExitOnFailure(hr, "Failed to create main window."); | 2729 | BalExitOnFailure(hr, "Failed to create wixstdba main window."); |
2744 | 2730 | ||
2745 | if (FAILED(pThis->m_hrFinal)) | 2731 | if (FAILED(pThis->m_hrFinal)) |
2746 | { | 2732 | { |
@@ -2752,7 +2738,7 @@ private: | |||
2752 | // Okay, we're ready for packages now. | 2738 | // Okay, we're ready for packages now. |
2753 | pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr); | 2739 | pThis->SetState(WIXSTDBA_STATE_INITIALIZED, hr); |
2754 | 2740 | ||
2755 | if (pThis->m_fPerformHelp && BOOTSTRAPPER_ACTION_HELP == pThis->m_command.action) | 2741 | if (pThis->m_fHandleHelp && BOOTSTRAPPER_ACTION_HELP == pThis->m_commandAction) |
2756 | { | 2742 | { |
2757 | firstAction = WM_WIXSTDBA_SHOW_HELP; | 2743 | firstAction = WM_WIXSTDBA_SHOW_HELP; |
2758 | } | 2744 | } |
@@ -2828,12 +2814,16 @@ private: | |||
2828 | // | 2814 | // |
2829 | // InitializeData - initializes all the package and prerequisite information. | 2815 | // InitializeData - initializes all the package and prerequisite information. |
2830 | // | 2816 | // |
2831 | HRESULT InitializeData() | 2817 | HRESULT InitializeData( |
2818 | __in BOOTSTRAPPER_COMMAND* pCommand | ||
2819 | ) | ||
2832 | { | 2820 | { |
2833 | HRESULT hr = S_OK; | 2821 | HRESULT hr = S_OK; |
2834 | LPWSTR sczModulePath = NULL; | ||
2835 | IXMLDOMDocument* pixdManifest = NULL; | 2822 | IXMLDOMDocument* pixdManifest = NULL; |
2836 | 2823 | ||
2824 | hr = XmlInitialize(); | ||
2825 | BalExitOnFailure(hr, "Failed to initialize XML."); | ||
2826 | |||
2837 | hr = BalManifestLoad(m_hModule, &pixdManifest); | 2827 | hr = BalManifestLoad(m_hModule, &pixdManifest); |
2838 | BalExitOnFailure(hr, "Failed to load bootstrapper application manifest."); | 2828 | BalExitOnFailure(hr, "Failed to load bootstrapper application manifest."); |
2839 | 2829 | ||
@@ -2843,21 +2833,10 @@ private: | |||
2843 | hr = ProcessCommandLine(&m_sczLanguage); | 2833 | hr = ProcessCommandLine(&m_sczLanguage); |
2844 | ExitOnFailure(hr, "Unknown commandline parameters."); | 2834 | ExitOnFailure(hr, "Unknown commandline parameters."); |
2845 | 2835 | ||
2846 | hr = PathRelativeToModule(&sczModulePath, NULL, m_hModule); | ||
2847 | BalExitOnFailure(hr, "Failed to get module path."); | ||
2848 | |||
2849 | hr = LoadLocalization(sczModulePath, m_sczLanguage); | ||
2850 | ExitOnFailure(hr, "Failed to load localization."); | ||
2851 | |||
2852 | LoadFilesInUse(); | ||
2853 | |||
2854 | hr = LoadTheme(sczModulePath, m_sczLanguage); | ||
2855 | ExitOnFailure(hr, "Failed to load theme."); | ||
2856 | |||
2857 | hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, m_pWixLoc); | 2836 | hr = BalConditionsParseFromXml(&m_Conditions, pixdManifest, m_pWixLoc); |
2858 | BalExitOnFailure(hr, "Failed to load conditions from XML."); | 2837 | BalExitOnFailure(hr, "Failed to load conditions from XML."); |
2859 | 2838 | ||
2860 | hr = LoadBAFunctions(pixdManifest); | 2839 | hr = LoadBAFunctions(pixdManifest, pCommand); |
2861 | BalExitOnFailure(hr, "Failed to load bootstrapper functions."); | 2840 | BalExitOnFailure(hr, "Failed to load bootstrapper functions."); |
2862 | 2841 | ||
2863 | GetBundleFileVersion(); | 2842 | GetBundleFileVersion(); |
@@ -2865,7 +2844,7 @@ private: | |||
2865 | 2844 | ||
2866 | if (m_fPrereq) | 2845 | if (m_fPrereq) |
2867 | { | 2846 | { |
2868 | hr = InitializePrerequisiteInformation(); | 2847 | hr = InitializePrerequisiteInformation(pixdManifest); |
2869 | BalExitOnFailure(hr, "Failed to initialize prerequisite information."); | 2848 | BalExitOnFailure(hr, "Failed to initialize prerequisite information."); |
2870 | } | 2849 | } |
2871 | else | 2850 | else |
@@ -2879,12 +2858,12 @@ private: | |||
2879 | if (m_fSupportCacheOnly) | 2858 | if (m_fSupportCacheOnly) |
2880 | { | 2859 | { |
2881 | // Doesn't make sense to prompt the user if cache only is requested. | 2860 | // Doesn't make sense to prompt the user if cache only is requested. |
2882 | if (BOOTSTRAPPER_DISPLAY_PASSIVE < m_command.display) | 2861 | if (BOOTSTRAPPER_DISPLAY_PASSIVE < m_commandDisplay) |
2883 | { | 2862 | { |
2884 | m_command.display = BOOTSTRAPPER_DISPLAY_PASSIVE; | 2863 | m_commandDisplay = BOOTSTRAPPER_DISPLAY_PASSIVE; |
2885 | } | 2864 | } |
2886 | 2865 | ||
2887 | m_command.action = BOOTSTRAPPER_ACTION_CACHE; | 2866 | m_commandAction = BOOTSTRAPPER_ACTION_CACHE; |
2888 | } | 2867 | } |
2889 | else | 2868 | else |
2890 | { | 2869 | { |
@@ -2894,13 +2873,40 @@ private: | |||
2894 | 2873 | ||
2895 | LExit: | 2874 | LExit: |
2896 | ReleaseObject(pixdManifest); | 2875 | ReleaseObject(pixdManifest); |
2897 | ReleaseStr(sczModulePath); | ||
2898 | 2876 | ||
2899 | return hr; | 2877 | return hr; |
2900 | } | 2878 | } |
2901 | 2879 | ||
2902 | 2880 | ||
2903 | // | 2881 | // |
2882 | // InitializeTheme - initializes the theme information. | ||
2883 | // | ||
2884 | HRESULT InitializeTheme() | ||
2885 | { | ||
2886 | HRESULT hr = S_OK; | ||
2887 | LPWSTR sczModulePath = NULL; | ||
2888 | |||
2889 | hr = ThemeInitialize(m_hModule); | ||
2890 | BalExitOnFailure(hr, "Failed to initialize theme manager."); | ||
2891 | |||
2892 | hr = PathRelativeToModule(&sczModulePath, NULL, m_hModule); | ||
2893 | BalExitOnFailure(hr, "Failed to get module path."); | ||
2894 | |||
2895 | hr = LoadLocalization(sczModulePath, m_sczLanguage); | ||
2896 | ExitOnFailure(hr, "Failed to load localization."); | ||
2897 | |||
2898 | LoadFilesInUse(); | ||
2899 | |||
2900 | hr = LoadTheme(sczModulePath, m_sczLanguage); | ||
2901 | ExitOnFailure(hr, "Failed to load theme."); | ||
2902 | |||
2903 | LExit: | ||
2904 | ReleaseStr(sczModulePath); | ||
2905 | |||
2906 | return hr; | ||
2907 | } | ||
2908 | |||
2909 | // | ||
2904 | // ProcessCommandLine - process the provided command line arguments. | 2910 | // ProcessCommandLine - process the provided command line arguments. |
2905 | // | 2911 | // |
2906 | HRESULT ProcessCommandLine( | 2912 | HRESULT ProcessCommandLine( |
@@ -2972,7 +2978,7 @@ private: | |||
2972 | HRESULT hr = S_OK; | 2978 | HRESULT hr = S_OK; |
2973 | LPWSTR sczLocPath = NULL; | 2979 | LPWSTR sczLocPath = NULL; |
2974 | LPWSTR sczFormatted = NULL; | 2980 | LPWSTR sczFormatted = NULL; |
2975 | LPCWSTR wzLocFileName = m_fPrereq ? L"mbapreq.wxl" : L"thm.wxl"; | 2981 | LPCWSTR wzLocFileName = m_fPrereq ? L"wixpreq.wxl" : L"thm.wxl"; |
2976 | 2982 | ||
2977 | // Find and load .wxl file. | 2983 | // Find and load .wxl file. |
2978 | hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath); | 2984 | hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath); |
@@ -3054,7 +3060,7 @@ private: | |||
3054 | { | 3060 | { |
3055 | HRESULT hr = S_OK; | 3061 | HRESULT hr = S_OK; |
3056 | LPWSTR sczThemePath = NULL; | 3062 | LPWSTR sczThemePath = NULL; |
3057 | LPCWSTR wzThemeFileName = m_fPrereq ? L"mbapreq.thm" : L"thm.xml"; | 3063 | LPCWSTR wzThemeFileName = m_fPrereq ? L"wixpreq.thm" : L"thm.xml"; |
3058 | 3064 | ||
3059 | hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath); | 3065 | hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath); |
3060 | BalExitOnFailure(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath); | 3066 | BalExitOnFailure(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath); |
@@ -3080,10 +3086,51 @@ private: | |||
3080 | } | 3086 | } |
3081 | 3087 | ||
3082 | 3088 | ||
3083 | HRESULT InitializePrerequisiteInformation() | 3089 | HRESULT InitializePrerequisiteInformation( |
3090 | __in IXMLDOMDocument* pixdManifest | ||
3091 | ) | ||
3084 | { | 3092 | { |
3085 | HRESULT hr = S_OK; | 3093 | HRESULT hr = S_OK; |
3086 | BAL_INFO_PACKAGE* pPackage = NULL; | 3094 | BAL_INFO_PACKAGE* pPackage = NULL; |
3095 | IXMLDOMNode* pNode = NULL; | ||
3096 | BOOL fXmlFound = FALSE; | ||
3097 | DWORD dwBool = 0; | ||
3098 | BOOL fHandleLayout = FALSE; | ||
3099 | |||
3100 | // Read any prereq BA data from the BA manifest. | ||
3101 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixPrereqOptions", &pNode); | ||
3102 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to read prereq options from BootstrapperApplication.xml manifest."); | ||
3103 | |||
3104 | if (fXmlFound) | ||
3105 | { | ||
3106 | hr = XmlGetAttributeNumber(pNode, L"Primary", &dwBool); | ||
3107 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@Primary value."); | ||
3108 | |||
3109 | m_fPreplanPrereqs = fXmlFound && (0 != dwBool); | ||
3110 | |||
3111 | hr = XmlGetAttributeNumber(pNode, L"HandleHelp", &dwBool); | ||
3112 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@HandleHelp value."); | ||
3113 | |||
3114 | m_fHandleHelp = fXmlFound && (0 != dwBool); | ||
3115 | |||
3116 | hr = XmlGetAttributeNumber(pNode, L"HandleLayout", &dwBool); | ||
3117 | BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get WixPrereqOptions/@HandleLayout value."); | ||
3118 | |||
3119 | fHandleLayout = fXmlFound && (0 != dwBool); | ||
3120 | } | ||
3121 | |||
3122 | // If pre-req BA has requested that this BA be in charge of layout. | ||
3123 | if (fHandleLayout && BOOTSTRAPPER_ACTION_LAYOUT == m_commandAction) | ||
3124 | { | ||
3125 | m_fPrereq = FALSE; | ||
3126 | ExitFunction(); | ||
3127 | } | ||
3128 | |||
3129 | // Pre-req BA should only show help or do an install (to launch the parent BA which can then do the right action). | ||
3130 | if (BOOTSTRAPPER_ACTION_HELP != m_commandAction) | ||
3131 | { | ||
3132 | m_commandAction = BOOTSTRAPPER_ACTION_INSTALL; | ||
3133 | } | ||
3087 | 3134 | ||
3088 | for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i) | 3135 | for (DWORD i = 0; i < m_Bundle.packages.cPackages; ++i) |
3089 | { | 3136 | { |
@@ -3265,13 +3312,13 @@ private: | |||
3265 | 3312 | ||
3266 | // Calculate the window style based on the theme style and command display value. | 3313 | // Calculate the window style based on the theme style and command display value. |
3267 | dwWindowStyle = m_pTheme->dwStyle; | 3314 | dwWindowStyle = m_pTheme->dwStyle; |
3268 | if (BOOTSTRAPPER_DISPLAY_NONE >= m_command.display || m_fPreplanPrereqs) | 3315 | if (BOOTSTRAPPER_DISPLAY_NONE >= m_commandDisplay || m_fPreplanPrereqs) |
3269 | { | 3316 | { |
3270 | dwWindowStyle &= ~WS_VISIBLE; | 3317 | dwWindowStyle &= ~WS_VISIBLE; |
3271 | } | 3318 | } |
3272 | 3319 | ||
3273 | // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden) | 3320 | // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden) |
3274 | if (::IsWindow(m_command.hwndSplashScreen)) | 3321 | if (::IsWindow(m_hwndSplashScreen)) |
3275 | { | 3322 | { |
3276 | dwWindowStyle &= ~WS_VISIBLE; | 3323 | dwWindowStyle &= ~WS_VISIBLE; |
3277 | } | 3324 | } |
@@ -3284,7 +3331,7 @@ private: | |||
3284 | } | 3331 | } |
3285 | 3332 | ||
3286 | hr = ThemeCreateParentWindow(m_pTheme, 0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, HWND_DESKTOP, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWnd); | 3333 | hr = ThemeCreateParentWindow(m_pTheme, 0, wc.lpszClassName, m_pTheme->sczCaption, dwWindowStyle, x, y, HWND_DESKTOP, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWnd); |
3287 | ExitOnFailure(hr, "Failed to create window."); | 3334 | ExitOnFailure(hr, "Failed to create wixstdba theme window."); |
3288 | 3335 | ||
3289 | OnThemeLoaded(); | 3336 | OnThemeLoaded(); |
3290 | 3337 | ||
@@ -3691,7 +3738,7 @@ private: | |||
3691 | SetState(WIXSTDBA_STATE_FAILED, S_OK); | 3738 | SetState(WIXSTDBA_STATE_FAILED, S_OK); |
3692 | 3739 | ||
3693 | // If the UI should be visible, display it now and hide the splash screen | 3740 | // If the UI should be visible, display it now and hide the splash screen |
3694 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 3741 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
3695 | { | 3742 | { |
3696 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); | 3743 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); |
3697 | } | 3744 | } |
@@ -3708,7 +3755,7 @@ private: | |||
3708 | SetState(WIXSTDBA_STATE_HELP, S_OK); | 3755 | SetState(WIXSTDBA_STATE_HELP, S_OK); |
3709 | 3756 | ||
3710 | // If the UI should be visible, display it now and hide the splash screen | 3757 | // If the UI should be visible, display it now and hide the splash screen |
3711 | if (BOOTSTRAPPER_DISPLAY_NONE < m_command.display) | 3758 | if (BOOTSTRAPPER_DISPLAY_NONE < m_commandDisplay) |
3712 | { | 3759 | { |
3713 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); | 3760 | ::ShowWindow(m_pTheme->hwndParent, SW_SHOW); |
3714 | } | 3761 | } |
@@ -3830,7 +3877,7 @@ private: | |||
3830 | // If our install is at the end (success or failure) and we're not showing full UI or not updating or | 3877 | // If our install is at the end (success or failure) and we're not showing full UI or not updating or |
3831 | // we successfully installed the prerequisite(s) and either no restart is required or can automatically restart | 3878 | // we successfully installed the prerequisite(s) and either no restart is required or can automatically restart |
3832 | // then exit. | 3879 | // then exit. |
3833 | if ((WIXSTDBA_STATE_APPLIED <= m_state && (BOOTSTRAPPER_DISPLAY_FULL > m_command.display || BOOTSTRAPPER_ACTION_UPDATE_REPLACE == m_plannedAction)) || | 3880 | if ((WIXSTDBA_STATE_APPLIED <= m_state && (BOOTSTRAPPER_DISPLAY_FULL > m_commandDisplay || BOOTSTRAPPER_ACTION_UPDATE_REPLACE == m_plannedAction)) || |
3834 | (WIXSTDBA_STATE_APPLIED == m_state && m_fPrereq && (!m_fRestartRequired || m_fShouldRestart && m_fAllowRestart))) | 3881 | (WIXSTDBA_STATE_APPLIED == m_state && m_fPrereq && (!m_fRestartRequired || m_fShouldRestart && m_fAllowRestart))) |
3835 | { | 3882 | { |
3836 | // Quietly exit. | 3883 | // Quietly exit. |
@@ -3910,40 +3957,6 @@ private: | |||
3910 | { | 3957 | { |
3911 | StrAllocString(&sczUnformattedText, m_sczFailedMessage, 0); | 3958 | StrAllocString(&sczUnformattedText, m_sczFailedMessage, 0); |
3912 | } | 3959 | } |
3913 | else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal) | ||
3914 | { | ||
3915 | HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.NET452WIN7RTMErrorMessage)", 0); | ||
3916 | if (FAILED(hr)) | ||
3917 | { | ||
3918 | BalLogError(hr, "Failed to initialize NET452WIN7RTMErrorMessage loc identifier."); | ||
3919 | } | ||
3920 | else | ||
3921 | { | ||
3922 | hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText); | ||
3923 | if (FAILED(hr)) | ||
3924 | { | ||
3925 | BalLogError(hr, "Failed to localize NET452WIN7RTMErrorMessage: %ls", sczUnformattedText); | ||
3926 | ReleaseNullStr(sczUnformattedText); | ||
3927 | } | ||
3928 | } | ||
3929 | } | ||
3930 | else if (E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal) | ||
3931 | { | ||
3932 | HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.SCDRUNTIMEFAILUREErrorMessage)", 0); | ||
3933 | if (FAILED(hr)) | ||
3934 | { | ||
3935 | BalLogError(hr, "Failed to initialize SCDRUNTIMEFAILUREErrorMessage loc identifier."); | ||
3936 | } | ||
3937 | else | ||
3938 | { | ||
3939 | hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText); | ||
3940 | if (FAILED(hr)) | ||
3941 | { | ||
3942 | BalLogError(hr, "Failed to localize SCDRUNTIMEFAILUREErrorMessage: %ls", sczUnformattedText); | ||
3943 | ReleaseNullStr(sczUnformattedText); | ||
3944 | } | ||
3945 | } | ||
3946 | } | ||
3947 | else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal) | 3960 | else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal) |
3948 | { | 3961 | { |
3949 | HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.PREREQBAINFINITELOOPErrorMessage)", 0); | 3962 | HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.PREREQBAINFINITELOOPErrorMessage)", 0); |
@@ -3977,9 +3990,7 @@ private: | |||
3977 | StrAllocString(&sczText, sczUnformattedText, 0); | 3990 | StrAllocString(&sczText, sczUnformattedText, 0); |
3978 | } | 3991 | } |
3979 | } | 3992 | } |
3980 | else if (E_MBAHOST_NET452_ON_WIN7RTM == m_hrFinal || | 3993 | else if (E_PREREQBA_INFINITE_LOOP == m_hrFinal) |
3981 | E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal || | ||
3982 | E_PREREQBA_INFINITE_LOOP == m_hrFinal) | ||
3983 | { | 3994 | { |
3984 | if (sczUnformattedText) | 3995 | if (sczUnformattedText) |
3985 | { | 3996 | { |
@@ -4053,7 +4064,7 @@ private: | |||
4053 | ::EnterCriticalSection(&m_csShowingInternalUiThisPackage); | 4064 | ::EnterCriticalSection(&m_csShowingInternalUiThisPackage); |
4054 | fClose = PromptCancel( | 4065 | fClose = PromptCancel( |
4055 | m_hWnd, | 4066 | m_hWnd, |
4056 | BOOTSTRAPPER_DISPLAY_FULL != m_command.display || m_fShowingInternalUiThisPackage, | 4067 | BOOTSTRAPPER_DISPLAY_FULL != m_commandDisplay || m_fShowingInternalUiThisPackage, |
4057 | m_sczConfirmCloseMessage ? m_sczConfirmCloseMessage : L"Are you sure you want to cancel?", | 4068 | m_sczConfirmCloseMessage ? m_sczConfirmCloseMessage : L"Are you sure you want to cancel?", |
4058 | m_pTheme->sczCaption); | 4069 | m_pTheme->sczCaption); |
4059 | ::LeaveCriticalSection(&m_csShowingInternalUiThisPackage); | 4070 | ::LeaveCriticalSection(&m_csShowingInternalUiThisPackage); |
@@ -4509,12 +4520,12 @@ LExit: | |||
4509 | __out DWORD* pdwPageId | 4520 | __out DWORD* pdwPageId |
4510 | ) | 4521 | ) |
4511 | { | 4522 | { |
4512 | if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_command.display) | 4523 | if (BOOTSTRAPPER_DISPLAY_PASSIVE == m_commandDisplay) |
4513 | { | 4524 | { |
4514 | switch (state) | 4525 | switch (state) |
4515 | { | 4526 | { |
4516 | case WIXSTDBA_STATE_INITIALIZED: | 4527 | case WIXSTDBA_STATE_INITIALIZED: |
4517 | *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; | 4528 | *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_commandAction ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; |
4518 | break; | 4529 | break; |
4519 | 4530 | ||
4520 | case WIXSTDBA_STATE_HELP: | 4531 | case WIXSTDBA_STATE_HELP: |
@@ -4543,7 +4554,7 @@ LExit: | |||
4543 | break; | 4554 | break; |
4544 | } | 4555 | } |
4545 | } | 4556 | } |
4546 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_command.display) | 4557 | else if (BOOTSTRAPPER_DISPLAY_FULL == m_commandDisplay) |
4547 | { | 4558 | { |
4548 | switch (state) | 4559 | switch (state) |
4549 | { | 4560 | { |
@@ -4552,7 +4563,7 @@ LExit: | |||
4552 | break; | 4563 | break; |
4553 | 4564 | ||
4554 | case WIXSTDBA_STATE_INITIALIZED: | 4565 | case WIXSTDBA_STATE_INITIALIZED: |
4555 | *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_command.action ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; | 4566 | *pdwPageId = BOOTSTRAPPER_ACTION_HELP == m_commandAction ? m_rgdwPageIds[WIXSTDBA_PAGE_HELP] : m_rgdwPageIds[WIXSTDBA_PAGE_LOADING]; |
4556 | break; | 4567 | break; |
4557 | 4568 | ||
4558 | case WIXSTDBA_STATE_HELP: | 4569 | case WIXSTDBA_STATE_HELP: |
@@ -4566,7 +4577,7 @@ LExit: | |||
4566 | case WIXSTDBA_STATE_DETECTED: | 4577 | case WIXSTDBA_STATE_DETECTED: |
4567 | case WIXSTDBA_STATE_PLANNING_PREREQS: __fallthrough; | 4578 | case WIXSTDBA_STATE_PLANNING_PREREQS: __fallthrough; |
4568 | case WIXSTDBA_STATE_PLANNED_PREREQS: __fallthrough; | 4579 | case WIXSTDBA_STATE_PLANNED_PREREQS: __fallthrough; |
4569 | switch (m_command.action) | 4580 | switch (m_commandAction) |
4570 | { | 4581 | { |
4571 | case BOOTSTRAPPER_ACTION_INSTALL: | 4582 | case BOOTSTRAPPER_ACTION_INSTALL: |
4572 | *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL]; | 4583 | *pdwPageId = m_rgdwPageIds[WIXSTDBA_PAGE_INSTALL]; |
@@ -4699,7 +4710,8 @@ LExit: | |||
4699 | 4710 | ||
4700 | 4711 | ||
4701 | HRESULT LoadBAFunctions( | 4712 | HRESULT LoadBAFunctions( |
4702 | __in IXMLDOMDocument* pixdManifest | 4713 | __in IXMLDOMDocument* pixdManifest, |
4714 | __in BOOTSTRAPPER_COMMAND* pCommand | ||
4703 | ) | 4715 | ) |
4704 | { | 4716 | { |
4705 | HRESULT hr = S_OK; | 4717 | HRESULT hr = S_OK; |
@@ -4733,8 +4745,9 @@ LExit: | |||
4733 | BalExitOnNullWithLastError(pfnBAFunctionsCreate, hr, "Failed to get BAFunctionsCreate entry-point from: %ls", sczBafPath); | 4745 | BalExitOnNullWithLastError(pfnBAFunctionsCreate, hr, "Failed to get BAFunctionsCreate entry-point from: %ls", sczBafPath); |
4734 | 4746 | ||
4735 | bafCreateArgs.cbSize = sizeof(bafCreateArgs); | 4747 | bafCreateArgs.cbSize = sizeof(bafCreateArgs); |
4736 | bafCreateArgs.qwBAFunctionsAPIVersion = MAKEQWORDVERSION(2021, 11, 8, 0); | 4748 | bafCreateArgs.qwBAFunctionsAPIVersion = MAKEQWORDVERSION(2024, 1, 1, 0); |
4737 | bafCreateArgs.pBootstrapperCreateArgs = &m_createArgs; | 4749 | bafCreateArgs.pEngine = m_pEngine; |
4750 | bafCreateArgs.pCommand = pCommand; | ||
4738 | 4751 | ||
4739 | bafCreateResults.cbSize = sizeof(bafCreateResults); | 4752 | bafCreateResults.cbSize = sizeof(bafCreateResults); |
4740 | 4753 | ||
@@ -4764,16 +4777,18 @@ public: | |||
4764 | // | 4777 | // |
4765 | CWixStandardBootstrapperApplication( | 4778 | CWixStandardBootstrapperApplication( |
4766 | __in HMODULE hModule, | 4779 | __in HMODULE hModule, |
4767 | __in_opt PREQBA_DATA* pPrereqData, | 4780 | __in BOOL fRunAsPrereqBA |
4768 | __in IBootstrapperEngine* pEngine | 4781 | ) : CBalBaseBootstrapperApplication(3, 3000) |
4769 | ) : CBalBaseBootstrapperApplication(pEngine, 3, 3000) | ||
4770 | { | 4782 | { |
4771 | THEME_ASSIGN_CONTROL_ID* pAssignControl = NULL; | 4783 | THEME_ASSIGN_CONTROL_ID* pAssignControl = NULL; |
4772 | DWORD dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ENABLED | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VISIBLE | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE; | 4784 | DWORD dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ENABLED | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VISIBLE | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE; |
4773 | 4785 | ||
4774 | m_hModule = hModule; | 4786 | m_hModule = hModule; |
4775 | m_command = { }; | 4787 | m_commandAction = BOOTSTRAPPER_ACTION_UNKNOWN; |
4776 | m_createArgs = { }; | 4788 | m_commandDisplay = BOOTSTRAPPER_DISPLAY_UNKNOWN; |
4789 | m_commandResumeType = BOOTSTRAPPER_RESUME_TYPE_NONE; | ||
4790 | m_commandRelationType = BOOTSTRAPPER_RELATION_NONE; | ||
4791 | m_hwndSplashScreen = NULL; | ||
4777 | 4792 | ||
4778 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; | 4793 | m_plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN; |
4779 | 4794 | ||
@@ -4794,7 +4809,7 @@ public: | |||
4794 | m_hWnd = NULL; | 4809 | m_hWnd = NULL; |
4795 | 4810 | ||
4796 | m_state = WIXSTDBA_STATE_INITIALIZING; | 4811 | m_state = WIXSTDBA_STATE_INITIALIZING; |
4797 | m_hrFinal = pPrereqData ? pPrereqData->hrFatalError : S_OK; | 4812 | m_hrFinal = S_OK; |
4798 | 4813 | ||
4799 | m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE; | 4814 | m_restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE; |
4800 | m_fRestartRequired = FALSE; | 4815 | m_fRestartRequired = FALSE; |
@@ -4818,10 +4833,9 @@ public: | |||
4818 | m_fShowingInternalUiThisPackage = FALSE; | 4833 | m_fShowingInternalUiThisPackage = FALSE; |
4819 | m_fTriedToLaunchElevated = FALSE; | 4834 | m_fTriedToLaunchElevated = FALSE; |
4820 | 4835 | ||
4821 | m_pPrereqData = pPrereqData; | 4836 | m_fPrereq = fRunAsPrereqBA; |
4822 | m_fPrereq = NULL != pPrereqData; | 4837 | m_fHandleHelp = FALSE; |
4823 | m_fPreplanPrereqs = FALSE; | 4838 | m_fPreplanPrereqs = FALSE; |
4824 | m_fPerformHelp = !m_fPrereq || m_pPrereqData->fPerformHelp; | ||
4825 | m_fPrereqPackagePlanned = FALSE; | 4839 | m_fPrereqPackagePlanned = FALSE; |
4826 | m_fPrereqInstalled = FALSE; | 4840 | m_fPrereqInstalled = FALSE; |
4827 | m_fPrereqSkipped = FALSE; | 4841 | m_fPrereqSkipped = FALSE; |
@@ -4840,9 +4854,6 @@ public: | |||
4840 | m_pFilesInUseIgnoreButtonLoc = NULL; | 4854 | m_pFilesInUseIgnoreButtonLoc = NULL; |
4841 | m_pFilesInUseExitButtonLoc = NULL; | 4855 | m_pFilesInUseExitButtonLoc = NULL; |
4842 | 4856 | ||
4843 | pEngine->AddRef(); | ||
4844 | m_pEngine = pEngine; | ||
4845 | |||
4846 | m_hBAFModule = NULL; | 4857 | m_hBAFModule = NULL; |
4847 | m_pfnBAFunctionsProc = NULL; | 4858 | m_pfnBAFunctionsProc = NULL; |
4848 | m_pvBAFunctionsProcContext = NULL; | 4859 | m_pvBAFunctionsProcContext = NULL; |
@@ -5056,15 +5067,16 @@ public: | |||
5056 | ReleaseStr(m_sczLicenseUrl); | 5067 | ReleaseStr(m_sczLicenseUrl); |
5057 | ReleaseStr(m_sczBundleVersion); | 5068 | ReleaseStr(m_sczBundleVersion); |
5058 | ReleaseStr(m_sczAfterForcedRestartPackage); | 5069 | ReleaseStr(m_sczAfterForcedRestartPackage); |
5059 | |||
5060 | ReleaseNullObject(m_pEngine); | ||
5061 | } | 5070 | } |
5062 | 5071 | ||
5063 | private: | 5072 | private: |
5064 | HMODULE m_hModule; | 5073 | HMODULE m_hModule; |
5065 | BOOTSTRAPPER_CREATE_ARGS m_createArgs; | 5074 | BOOTSTRAPPER_ACTION m_commandAction; |
5066 | BOOTSTRAPPER_COMMAND m_command; | 5075 | BOOTSTRAPPER_DISPLAY m_commandDisplay; |
5067 | IBootstrapperEngine* m_pEngine; | 5076 | BOOTSTRAPPER_RESUME_TYPE m_commandResumeType; |
5077 | BOOTSTRAPPER_RELATION_TYPE m_commandRelationType; | ||
5078 | HWND m_hwndSplashScreen; | ||
5079 | |||
5068 | BOOTSTRAPPER_ACTION m_plannedAction; | 5080 | BOOTSTRAPPER_ACTION m_plannedAction; |
5069 | 5081 | ||
5070 | LPWSTR m_sczAfterForcedRestartPackage; | 5082 | LPWSTR m_sczAfterForcedRestartPackage; |
@@ -5147,10 +5159,9 @@ private: | |||
5147 | BOOL m_fSupportCacheOnly; | 5159 | BOOL m_fSupportCacheOnly; |
5148 | BOOL m_fRequestedCacheOnly; | 5160 | BOOL m_fRequestedCacheOnly; |
5149 | 5161 | ||
5150 | PREQBA_DATA* m_pPrereqData; | ||
5151 | BOOL m_fPrereq; | 5162 | BOOL m_fPrereq; |
5152 | BOOL m_fPreplanPrereqs; | 5163 | BOOL m_fPreplanPrereqs; |
5153 | BOOL m_fPerformHelp; | 5164 | BOOL m_fHandleHelp; |
5154 | BOOL m_fPrereqPackagePlanned; | 5165 | BOOL m_fPrereqPackagePlanned; |
5155 | BOOL m_fPrereqInstalled; | 5166 | BOOL m_fPrereqInstalled; |
5156 | BOOL m_fPrereqSkipped; | 5167 | BOOL m_fPrereqSkipped; |
@@ -5182,54 +5193,6 @@ private: | |||
5182 | }; | 5193 | }; |
5183 | 5194 | ||
5184 | 5195 | ||
5185 | // | ||
5186 | // CreateBootstrapperApplication - creates a new IBootstrapperApplication object. | ||
5187 | // | ||
5188 | HRESULT CreateBootstrapperApplication( | ||
5189 | __in HMODULE hModule, | ||
5190 | __in_opt PREQBA_DATA* pPrereqData, | ||
5191 | __in IBootstrapperEngine* pEngine, | ||
5192 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
5193 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
5194 | __out IBootstrapperApplication** ppApplication | ||
5195 | ) | ||
5196 | { | ||
5197 | HRESULT hr = S_OK; | ||
5198 | CWixStandardBootstrapperApplication* pApplication = NULL; | ||
5199 | |||
5200 | if (BOOTSTRAPPER_DISPLAY_UNKNOWN == pArgs->pCommand->display) | ||
5201 | { | ||
5202 | BalExitOnFailure(hr = E_INVALIDARG, "Engine requested Unknown display type."); | ||
5203 | } | ||
5204 | |||
5205 | pApplication = new CWixStandardBootstrapperApplication(hModule, pPrereqData, pEngine); | ||
5206 | BalExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object."); | ||
5207 | |||
5208 | hr = pApplication->Initialize(pArgs); | ||
5209 | ExitOnFailure(hr, "CWixStandardBootstrapperApplication initialization failed."); | ||
5210 | |||
5211 | pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; | ||
5212 | pResults->pvBootstrapperApplicationProcContext = pApplication; | ||
5213 | *ppApplication = pApplication; | ||
5214 | pApplication = NULL; | ||
5215 | |||
5216 | LExit: | ||
5217 | ReleaseObject(pApplication); | ||
5218 | return hr; | ||
5219 | } | ||
5220 | |||
5221 | |||
5222 | void DestroyBootstrapperApplication( | ||
5223 | __in IBootstrapperApplication* pApplication, | ||
5224 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
5225 | __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
5226 | ) | ||
5227 | { | ||
5228 | CWixStandardBootstrapperApplication* pBA = (CWixStandardBootstrapperApplication*)pApplication; | ||
5229 | pBA->Uninitialize(pArgs, pResults); | ||
5230 | } | ||
5231 | |||
5232 | |||
5233 | static HRESULT DAPI EvaluateVariableConditionCallback( | 5196 | static HRESULT DAPI EvaluateVariableConditionCallback( |
5234 | __in_z LPCWSTR wzCondition, | 5197 | __in_z LPCWSTR wzCondition, |
5235 | __out BOOL* pf, | 5198 | __out BOOL* pf, |
@@ -5370,3 +5333,41 @@ static LPCSTR LoggingMsiFeatureStateToString( | |||
5370 | return "Invalid"; | 5333 | return "Invalid"; |
5371 | } | 5334 | } |
5372 | } | 5335 | } |
5336 | |||
5337 | EXTERN_C HRESULT CreateWixPrerequisiteBootstrapperApplication( | ||
5338 | __in HINSTANCE hInstance, | ||
5339 | __out IBootstrapperApplication** ppApplication | ||
5340 | ) | ||
5341 | { | ||
5342 | HRESULT hr = S_OK; | ||
5343 | |||
5344 | CWixStandardBootstrapperApplication* pApplication = new CWixStandardBootstrapperApplication(hInstance, TRUE); | ||
5345 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new bootstrapper application."); | ||
5346 | |||
5347 | hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication)); | ||
5348 | ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication."); | ||
5349 | |||
5350 | LExit: | ||
5351 | ReleaseObject(pApplication); | ||
5352 | |||
5353 | return hr; | ||
5354 | } | ||
5355 | |||
5356 | EXTERN_C HRESULT CreateWixStandardBootstrapperApplication( | ||
5357 | __in HINSTANCE hInstance, | ||
5358 | __out IBootstrapperApplication** ppApplication | ||
5359 | ) | ||
5360 | { | ||
5361 | HRESULT hr = S_OK; | ||
5362 | |||
5363 | CWixStandardBootstrapperApplication* pApplication = new CWixStandardBootstrapperApplication(hInstance, FALSE); | ||
5364 | ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new bootstrapper application."); | ||
5365 | |||
5366 | hr = pApplication->QueryInterface(IID_PPV_ARGS(ppApplication)); | ||
5367 | ExitOnRootFailure(hr, "Failed to query for IBootstrapperApplication."); | ||
5368 | |||
5369 | LExit: | ||
5370 | ReleaseObject(pApplication); | ||
5371 | |||
5372 | return hr; | ||
5373 | } | ||
diff --git a/src/ext/Bal/wixiuiba/wixiuiba.h b/src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h index 76077f42..6dfef7d9 100644 --- a/src/ext/Bal/wixiuiba/wixiuiba.h +++ b/src/ext/Bal/stdbas/inc/WixInternalUIBootstrapperApplication.h | |||
@@ -1,13 +1,7 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
3 | 3 | ||
4 | 4 | EXTERN_C HRESULT CreateWixInternalUIBootstrapperApplication( | |
5 | struct INTERNAL_UI_BA_STATE | 5 | __in HINSTANCE hInstance, |
6 | { | 6 | __out IBootstrapperApplication** ppApplication |
7 | BOOL fInitialized; | 7 | ); |
8 | HINSTANCE hInstance; | ||
9 | LPWSTR sczAppBase; | ||
10 | HMODULE hPrereqModule; | ||
11 | PREQBA_DATA prereqData; | ||
12 | IBootstrapperApplication* pApplication; | ||
13 | }; | ||
diff --git a/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h b/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h new file mode 100644 index 00000000..c3742816 --- /dev/null +++ b/src/ext/Bal/stdbas/inc/WixStandardBootstrapperApplication.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | EXTERN_C HRESULT CreateWixPrerequisiteBootstrapperApplication( | ||
5 | __in HINSTANCE hInstance, | ||
6 | __out IBootstrapperApplication** ppApplication | ||
7 | ); | ||
8 | |||
9 | EXTERN_C HRESULT CreateWixStandardBootstrapperApplication( | ||
10 | __in HINSTANCE hInstance, | ||
11 | __out IBootstrapperApplication** ppApplication | ||
12 | ); | ||
diff --git a/src/ext/Bal/dnchost/precomp.cpp b/src/ext/Bal/stdbas/precomp.cpp index 37664a1c..37664a1c 100644 --- a/src/ext/Bal/dnchost/precomp.cpp +++ b/src/ext/Bal/stdbas/precomp.cpp | |||
diff --git a/src/ext/Bal/stdbas/precomp.h b/src/ext/Bal/stdbas/precomp.h new file mode 100644 index 00000000..7f138035 --- /dev/null +++ b/src/ext/Bal/stdbas/precomp.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #include <windows.h> | ||
6 | |||
7 | #pragma warning(push) | ||
8 | #pragma warning(disable:4458) // declaration of 'xxx' hides class member | ||
9 | #include <gdiplus.h> | ||
10 | #pragma warning(pop) | ||
11 | |||
12 | #include <msiquery.h> | ||
13 | #include <objbase.h> | ||
14 | #include <shlobj.h> | ||
15 | #include <shlwapi.h> | ||
16 | #include <stdlib.h> | ||
17 | #include <strsafe.h> | ||
18 | #include <stddef.h> | ||
19 | |||
20 | #include <dutil.h> | ||
21 | #include <apputil.h> | ||
22 | #include <memutil.h> | ||
23 | #include <dictutil.h> | ||
24 | #include <dirutil.h> | ||
25 | #include <fileutil.h> | ||
26 | #include <locutil.h> | ||
27 | #include <logutil.h> | ||
28 | #include <pathutil.h> | ||
29 | #include <procutil.h> | ||
30 | #include <resrutil.h> | ||
31 | #include <shelutil.h> | ||
32 | #include <strutil.h> | ||
33 | #include <wndutil.h> | ||
34 | #include <thmutil.h> | ||
35 | #include <verutil.h> | ||
36 | #include <uriutil.h> | ||
37 | #include <xmlutil.h> | ||
38 | |||
39 | #include <IBootstrapperEngine.h> | ||
40 | #include <IBootstrapperApplication.h> | ||
41 | |||
42 | #include <balutil.h> | ||
43 | #include <balinfo.h> | ||
44 | #include <balcondition.h> | ||
45 | |||
46 | #include <BAFunctions.h> | ||
47 | |||
48 | #include "stdbas.messages.h" | ||
49 | #include "WixStandardBootstrapperApplication.h" | ||
diff --git a/src/ext/Bal/stdbas/stdbas.manifest b/src/ext/Bal/stdbas/stdbas.manifest new file mode 100644 index 00000000..d978bb2b --- /dev/null +++ b/src/ext/Bal/stdbas/stdbas.manifest | |||
@@ -0,0 +1,19 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
2 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
3 | <assemblyIdentity name="wixstdba.exe" version="5.0.0.0" type="win32"/> | ||
4 | <description>WiX Toolset Bootstrapper Applications</description> | ||
5 | <dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /></dependentAssembly></dependency> | ||
6 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application> | ||
7 | <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> | ||
8 | <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> | ||
9 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> | ||
10 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> | ||
11 | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | ||
12 | </application></compatibility> | ||
13 | <application xmlns="urn:schemas-microsoft-com:asm.v3"><windowsSettings> | ||
14 | <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> | ||
15 | <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor, System</dpiAwareness> | ||
16 | <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> | ||
17 | </windowsSettings></application> | ||
18 | <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"/></requestedPrivileges></security></trustInfo> | ||
19 | </assembly> | ||
diff --git a/src/ext/Bal/wixstdba/wixstdba.mc b/src/ext/Bal/stdbas/stdbas.mc index 025315a5..025315a5 100644 --- a/src/ext/Bal/wixstdba/wixstdba.mc +++ b/src/ext/Bal/stdbas/stdbas.mc | |||
diff --git a/src/ext/Bal/dnchost/dnchost.vcxproj b/src/ext/Bal/stdbas/stdbas.vcxproj index 5860e968..3722b40a 100644 --- a/src/ext/Bal/dnchost/dnchost.vcxproj +++ b/src/ext/Bal/stdbas/stdbas.vcxproj | |||
@@ -1,5 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | |||
3 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
4 | <ItemGroup Label="ProjectConfigurations"> | 5 | <ItemGroup Label="ProjectConfigurations"> |
5 | <ProjectConfiguration Include="Debug|ARM64"> | 6 | <ProjectConfiguration Include="Debug|ARM64"> |
@@ -29,59 +30,48 @@ | |||
29 | </ItemGroup> | 30 | </ItemGroup> |
30 | 31 | ||
31 | <PropertyGroup Label="Globals"> | 32 | <PropertyGroup Label="Globals"> |
32 | <ProjectGuid>{B6F70281-6583-4138-BB7F-AABFEBBB3CA2}</ProjectGuid> | 33 | <ProjectGuid>{DBBF5F32-BAEA-46A8-99A0-17277A906456}</ProjectGuid> |
33 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 34 | <Keyword>Win32Proj</Keyword> |
35 | <ConfigurationType>StaticLibrary</ConfigurationType> | ||
34 | <CharacterSet>Unicode</CharacterSet> | 36 | <CharacterSet>Unicode</CharacterSet> |
35 | <TargetName>dnchost</TargetName> | 37 | <Description>WiX Standard Bootstrapper Applications</Description> |
36 | <ProjectModuleDefinitionFile>dnchost.def</ProjectModuleDefinitionFile> | 38 | <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets> |
37 | </PropertyGroup> | 39 | </PropertyGroup> |
38 | 40 | ||
39 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
40 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
41 | 43 | ||
42 | <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' "> | 44 | <ImportGroup Label="ExtensionSettings"> |
43 | <ClCompile> | 45 | </ImportGroup> |
44 | <!-- libnethost.lib is currently only available in Release mode, so can't use debug runtime --> | ||
45 | <RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
46 | </ClCompile> | ||
47 | </ItemDefinitionGroup> | ||
48 | 46 | ||
49 | <PropertyGroup> | 47 | <ImportGroup Label="Shared"> |
50 | <NetHostPlatform>$(Platform)</NetHostPlatform> | 48 | </ImportGroup> |
51 | <NetHostPlatform Condition=" '$(NetHostPlatform)'=='Win32' ">x86</NetHostPlatform> | ||
52 | <NetHostPath>..\..\..\..\packages\runtime.win-$(NetHostPlatform).Microsoft.NETCore.DotNetAppHost.6.0.4\runtimes\win-$(NetHostPlatform)\native\</NetHostPath> | ||
53 | <ProjectAdditionalIncludeDirectories>$(BaseOutputPath)obj;$(NetHostPath);..\wixstdba\inc</ProjectAdditionalIncludeDirectories> | ||
54 | <ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)libnethost.lib</ProjectAdditionalLinkLibraries> | ||
55 | </PropertyGroup> | ||
56 | 49 | ||
57 | <ItemGroup> | 50 | <ItemGroup> |
58 | <ClCompile Include="dnchost.cpp" /> | 51 | <ClInclude Include="inc\WixInternalUIBootstrapperApplication.h" /> |
59 | <ClCompile Include="dncutil.cpp" /> | 52 | <ClInclude Include="inc\WixStandardBootstrapperApplication.h" /> |
60 | <ClCompile Include="precomp.cpp"> | ||
61 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
62 | </ClCompile> | ||
63 | </ItemGroup> | ||
64 | |||
65 | <ItemGroup> | ||
66 | <ClInclude Include="dnchost.h" /> | ||
67 | <ClInclude Include="dncutil.h" /> | ||
68 | <ClInclude Include="precomp.h" /> | 53 | <ClInclude Include="precomp.h" /> |
69 | </ItemGroup> | 54 | </ItemGroup> |
70 | |||
71 | <ItemGroup> | 55 | <ItemGroup> |
72 | <None Include="dnchost.def" /> | 56 | <ClCompile Include="precomp.cpp"> |
57 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
58 | </ClCompile> | ||
59 | <ClCompile Include="WixInternalUIBootstrapperApplication.cpp" /> | ||
60 | <ClCompile Include="WixStandardBootstrapperApplication.cpp" /> | ||
73 | </ItemGroup> | 61 | </ItemGroup> |
74 | 62 | ||
75 | <ItemDefinitionGroup> | 63 | <ItemDefinitionGroup> |
76 | <Link> | 64 | <CustomBuildStep> |
77 | <!-- libnethost.lib is currently compiled with /GL, so must use linker option /LTCG --> | 65 | <Message>Compiling message file...</Message> |
78 | <AdditionalOptions>/LTCG %(AdditionalOptions)</AdditionalOptions> | 66 | <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z stdbas.messages "$(InputDir)stdbas.mc" |
79 | </Link> | 67 | rc.exe -fo "$(OutDir)stdbas.res" "$(IntDir)stdbas.messages.rc"</Command> |
68 | <Inputs>$(InputDir)stdbas.mc</Inputs> | ||
69 | <Outputs>$(IntDir)stdbas.messages.h;$(IntDir)stdbas.messages.rc</Outputs> | ||
70 | </CustomBuildStep> | ||
80 | </ItemDefinitionGroup> | 71 | </ItemDefinitionGroup> |
81 | 72 | ||
82 | <ItemGroup> | 73 | <ItemGroup> |
83 | <PackageReference Include="WixToolset.BalUtil" /> | 74 | <PackageReference Include="WixToolset.BalUtil" /> |
84 | |||
85 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 75 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
86 | </ItemGroup> | 76 | </ItemGroup> |
87 | 77 | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs index 2e60e2c0..217fdfb1 100644 --- a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs | |||
@@ -116,47 +116,47 @@ namespace WixToolsetTest.Bal | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | [Fact] | 119 | //[Fact] |
120 | public void CanBuildUsingMBAWithAlwaysInstallPrereqs() | 120 | //public void CanBuildUsingMBAWithAlwaysInstallPrereqs() |
121 | { | 121 | //{ |
122 | using (var fs = new DisposableFileSystem()) | 122 | // using (var fs = new DisposableFileSystem()) |
123 | { | 123 | // { |
124 | var baseFolder = fs.GetFolder(); | 124 | // var baseFolder = fs.GetFolder(); |
125 | var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); | 125 | // var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); |
126 | var bundleSourceFolder = TestData.Get(@"TestData\MBA"); | 126 | // var bundleSourceFolder = TestData.Get("TestData", "MBA"); |
127 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | 127 | // var intermediateFolder = Path.Combine(baseFolder, "obj"); |
128 | var baFolderPath = Path.Combine(baseFolder, "ba"); | 128 | // var baFolderPath = Path.Combine(baseFolder, "ba"); |
129 | var extractFolderPath = Path.Combine(baseFolder, "extract"); | 129 | // var extractFolderPath = Path.Combine(baseFolder, "extract"); |
130 | 130 | ||
131 | var compileResult = WixRunner.Execute(new[] | 131 | // var compileResult = WixRunner.Execute(new[] |
132 | { | 132 | // { |
133 | "build", | 133 | // "build", |
134 | Path.Combine(bundleSourceFolder, "AlwaysInstallPrereqsBundle.wxs"), | 134 | // Path.Combine(bundleSourceFolder, "AlwaysInstallPrereqsBundle.wxs"), |
135 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | 135 | // "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), |
136 | "-intermediateFolder", intermediateFolder, | 136 | // "-intermediateFolder", intermediateFolder, |
137 | "-o", bundleFile, | 137 | // "-o", bundleFile, |
138 | }); | 138 | // }); |
139 | 139 | ||
140 | compileResult.AssertSuccess(); | 140 | // compileResult.AssertSuccess(); |
141 | 141 | ||
142 | Assert.True(File.Exists(bundleFile)); | 142 | // Assert.True(File.Exists(bundleFile)); |
143 | 143 | ||
144 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); | 144 | // var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); |
145 | extractResult.AssertSuccess(); | 145 | // extractResult.AssertSuccess(); |
146 | 146 | ||
147 | var wixMbaPrereqOptionsElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixMbaPrereqOptions"); | 147 | // var wixPrereqOptionsElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqOptions"); |
148 | WixAssert.CompareLineByLine(new[] | 148 | // WixAssert.CompareLineByLine(new[] |
149 | { | 149 | // { |
150 | "<WixMbaPrereqOptions AlwaysInstallPrereqs='1' />", | 150 | // "<WixPrereqOptions AlwaysInstallPrereqs='1' />", |
151 | }, wixMbaPrereqOptionsElements); | 151 | // }, wixPrereqOptionsElements); |
152 | 152 | ||
153 | var wixMbaPrereqInformationElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixMbaPrereqInformation"); | 153 | // var wixPrereqInformationElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); |
154 | WixAssert.CompareLineByLine(new[] | 154 | // WixAssert.CompareLineByLine(new[] |
155 | { | 155 | // { |
156 | "<WixMbaPrereqInformation PackageId='wixnative.exe' />", | 156 | // "<WixPrereqInformation PackageId='wixnative.exe' />", |
157 | }, wixMbaPrereqInformationElements); | 157 | // }, wixPrereqInformationElements); |
158 | } | 158 | // } |
159 | } | 159 | //} |
160 | 160 | ||
161 | [Fact] | 161 | [Fact] |
162 | public void CannotBuildUsingMBAWithNoPrereqs() | 162 | public void CannotBuildUsingMBAWithNoPrereqs() |
@@ -165,7 +165,8 @@ namespace WixToolsetTest.Bal | |||
165 | { | 165 | { |
166 | var baseFolder = fs.GetFolder(); | 166 | var baseFolder = fs.GetFolder(); |
167 | var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); | 167 | var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); |
168 | var bundleSourceFolder = TestData.Get(@"TestData\MBA"); | 168 | var bundleSourceFolder = TestData.Get(@"TestData", "MBA"); |
169 | var dataFolder = TestData.Get(@"TestData", ".Data"); | ||
169 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | 170 | var intermediateFolder = Path.Combine(baseFolder, "obj"); |
170 | 171 | ||
171 | var compileResult = WixRunner.Execute(new[] | 172 | var compileResult = WixRunner.Execute(new[] |
@@ -174,10 +175,15 @@ namespace WixToolsetTest.Bal | |||
174 | Path.Combine(bundleSourceFolder, "Bundle.wxs"), | 175 | Path.Combine(bundleSourceFolder, "Bundle.wxs"), |
175 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | 176 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), |
176 | "-intermediateFolder", intermediateFolder, | 177 | "-intermediateFolder", intermediateFolder, |
178 | "-bindpath", dataFolder, | ||
177 | "-o", bundleFile, | 179 | "-o", bundleFile, |
178 | }); | 180 | }); |
179 | Assert.Equal(6802, compileResult.ExitCode); | 181 | |
180 | WixAssert.StringEqual("There must be at least one package with bal:PrereqPackage=\"yes\" when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.", compileResult.Messages[0].ToString()); | 182 | WixAssert.CompareLineByLine(new[] |
183 | { | ||
184 | "The WixManagedBootstrapperApplicationHost element has been deprecated.", | ||
185 | }, compileResult.Messages.Select(m => m.ToString()).ToArray()); | ||
186 | Assert.Equal(1130, compileResult.ExitCode); | ||
181 | 187 | ||
182 | Assert.False(File.Exists(bundleFile)); | 188 | Assert.False(File.Exists(bundleFile)); |
183 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); | 189 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); |
@@ -202,11 +208,13 @@ namespace WixToolsetTest.Bal | |||
202 | "-intermediateFolder", intermediateFolder, | 208 | "-intermediateFolder", intermediateFolder, |
203 | "-o", bundleFile, | 209 | "-o", bundleFile, |
204 | }); | 210 | }); |
211 | |||
205 | WixAssert.CompareLineByLine(new[] | 212 | WixAssert.CompareLineByLine(new[] |
206 | { | 213 | { |
207 | "When using DotNetCoreBootstrapperApplicationHost, the Payload element for the BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\".", | 214 | "The WixDotNetCoreBootstrapperApplicationHost element has been deprecated.", |
215 | "The BootstrapperApplication element's Name or SourceFile attribute was not found; one of these is required." | ||
208 | }, compileResult.Messages.Select(x => x.ToString()).ToArray()); | 216 | }, compileResult.Messages.Select(x => x.ToString()).ToArray()); |
209 | Assert.Equal(6818, compileResult.ExitCode); | 217 | Assert.Equal(44, compileResult.ExitCode); |
210 | 218 | ||
211 | Assert.False(File.Exists(bundleFile)); | 219 | Assert.False(File.Exists(bundleFile)); |
212 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); | 220 | Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); |
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs b/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs index 314bcd35..22e2fec1 100644 --- a/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs | |||
@@ -45,8 +45,8 @@ namespace WixToolsetTest.Bal | |||
45 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", | 45 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", |
46 | }, balPackageInfos); | 46 | }, balPackageInfos); |
47 | 47 | ||
48 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.thm"))); | 48 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
49 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.wxl"))); | 49 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
@@ -84,14 +84,14 @@ namespace WixToolsetTest.Bal | |||
84 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", | 84 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", |
85 | }, balPackageInfos); | 85 | }, balPackageInfos); |
86 | 86 | ||
87 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixMbaPrereqInformation"); | 87 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); |
88 | WixAssert.CompareLineByLine(new[] | 88 | WixAssert.CompareLineByLine(new[] |
89 | { | 89 | { |
90 | "<WixMbaPrereqInformation PackageId='wixnative.exe' LicenseUrl='https://www.mysite.com/prereqterms' />", | 90 | "<WixPrereqInformation PackageId='wixnative.exe' LicenseUrl='https://www.mysite.com/prereqterms' />", |
91 | }, mbaPrereqInfos); | 91 | }, mbaPrereqInfos); |
92 | 92 | ||
93 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.thm"))); | 93 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
94 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.wxl"))); | 94 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
@@ -129,14 +129,14 @@ namespace WixToolsetTest.Bal | |||
129 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", | 129 | "<WixBalPackageInfo PackageId='test.msi' PrimaryPackageType='default' />", |
130 | }, balPackageInfos); | 130 | }, balPackageInfos); |
131 | 131 | ||
132 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixMbaPrereqInformation"); | 132 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); |
133 | WixAssert.CompareLineByLine(new[] | 133 | WixAssert.CompareLineByLine(new[] |
134 | { | 134 | { |
135 | "<WixMbaPrereqInformation PackageId='wixnative.exe' />", | 135 | "<WixPrereqInformation PackageId='wixnative.exe' />", |
136 | }, mbaPrereqInfos); | 136 | }, mbaPrereqInfos); |
137 | 137 | ||
138 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.thm"))); | 138 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
139 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.wxl"))); | 139 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
140 | } | 140 | } |
141 | } | 141 | } |
142 | 142 | ||
@@ -183,14 +183,14 @@ namespace WixToolsetTest.Bal | |||
183 | "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='DISPLAYTEST' PrimaryPackageType='default' />", | 183 | "<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='DISPLAYTEST' PrimaryPackageType='default' />", |
184 | }, balPackageInfos); | 184 | }, balPackageInfos); |
185 | 185 | ||
186 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixMbaPrereqInformation"); | 186 | var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); |
187 | WixAssert.CompareLineByLine(new[] | 187 | WixAssert.CompareLineByLine(new[] |
188 | { | 188 | { |
189 | "<WixMbaPrereqInformation PackageId='wixnative.exe' />", | 189 | "<WixPrereqInformation PackageId='wixnative.exe' />", |
190 | }, mbaPrereqInfos); | 190 | }, mbaPrereqInfos); |
191 | 191 | ||
192 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.thm"))); | 192 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); |
193 | Assert.True(File.Exists(Path.Combine(baFolderPath, "mbapreq.wxl"))); | 193 | Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); |
194 | } | 194 | } |
195 | } | 195 | } |
196 | 196 | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe new file mode 100644 index 00000000..f27639e9 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe | |||
@@ -0,0 +1 @@ | |||
This is fake.exe \ No newline at end of file | |||
diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs index ba1aefba..59be4bd4 100644 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs +++ b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs | |||
@@ -2,7 +2,7 @@ | |||
2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" |
3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
4 | <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2"> | 4 | <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2"> |
5 | <BootstrapperApplication> | 5 | <BootstrapperApplication SourceFile="fake.exe"> |
6 | <bal:WixManagedBootstrapperApplicationHost /> | 6 | <bal:WixManagedBootstrapperApplicationHost /> |
7 | </BootstrapperApplication> | 7 | </BootstrapperApplication> |
8 | <Chain> | 8 | <Chain> |
diff --git a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/CSharpSourceGeneratorVerifier.cs b/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/CSharpSourceGeneratorVerifier.cs deleted file mode 100644 index 27729ac8..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/CSharpSourceGeneratorVerifier.cs +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.Dnc.HostGenerator | ||
4 | { | ||
5 | using System; | ||
6 | using System.Collections.Immutable; | ||
7 | using Microsoft.CodeAnalysis; | ||
8 | using Microsoft.CodeAnalysis.CSharp; | ||
9 | using Microsoft.CodeAnalysis.CSharp.Testing; | ||
10 | using Microsoft.CodeAnalysis.Testing.Verifiers; | ||
11 | |||
12 | public static class CSharpSourceGeneratorVerifier<TSourceGenerator> | ||
13 | where TSourceGenerator : ISourceGenerator, new() | ||
14 | { | ||
15 | public class Test : CSharpSourceGeneratorTest<TSourceGenerator, XUnitVerifier> | ||
16 | { | ||
17 | public Test() | ||
18 | { | ||
19 | } | ||
20 | |||
21 | protected override CompilationOptions CreateCompilationOptions() | ||
22 | { | ||
23 | var compilationOptions = base.CreateCompilationOptions(); | ||
24 | return compilationOptions.WithSpecificDiagnosticOptions( | ||
25 | compilationOptions.SpecificDiagnosticOptions.SetItems(GetNullableWarningsFromCompiler())); | ||
26 | } | ||
27 | |||
28 | public LanguageVersion LanguageVersion { get; set; } = LanguageVersion.Default; | ||
29 | |||
30 | private static ImmutableDictionary<string, ReportDiagnostic> GetNullableWarningsFromCompiler() | ||
31 | { | ||
32 | string[] args = { "/warnaserror:nullable" }; | ||
33 | var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory); | ||
34 | var nullableWarnings = commandLineArguments.CompilationOptions.SpecificDiagnosticOptions; | ||
35 | |||
36 | return nullableWarnings; | ||
37 | } | ||
38 | |||
39 | protected override ParseOptions CreateParseOptions() | ||
40 | { | ||
41 | return ((CSharpParseOptions)base.CreateParseOptions()).WithLanguageVersion(this.LanguageVersion); | ||
42 | } | ||
43 | } | ||
44 | } | ||
45 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/DncHostGeneratorTests.cs b/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/DncHostGeneratorTests.cs deleted file mode 100644 index ae55b2b5..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/DncHostGeneratorTests.cs +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.Dnc.HostGenerator | ||
4 | { | ||
5 | using System; | ||
6 | using System.Text; | ||
7 | using System.Threading.Tasks; | ||
8 | using Microsoft.CodeAnalysis; | ||
9 | using Microsoft.CodeAnalysis.Testing; | ||
10 | using Microsoft.CodeAnalysis.Text; | ||
11 | using WixToolset.Dnc.HostGenerator; | ||
12 | using WixToolset.Mba.Core; | ||
13 | using Xunit; | ||
14 | |||
15 | using VerifyCS = CSharpSourceGeneratorVerifier<WixToolset.Dnc.HostGenerator.DncHostGenerator>; | ||
16 | |||
17 | public class DncHostGeneratorTests | ||
18 | { | ||
19 | static readonly MetadataReference MbaCoreAssembly = MetadataReference.CreateFromFile(typeof(BootstrapperApplicationFactoryAttribute).Assembly.Location); | ||
20 | |||
21 | // https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md#unit-testing-of-generators | ||
22 | [Fact] | ||
23 | public async Task FailsBuildWhenMissingAttribute() | ||
24 | { | ||
25 | var code = @" | ||
26 | //[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Test.BAFactory))] | ||
27 | namespace Test | ||
28 | { | ||
29 | using WixToolset.Mba.Core; | ||
30 | |||
31 | public class BAFactory : BaseBootstrapperApplicationFactory | ||
32 | { | ||
33 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
34 | { | ||
35 | return null; | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | "; | ||
40 | |||
41 | await new VerifyCS.Test | ||
42 | { | ||
43 | TestState = | ||
44 | { | ||
45 | Sources = { code }, | ||
46 | ReferenceAssemblies = ReferenceAssemblies.Net.Net60, | ||
47 | AdditionalReferences = { MbaCoreAssembly }, | ||
48 | ExpectedDiagnostics = | ||
49 | { | ||
50 | new DiagnosticResult(DncHostGenerator.MissingFactoryAttributeDescriptor), | ||
51 | }, | ||
52 | }, | ||
53 | }.RunAsync(); | ||
54 | } | ||
55 | |||
56 | [Fact] | ||
57 | public async Task GeneratesEntryPoint() | ||
58 | { | ||
59 | var code = @" | ||
60 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Test.BAFactory))] | ||
61 | namespace Test | ||
62 | { | ||
63 | using WixToolset.Mba.Core; | ||
64 | |||
65 | public class BAFactory : BaseBootstrapperApplicationFactory | ||
66 | { | ||
67 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
68 | { | ||
69 | return null; | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | "; | ||
74 | var generated = String.Format(DncHostGenerator.Template, DncHostGenerator.Version, "Test.BAFactory"); | ||
75 | |||
76 | await new VerifyCS.Test | ||
77 | { | ||
78 | TestState = | ||
79 | { | ||
80 | Sources = { code }, | ||
81 | GeneratedSources = | ||
82 | { | ||
83 | (typeof(DncHostGenerator), "WixToolset.Dnc.Host.g.cs", SourceText.From(generated, Encoding.UTF8, SourceHashAlgorithm.Sha256)), | ||
84 | }, | ||
85 | ReferenceAssemblies = ReferenceAssemblies.Net.Net60, | ||
86 | AdditionalReferences = { MbaCoreAssembly }, | ||
87 | }, | ||
88 | }.RunAsync(); | ||
89 | } | ||
90 | } | ||
91 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/WixToolsetTest.Dnc.HostGenerator.csproj b/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/WixToolsetTest.Dnc.HostGenerator.csproj deleted file mode 100644 index 1cbf702d..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Dnc.HostGenerator/WixToolsetTest.Dnc.HostGenerator.csproj +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>net6.0</TargetFramework> | ||
7 | <IsWixTestProject>true</IsWixTestProject> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <ItemGroup> | ||
11 | <ProjectReference Include="..\..\WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj" /> | ||
12 | </ItemGroup> | ||
13 | |||
14 | <ItemGroup> | ||
15 | <PackageReference Include="WixInternal.TestSupport" /> | ||
16 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
17 | </ItemGroup> | ||
18 | |||
19 | <ItemGroup> | ||
20 | <PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" /> | ||
21 | <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" /> | ||
22 | </ItemGroup> | ||
23 | </Project> | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs deleted file mode 100644 index fe644d2d..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs +++ /dev/null | |||
@@ -1,285 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.ManagedHost | ||
4 | { | ||
5 | using System; | ||
6 | using WixInternal.TestSupport; | ||
7 | using WixInternal.TestSupport.XunitExtensions; | ||
8 | using Xunit; | ||
9 | |||
10 | public class DncHostFixture | ||
11 | { | ||
12 | static readonly string bundleBasePath = TestData.Get("..", "examples"); | ||
13 | |||
14 | [Fact] | ||
15 | public void CanLoadFDDEarliestCoreMBA() | ||
16 | { | ||
17 | using (var fs = new DisposableFileSystem()) | ||
18 | { | ||
19 | var baseFolder = fs.GetFolder(); | ||
20 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDD.exe"); | ||
21 | var testEngine = new TestEngine(); | ||
22 | |||
23 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
24 | WixAssert.CompareLineByLine(new[] | ||
25 | { | ||
26 | "Loading .NET Core FDD bootstrapper application.", | ||
27 | "Creating BA thread to run asynchronously.", | ||
28 | "EarliestCoreBA", | ||
29 | "Shutdown,ReloadBootstrapper,0", | ||
30 | }, result.Output.ToArray()); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | [SkippableFact] | ||
35 | public void CanLoadFDDx86EarliestCoreMBA() | ||
36 | { | ||
37 | // https://github.com/microsoft/vstest/issues/3586 | ||
38 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
39 | |||
40 | using (var fs = new DisposableFileSystem()) | ||
41 | { | ||
42 | var baseFolder = fs.GetFolder(); | ||
43 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDDx86.exe"); | ||
44 | var testEngine = new TestEngine(); | ||
45 | |||
46 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
47 | var resultOutput = result.Output.ToArray(); | ||
48 | |||
49 | if (resultOutput.Length > 0 && (resultOutput[0] == "error from hostfxr: It was not possible to find any compatible framework version" || | ||
50 | resultOutput[0] == "error from hostfxr: You must install or update .NET to run this application.")) | ||
51 | { | ||
52 | WixAssert.Skip(String.Join(Environment.NewLine, resultOutput)); | ||
53 | } | ||
54 | |||
55 | WixAssert.CompareLineByLine(new[] | ||
56 | { | ||
57 | "Loading .NET Core FDD bootstrapper application.", | ||
58 | "Creating BA thread to run asynchronously.", | ||
59 | "EarliestCoreBA", | ||
60 | "Shutdown,ReloadBootstrapper,0", | ||
61 | }, resultOutput); | ||
62 | } | ||
63 | } | ||
64 | |||
65 | [Fact] | ||
66 | public void CanLoadSCDEarliestCoreMBA() | ||
67 | { | ||
68 | using (var fs = new DisposableFileSystem()) | ||
69 | { | ||
70 | var baseFolder = fs.GetFolder(); | ||
71 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe"); | ||
72 | var testEngine = new TestEngine(); | ||
73 | |||
74 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
75 | WixAssert.CompareLineByLine(new[] | ||
76 | { | ||
77 | "Loading .NET Core SCD bootstrapper application.", | ||
78 | "Creating BA thread to run asynchronously.", | ||
79 | "EarliestCoreBA", | ||
80 | "Shutdown,ReloadBootstrapper,0", | ||
81 | }, result.Output.ToArray()); | ||
82 | } | ||
83 | } | ||
84 | |||
85 | [Fact] | ||
86 | public void CanLoadTrimmedSCDEarliestCoreMBA() | ||
87 | { | ||
88 | using (var fs = new DisposableFileSystem()) | ||
89 | { | ||
90 | var baseFolder = fs.GetFolder(); | ||
91 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleTrimmedSCD.exe"); | ||
92 | var testEngine = new TestEngine(); | ||
93 | |||
94 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
95 | WixAssert.CompareLineByLine(new[] | ||
96 | { | ||
97 | "Loading .NET Core SCD bootstrapper application.", | ||
98 | "Creating BA thread to run asynchronously.", | ||
99 | "EarliestCoreBA", | ||
100 | "Shutdown,ReloadBootstrapper,0", | ||
101 | }, result.Output.ToArray()); | ||
102 | } | ||
103 | } | ||
104 | |||
105 | [Fact] | ||
106 | public void CanReloadSCDEarliestCoreMBA() | ||
107 | { | ||
108 | using (var fs = new DisposableFileSystem()) | ||
109 | { | ||
110 | var baseFolder = fs.GetFolder(); | ||
111 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe"); | ||
112 | var testEngine = new TestEngine(); | ||
113 | |||
114 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
115 | WixAssert.CompareLineByLine(new[] | ||
116 | { | ||
117 | "Loading .NET Core SCD bootstrapper application.", | ||
118 | "Creating BA thread to run asynchronously.", | ||
119 | "EarliestCoreBA", | ||
120 | "Shutdown,ReloadBootstrapper,0", | ||
121 | "Loading .NET Core SCD bootstrapper application.", | ||
122 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
123 | "Creating BA thread to run asynchronously.", | ||
124 | "EarliestCoreBA", | ||
125 | "Shutdown,Restart,0", | ||
126 | |||
127 | }, result.Output.ToArray()); | ||
128 | } | ||
129 | } | ||
130 | |||
131 | [Fact] | ||
132 | public void CanLoadFDDLatestCoreMBA() | ||
133 | { | ||
134 | using (var fs = new DisposableFileSystem()) | ||
135 | { | ||
136 | var baseFolder = fs.GetFolder(); | ||
137 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe"); | ||
138 | var testEngine = new TestEngine(); | ||
139 | |||
140 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
141 | WixAssert.CompareLineByLine(new[] | ||
142 | { | ||
143 | "Loading .NET Core FDD bootstrapper application.", | ||
144 | "Creating BA thread to run asynchronously.", | ||
145 | "LatestCoreBA", | ||
146 | "Shutdown,ReloadBootstrapper,0", | ||
147 | }, result.Output.ToArray()); | ||
148 | } | ||
149 | } | ||
150 | |||
151 | [Fact] | ||
152 | public void CanLoadFDDx86LatestCoreMBA() | ||
153 | { | ||
154 | // https://github.com/microsoft/vstest/issues/3586 | ||
155 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
156 | |||
157 | using (var fs = new DisposableFileSystem()) | ||
158 | { | ||
159 | var baseFolder = fs.GetFolder(); | ||
160 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDDx86.exe"); | ||
161 | var testEngine = new TestEngine(); | ||
162 | |||
163 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
164 | WixAssert.CompareLineByLine(new[] | ||
165 | { | ||
166 | "Loading .NET Core FDD bootstrapper application.", | ||
167 | "Creating BA thread to run asynchronously.", | ||
168 | "LatestCoreBA", | ||
169 | "Shutdown,ReloadBootstrapper,0", | ||
170 | }, result.Output.ToArray()); | ||
171 | } | ||
172 | } | ||
173 | |||
174 | [Fact] | ||
175 | public void CanReloadFDDLatestCoreMBA() | ||
176 | { | ||
177 | using (var fs = new DisposableFileSystem()) | ||
178 | { | ||
179 | var baseFolder = fs.GetFolder(); | ||
180 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe"); | ||
181 | var testEngine = new TestEngine(); | ||
182 | |||
183 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
184 | WixAssert.CompareLineByLine(new[] | ||
185 | { | ||
186 | "Loading .NET Core FDD bootstrapper application.", | ||
187 | "Creating BA thread to run asynchronously.", | ||
188 | "LatestCoreBA", | ||
189 | "Shutdown,ReloadBootstrapper,0", | ||
190 | "Loading .NET Core FDD bootstrapper application.", | ||
191 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
192 | "Creating BA thread to run asynchronously.", | ||
193 | "LatestCoreBA", | ||
194 | "Shutdown,Restart,0", | ||
195 | }, result.Output.ToArray()); | ||
196 | } | ||
197 | } | ||
198 | |||
199 | [Fact] | ||
200 | public void CanLoadSCDLatestCoreMBA() | ||
201 | { | ||
202 | using (var fs = new DisposableFileSystem()) | ||
203 | { | ||
204 | var baseFolder = fs.GetFolder(); | ||
205 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe"); | ||
206 | var testEngine = new TestEngine(); | ||
207 | |||
208 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
209 | WixAssert.CompareLineByLine(new[] | ||
210 | { | ||
211 | "Loading .NET Core SCD bootstrapper application.", | ||
212 | "Creating BA thread to run asynchronously.", | ||
213 | "LatestCoreBA", | ||
214 | "Shutdown,ReloadBootstrapper,0", | ||
215 | }, result.Output.ToArray()); | ||
216 | var logMessages = result.Output; | ||
217 | } | ||
218 | } | ||
219 | |||
220 | [Fact] | ||
221 | public void CanLoadTrimmedSCDLatestCoreMBA() | ||
222 | { | ||
223 | using (var fs = new DisposableFileSystem()) | ||
224 | { | ||
225 | var baseFolder = fs.GetFolder(); | ||
226 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleTrimmedSCD.exe"); | ||
227 | var testEngine = new TestEngine(); | ||
228 | |||
229 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
230 | WixAssert.CompareLineByLine(new[] | ||
231 | { | ||
232 | "Loading .NET Core SCD bootstrapper application.", | ||
233 | "Creating BA thread to run asynchronously.", | ||
234 | "LatestCoreBA", | ||
235 | "Shutdown,ReloadBootstrapper,0", | ||
236 | }, result.Output.ToArray()); | ||
237 | } | ||
238 | } | ||
239 | |||
240 | [Fact] | ||
241 | public void CanReloadSCDLatestCoreMBA() | ||
242 | { | ||
243 | using (var fs = new DisposableFileSystem()) | ||
244 | { | ||
245 | var baseFolder = fs.GetFolder(); | ||
246 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe"); | ||
247 | var testEngine = new TestEngine(); | ||
248 | |||
249 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
250 | WixAssert.CompareLineByLine(new[] | ||
251 | { | ||
252 | "Loading .NET Core SCD bootstrapper application.", | ||
253 | "Creating BA thread to run asynchronously.", | ||
254 | "LatestCoreBA", | ||
255 | "Shutdown,ReloadBootstrapper,0", | ||
256 | "Loading .NET Core SCD bootstrapper application.", | ||
257 | "Reloaded 1 time(s)", // dnchost doesn't currently support unloading | ||
258 | "Creating BA thread to run asynchronously.", | ||
259 | "LatestCoreBA", | ||
260 | "Shutdown,Restart,0", | ||
261 | }, result.Output.ToArray()); | ||
262 | } | ||
263 | } | ||
264 | |||
265 | [Fact] | ||
266 | public void CanLoadFDDWPFCoreMBA() | ||
267 | { | ||
268 | using (var fs = new DisposableFileSystem()) | ||
269 | { | ||
270 | var baseFolder = fs.GetFolder(); | ||
271 | var bundleFile = TestData.Get(bundleBasePath, "WPFCoreBundleFDD.exe"); | ||
272 | var testEngine = new TestEngine(); | ||
273 | |||
274 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
275 | WixAssert.CompareLineByLine(new[] | ||
276 | { | ||
277 | "Loading .NET Core FDD bootstrapper application.", | ||
278 | "Creating BA thread to run asynchronously.", | ||
279 | "WPFCoreBA", | ||
280 | "Shutdown,ReloadBootstrapper,0", | ||
281 | }, result.Output.ToArray()); | ||
282 | } | ||
283 | } | ||
284 | } | ||
285 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs deleted file mode 100644 index 6f7709b5..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.ManagedHost | ||
4 | { | ||
5 | using WixInternal.TestSupport; | ||
6 | using Xunit; | ||
7 | |||
8 | public class MbaHostFixture | ||
9 | { | ||
10 | static readonly string bundleBasePath = TestData.Get("..", "examples"); | ||
11 | |||
12 | [Fact] | ||
13 | public void CanLoadFullFramework2MBA() | ||
14 | { | ||
15 | using (var fs = new DisposableFileSystem()) | ||
16 | { | ||
17 | var baseFolder = fs.GetFolder(); | ||
18 | var bundleFile = TestData.Get(bundleBasePath, "FullFramework2Bundle.exe"); | ||
19 | var testEngine = new TestEngine(); | ||
20 | |||
21 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
22 | WixAssert.CompareLineByLine(new[] | ||
23 | { | ||
24 | "Loading managed bootstrapper application.", | ||
25 | "Creating BA thread to run asynchronously.", | ||
26 | "FullFramework2BA", | ||
27 | "Shutdown,ReloadBootstrapper,0", | ||
28 | }, result.Output.ToArray()); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | [Fact] | ||
33 | public void CanLoadFullFramework4MBA() | ||
34 | { | ||
35 | using (var fs = new DisposableFileSystem()) | ||
36 | { | ||
37 | var baseFolder = fs.GetFolder(); | ||
38 | var bundleFile = TestData.Get(bundleBasePath, "FullFramework4Bundle.exe"); | ||
39 | var testEngine = new TestEngine(); | ||
40 | |||
41 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
42 | WixAssert.CompareLineByLine(new[] | ||
43 | { | ||
44 | "Loading managed bootstrapper application.", | ||
45 | "Creating BA thread to run asynchronously.", | ||
46 | "FullFramework4BA", | ||
47 | "Shutdown,ReloadBootstrapper,0", | ||
48 | }, result.Output.ToArray()); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | [Fact] | ||
53 | public void CanReloadFullFramework2MBA() | ||
54 | { | ||
55 | using (var fs = new DisposableFileSystem()) | ||
56 | { | ||
57 | var baseFolder = fs.GetFolder(); | ||
58 | var bundleFile = TestData.Get(bundleBasePath, "FullFramework2Bundle.exe"); | ||
59 | var testEngine = new TestEngine(); | ||
60 | |||
61 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
62 | WixAssert.CompareLineByLine(new[] | ||
63 | { | ||
64 | "Loading managed bootstrapper application.", | ||
65 | "Creating BA thread to run asynchronously.", | ||
66 | "FullFramework2BA", | ||
67 | "Shutdown,ReloadBootstrapper,0", | ||
68 | "Loading managed bootstrapper application.", | ||
69 | "Creating BA thread to run asynchronously.", | ||
70 | "FullFramework2BA", | ||
71 | "Shutdown,Restart,0", | ||
72 | }, result.Output.ToArray()); | ||
73 | } | ||
74 | } | ||
75 | |||
76 | [Fact] | ||
77 | public void CanReloadFullFramework4MBA() | ||
78 | { | ||
79 | using (var fs = new DisposableFileSystem()) | ||
80 | { | ||
81 | var baseFolder = fs.GetFolder(); | ||
82 | var bundleFile = TestData.Get(bundleBasePath, "FullFramework4Bundle.exe"); | ||
83 | var testEngine = new TestEngine(); | ||
84 | |||
85 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
86 | WixAssert.CompareLineByLine(new[] | ||
87 | { | ||
88 | "Loading managed bootstrapper application.", | ||
89 | "Creating BA thread to run asynchronously.", | ||
90 | "FullFramework4BA", | ||
91 | "Shutdown,ReloadBootstrapper,0", | ||
92 | "Loading managed bootstrapper application.", | ||
93 | "Creating BA thread to run asynchronously.", | ||
94 | "FullFramework4BA", | ||
95 | "Shutdown,Restart,0", | ||
96 | }, result.Output.ToArray()); | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/README.md b/src/ext/Bal/test/WixToolsetTest.ManagedHost/README.md deleted file mode 100644 index cbec1387..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/README.md +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | In order to properly test dnchost and mbahost, | ||
2 | the managed BAs need to be published and a bundle needs to be built for each scenario. | ||
3 | Making this happen on every build for the solution takes too long, | ||
4 | so this project relies on manually running devbuild.cmd to publish everything before the tests can be run. | ||
5 | devbuild.cmd needs to be ran again every time changes are made in other projects. \ No newline at end of file | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs deleted file mode 100644 index 8be62e92..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.ManagedHost | ||
4 | { | ||
5 | using System; | ||
6 | using System.Collections.Generic; | ||
7 | using System.Diagnostics; | ||
8 | using System.IO; | ||
9 | using WixInternal.TestSupport; | ||
10 | using WixInternal.Core.TestPackage; | ||
11 | |||
12 | public class TestEngine | ||
13 | { | ||
14 | private static readonly string TestEngineFile = TestData.Get(@"..\x64\examples\Example.TestEngine\Example.TestEngine.exe"); | ||
15 | private static readonly string TestEngineFileX86 = TestData.Get(@"..\x86\examples\Example.TestEngine\Example.TestEngine.exe"); | ||
16 | |||
17 | public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) | ||
18 | { | ||
19 | return this.RunTestEngine("reload", bundleFilePath, tempFolderPath, x86); | ||
20 | } | ||
21 | |||
22 | public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) | ||
23 | { | ||
24 | return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath, x86); | ||
25 | } | ||
26 | |||
27 | private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath, bool x86 = false) | ||
28 | { | ||
29 | var baFolderPath = Path.Combine(tempFolderPath, "ba"); | ||
30 | var extractFolderPath = Path.Combine(tempFolderPath, "extract"); | ||
31 | var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFilePath, baFolderPath, extractFolderPath); | ||
32 | extractResult.AssertSuccess(); | ||
33 | |||
34 | var args = new string[] { | ||
35 | engineMode, | ||
36 | '"' + bundleFilePath + '"', | ||
37 | '"' + extractResult.GetBAFilePath(baFolderPath) + '"', | ||
38 | }; | ||
39 | return RunProcessCaptureOutput(x86 ? TestEngineFileX86 : TestEngineFile, args); | ||
40 | } | ||
41 | |||
42 | private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null) | ||
43 | { | ||
44 | var startInfo = new ProcessStartInfo(executablePath) | ||
45 | { | ||
46 | Arguments = String.Join(' ', arguments), | ||
47 | CreateNoWindow = true, | ||
48 | RedirectStandardError = true, | ||
49 | RedirectStandardOutput = true, | ||
50 | UseShellExecute = false, | ||
51 | WorkingDirectory = workingFolder, | ||
52 | }; | ||
53 | |||
54 | var exitCode = 0; | ||
55 | var output = new List<string>(); | ||
56 | |||
57 | using (var process = Process.Start(startInfo)) | ||
58 | { | ||
59 | process.OutputDataReceived += (s, e) => { if (e.Data != null) { output.Add(e.Data); } }; | ||
60 | process.ErrorDataReceived += (s, e) => { if (e.Data != null) { output.Add(e.Data); } }; | ||
61 | |||
62 | process.BeginErrorReadLine(); | ||
63 | process.BeginOutputReadLine(); | ||
64 | |||
65 | process.WaitForExit(); | ||
66 | exitCode = process.ExitCode; | ||
67 | } | ||
68 | |||
69 | return new TestEngineResult | ||
70 | { | ||
71 | ExitCode = exitCode, | ||
72 | Output = output, | ||
73 | }; | ||
74 | } | ||
75 | } | ||
76 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngineResult.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngineResult.cs deleted file mode 100644 index 63f6f7f5..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngineResult.cs +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolsetTest.ManagedHost | ||
4 | { | ||
5 | using System.Collections.Generic; | ||
6 | |||
7 | public class TestEngineResult | ||
8 | { | ||
9 | public int ExitCode { get; set; } | ||
10 | public List<string> Output { get; set; } | ||
11 | } | ||
12 | } | ||
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj b/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj deleted file mode 100644 index 9caf3aa6..00000000 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFramework>net6.0</TargetFramework> | ||
7 | <IsWixTestProject>true</IsWixTestProject> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <ItemGroup> | ||
11 | <ProjectReference Include="..\examples\TestEngine\Example.TestEngine.vcxproj" Properties="Platform=ARM64" ReferenceOutputAssembly="false" /> | ||
12 | <ProjectReference Include="..\examples\TestEngine\Example.TestEngine.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" /> | ||
13 | <ProjectReference Include="..\examples\TestEngine\Example.TestEngine.vcxproj" Properties="Platform=x64" ReferenceOutputAssembly="false" /> | ||
14 | </ItemGroup> | ||
15 | |||
16 | <ItemGroup> | ||
17 | <PackageReference Include="WixInternal.Core.TestPackage" /> | ||
18 | </ItemGroup> | ||
19 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/Directory.Build.props b/src/ext/Bal/test/examples/Directory.Build.props index 7f38564a..e7d65cdd 100644 --- a/src/ext/Bal/test/examples/Directory.Build.props +++ b/src/ext/Bal/test/examples/Directory.Build.props | |||
@@ -2,6 +2,5 @@ | |||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | <Project> | 3 | <Project> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\Directory.Build.props" /> | 4 | <Import Project="$(MsbuildThisFileDirectory)..\..\Directory.Build.props" /> |
5 | <Import Project="Directory.csproj.props" Condition=" '$(MSBuildProjectExtension)'=='.csproj' " /> | ||
6 | <Import Project="Directory.wixproj.props" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> | 5 | <Import Project="Directory.wixproj.props" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> |
7 | </Project> | 6 | </Project> |
diff --git a/src/ext/Bal/test/examples/Directory.Build.targets b/src/ext/Bal/test/examples/Directory.Build.targets index b27a1a41..3e9115e0 100644 --- a/src/ext/Bal/test/examples/Directory.Build.targets +++ b/src/ext/Bal/test/examples/Directory.Build.targets | |||
@@ -3,5 +3,4 @@ | |||
3 | <Project> | 3 | <Project> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\..\..\Directory.Build.targets" /> | 4 | <Import Project="$(MsbuildThisFileDirectory)..\..\..\..\Directory.Build.targets" /> |
5 | <Import Project="Directory.wixproj.targets" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> | 5 | <Import Project="Directory.wixproj.targets" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> |
6 | <Import Project="DncBA.targets" Condition=" '$(IsDncBA)'=='true' " /> | ||
7 | </Project> | 6 | </Project> |
diff --git a/src/ext/Bal/test/examples/DncBA.targets b/src/ext/Bal/test/examples/DncBA.targets deleted file mode 100644 index 2b8c1428..00000000 --- a/src/ext/Bal/test/examples/DncBA.targets +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <Project> | ||
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\build\WixToolset.Dnc.HostGenerator.targets" /> | ||
5 | |||
6 | <PropertyGroup> | ||
7 | <ILLinkTreatWarningsAsErrors>false</ILLinkTreatWarningsAsErrors> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <ItemGroup> | ||
11 | <ProjectReference Include="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj" | ||
12 | OutputItemType="Analyzer" | ||
13 | ReferenceOutputAssembly="false" /> | ||
14 | </ItemGroup> | ||
15 | |||
16 | <ItemGroup> | ||
17 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
18 | </ItemGroup> | ||
19 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs index 116d5223..bb83568f 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs index 3672fc1d..ca3d4cf0 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDx86EarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{3D4A29A0-8AAE-4831-A9CF-E34AC298097D}"> | 2 | <Bundle Name="FDDx86EarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{3D4A29A0-8AAE-4831-A9CF-E34AC298097D}"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs index d888d3d9..38a167f1 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.EarliestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> | 5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt index 06b84256..d30b2564 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt +++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs index 5f1aa557..bf4ad6e3 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="SourceDir\Example.EarliestCoreMBA.exe" > |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> | 5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt index 06b84256..d30b2564 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt +++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs index c9291a7f..490f4051 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.EarliestCoreMBA | |||
6 | 6 | ||
7 | public class EarliestCoreBA : BootstrapperApplication | 7 | public class EarliestCoreBA : BootstrapperApplication |
8 | { | 8 | { |
9 | public EarliestCoreBA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(0); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs deleted file mode 100644 index 672e17ee..00000000 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.EarliestCoreMBA.EarliestCoreBAFactory))] | ||
4 | namespace Example.EarliestCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class EarliestCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new EarliestCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj index 7b9d1670..958381c3 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj | |||
@@ -3,7 +3,12 @@ | |||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <TargetFramework>net6.0</TargetFramework> | 4 | <TargetFramework>net6.0</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | 6 | <OutputType>WinExe</OutputType> |
7 | <DebugType>embedded</DebugType> | ||
7 | <Description>Earliest .NET Core MBA</Description> | 8 | <Description>Earliest .NET Core MBA</Description> |
8 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
9 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs new file mode 100644 index 00000000..11cc46f0 --- /dev/null +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace Example.EarliestCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new EarliestCoreBA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs index ba4f02b6..9ca93c7f 100644 --- a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs | |||
@@ -1,11 +1,10 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FullFramework2MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FullFramework2MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.exe"> |
4 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.dll" /> | 4 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.exe.config" /> |
5 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\mbanative.dll" /> | 5 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\mbanative.dll" /> |
6 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Core.dll" /> | 6 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Core.dll" /> |
7 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Host.config" /> | 7 | <!-- <bal:WixManagedBootstrapperApplicationHost /> --> |
8 | <bal:WixManagedBootstrapperApplicationHost /> | ||
9 | </BootstrapperApplication> | 8 | </BootstrapperApplication> |
10 | <Chain> | 9 | <Chain> |
11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 10 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj b/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj index ba75a9ff..7f9c222e 100644 --- a/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj +++ b/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj | |||
@@ -1,2 +1,6 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
2 | <Project Sdk="WixToolset.Sdk" /> | 2 | <Project Sdk="WixToolset.Sdk"> |
3 | <ItemGroup> | ||
4 | <ProjectReference Include="..\FullFramework2MBA\Example.FullFramework2MBA.csproj" /> | ||
5 | </ItemGroup> | ||
6 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/Directory.csproj.props b/src/ext/Bal/test/examples/FullFramework2MBA/App.config index e314ca20..cd68f257 100644 --- a/src/ext/Bal/test/examples/Directory.csproj.props +++ b/src/ext/Bal/test/examples/FullFramework2MBA/App.config | |||
@@ -1,5 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | <Project> | 3 | <configuration> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\build\WixToolset.Dnc.HostGenerator.props" /> | 4 | <startup> |
5 | </Project> | 5 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> |
6 | </startup> | ||
7 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj index f6280a9e..7c4db8c1 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj | |||
@@ -4,6 +4,7 @@ | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net462</TargetFramework> | 6 | <TargetFramework>net462</TargetFramework> |
7 | <OutputType>WinExe</OutputType> | ||
7 | <AssemblyName>Example.FullFramework2MBA</AssemblyName> | 8 | <AssemblyName>Example.FullFramework2MBA</AssemblyName> |
8 | <RootNamespace>Example.FullFramework2MBA</RootNamespace> | 9 | <RootNamespace>Example.FullFramework2MBA</RootNamespace> |
9 | <DebugType>embedded</DebugType> | 10 | <DebugType>embedded</DebugType> |
@@ -11,10 +12,10 @@ | |||
11 | </PropertyGroup> | 12 | </PropertyGroup> |
12 | 13 | ||
13 | <ItemGroup> | 14 | <ItemGroup> |
14 | <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | 15 | <PackageReference Include="WixToolset.Mba.Core" /> |
15 | </ItemGroup> | 16 | </ItemGroup> |
16 | 17 | ||
17 | <ItemGroup> | 18 | <ItemGroup> |
18 | <PackageReference Include="WixToolset.Mba.Core" /> | 19 | <ProjectReference Include="..\..\..\..\..\api\burn\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" /> |
19 | </ItemGroup> | 20 | </ItemGroup> |
20 | </Project> | 21 | </Project> |
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs index 32cd19c8..c6d478af 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs +++ b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.FullFramework2MBA | |||
6 | 6 | ||
7 | public class FullFramework2BA : BootstrapperApplication | 7 | public class FullFramework2BA : BootstrapperApplication |
8 | { | 8 | { |
9 | public FullFramework2BA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(42); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs deleted file mode 100644 index 647c2040..00000000 --- a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework2MBA.FullFramework2BAFactory))] | ||
4 | namespace Example.FullFramework2MBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class FullFramework2BAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new FullFramework2BA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs new file mode 100644 index 00000000..067fefe8 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace Example.FullFramework2MBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new FullFramework2BA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config deleted file mode 100644 index 41cacce5..00000000 --- a/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup> | ||
12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | |||
16 | <host assemblyName="Example.FullFramework2MBA"> | ||
17 | <supportedFramework version="v4\Client" /> | ||
18 | </host> | ||
19 | </wix.bootstrapper> | ||
20 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs index 802b8b1e..7cac54f2 100644 --- a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs | |||
@@ -1,11 +1,11 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FullFramework4MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="E08068E0-4FBA-439D-A1C8-4CD1FE27093F"> | 2 | <Bundle Name="FullFramework4MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="E08068E0-4FBA-439D-A1C8-4CD1FE27093F"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.exe"> |
4 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.dll" /> | 4 | <!-- <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.dll" /> --> |
5 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.exe.config" /> | ||
5 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\mbanative.dll" /> | 6 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\mbanative.dll" /> |
6 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Core.dll" /> | 7 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Core.dll" /> |
7 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Host.config" /> | 8 | <!-- <bal:WixManagedBootstrapperApplicationHost /> --> |
8 | <bal:WixManagedBootstrapperApplicationHost /> | ||
9 | </BootstrapperApplication> | 9 | </BootstrapperApplication> |
10 | <Chain> | 10 | <Chain> |
11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj b/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj index ba75a9ff..f36d1910 100644 --- a/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj +++ b/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj | |||
@@ -1,2 +1,7 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
2 | <Project Sdk="WixToolset.Sdk" /> | 2 | <Project Sdk="WixToolset.Sdk"> |
3 | <ItemGroup> | ||
4 | <ProjectReference Include="..\FullFramework4MBA\Example.FullFramework4MBA.csproj" /> | ||
5 | </ItemGroup> | ||
6 | </Project> | ||
7 | |||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/App.config b/src/ext/Bal/test/examples/FullFramework4MBA/App.config new file mode 100644 index 00000000..dfb3084c --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/App.config | |||
@@ -0,0 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | <configuration> | ||
4 | <startup> | ||
5 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
6 | </startup> | ||
7 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj index 247c8173..09665180 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj | |||
@@ -4,15 +4,13 @@ | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net472</TargetFramework> | 6 | <TargetFramework>net472</TargetFramework> |
7 | <OutputType>WinExe</OutputType> | ||
7 | <Description>Full Framework v4 MBA</Description> | 8 | <Description>Full Framework v4 MBA</Description> |
9 | <DebugType>embedded</DebugType> | ||
8 | <RuntimeIdentifier>win-x64</RuntimeIdentifier> | 10 | <RuntimeIdentifier>win-x64</RuntimeIdentifier> |
9 | </PropertyGroup> | 11 | </PropertyGroup> |
10 | 12 | ||
11 | <ItemGroup> | 13 | <ItemGroup> |
12 | <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | ||
13 | </ItemGroup> | ||
14 | |||
15 | <ItemGroup> | ||
16 | <PackageReference Include="WixToolset.Mba.Core" /> | 14 | <PackageReference Include="WixToolset.Mba.Core" /> |
17 | </ItemGroup> | 15 | </ItemGroup> |
18 | </Project> | 16 | </Project> |
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs index 8ee3bd19..8a91195a 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs +++ b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.FullFramework4MBA | |||
6 | 6 | ||
7 | public class FullFramework4BA : BootstrapperApplication | 7 | public class FullFramework4BA : BootstrapperApplication |
8 | { | 8 | { |
9 | public FullFramework4BA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(0); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs deleted file mode 100644 index 6a571a54..00000000 --- a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework4MBA.FullFramework4BAFactory))] | ||
4 | namespace Example.FullFramework4MBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class FullFramework4BAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new FullFramework4BA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs new file mode 100644 index 00000000..23fb6851 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace Example.FullFramework4MBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new FullFramework4BA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config deleted file mode 100644 index ac4770df..00000000 --- a/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup> | ||
12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | <host assemblyName="Example.FullFramework4MBA" /> | ||
16 | </wix.bootstrapper> | ||
17 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs index b29363dd..74f82d99 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs index 15dd290a..ab40a543 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDx86LatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{E547C546-5E0E-4BF9-A675-BBEF4C77FF0D}"> | 2 | <Bundle Name="FDDx86LatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{E547C546-5E0E-4BF9-A675-BBEF4C77FF0D}"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs index 56edc986..0022b690 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> | 5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt index acc7474c..f606296e 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt +++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs index 7ac9c34a..322a27a3 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> | 5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt index acc7474c..f606296e 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt +++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj index 236e715c..c4d31151 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj | |||
@@ -3,7 +3,12 @@ | |||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <TargetFramework>net6.0</TargetFramework> | 4 | <TargetFramework>net6.0</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | 6 | <OutputType>WinExe</OutputType> |
7 | <DebugType>embedded</DebugType> | ||
7 | <Description>Latest .NET Core MBA</Description> | 8 | <Description>Latest .NET Core MBA</Description> |
8 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
9 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs index 50386a87..bd5378eb 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs +++ b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs | |||
@@ -6,13 +6,9 @@ namespace Example.LatestCoreMBA | |||
6 | 6 | ||
7 | public class LatestCoreBA : BootstrapperApplication | 7 | public class LatestCoreBA : BootstrapperApplication |
8 | { | 8 | { |
9 | public LatestCoreBA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | } | ||
13 | |||
14 | protected override void Run() | 9 | protected override void Run() |
15 | { | 10 | { |
11 | this.engine.Quit(0); | ||
16 | } | 12 | } |
17 | 13 | ||
18 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs deleted file mode 100644 index fff3b5c5..00000000 --- a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.LatestCoreMBA.LatestCoreBAFactory))] | ||
4 | namespace Example.LatestCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class LatestCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new LatestCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs new file mode 100644 index 00000000..94da360b --- /dev/null +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace Example.LatestCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new LatestCoreBA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp index 5c6ed398..197e3116 100644 --- a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp +++ b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp | |||
@@ -26,16 +26,12 @@ HRESULT TestEngine::LoadBA( | |||
26 | { | 26 | { |
27 | HRESULT hr = S_OK; | 27 | HRESULT hr = S_OK; |
28 | BOOTSTRAPPER_COMMAND command = { }; | 28 | BOOTSTRAPPER_COMMAND command = { }; |
29 | BOOTSTRAPPER_CREATE_ARGS args = { }; | ||
30 | PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL; | ||
31 | 29 | ||
32 | if (m_pCreateResults || m_hBAModule) | 30 | if (m_hBAModule) |
33 | { | 31 | { |
34 | ExitFunction1(hr = E_INVALIDSTATE); | 32 | ExitFunction1(hr = E_INVALIDSTATE); |
35 | } | 33 | } |
36 | 34 | ||
37 | m_pCreateResults = static_cast<BOOTSTRAPPER_CREATE_RESULTS*>(MemAlloc(sizeof(BOOTSTRAPPER_CREATE_RESULTS), TRUE)); | ||
38 | |||
39 | command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); | 35 | command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); |
40 | 36 | ||
41 | hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); | 37 | hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); |
@@ -44,14 +40,7 @@ HRESULT TestEngine::LoadBA( | |||
44 | hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); | 40 | hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); |
45 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); | 41 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); |
46 | 42 | ||
47 | args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS); | 43 | #ifdef TODO_DELETE |
48 | args.pCommand = &command; | ||
49 | args.pfnBootstrapperEngineProc = TestEngine::EngineProc; | ||
50 | args.pvBootstrapperEngineProcContext = this; | ||
51 | args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1); | ||
52 | |||
53 | m_pCreateResults->cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | ||
54 | |||
55 | m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | 44 | m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); |
56 | ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); | 45 | ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); |
57 | 46 | ||
@@ -60,6 +49,7 @@ HRESULT TestEngine::LoadBA( | |||
60 | 49 | ||
61 | hr = pfnCreate(&args, m_pCreateResults); | 50 | hr = pfnCreate(&args, m_pCreateResults); |
62 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); | 51 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); |
52 | #endif | ||
63 | 53 | ||
64 | LExit: | 54 | LExit: |
65 | ReleaseStr(command.wzBootstrapperApplicationDataPath); | 55 | ReleaseStr(command.wzBootstrapperApplicationDataPath); |
@@ -117,7 +107,7 @@ HRESULT TestEngine::SendShutdownEvent( | |||
117 | shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); | 107 | shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); |
118 | shutdownResults.action = defaultAction; | 108 | shutdownResults.action = defaultAction; |
119 | shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); | 109 | shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); |
120 | hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); | 110 | // hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); |
121 | return hr; | 111 | return hr; |
122 | } | 112 | } |
123 | 113 | ||
@@ -128,7 +118,7 @@ HRESULT TestEngine::SendStartupEvent() | |||
128 | BA_ONSTARTUP_RESULTS startupResults = { }; | 118 | BA_ONSTARTUP_RESULTS startupResults = { }; |
129 | startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); | 119 | startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); |
130 | startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); | 120 | startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); |
131 | hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); | 121 | // hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); |
132 | return hr; | 122 | return hr; |
133 | } | 123 | } |
134 | 124 | ||
@@ -151,6 +141,7 @@ void TestEngine::UnloadBA( | |||
151 | __in BOOL fReload | 141 | __in BOOL fReload |
152 | ) | 142 | ) |
153 | { | 143 | { |
144 | #ifdef TODO_DELETE | ||
154 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; | 145 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; |
155 | BOOTSTRAPPER_DESTROY_ARGS args = { }; | 146 | BOOTSTRAPPER_DESTROY_ARGS args = { }; |
156 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; | 147 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; |
@@ -178,6 +169,7 @@ void TestEngine::UnloadBA( | |||
178 | 169 | ||
179 | m_hBAModule = NULL; | 170 | m_hBAModule = NULL; |
180 | } | 171 | } |
172 | #endif | ||
181 | } | 173 | } |
182 | 174 | ||
183 | HRESULT TestEngine::BAEngineLog( | 175 | HRESULT TestEngine::BAEngineLog( |
@@ -254,11 +246,9 @@ HRESULT TestEngine::ProcessBAMessage( | |||
254 | TestEngine::TestEngine() | 246 | TestEngine::TestEngine() |
255 | { | 247 | { |
256 | m_hBAModule = NULL; | 248 | m_hBAModule = NULL; |
257 | m_pCreateResults = NULL; | ||
258 | m_dwThreadId = ::GetCurrentThreadId(); | 249 | m_dwThreadId = ::GetCurrentThreadId(); |
259 | } | 250 | } |
260 | 251 | ||
261 | TestEngine::~TestEngine() | 252 | TestEngine::~TestEngine() |
262 | { | 253 | { |
263 | ReleaseMem(m_pCreateResults); | ||
264 | } | 254 | } |
diff --git a/src/ext/Bal/test/examples/TestEngine/TestEngine.h b/src/ext/Bal/test/examples/TestEngine/TestEngine.h index 248e979a..6c4867b0 100644 --- a/src/ext/Bal/test/examples/TestEngine/TestEngine.h +++ b/src/ext/Bal/test/examples/TestEngine/TestEngine.h | |||
@@ -77,6 +77,5 @@ public: | |||
77 | 77 | ||
78 | private: | 78 | private: |
79 | HMODULE m_hBAModule; | 79 | HMODULE m_hBAModule; |
80 | BOOTSTRAPPER_CREATE_RESULTS* m_pCreateResults; | ||
81 | DWORD m_dwThreadId; | 80 | DWORD m_dwThreadId; |
82 | }; | 81 | }; |
diff --git a/src/ext/Bal/test/examples/TestEngine/precomp.h b/src/ext/Bal/test/examples/TestEngine/precomp.h index f943f420..e9ba3f98 100644 --- a/src/ext/Bal/test/examples/TestEngine/precomp.h +++ b/src/ext/Bal/test/examples/TestEngine/precomp.h | |||
@@ -11,8 +11,8 @@ | |||
11 | #include "pathutil.h" | 11 | #include "pathutil.h" |
12 | #include "strutil.h" | 12 | #include "strutil.h" |
13 | 13 | ||
14 | #include "BootstrapperEngine.h" | 14 | #include <baenginetypes.h> |
15 | #include "BootstrapperApplication.h" | 15 | #include <batypes.h> |
16 | 16 | ||
17 | #include "TestEngine.h" | 17 | #include "TestEngine.h" |
18 | #include "ReloadEngine.h" | 18 | #include "ReloadEngine.h" |
diff --git a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs index 5f054ca4..e95fbba0 100644 --- a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDWPFCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDWPFCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.deps.json" Name="Example.WPFCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.deps.json" Name="Example.WPFCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.dll" Name="Example.WPFCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.dll" Name="Example.WPFCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.runtimeconfig.json" Name="Example.WPFCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.runtimeconfig.json" Name="Example.WPFCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj index 338da446..279b498f 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj | |||
@@ -1,10 +1,14 @@ | |||
1 | <Project Sdk="Microsoft.NET.Sdk"> | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 | ||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <OutputType>WinExe</OutputType> | ||
4 | <TargetFramework>net6.0-windows</TargetFramework> | 5 | <TargetFramework>net6.0-windows</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 6 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | ||
7 | <Description>WPF .NET Core MBA</Description> | 7 | <Description>WPF .NET Core MBA</Description> |
8 | <UseWPF>true</UseWPF> | 8 | <UseWPF>true</UseWPF> |
9 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
10 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs new file mode 100644 index 00000000..185e92cc --- /dev/null +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs | |||
@@ -0,0 +1,19 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace Example.WPFCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | // using WixToolset.BootstrapperApplications.Managed; | ||
7 | |||
8 | public class Program | ||
9 | { | ||
10 | public static int Main(string[] args) | ||
11 | { | ||
12 | var app = new WPFCoreBA(); | ||
13 | |||
14 | ManagedBootstrapperApplication.Run(app); | ||
15 | |||
16 | return 0; | ||
17 | } | ||
18 | } | ||
19 | } | ||
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs index d50be813..7bc06094 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs +++ b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs | |||
@@ -7,11 +7,6 @@ namespace Example.WPFCoreMBA | |||
7 | 7 | ||
8 | public class WPFCoreBA : BootstrapperApplication | 8 | public class WPFCoreBA : BootstrapperApplication |
9 | { | 9 | { |
10 | public WPFCoreBA(IEngine engine) | ||
11 | : base(engine) | ||
12 | { | ||
13 | } | ||
14 | |||
15 | public Dispatcher BADispatcher { get; private set; } | 10 | public Dispatcher BADispatcher { get; private set; } |
16 | 11 | ||
17 | protected override void Run() | 12 | protected override void Run() |
@@ -21,7 +16,7 @@ namespace Example.WPFCoreMBA | |||
21 | window.Closed += (s, e) => this.BADispatcher.InvokeShutdown(); | 16 | window.Closed += (s, e) => this.BADispatcher.InvokeShutdown(); |
22 | //window.Show(); | 17 | //window.Show(); |
23 | //Dispatcher.Run(); | 18 | //Dispatcher.Run(); |
24 | //this.engine.Quit(0); | 19 | this.engine.Quit(0); |
25 | } | 20 | } |
26 | 21 | ||
27 | protected override void OnStartup(StartupEventArgs args) | 22 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs deleted file mode 100644 index a3ccdf9f..00000000 --- a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.WPFCoreMBA.WPFCoreBAFactory))] | ||
4 | namespace Example.WPFCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class WPFCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new WPFCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/examples.proj b/src/ext/Bal/test/examples/examples.proj index 60388a93..c1544766 100644 --- a/src/ext/Bal/test/examples/examples.proj +++ b/src/ext/Bal/test/examples/examples.proj | |||
@@ -6,8 +6,6 @@ | |||
6 | 6 | ||
7 | <PropertyGroup> | 7 | <PropertyGroup> |
8 | <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath> | 8 | <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath> |
9 | <FullFramework2MBAProjectPath>FullFramework2MBA\Example.FullFramework2MBA.csproj</FullFramework2MBAProjectPath> | ||
10 | <FullFramework4MBAProjectPath>FullFramework4MBA\Example.FullFramework4MBA.csproj</FullFramework4MBAProjectPath> | ||
11 | <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath> | 9 | <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath> |
12 | <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath> | 10 | <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath> |
13 | <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath> | 11 | <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath> |
@@ -27,9 +25,6 @@ | |||
27 | <SkipFDDx86>true</SkipFDDx86> | 25 | <SkipFDDx86>true</SkipFDDx86> |
28 | <SkipSCD>true</SkipSCD> | 26 | <SkipSCD>true</SkipSCD> |
29 | </CoreMBAProject> | 27 | </CoreMBAProject> |
30 | |||
31 | <FullMBAProject Include="$(FullFramework2MBAProjectPath)" /> | ||
32 | <FullMBAProject Include="$(FullFramework4MBAProjectPath)" /> | ||
33 | </ItemGroup> | 28 | </ItemGroup> |
34 | 29 | ||
35 | <Target Name="PublishCoreExamples" BeforeTargets="Build"> | 30 | <Target Name="PublishCoreExamples" BeforeTargets="Build"> |
@@ -41,7 +36,7 @@ | |||
41 | Condition="'%(CoreMBAProject.SkipSCD)'==''" /> | 36 | Condition="'%(CoreMBAProject.SkipSCD)'==''" /> |
42 | <!-- | 37 | <!-- |
43 | Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535) | 38 | Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535) |
44 | and is now a build error. This will go away when BAs go out of proc, so not spending a | 39 | and is now a build error. This will go away when BAs go out of proc, so not spending a |
45 | lot of time to keep building trimmed in VS 17.8. | 40 | lot of time to keep building trimmed in VS 17.8. |
46 | --> | 41 | --> |
47 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"' | 42 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"' |
diff --git a/src/ext/Bal/wixext/BalBurnBackendExtension.cs b/src/ext/Bal/wixext/BalBurnBackendExtension.cs index 0293b236..84e4323e 100644 --- a/src/ext/Bal/wixext/BalBurnBackendExtension.cs +++ b/src/ext/Bal/wixext/BalBurnBackendExtension.cs | |||
@@ -18,16 +18,17 @@ namespace WixToolset.Bal | |||
18 | { | 18 | { |
19 | private static readonly IntermediateSymbolDefinition[] BurnSymbolDefinitions = | 19 | private static readonly IntermediateSymbolDefinition[] BurnSymbolDefinitions = |
20 | { | 20 | { |
21 | #pragma warning disable 0612 // obsolete | ||
21 | BalSymbolDefinitions.WixBalBAFactoryAssembly, | 22 | BalSymbolDefinitions.WixBalBAFactoryAssembly, |
23 | #pragma warning restore 0612 | ||
22 | BalSymbolDefinitions.WixBalBAFunctions, | 24 | BalSymbolDefinitions.WixBalBAFunctions, |
23 | BalSymbolDefinitions.WixBalCondition, | 25 | BalSymbolDefinitions.WixBalCondition, |
24 | BalSymbolDefinitions.WixBalPackageInfo, | 26 | BalSymbolDefinitions.WixBalPackageInfo, |
25 | BalSymbolDefinitions.WixDncOptions, | 27 | BalSymbolDefinitions.WixPrereqInformation, |
26 | BalSymbolDefinitions.WixMbaPrereqInformation, | ||
27 | BalSymbolDefinitions.WixStdbaCommandLine, | 28 | BalSymbolDefinitions.WixStdbaCommandLine, |
28 | BalSymbolDefinitions.WixStdbaOptions, | 29 | BalSymbolDefinitions.WixStdbaOptions, |
29 | BalSymbolDefinitions.WixStdbaOverridableVariable, | 30 | BalSymbolDefinitions.WixStdbaOverridableVariable, |
30 | BalSymbolDefinitions.WixMbaPrereqOptions, | 31 | BalSymbolDefinitions.WixPrereqOptions, |
31 | }; | 32 | }; |
32 | 33 | ||
33 | protected override IReadOnlyCollection<IntermediateSymbolDefinition> SymbolDefinitions => BurnSymbolDefinitions; | 34 | protected override IReadOnlyCollection<IntermediateSymbolDefinition> SymbolDefinitions => BurnSymbolDefinitions; |
@@ -112,59 +113,28 @@ namespace WixToolset.Bal | |||
112 | } | 113 | } |
113 | 114 | ||
114 | var isIuiBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.InternalUi; | 115 | var isIuiBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.InternalUi; |
116 | var isPreqBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Prerequisite; | ||
115 | var isStdBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Standard; | 117 | var isStdBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.Standard; |
116 | var isMBA = balBaSymbol.Type == WixBalBootstrapperApplicationType.ManagedHost; | ||
117 | var isDNC = balBaSymbol.Type == WixBalBootstrapperApplicationType.DotNetCoreHost; | ||
118 | var isSCD = isDNC && this.VerifySCD(section); | ||
119 | 118 | ||
120 | 119 | if (!isIuiBA && !isPreqBA && !isStdBA) | |
121 | if (!isIuiBA && !isStdBA && !isMBA && !isDNC) | ||
122 | { | 120 | { |
123 | throw new WixException($"Invalid WixBalBootstrapperApplicationType: '{balBaSymbol.Type}'"); | 121 | throw new WixException($"Invalid WixBalBootstrapperApplicationType: '{balBaSymbol.Type}'"); |
124 | } | 122 | } |
125 | 123 | ||
124 | this.VerifyBAFunctions(section); | ||
125 | |||
126 | if (isIuiBA) | 126 | if (isIuiBA) |
127 | { | 127 | { |
128 | // This needs to happen before VerifyPrereqPackages because it can add prereq packages. | 128 | // This needs to happen before VerifyPrereqPackages because it can add prereq packages. |
129 | this.VerifyPrimaryPackages(section, balBaSymbol.SourceLineNumbers); | 129 | this.VerifyPrimaryPackages(section, balBaSymbol.SourceLineNumbers); |
130 | } | 130 | } |
131 | 131 | ||
132 | if (isDNC) | 132 | if (isIuiBA || isPreqBA) |
133 | { | 133 | { |
134 | this.FinalizeBAFactorySymbol(section, balBaSymbol.SourceLineNumbers); | 134 | this.VerifyPrereqPackages(section, balBaSymbol.SourceLineNumbers, isIuiBA); |
135 | } | ||
136 | |||
137 | if (isIuiBA || isStdBA || isMBA || isDNC) | ||
138 | { | ||
139 | this.VerifyBAFunctions(section); | ||
140 | } | ||
141 | |||
142 | if (isIuiBA || isMBA || (isDNC && !isSCD)) | ||
143 | { | ||
144 | this.VerifyPrereqPackages(section, balBaSymbol.SourceLineNumbers, isDNC, isIuiBA); | ||
145 | } | 135 | } |
146 | } | 136 | } |
147 | 137 | ||
148 | private void FinalizeBAFactorySymbol(IntermediateSection section, SourceLineNumber baSourceLineNumbers) | ||
149 | { | ||
150 | var factorySymbol = section.Symbols.OfType<WixBalBAFactoryAssemblySymbol>().SingleOrDefault(); | ||
151 | if (null == factorySymbol) | ||
152 | { | ||
153 | this.Messaging.Write(BalErrors.MissingDNCBAFactoryAssembly(baSourceLineNumbers)); | ||
154 | return; | ||
155 | } | ||
156 | |||
157 | var factoryPayloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>() | ||
158 | .Where(p => p.Id.Id == factorySymbol.PayloadId) | ||
159 | .SingleOrDefault(); | ||
160 | if (null == factoryPayloadSymbol) | ||
161 | { | ||
162 | throw new WixException($"Missing payload symbol with id: 'factorySymbol.PayloadId'"); | ||
163 | } | ||
164 | |||
165 | factorySymbol.FilePath = factoryPayloadSymbol.Name; | ||
166 | } | ||
167 | |||
168 | private void VerifyBAFunctions(IntermediateSection section) | 138 | private void VerifyBAFunctions(IntermediateSection section) |
169 | { | 139 | { |
170 | WixBalBAFunctionsSymbol baFunctionsSymbol = null; | 140 | WixBalBAFunctionsSymbol baFunctionsSymbol = null; |
@@ -234,7 +204,7 @@ namespace WixToolset.Bal | |||
234 | var nonPermanentNonPrimaryPackages = new List<WixBundlePackageSymbol>(); | 204 | var nonPermanentNonPrimaryPackages = new List<WixBundlePackageSymbol>(); |
235 | 205 | ||
236 | var balPackageInfoSymbolsByPackageId = section.Symbols.OfType<WixBalPackageInfoSymbol>().ToDictionary(x => x.PackageId); | 206 | var balPackageInfoSymbolsByPackageId = section.Symbols.OfType<WixBalPackageInfoSymbol>().ToDictionary(x => x.PackageId); |
237 | var mbaPrereqInfoSymbolsByPackageId = section.Symbols.OfType<WixMbaPrereqInformationSymbol>().ToDictionary(x => x.PackageId); | 207 | var mbaPrereqInfoSymbolsByPackageId = section.Symbols.OfType<WixPrereqInformationSymbol>().ToDictionary(x => x.PackageId); |
238 | var msiPackageSymbolsByPackageId = section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(x => x.Id.Id); | 208 | var msiPackageSymbolsByPackageId = section.Symbols.OfType<WixBundleMsiPackageSymbol>().ToDictionary(x => x.Id.Id); |
239 | var packageSymbols = section.Symbols.OfType<WixBundlePackageSymbol>().ToList(); | 209 | var packageSymbols = section.Symbols.OfType<WixBundlePackageSymbol>().ToList(); |
240 | foreach (var packageSymbol in packageSymbols) | 210 | foreach (var packageSymbol in packageSymbols) |
@@ -263,7 +233,7 @@ namespace WixToolset.Bal | |||
263 | { | 233 | { |
264 | if (!isPrereq) | 234 | if (!isPrereq) |
265 | { | 235 | { |
266 | var prereqInfoSymbol = section.AddSymbol(new WixMbaPrereqInformationSymbol(packageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) | 236 | var prereqInfoSymbol = section.AddSymbol(new WixPrereqInformationSymbol(packageSymbol.SourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) |
267 | { | 237 | { |
268 | PackageId = packageId, | 238 | PackageId = packageId, |
269 | }); | 239 | }); |
@@ -476,13 +446,12 @@ namespace WixToolset.Bal | |||
476 | } | 446 | } |
477 | } | 447 | } |
478 | 448 | ||
479 | private void VerifyPrereqPackages(IntermediateSection section, SourceLineNumber baSourceLineNumbers, bool isDNC, bool isIuiBA) | 449 | private void VerifyPrereqPackages(IntermediateSection section, SourceLineNumber baSourceLineNumbers, bool isIuiBA) |
480 | { | 450 | { |
481 | var prereqInfoSymbols = section.Symbols.OfType<WixMbaPrereqInformationSymbol>().ToList(); | 451 | var prereqInfoSymbols = section.Symbols.OfType<WixPrereqInformationSymbol>().ToList(); |
482 | if (!isIuiBA && prereqInfoSymbols.Count == 0) | 452 | if (!isIuiBA && prereqInfoSymbols.Count == 0) |
483 | { | 453 | { |
484 | var message = isDNC ? BalErrors.MissingDNCPrereq(baSourceLineNumbers) : BalErrors.MissingMBAPrereq(baSourceLineNumbers); | 454 | this.Messaging.Write(BalErrors.MissingPrereq(baSourceLineNumbers)); |
485 | this.Messaging.Write(message); | ||
486 | return; | 455 | return; |
487 | } | 456 | } |
488 | 457 | ||
@@ -514,18 +483,5 @@ namespace WixToolset.Bal | |||
514 | } | 483 | } |
515 | } | 484 | } |
516 | } | 485 | } |
517 | |||
518 | private bool VerifySCD(IntermediateSection section) | ||
519 | { | ||
520 | var isSCD = false; | ||
521 | |||
522 | var dncOptions = section.Symbols.OfType<WixDncOptionsSymbol>().SingleOrDefault(); | ||
523 | if (dncOptions != null) | ||
524 | { | ||
525 | isSCD = dncOptions.SelfContainedDeployment != 0; | ||
526 | } | ||
527 | |||
528 | return isSCD; | ||
529 | } | ||
530 | } | 486 | } |
531 | } | 487 | } |
diff --git a/src/ext/Bal/wixext/BalCompiler.cs b/src/ext/Bal/wixext/BalCompiler.cs index 72883bdf..829da0e6 100644 --- a/src/ext/Bal/wixext/BalCompiler.cs +++ b/src/ext/Bal/wixext/BalCompiler.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Bal | |||
7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
8 | using WixToolset.Bal.Symbols; | 8 | using WixToolset.Bal.Symbols; |
9 | using WixToolset.Data; | 9 | using WixToolset.Data; |
10 | using WixToolset.Data.Burn; | ||
10 | using WixToolset.Data.Symbols; | 11 | using WixToolset.Data.Symbols; |
11 | using WixToolset.Extensibility; | 12 | using WixToolset.Extensibility; |
12 | using WixToolset.Extensibility.Data; | 13 | using WixToolset.Extensibility.Data; |
@@ -17,16 +18,9 @@ namespace WixToolset.Bal | |||
17 | public sealed class BalCompiler : BaseCompilerExtension | 18 | public sealed class BalCompiler : BaseCompilerExtension |
18 | { | 19 | { |
19 | private readonly Dictionary<string, WixBalPackageInfoSymbol> packageInfoSymbolsByPackageId = new Dictionary<string, WixBalPackageInfoSymbol>(); | 20 | private readonly Dictionary<string, WixBalPackageInfoSymbol> packageInfoSymbolsByPackageId = new Dictionary<string, WixBalPackageInfoSymbol>(); |
20 | private readonly Dictionary<string, WixMbaPrereqInformationSymbol> prereqInfoSymbolsByPackageId = new Dictionary<string, WixMbaPrereqInformationSymbol>(); | 21 | private readonly Dictionary<string, WixPrereqInformationSymbol> prereqInfoSymbolsByPackageId = new Dictionary<string, WixPrereqInformationSymbol>(); |
21 | 22 | ||
22 | private enum WixDotNetCoreBootstrapperApplicationHostTheme | 23 | private enum WixPrerequisiteBootstrapperApplicationTheme |
23 | { | ||
24 | Unknown, | ||
25 | None, | ||
26 | Standard, | ||
27 | } | ||
28 | |||
29 | private enum WixManagedBootstrapperApplicationHostTheme | ||
30 | { | 24 | { |
31 | Unknown, | 25 | Unknown, |
32 | None, | 26 | None, |
@@ -63,17 +57,35 @@ namespace WixToolset.Bal | |||
63 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> | 57 | /// <param name="context">Extra information about the context in which this element is being parsed.</param> |
64 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | 58 | public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
65 | { | 59 | { |
60 | this.ParsePossibleKeyPathElement(intermediate, section, parentElement, element, context); | ||
61 | } | ||
62 | |||
63 | /// <summary> | ||
64 | /// Processes an element for the Compiler. | ||
65 | /// </summary> | ||
66 | /// <param name="sourceLineNumbers">Source line number for the parent element.</param> | ||
67 | /// <param name="parentElement">Parent element of element to process.</param> | ||
68 | /// <param name="element">Element to process.</param> | ||
69 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | ||
70 | public override IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | ||
71 | { | ||
72 | IComponentKeyPath exePayloadRef = null; | ||
73 | |||
66 | switch (parentElement.Name.LocalName) | 74 | switch (parentElement.Name.LocalName) |
67 | { | 75 | { |
68 | case "Bundle": | 76 | case "Bundle": |
69 | case "Fragment": | 77 | case "Fragment": |
70 | switch (element.Name.LocalName) | 78 | switch (element.Name.LocalName) |
71 | { | 79 | { |
80 | case "BootstrapperApplicationPrerequisiteInformation": | ||
81 | this.ParseBootstrapperApplicationPrerequisiteInformationElement(intermediate, section, element); | ||
82 | break; | ||
72 | case "Condition": | 83 | case "Condition": |
73 | this.ParseConditionElement(intermediate, section, element); | 84 | this.ParseConditionElement(intermediate, section, element); |
74 | break; | 85 | break; |
75 | case "ManagedBootstrapperApplicationPrereqInformation": | 86 | case "ManagedBootstrapperApplicationPrereqInformation": |
76 | this.ParseMbaPrereqInfoElement(intermediate, section, element); | 87 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName, "BootstrapperApplicationPrerequisiteInformation")); |
88 | this.ParseBootstrapperApplicationPrerequisiteInformationElement(intermediate, section, element); | ||
77 | break; | 89 | break; |
78 | default: | 90 | default: |
79 | this.ParseHelper.UnexpectedElement(parentElement, element); | 91 | this.ParseHelper.UnexpectedElement(parentElement, element); |
@@ -84,16 +96,19 @@ namespace WixToolset.Bal | |||
84 | switch (element.Name.LocalName) | 96 | switch (element.Name.LocalName) |
85 | { | 97 | { |
86 | case "WixInternalUIBootstrapperApplication": | 98 | case "WixInternalUIBootstrapperApplication": |
87 | this.ParseWixInternalUIBootstrapperApplicationElement(intermediate, section, element); | 99 | exePayloadRef = this.ParseWixInternalUIBootstrapperApplicationElement(intermediate, section, element); |
100 | break; | ||
101 | case "WixPrerequisiteBootstrapperApplication": | ||
102 | this.ParseWixPrerequisiteBootstrapperApplicationElement(intermediate, section, element, context); | ||
88 | break; | 103 | break; |
89 | case "WixStandardBootstrapperApplication": | 104 | case "WixStandardBootstrapperApplication": |
90 | this.ParseWixStandardBootstrapperApplicationElement(intermediate, section, element); | 105 | exePayloadRef = this.ParseWixStandardBootstrapperApplicationElement(intermediate, section, element); |
91 | break; | 106 | break; |
92 | case "WixManagedBootstrapperApplicationHost": | 107 | case "WixManagedBootstrapperApplicationHost": |
93 | this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element); | 108 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName)); |
94 | break; | 109 | break; |
95 | case "WixDotNetCoreBootstrapperApplicationHost": | 110 | case "WixDotNetCoreBootstrapperApplicationHost": |
96 | this.ParseWixDotNetCoreBootstrapperApplicationHostElement(intermediate, section, element); | 111 | this.Messaging.Write(WarningMessages.DeprecatedElement(this.ParseHelper.GetSourceLineNumbers(element), element.Name.LocalName)); |
97 | break; | 112 | break; |
98 | default: | 113 | default: |
99 | this.ParseHelper.UnexpectedElement(parentElement, element); | 114 | this.ParseHelper.UnexpectedElement(parentElement, element); |
@@ -104,6 +119,8 @@ namespace WixToolset.Bal | |||
104 | this.ParseHelper.UnexpectedElement(parentElement, element); | 119 | this.ParseHelper.UnexpectedElement(parentElement, element); |
105 | break; | 120 | break; |
106 | } | 121 | } |
122 | |||
123 | return exePayloadRef; | ||
107 | } | 124 | } |
108 | 125 | ||
109 | /// <summary> | 126 | /// <summary> |
@@ -282,15 +299,7 @@ namespace WixToolset.Bal | |||
282 | switch (attribute.Name.LocalName) | 299 | switch (attribute.Name.LocalName) |
283 | { | 300 | { |
284 | case "BAFactoryAssembly": | 301 | case "BAFactoryAssembly": |
285 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 302 | this.Messaging.Write(BalWarnings.DeprecatedBAFactoryAssemblyAttribute(this.ParseHelper.GetSourceLineNumbers(parentElement), parentElement.Name.LocalName, attribute.Name.LocalName)); |
286 | { | ||
287 | // There can only be one. | ||
288 | var id = new Identifier(AccessModifier.Global, "TheBAFactoryAssembly"); | ||
289 | section.AddSymbol(new WixBalBAFactoryAssemblySymbol(sourceLineNumbers, id) | ||
290 | { | ||
291 | PayloadId = payloadId, | ||
292 | }); | ||
293 | } | ||
294 | break; | 303 | break; |
295 | case "BAFunctions": | 304 | case "BAFunctions": |
296 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 305 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) |
@@ -352,15 +361,15 @@ namespace WixToolset.Bal | |||
352 | return packageInfo; | 361 | return packageInfo; |
353 | } | 362 | } |
354 | 363 | ||
355 | private WixMbaPrereqInformationSymbol GetMbaPrereqInformationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, XAttribute prereqAttribute, string packageId) | 364 | private WixPrereqInformationSymbol GetMbaPrereqInformationSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, XAttribute prereqAttribute, string packageId) |
356 | { | 365 | { |
357 | WixMbaPrereqInformationSymbol prereqInfo = null; | 366 | WixPrereqInformationSymbol prereqInfo = null; |
358 | 367 | ||
359 | if (prereqAttribute != null && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqAttribute)) | 368 | if (prereqAttribute != null && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, prereqAttribute)) |
360 | { | 369 | { |
361 | if (!this.prereqInfoSymbolsByPackageId.TryGetValue(packageId, out prereqInfo)) | 370 | if (!this.prereqInfoSymbolsByPackageId.TryGetValue(packageId, out prereqInfo)) |
362 | { | 371 | { |
363 | prereqInfo = section.AddSymbol(new WixMbaPrereqInformationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) | 372 | prereqInfo = section.AddSymbol(new WixPrereqInformationSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) |
364 | { | 373 | { |
365 | PackageId = packageId, | 374 | PackageId = packageId, |
366 | }); | 375 | }); |
@@ -432,7 +441,7 @@ namespace WixToolset.Bal | |||
432 | /// Parses a Condition element for Bundles. | 441 | /// Parses a Condition element for Bundles. |
433 | /// </summary> | 442 | /// </summary> |
434 | /// <param name="node">The element to parse.</param> | 443 | /// <param name="node">The element to parse.</param> |
435 | private void ParseMbaPrereqInfoElement(Intermediate intermediate, IntermediateSection section, XElement node) | 444 | private void ParseBootstrapperApplicationPrerequisiteInformationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
436 | { | 445 | { |
437 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 446 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
438 | string packageId = null; | 447 | string packageId = null; |
@@ -480,7 +489,7 @@ namespace WixToolset.Bal | |||
480 | 489 | ||
481 | if (!this.Messaging.EncounteredError) | 490 | if (!this.Messaging.EncounteredError) |
482 | { | 491 | { |
483 | section.AddSymbol(new WixMbaPrereqInformationSymbol(sourceLineNumbers) | 492 | section.AddSymbol(new WixPrereqInformationSymbol(sourceLineNumbers) |
484 | { | 493 | { |
485 | PackageId = packageId, | 494 | PackageId = packageId, |
486 | LicenseFile = licenseFile, | 495 | LicenseFile = licenseFile, |
@@ -490,14 +499,16 @@ namespace WixToolset.Bal | |||
490 | } | 499 | } |
491 | } | 500 | } |
492 | 501 | ||
493 | private void ParseWixInternalUIBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) | 502 | private IComponentKeyPath ParseWixInternalUIBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
494 | { | 503 | { |
495 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 504 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
496 | WixInternalUIBootstrapperApplicationTheme? theme = null; | 505 | var theme = WixInternalUIBootstrapperApplicationTheme.Standard; |
497 | string themeFile = null; | 506 | string themeFile = null; |
498 | string logoFile = null; | 507 | string logoFile = null; |
499 | string localizationFile = null; | 508 | string localizationFile = null; |
500 | 509 | ||
510 | IComponentKeyPath exePayloadRef = null; | ||
511 | |||
501 | foreach (var attrib in node.Attributes()) | 512 | foreach (var attrib in node.Attributes()) |
502 | { | 513 | { |
503 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 514 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -542,11 +553,6 @@ namespace WixToolset.Bal | |||
542 | 553 | ||
543 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | 554 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); |
544 | 555 | ||
545 | if (!theme.HasValue) | ||
546 | { | ||
547 | theme = WixInternalUIBootstrapperApplicationTheme.Standard; | ||
548 | } | ||
549 | |||
550 | if (!this.Messaging.EncounteredError) | 556 | if (!this.Messaging.EncounteredError) |
551 | { | 557 | { |
552 | if (!String.IsNullOrEmpty(logoFile)) | 558 | if (!String.IsNullOrEmpty(logoFile)) |
@@ -573,23 +579,41 @@ namespace WixToolset.Bal | |||
573 | }); | 579 | }); |
574 | } | 580 | } |
575 | 581 | ||
576 | var baId = "WixInternalUIBootstrapperApplication"; | ||
577 | switch (theme) | 582 | switch (theme) |
578 | { | 583 | { |
579 | case WixInternalUIBootstrapperApplicationTheme.Standard: | 584 | case WixInternalUIBootstrapperApplicationTheme.Standard: |
580 | baId = "WixInternalUIBootstrapperApplication.Standard"; | 585 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixIuibaStandardPayloads", platformSpecific: false); |
581 | break; | 586 | break; |
582 | } | 587 | } |
583 | 588 | ||
584 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.InternalUi); | 589 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) |
590 | { | ||
591 | Type = WixBalBootstrapperApplicationType.InternalUi, | ||
592 | }); | ||
593 | |||
594 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) | ||
595 | { | ||
596 | Primary = 1, | ||
597 | HandleHelp = 1, | ||
598 | HandleLayout = 1, | ||
599 | }); | ||
600 | |||
601 | var exePayloadId = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixInternalUIBootstrapperApplication", platformSpecific: true); | ||
602 | |||
603 | exePayloadRef = this.CreateComponentKeyPath(); | ||
604 | exePayloadRef.Id = new Identifier(AccessModifier.Section, exePayloadId); | ||
605 | exePayloadRef.Explicit = true; // Internal UI BA is always secondary because the PrereqBA is always primary to handle the help and layout options. | ||
606 | exePayloadRef.Type = PossibleKeyPathType.File; | ||
585 | } | 607 | } |
608 | |||
609 | return exePayloadRef; | ||
586 | } | 610 | } |
587 | 611 | ||
588 | /// <summary> | 612 | /// <summary> |
589 | /// Parses a WixStandardBootstrapperApplication element for Bundles. | 613 | /// Parses a WixStandardBootstrapperApplication element for Bundles. |
590 | /// </summary> | 614 | /// </summary> |
591 | /// <param name="node">The element to parse.</param> | 615 | /// <param name="node">The element to parse.</param> |
592 | private void ParseWixStandardBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) | 616 | private IComponentKeyPath ParseWixStandardBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) |
593 | { | 617 | { |
594 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 618 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
595 | string launchTarget = null; | 619 | string launchTarget = null; |
@@ -610,6 +634,8 @@ namespace WixToolset.Bal | |||
610 | var showVersion = YesNoType.NotSet; | 634 | var showVersion = YesNoType.NotSet; |
611 | var supportCacheOnly = YesNoType.NotSet; | 635 | var supportCacheOnly = YesNoType.NotSet; |
612 | 636 | ||
637 | IComponentKeyPath exePayloadRef = null; | ||
638 | |||
613 | foreach (var attrib in node.Attributes()) | 639 | foreach (var attrib in node.Attributes()) |
614 | { | 640 | { |
615 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 641 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -840,35 +866,159 @@ namespace WixToolset.Bal | |||
840 | } | 866 | } |
841 | } | 867 | } |
842 | 868 | ||
843 | var baId = "WixStandardBootstrapperApplication"; | ||
844 | switch (theme) | 869 | switch (theme) |
845 | { | 870 | { |
846 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: | 871 | case WixStandardBootstrapperApplicationTheme.HyperlinkLargeLicense: |
847 | baId = "WixStandardBootstrapperApplication.HyperlinkLargeLicense"; | 872 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkLargeLicensePayloads", platformSpecific: false); |
848 | break; | 873 | break; |
849 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: | 874 | case WixStandardBootstrapperApplicationTheme.HyperlinkLicense: |
850 | baId = "WixStandardBootstrapperApplication.HyperlinkLicense"; | 875 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkLicensePayloads", platformSpecific: false); |
851 | break; | 876 | break; |
852 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: | 877 | case WixStandardBootstrapperApplicationTheme.HyperlinkSidebarLicense: |
853 | baId = "WixStandardBootstrapperApplication.HyperlinkSidebarLicense"; | 878 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaHyperlinkSidebarLicensePayloads", platformSpecific: false); |
854 | break; | 879 | break; |
855 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: | 880 | case WixStandardBootstrapperApplicationTheme.RtfLargeLicense: |
856 | baId = "WixStandardBootstrapperApplication.RtfLargeLicense"; | 881 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaRtfLargeLicensePayloads", platformSpecific: false); |
857 | break; | 882 | break; |
858 | case WixStandardBootstrapperApplicationTheme.RtfLicense: | 883 | case WixStandardBootstrapperApplicationTheme.RtfLicense: |
859 | baId = "WixStandardBootstrapperApplication.RtfLicense"; | 884 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStdbaRtfLicensePayloads", platformSpecific: false); |
885 | break; | ||
886 | } | ||
887 | |||
888 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) | ||
889 | { | ||
890 | Type = WixBalBootstrapperApplicationType.Standard, | ||
891 | }); | ||
892 | |||
893 | var exePayloadId = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixStandardBootstrapperApplication", platformSpecific: true); | ||
894 | |||
895 | exePayloadRef = this.CreateComponentKeyPath(); | ||
896 | exePayloadRef.Id = new Identifier(AccessModifier.Section, exePayloadId); | ||
897 | exePayloadRef.Type = PossibleKeyPathType.File; | ||
898 | } | ||
899 | |||
900 | return exePayloadRef; | ||
901 | } | ||
902 | |||
903 | /// <summary> | ||
904 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. | ||
905 | /// </summary> | ||
906 | /// <param name="node">The element to parse.</param> | ||
907 | private void ParseWixPrerequisiteBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node, IDictionary<string, string> context) | ||
908 | { | ||
909 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
910 | string logoFile = null; | ||
911 | string themeFile = null; | ||
912 | string localizationFile = null; | ||
913 | var theme = WixPrerequisiteBootstrapperApplicationTheme.Standard; | ||
914 | |||
915 | foreach (var attrib in node.Attributes()) | ||
916 | { | ||
917 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
918 | { | ||
919 | switch (attrib.Name.LocalName) | ||
920 | { | ||
921 | case "LogoFile": | ||
922 | logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
923 | break; | ||
924 | case "ThemeFile": | ||
925 | themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
926 | break; | ||
927 | case "LocalizationFile": | ||
928 | localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
929 | break; | ||
930 | case "Theme": | ||
931 | var themeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
932 | switch (themeValue) | ||
933 | { | ||
934 | case "none": | ||
935 | theme = WixPrerequisiteBootstrapperApplicationTheme.None; | ||
936 | break; | ||
937 | case "standard": | ||
938 | theme = WixPrerequisiteBootstrapperApplicationTheme.Standard; | ||
939 | break; | ||
940 | default: | ||
941 | this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Theme", themeValue, "none", "standard")); | ||
942 | theme = WixPrerequisiteBootstrapperApplicationTheme.Unknown; | ||
943 | break; | ||
944 | } | ||
945 | break; | ||
946 | default: | ||
947 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
948 | break; | ||
949 | } | ||
950 | } | ||
951 | else | ||
952 | { | ||
953 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
954 | } | ||
955 | } | ||
956 | |||
957 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
958 | |||
959 | if (!this.Messaging.EncounteredError) | ||
960 | { | ||
961 | if (!String.IsNullOrEmpty(logoFile)) | ||
962 | { | ||
963 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaLogo")) | ||
964 | { | ||
965 | Value = logoFile, | ||
966 | }); | ||
967 | } | ||
968 | |||
969 | if (!String.IsNullOrEmpty(themeFile)) | ||
970 | { | ||
971 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaThemeXml")) | ||
972 | { | ||
973 | Value = themeFile, | ||
974 | }); | ||
975 | } | ||
976 | |||
977 | if (!String.IsNullOrEmpty(localizationFile)) | ||
978 | { | ||
979 | section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPreqbaThemeWxl")) | ||
980 | { | ||
981 | Value = localizationFile, | ||
982 | }); | ||
983 | } | ||
984 | |||
985 | switch (theme) | ||
986 | { | ||
987 | case WixPrerequisiteBootstrapperApplicationTheme.Standard: | ||
988 | this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixPreqbaStandardPayloads", platformSpecific: false); | ||
860 | break; | 989 | break; |
861 | } | 990 | } |
862 | 991 | ||
863 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.Standard); | 992 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) |
993 | { | ||
994 | Type = WixBalBootstrapperApplicationType.Prerequisite, | ||
995 | }); | ||
996 | |||
997 | var primary = context.TryGetValue("Secondary", out var parentSecondaryValue) && "True".Equals(parentSecondaryValue, StringComparison.OrdinalIgnoreCase) ? true : false; | ||
998 | |||
999 | var baId = this.CreateIdentifierFromPlatform(sourceLineNumbers, node, primary ? "WixPrereqBootstrapperApplication.Primary" : "WixPrereqBootstrapperApplication.Secondary"); | ||
1000 | |||
1001 | if (!String.IsNullOrEmpty(baId)) | ||
1002 | { | ||
1003 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, baId); | ||
1004 | } | ||
1005 | |||
1006 | if (primary) | ||
1007 | { | ||
1008 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) | ||
1009 | { | ||
1010 | Primary = 1 | ||
1011 | }); | ||
1012 | } | ||
864 | } | 1013 | } |
865 | } | 1014 | } |
866 | 1015 | ||
1016 | #if DELETE | ||
867 | /// <summary> | 1017 | /// <summary> |
868 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. | 1018 | /// Parses a WixManagedBootstrapperApplicationHost element for Bundles. |
869 | /// </summary> | 1019 | /// </summary> |
870 | /// <param name="node">The element to parse.</param> | 1020 | /// <param name="node">The element to parse.</param> |
871 | private void ParseWixManagedBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) | 1021 | private IComponentKeyPath ParseWixManagedBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) |
872 | { | 1022 | { |
873 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 1023 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
874 | bool alwaysInstallPrereqs = false; | 1024 | bool alwaysInstallPrereqs = false; |
@@ -877,6 +1027,8 @@ namespace WixToolset.Bal | |||
877 | string localizationFile = null; | 1027 | string localizationFile = null; |
878 | WixManagedBootstrapperApplicationHostTheme? theme = null; | 1028 | WixManagedBootstrapperApplicationHostTheme? theme = null; |
879 | 1029 | ||
1030 | IComponentKeyPath exePayloadRef = null; | ||
1031 | |||
880 | foreach (var attrib in node.Attributes()) | 1032 | foreach (var attrib in node.Attributes()) |
881 | { | 1033 | { |
882 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 1034 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -963,23 +1115,25 @@ namespace WixToolset.Bal | |||
963 | break; | 1115 | break; |
964 | } | 1116 | } |
965 | 1117 | ||
966 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.ManagedHost); | 1118 | exePayloadRef = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixManagedBootstrapperApplicationHost", baId, WixBalBootstrapperApplicationType.ManagedHost); |
967 | 1119 | ||
968 | if (alwaysInstallPrereqs) | 1120 | if (alwaysInstallPrereqs) |
969 | { | 1121 | { |
970 | section.AddSymbol(new WixMbaPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixMbaPrereqOptions")) | 1122 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) |
971 | { | 1123 | { |
972 | AlwaysInstallPrereqs = 1, | 1124 | AlwaysInstallPrereqs = 1, |
973 | }); | 1125 | }); |
974 | } | 1126 | } |
975 | } | 1127 | } |
1128 | |||
1129 | return exePayloadRef; | ||
976 | } | 1130 | } |
977 | 1131 | ||
978 | /// <summary> | 1132 | /// <summary> |
979 | /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles. | 1133 | /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles. |
980 | /// </summary> | 1134 | /// </summary> |
981 | /// <param name="node">The element to parse.</param> | 1135 | /// <param name="node">The element to parse.</param> |
982 | private void ParseWixDotNetCoreBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) | 1136 | private IComponentKeyPath ParseWixDotNetCoreBootstrapperApplicationHostElement(Intermediate intermediate, IntermediateSection section, XElement node) |
983 | { | 1137 | { |
984 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 1138 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
985 | bool alwaysInstallPrereqs = false; | 1139 | bool alwaysInstallPrereqs = false; |
@@ -989,6 +1143,8 @@ namespace WixToolset.Bal | |||
989 | var selfContainedDeployment = YesNoType.NotSet; | 1143 | var selfContainedDeployment = YesNoType.NotSet; |
990 | WixDotNetCoreBootstrapperApplicationHostTheme? theme = null; | 1144 | WixDotNetCoreBootstrapperApplicationHostTheme? theme = null; |
991 | 1145 | ||
1146 | IComponentKeyPath exePayloadRef = null; | ||
1147 | |||
992 | foreach (var attrib in node.Attributes()) | 1148 | foreach (var attrib in node.Attributes()) |
993 | { | 1149 | { |
994 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 1150 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
@@ -1086,19 +1242,36 @@ namespace WixToolset.Bal | |||
1086 | break; | 1242 | break; |
1087 | } | 1243 | } |
1088 | 1244 | ||
1089 | this.CreateBARef(section, sourceLineNumbers, node, baId, WixBalBootstrapperApplicationType.DotNetCoreHost); | 1245 | exePayloadRef = this.CreatePayloadGroupRef(section, sourceLineNumbers, node, "WixDotNetCoreBootstrapperApplicationHost", baId, WixBalBootstrapperApplicationType.DotNetCoreHost); |
1090 | 1246 | ||
1091 | if (alwaysInstallPrereqs) | 1247 | if (alwaysInstallPrereqs) |
1092 | { | 1248 | { |
1093 | section.AddSymbol(new WixMbaPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixMbaPrereqOptions")) | 1249 | section.AddSymbol(new WixPrereqOptionsSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixPrereqOptions")) |
1094 | { | 1250 | { |
1095 | AlwaysInstallPrereqs = 1, | 1251 | AlwaysInstallPrereqs = 1, |
1096 | }); | 1252 | }); |
1097 | } | 1253 | } |
1098 | } | 1254 | } |
1255 | |||
1256 | return exePayloadRef; | ||
1257 | } | ||
1258 | #endif | ||
1259 | |||
1260 | private string CreatePayloadGroupRef(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement node, string basePayloadGroupId, bool platformSpecific) | ||
1261 | { | ||
1262 | var id = platformSpecific ? this.CreateIdentifierFromPlatform(sourceLineNumbers, node, basePayloadGroupId) : basePayloadGroupId; | ||
1263 | |||
1264 | if (!String.IsNullOrEmpty(id)) | ||
1265 | { | ||
1266 | this.ParseHelper.CreateWixGroupSymbol(section, sourceLineNumbers, ComplexReferenceParentType.Container, BurnConstants.BurnUXContainerName, ComplexReferenceChildType.PayloadGroup, id); | ||
1267 | |||
1268 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundlePayloadGroup, id); | ||
1269 | } | ||
1270 | |||
1271 | return id; | ||
1099 | } | 1272 | } |
1100 | 1273 | ||
1101 | private void CreateBARef(IntermediateSection section, SourceLineNumber sourceLineNumbers, XElement node, string name, WixBalBootstrapperApplicationType baType) | 1274 | private string CreateIdentifierFromPlatform(SourceLineNumber sourceLineNumbers, XElement node, string name) |
1102 | { | 1275 | { |
1103 | var id = this.ParseHelper.CreateIdentifierValueFromPlatform(name, this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); | 1276 | var id = this.ParseHelper.CreateIdentifierValueFromPlatform(name, this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); |
1104 | if (id == null) | 1277 | if (id == null) |
@@ -1106,15 +1279,7 @@ namespace WixToolset.Bal | |||
1106 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName)); | 1279 | this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName)); |
1107 | } | 1280 | } |
1108 | 1281 | ||
1109 | if (!this.Messaging.EncounteredError) | 1282 | return id; |
1110 | { | ||
1111 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBootstrapperApplication, id); | ||
1112 | |||
1113 | section.AddSymbol(new WixBalBootstrapperApplicationSymbol(sourceLineNumbers) | ||
1114 | { | ||
1115 | Type = baType, | ||
1116 | }); | ||
1117 | } | ||
1118 | } | 1283 | } |
1119 | } | 1284 | } |
1120 | } | 1285 | } |
diff --git a/src/ext/Bal/wixext/BalErrors.cs b/src/ext/Bal/wixext/BalErrors.cs index 7fbccecb..10986f0e 100644 --- a/src/ext/Bal/wixext/BalErrors.cs +++ b/src/ext/Bal/wixext/BalErrors.cs | |||
@@ -48,9 +48,9 @@ namespace WixToolset.Bal | |||
48 | return Message(sourceLineNumbers, Ids.MissingDNCBAFactoryAssembly, "When using DotNetCoreBootstrapperApplicationHost, the Payload element for the BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\"."); | 48 | return Message(sourceLineNumbers, Ids.MissingDNCBAFactoryAssembly, "When using DotNetCoreBootstrapperApplicationHost, the Payload element for the BA's entry point DLL must have bal:BAFactoryAssembly=\"yes\"."); |
49 | } | 49 | } |
50 | 50 | ||
51 | public static Message MissingDNCPrereq(SourceLineNumber sourceLineNumbers) | 51 | public static Message MissingPrereq(SourceLineNumber sourceLineNumbers) |
52 | { | 52 | { |
53 | return Message(sourceLineNumbers, Ids.MissingDNCPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\"."); | 53 | return Message(sourceLineNumbers, Ids.MissingPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the bal:WixPrerequisiteBootstrapperApplication."); |
54 | } | 54 | } |
55 | 55 | ||
56 | public static Message MissingIUIPrimaryPackage(SourceLineNumber sourceLineNumbers) | 56 | public static Message MissingIUIPrimaryPackage(SourceLineNumber sourceLineNumbers) |
@@ -58,11 +58,6 @@ namespace WixToolset.Bal | |||
58 | return Message(sourceLineNumbers, Ids.MissingIUIPrimaryPackage, "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\"."); | 58 | return Message(sourceLineNumbers, Ids.MissingIUIPrimaryPackage, "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\"."); |
59 | } | 59 | } |
60 | 60 | ||
61 | public static Message MissingMBAPrereq(SourceLineNumber sourceLineNumbers) | ||
62 | { | ||
63 | return Message(sourceLineNumbers, Ids.MissingMBAPrereq, "There must be at least one package with bal:PrereqPackage=\"yes\" when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups."); | ||
64 | } | ||
65 | |||
66 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) | 61 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) |
67 | { | 62 | { |
68 | return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs."); | 63 | return Message(sourceLineNumbers, Ids.MultipleBAFunctions, "WixStandardBootstrapperApplication doesn't support multiple BAFunctions DLLs."); |
@@ -106,11 +101,10 @@ namespace WixToolset.Bal | |||
106 | public enum Ids | 101 | public enum Ids |
107 | { | 102 | { |
108 | AttributeRequiresPrereqPackage = 6801, | 103 | AttributeRequiresPrereqPackage = 6801, |
109 | MissingMBAPrereq = 6802, | 104 | MissingPrereq = 6802, |
110 | MultiplePrereqLicenses = 6803, | 105 | MultiplePrereqLicenses = 6803, |
111 | MultipleBAFunctions = 6804, | 106 | MultipleBAFunctions = 6804, |
112 | BAFunctionsPayloadRequiredInUXContainer = 6805, | 107 | BAFunctionsPayloadRequiredInUXContainer = 6805, |
113 | MissingDNCPrereq = 6806, | ||
114 | MissingIUIPrimaryPackage = 6808, | 108 | MissingIUIPrimaryPackage = 6808, |
115 | MultiplePrimaryPackageType = 6809, | 109 | MultiplePrimaryPackageType = 6809, |
116 | MultiplePrimaryPackageType2 = 6810, | 110 | MultiplePrimaryPackageType2 = 6810, |
diff --git a/src/ext/Bal/wixext/BalWarnings.cs b/src/ext/Bal/wixext/BalWarnings.cs index 96e7a523..73a19d07 100644 --- a/src/ext/Bal/wixext/BalWarnings.cs +++ b/src/ext/Bal/wixext/BalWarnings.cs | |||
@@ -33,6 +33,11 @@ namespace WixToolset.Bal | |||
33 | return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded."); | 33 | return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded."); |
34 | } | 34 | } |
35 | 35 | ||
36 | public static Message DeprecatedBAFactoryAssemblyAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
37 | { | ||
38 | return Message(sourceLineNumbers, Ids.DeprecatedBAFactoryAssemblyAttribute, "The {0}/@{1} attribute has been deprecated. Move the Payload/@SourceFile attribute to be the BootstrapperApplication/@SourceFile attribute and remove the Payload element.", elementName, attributeName); | ||
39 | } | ||
40 | |||
36 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | 41 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
37 | { | 42 | { |
38 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | 43 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); |
@@ -50,6 +55,7 @@ namespace WixToolset.Bal | |||
50 | IuibaPrimaryPackageInstallCondition = 6503, | 55 | IuibaPrimaryPackageInstallCondition = 6503, |
51 | IuibaPrimaryPackageDisplayInternalUICondition = 6504, | 56 | IuibaPrimaryPackageDisplayInternalUICondition = 6504, |
52 | IuibaPrereqPackageAfterPrimaryPackage = 6505, | 57 | IuibaPrereqPackageAfterPrimaryPackage = 6505, |
58 | DeprecatedBAFactoryAssemblyAttribute = 6506, | ||
53 | } | 59 | } |
54 | } | 60 | } |
55 | } | 61 | } |
diff --git a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs index 5229f278..5e9fb936 100644 --- a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs +++ b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs | |||
@@ -13,11 +13,11 @@ namespace WixToolset.Bal | |||
13 | WixBalCondition, | 13 | WixBalCondition, |
14 | WixBalPackageInfo, | 14 | WixBalPackageInfo, |
15 | WixDncOptions, | 15 | WixDncOptions, |
16 | WixMbaPrereqInformation, | 16 | WixPrereqInformation, |
17 | WixStdbaCommandLine, | 17 | WixStdbaCommandLine, |
18 | WixStdbaOptions, | 18 | WixStdbaOptions, |
19 | WixStdbaOverridableVariable, | 19 | WixStdbaOverridableVariable, |
20 | WixMbaPrereqOptions, | 20 | WixPrereqOptions, |
21 | WixBalBootstrapperApplication, | 21 | WixBalBootstrapperApplication, |
22 | } | 22 | } |
23 | 23 | ||
@@ -37,8 +37,10 @@ namespace WixToolset.Bal | |||
37 | { | 37 | { |
38 | switch (type) | 38 | switch (type) |
39 | { | 39 | { |
40 | #pragma warning disable 0612 // obsolete | ||
40 | case BalSymbolDefinitionType.WixBalBAFactoryAssembly: | 41 | case BalSymbolDefinitionType.WixBalBAFactoryAssembly: |
41 | return BalSymbolDefinitions.WixBalBAFactoryAssembly; | 42 | return BalSymbolDefinitions.WixBalBAFactoryAssembly; |
43 | #pragma warning restore 0612 | ||
42 | 44 | ||
43 | case BalSymbolDefinitionType.WixBalBAFunctions: | 45 | case BalSymbolDefinitionType.WixBalBAFunctions: |
44 | return BalSymbolDefinitions.WixBalBAFunctions; | 46 | return BalSymbolDefinitions.WixBalBAFunctions; |
@@ -49,11 +51,8 @@ namespace WixToolset.Bal | |||
49 | case BalSymbolDefinitionType.WixBalPackageInfo: | 51 | case BalSymbolDefinitionType.WixBalPackageInfo: |
50 | return BalSymbolDefinitions.WixBalPackageInfo; | 52 | return BalSymbolDefinitions.WixBalPackageInfo; |
51 | 53 | ||
52 | case BalSymbolDefinitionType.WixDncOptions: | 54 | case BalSymbolDefinitionType.WixPrereqInformation: |
53 | return BalSymbolDefinitions.WixDncOptions; | 55 | return BalSymbolDefinitions.WixPrereqInformation; |
54 | |||
55 | case BalSymbolDefinitionType.WixMbaPrereqInformation: | ||
56 | return BalSymbolDefinitions.WixMbaPrereqInformation; | ||
57 | 56 | ||
58 | case BalSymbolDefinitionType.WixStdbaCommandLine: | 57 | case BalSymbolDefinitionType.WixStdbaCommandLine: |
59 | return BalSymbolDefinitions.WixStdbaCommandLine; | 58 | return BalSymbolDefinitions.WixStdbaCommandLine; |
@@ -64,8 +63,8 @@ namespace WixToolset.Bal | |||
64 | case BalSymbolDefinitionType.WixStdbaOverridableVariable: | 63 | case BalSymbolDefinitionType.WixStdbaOverridableVariable: |
65 | return BalSymbolDefinitions.WixStdbaOverridableVariable; | 64 | return BalSymbolDefinitions.WixStdbaOverridableVariable; |
66 | 65 | ||
67 | case BalSymbolDefinitionType.WixMbaPrereqOptions: | 66 | case BalSymbolDefinitionType.WixPrereqOptions: |
68 | return BalSymbolDefinitions.WixMbaPrereqOptions; | 67 | return BalSymbolDefinitions.WixPrereqOptions; |
69 | 68 | ||
70 | case BalSymbolDefinitionType.WixBalBootstrapperApplication: | 69 | case BalSymbolDefinitionType.WixBalBootstrapperApplication: |
71 | return BalSymbolDefinitions.WixBalBootstrapperApplication; | 70 | return BalSymbolDefinitions.WixBalBootstrapperApplication; |
@@ -77,16 +76,17 @@ namespace WixToolset.Bal | |||
77 | 76 | ||
78 | static BalSymbolDefinitions() | 77 | static BalSymbolDefinitions() |
79 | { | 78 | { |
79 | #pragma warning disable 0612 // obsolete | ||
80 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 80 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
81 | #pragma warning restore 0612 | ||
81 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 82 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
82 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 83 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
83 | WixBalPackageInfo.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 84 | WixBalPackageInfo.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
84 | WixDncOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 85 | WixPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
85 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | ||
86 | WixStdbaCommandLine.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 86 | WixStdbaCommandLine.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
87 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 87 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
88 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 88 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
89 | WixMbaPrereqOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); | 89 | WixPrereqOptions.AddTag(BurnConstants.BootstrapperApplicationDataSymbolDefinitionTag); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | } | 92 | } |
diff --git a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs index 52042e4c..3ce535a3 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs | |||
@@ -2,11 +2,13 @@ | |||
2 | 2 | ||
3 | namespace WixToolset.Bal | 3 | namespace WixToolset.Bal |
4 | { | 4 | { |
5 | using System; | ||
5 | using WixToolset.Data; | 6 | using WixToolset.Data; |
6 | using WixToolset.Bal.Symbols; | 7 | using WixToolset.Bal.Symbols; |
7 | 8 | ||
8 | public static partial class BalSymbolDefinitions | 9 | public static partial class BalSymbolDefinitions |
9 | { | 10 | { |
11 | [Obsolete] | ||
10 | public static readonly IntermediateSymbolDefinition WixBalBAFactoryAssembly = new IntermediateSymbolDefinition( | 12 | public static readonly IntermediateSymbolDefinition WixBalBAFactoryAssembly = new IntermediateSymbolDefinition( |
11 | BalSymbolDefinitionType.WixBalBAFactoryAssembly.ToString(), | 13 | BalSymbolDefinitionType.WixBalBAFactoryAssembly.ToString(), |
12 | new[] | 14 | new[] |
@@ -20,14 +22,17 @@ namespace WixToolset.Bal | |||
20 | 22 | ||
21 | namespace WixToolset.Bal.Symbols | 23 | namespace WixToolset.Bal.Symbols |
22 | { | 24 | { |
25 | using System; | ||
23 | using WixToolset.Data; | 26 | using WixToolset.Data; |
24 | 27 | ||
28 | [Obsolete] | ||
25 | public enum WixBalBAFactorySymbolFields | 29 | public enum WixBalBAFactorySymbolFields |
26 | { | 30 | { |
27 | PayloadId, | 31 | PayloadId, |
28 | FilePath, | 32 | FilePath, |
29 | } | 33 | } |
30 | 34 | ||
35 | [Obsolete] | ||
31 | public class WixBalBAFactoryAssemblySymbol : IntermediateSymbol | 36 | public class WixBalBAFactoryAssemblySymbol : IntermediateSymbol |
32 | { | 37 | { |
33 | public WixBalBAFactoryAssemblySymbol() : base(BalSymbolDefinitions.WixBalBAFactoryAssembly, null, null) | 38 | public WixBalBAFactoryAssemblySymbol() : base(BalSymbolDefinitions.WixBalBAFactoryAssembly, null, null) |
@@ -52,4 +57,4 @@ namespace WixToolset.Bal.Symbols | |||
52 | set => this.Set((int)WixBalBAFactorySymbolFields.FilePath, value); | 57 | set => this.Set((int)WixBalBAFactorySymbolFields.FilePath, value); |
53 | } | 58 | } |
54 | } | 59 | } |
55 | } \ No newline at end of file | 60 | } |
diff --git a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs index 7096930d..47e930c2 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs | |||
@@ -19,15 +19,19 @@ namespace WixToolset.Bal | |||
19 | 19 | ||
20 | namespace WixToolset.Bal.Symbols | 20 | namespace WixToolset.Bal.Symbols |
21 | { | 21 | { |
22 | using System; | ||
22 | using WixToolset.Data; | 23 | using WixToolset.Data; |
23 | 24 | ||
24 | public enum WixBalBootstrapperApplicationType | 25 | public enum WixBalBootstrapperApplicationType |
25 | { | 26 | { |
26 | Unknown, | 27 | Unknown, |
27 | Standard, | 28 | Standard, |
29 | [Obsolete] | ||
28 | ManagedHost, | 30 | ManagedHost, |
31 | [Obsolete] | ||
29 | DotNetCoreHost, | 32 | DotNetCoreHost, |
30 | InternalUi, | 33 | InternalUi, |
34 | Prerequisite, | ||
31 | } | 35 | } |
32 | 36 | ||
33 | public enum WixBalBootstrapperApplicationSymbolFields | 37 | public enum WixBalBootstrapperApplicationSymbolFields |
diff --git a/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs deleted file mode 100644 index b9a41c21..00000000 --- a/src/ext/Bal/wixext/Symbols/WixDncOptionsSymbol.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixDncOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixDncOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixDncOptionsSymbolFields.SelfContainedDeployment), IntermediateFieldType.Number), | ||
15 | }, | ||
16 | typeof(WixDncOptionsSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Bal.Symbols | ||
21 | { | ||
22 | using WixToolset.Data; | ||
23 | |||
24 | public enum WixDncOptionsSymbolFields | ||
25 | { | ||
26 | SelfContainedDeployment, | ||
27 | } | ||
28 | |||
29 | public class WixDncOptionsSymbol : IntermediateSymbol | ||
30 | { | ||
31 | public WixDncOptionsSymbol() : base(BalSymbolDefinitions.WixDncOptions, null, null) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | public WixDncOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixDncOptions, sourceLineNumber, id) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public IntermediateField this[WixDncOptionsSymbolFields index] => this.Fields[(int)index]; | ||
40 | |||
41 | public int SelfContainedDeployment | ||
42 | { | ||
43 | get => this.Fields[(int)WixDncOptionsSymbolFields.SelfContainedDeployment].AsNumber(); | ||
44 | set => this.Set((int)WixDncOptionsSymbolFields.SelfContainedDeployment, value); | ||
45 | } | ||
46 | } | ||
47 | } \ No newline at end of file | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs deleted file mode 100644 index e4d78da0..00000000 --- a/src/ext/Bal/wixext/Symbols/WixMbaPrereqInformationSymbol.cs +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixMbaPrereqInformation = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixMbaPrereqInformation.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.PackageId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.LicenseFile), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixMbaPrereqInformationSymbolFields.LicenseUrl), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixMbaPrereqInformationSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixMbaPrereqInformationSymbolFields | ||
27 | { | ||
28 | PackageId, | ||
29 | LicenseFile, | ||
30 | LicenseUrl, | ||
31 | } | ||
32 | |||
33 | public class WixMbaPrereqInformationSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixMbaPrereqInformationSymbol() : base(BalSymbolDefinitions.WixMbaPrereqInformation, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixMbaPrereqInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixMbaPrereqInformation, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixMbaPrereqInformationSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string PackageId | ||
46 | { | ||
47 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.PackageId].AsString(); | ||
48 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.PackageId, value); | ||
49 | } | ||
50 | |||
51 | public string LicenseFile | ||
52 | { | ||
53 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.LicenseFile].AsString(); | ||
54 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.LicenseFile, value); | ||
55 | } | ||
56 | |||
57 | public string LicenseUrl | ||
58 | { | ||
59 | get => this.Fields[(int)WixMbaPrereqInformationSymbolFields.LicenseUrl].AsString(); | ||
60 | set => this.Set((int)WixMbaPrereqInformationSymbolFields.LicenseUrl, value); | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs deleted file mode 100644 index 66374579..00000000 --- a/src/ext/Bal/wixext/Symbols/WixMbaPrereqOptionsSymbol.cs +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixMbaPrereqOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixMbaPrereqOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs), IntermediateFieldType.Number), | ||
15 | }, | ||
16 | typeof(WixMbaPrereqOptionsSymbol)); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | namespace WixToolset.Bal.Symbols | ||
21 | { | ||
22 | using WixToolset.Data; | ||
23 | |||
24 | public enum WixMbaPrereqOptionsSymbolFields | ||
25 | { | ||
26 | AlwaysInstallPrereqs, | ||
27 | } | ||
28 | |||
29 | public class WixMbaPrereqOptionsSymbol : IntermediateSymbol | ||
30 | { | ||
31 | public WixMbaPrereqOptionsSymbol() : base(BalSymbolDefinitions.WixMbaPrereqOptions, null, null) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | public WixMbaPrereqOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixMbaPrereqOptions, sourceLineNumber, id) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public IntermediateField this[WixMbaPrereqOptionsSymbolFields index] => this.Fields[(int)index]; | ||
40 | |||
41 | public int AlwaysInstallPrereqs | ||
42 | { | ||
43 | get => this.Fields[(int)WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs].AsNumber(); | ||
44 | set => this.Set((int)WixMbaPrereqOptionsSymbolFields.AlwaysInstallPrereqs, value); | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs new file mode 100644 index 00000000..4b5e301e --- /dev/null +++ b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixPrereqInformation = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixPrereqInformation.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.PackageId), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseFile), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixPrereqInformationSymbolFields.LicenseUrl), IntermediateFieldType.String), | ||
17 | }, | ||
18 | typeof(WixPrereqInformationSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixPrereqInformationSymbolFields | ||
27 | { | ||
28 | PackageId, | ||
29 | LicenseFile, | ||
30 | LicenseUrl, | ||
31 | } | ||
32 | |||
33 | public class WixPrereqInformationSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixPrereqInformationSymbol() : base(BalSymbolDefinitions.WixPrereqInformation, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixPrereqInformationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqInformation, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixPrereqInformationSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public string PackageId | ||
46 | { | ||
47 | get => this.Fields[(int)WixPrereqInformationSymbolFields.PackageId].AsString(); | ||
48 | set => this.Set((int)WixPrereqInformationSymbolFields.PackageId, value); | ||
49 | } | ||
50 | |||
51 | public string LicenseFile | ||
52 | { | ||
53 | get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseFile].AsString(); | ||
54 | set => this.Set((int)WixPrereqInformationSymbolFields.LicenseFile, value); | ||
55 | } | ||
56 | |||
57 | public string LicenseUrl | ||
58 | { | ||
59 | get => this.Fields[(int)WixPrereqInformationSymbolFields.LicenseUrl].AsString(); | ||
60 | set => this.Set((int)WixPrereqInformationSymbolFields.LicenseUrl, value); | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs new file mode 100644 index 00000000..a351d7da --- /dev/null +++ b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs | |||
@@ -0,0 +1,63 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Bal | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Bal.Symbols; | ||
7 | |||
8 | public static partial class BalSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition WixPrereqOptions = new IntermediateSymbolDefinition( | ||
11 | BalSymbolDefinitionType.WixPrereqOptions.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.Primary), IntermediateFieldType.Number), | ||
15 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleHelp), IntermediateFieldType.Number), | ||
16 | new IntermediateFieldDefinition(nameof(WixPrereqOptionsSymbolFields.HandleLayout), IntermediateFieldType.Number), | ||
17 | }, | ||
18 | typeof(WixPrereqOptionsSymbol)); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | namespace WixToolset.Bal.Symbols | ||
23 | { | ||
24 | using WixToolset.Data; | ||
25 | |||
26 | public enum WixPrereqOptionsSymbolFields | ||
27 | { | ||
28 | Primary, | ||
29 | HandleHelp, | ||
30 | HandleLayout, | ||
31 | } | ||
32 | |||
33 | public class WixPrereqOptionsSymbol : IntermediateSymbol | ||
34 | { | ||
35 | public WixPrereqOptionsSymbol() : base(BalSymbolDefinitions.WixPrereqOptions, null, null) | ||
36 | { | ||
37 | } | ||
38 | |||
39 | public WixPrereqOptionsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalSymbolDefinitions.WixPrereqOptions, sourceLineNumber, id) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public IntermediateField this[WixPrereqOptionsSymbolFields index] => this.Fields[(int)index]; | ||
44 | |||
45 | public int Primary | ||
46 | { | ||
47 | get => this.Fields[(int)WixPrereqOptionsSymbolFields.Primary].AsNumber(); | ||
48 | set => this.Set((int)WixPrereqOptionsSymbolFields.Primary, value); | ||
49 | } | ||
50 | |||
51 | public int? HandleHelp | ||
52 | { | ||
53 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleHelp]; | ||
54 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleHelp, value); | ||
55 | } | ||
56 | |||
57 | public int? HandleLayout | ||
58 | { | ||
59 | get => (int?)this.Fields[(int)WixPrereqOptionsSymbolFields.HandleLayout]; | ||
60 | set => this.Set((int)WixPrereqOptionsSymbolFields.HandleLayout, value); | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/src/ext/Bal/wixiuiba/WixInternalUIBootstrapperApplication.h b/src/ext/Bal/wixiuiba/WixInternalUIBootstrapperApplication.h deleted file mode 100644 index b0b782dd..00000000 --- a/src/ext/Bal/wixiuiba/WixInternalUIBootstrapperApplication.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | HRESULT CreateBootstrapperApplication( | ||
6 | __in HMODULE hModule, | ||
7 | __in_opt PREQBA_DATA* pPrereqData, | ||
8 | __in IBootstrapperEngine* pEngine, | ||
9 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
10 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
11 | __out IBootstrapperApplication** ppApplication | ||
12 | ); | ||
13 | |||
14 | void DestroyBootstrapperApplication( | ||
15 | __in IBootstrapperApplication* pApplication, | ||
16 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
17 | __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
18 | ); | ||
diff --git a/src/ext/Bal/wixiuiba/precomp.h b/src/ext/Bal/wixiuiba/precomp.h index 89ec6eab..cb6730fd 100644 --- a/src/ext/Bal/wixiuiba/precomp.h +++ b/src/ext/Bal/wixiuiba/precomp.h | |||
@@ -15,8 +15,9 @@ | |||
15 | #include <strutil.h> | 15 | #include <strutil.h> |
16 | #include <xmlutil.h> | 16 | #include <xmlutil.h> |
17 | 17 | ||
18 | #include <BootstrapperEngine.h> | 18 | #include <baenginetypes.h> |
19 | #include <BootstrapperApplication.h> | 19 | #include <batypes.h> |
20 | |||
20 | #include <IBootstrapperEngine.h> | 21 | #include <IBootstrapperEngine.h> |
21 | #include <IBootstrapperApplication.h> | 22 | #include <IBootstrapperApplication.h> |
22 | 23 | ||
@@ -24,7 +25,4 @@ | |||
24 | #include <balinfo.h> | 25 | #include <balinfo.h> |
25 | #include <balcondition.h> | 26 | #include <balcondition.h> |
26 | 27 | ||
27 | #include <preqba.h> | ||
28 | |||
29 | #include "WixInternalUIBootstrapperApplication.h" | 28 | #include "WixInternalUIBootstrapperApplication.h" |
30 | #include "wixiuiba.h" | ||
diff --git a/src/ext/Bal/wixiuiba/wixiuiba.cpp b/src/ext/Bal/wixiuiba/wixiuiba.cpp index 3e751893..92261e9b 100644 --- a/src/ext/Bal/wixiuiba/wixiuiba.cpp +++ b/src/ext/Bal/wixiuiba/wixiuiba.cpp | |||
@@ -2,191 +2,27 @@ | |||
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 4 | ||
5 | static INTERNAL_UI_BA_STATE vstate = { }; | ||
6 | |||
7 | |||
8 | // internal function declarations | ||
9 | |||
10 | static HRESULT LoadModulePaths( | ||
11 | __in INTERNAL_UI_BA_STATE* pState | ||
12 | ); | ||
13 | static HRESULT LoadInternalUIBAConfiguration( | ||
14 | __in INTERNAL_UI_BA_STATE* pState, | ||
15 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs | ||
16 | ); | ||
17 | static HRESULT CreatePrerequisiteBA( | ||
18 | __in INTERNAL_UI_BA_STATE* pState, | ||
19 | __in IBootstrapperEngine* pEngine, | ||
20 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
21 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
22 | ); | ||
23 | |||
24 | 5 | ||
25 | // function definitions | 6 | // function definitions |
26 | 7 | ||
27 | extern "C" BOOL WINAPI DllMain( | 8 | EXTERN_C int WINAPI wWinMain( |
28 | __in HINSTANCE hInstance, | 9 | __in HINSTANCE hInstance, |
29 | __in DWORD dwReason, | 10 | __in_opt HINSTANCE /* hPrevInstance */, |
30 | __in LPVOID /*pvReserved*/ | 11 | __in_z_opt LPWSTR /*lpCmdLine*/, |
31 | ) | 12 | __in int /*nCmdShow*/ |
32 | { | ||
33 | switch (dwReason) | ||
34 | { | ||
35 | case DLL_PROCESS_ATTACH: | ||
36 | ::DisableThreadLibraryCalls(hInstance); | ||
37 | vstate.hInstance = hInstance; | ||
38 | break; | ||
39 | |||
40 | case DLL_PROCESS_DETACH: | ||
41 | vstate.hInstance = NULL; | ||
42 | break; | ||
43 | } | ||
44 | |||
45 | return TRUE; | ||
46 | } | ||
47 | |||
48 | // Note: This function assumes that COM was already initialized on the thread. | ||
49 | extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | ||
50 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
51 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
52 | ) | ||
53 | { | ||
54 | HRESULT hr = S_OK; | ||
55 | IBootstrapperEngine* pEngine = NULL; | ||
56 | |||
57 | hr = BalInitializeFromCreateArgs(pArgs, &pEngine); | ||
58 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
59 | |||
60 | if (!vstate.fInitialized) | ||
61 | { | ||
62 | hr = XmlInitialize(); | ||
63 | BalExitOnFailure(hr, "Failed to initialize XML."); | ||
64 | |||
65 | hr = LoadModulePaths(&vstate); | ||
66 | BalExitOnFailure(hr, "Failed to load the module paths."); | ||
67 | |||
68 | hr = LoadInternalUIBAConfiguration(&vstate, pArgs); | ||
69 | BalExitOnFailure(hr, "Failed to get the InternalUIBA configuration."); | ||
70 | |||
71 | vstate.fInitialized = TRUE; | ||
72 | } | ||
73 | |||
74 | if (vstate.prereqData.fAlwaysInstallPrereqs && !vstate.prereqData.fCompleted || | ||
75 | FAILED(vstate.prereqData.hrFatalError)) | ||
76 | { | ||
77 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application."); | ||
78 | |||
79 | hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults); | ||
80 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); | ||
81 | } | ||
82 | else | ||
83 | { | ||
84 | hr = CreateBootstrapperApplication(vstate.hInstance, &vstate.prereqData, pEngine, pArgs, pResults, &vstate.pApplication); | ||
85 | BalExitOnFailure(hr, "Failed to create bootstrapper application interface."); | ||
86 | } | ||
87 | |||
88 | LExit: | ||
89 | ReleaseNullObject(pEngine); | ||
90 | |||
91 | return hr; | ||
92 | } | ||
93 | |||
94 | extern "C" void WINAPI BootstrapperApplicationDestroy( | ||
95 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
96 | __in BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
97 | ) | ||
98 | { | ||
99 | BOOTSTRAPPER_DESTROY_RESULTS childResults = { }; | ||
100 | |||
101 | if (vstate.hPrereqModule) | ||
102 | { | ||
103 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = reinterpret_cast<PFN_BOOTSTRAPPER_APPLICATION_DESTROY>(::GetProcAddress(vstate.hPrereqModule, "PrereqBootstrapperApplicationDestroy")); | ||
104 | if (pfnDestroy) | ||
105 | { | ||
106 | (*pfnDestroy)(pArgs, &childResults); | ||
107 | } | ||
108 | |||
109 | ::FreeLibrary(vstate.hPrereqModule); | ||
110 | vstate.hPrereqModule = NULL; | ||
111 | } | ||
112 | |||
113 | if (vstate.pApplication) | ||
114 | { | ||
115 | DestroyBootstrapperApplication(vstate.pApplication, pArgs, pResults); | ||
116 | ReleaseNullObject(vstate.pApplication); | ||
117 | } | ||
118 | |||
119 | BalUninitialize(); | ||
120 | |||
121 | // Need to keep track of state between reloads. | ||
122 | pResults->fDisableUnloading = TRUE; | ||
123 | } | ||
124 | |||
125 | static HRESULT LoadModulePaths( | ||
126 | __in INTERNAL_UI_BA_STATE* pState | ||
127 | ) | ||
128 | { | ||
129 | HRESULT hr = S_OK; | ||
130 | LPWSTR sczFullPath = NULL; | ||
131 | |||
132 | hr = PathForCurrentProcess(&sczFullPath, pState->hInstance); | ||
133 | ExitOnFailure(hr, "Failed to get the full host path."); | ||
134 | |||
135 | hr = PathGetDirectory(sczFullPath, &pState->sczAppBase); | ||
136 | ExitOnFailure(hr, "Failed to get the directory of the full process path."); | ||
137 | |||
138 | LExit: | ||
139 | ReleaseStr(sczFullPath); | ||
140 | |||
141 | return hr; | ||
142 | } | ||
143 | |||
144 | static HRESULT LoadInternalUIBAConfiguration( | ||
145 | __in INTERNAL_UI_BA_STATE* pState, | ||
146 | __in const BOOTSTRAPPER_CREATE_ARGS* /*pArgs*/ | ||
147 | ) | 13 | ) |
148 | { | 14 | { |
149 | HRESULT hr = S_OK; | 15 | HRESULT hr = S_OK; |
16 | IBootstrapperApplication* pApplication = NULL; | ||
150 | 17 | ||
151 | pState->prereqData.fAlwaysInstallPrereqs = TRUE; | 18 | hr = CreateWixInternalUIBootstrapperApplication(hInstance, &pApplication); |
152 | pState->prereqData.fPerformHelp = TRUE; | 19 | ExitOnFailure(hr, "Failed to create WiX internal UI bootstrapper application."); |
153 | pState->prereqData.fPerformLayout = TRUE; | ||
154 | |||
155 | return hr; | ||
156 | } | ||
157 | |||
158 | static HRESULT CreatePrerequisiteBA( | ||
159 | __in INTERNAL_UI_BA_STATE* pState, | ||
160 | __in IBootstrapperEngine* pEngine, | ||
161 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
162 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
163 | ) | ||
164 | { | ||
165 | HRESULT hr = S_OK; | ||
166 | LPWSTR sczPrereqPath = NULL; | ||
167 | HMODULE hModule = NULL; | ||
168 | |||
169 | hr = PathConcat(pState->sczAppBase, L"prereqba.dll", &sczPrereqPath); | ||
170 | BalExitOnFailure(hr, "Failed to get path to pre-requisite BA."); | ||
171 | |||
172 | hModule = ::LoadLibraryExW(sczPrereqPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | ||
173 | ExitOnNullWithLastError(hModule, hr, "Failed to load pre-requisite BA DLL."); | ||
174 | |||
175 | PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = reinterpret_cast<PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE>(::GetProcAddress(hModule, "PrereqBootstrapperApplicationCreate")); | ||
176 | ExitOnNullWithLastError(pfnCreate, hr, "Failed to get PrereqBootstrapperApplicationCreate entry-point from: %ls", sczPrereqPath); | ||
177 | |||
178 | hr = pfnCreate(&pState->prereqData, pEngine, pArgs, pResults); | ||
179 | ExitOnFailure(hr, "Failed to create prequisite bootstrapper app."); | ||
180 | 20 | ||
181 | pState->hPrereqModule = hModule; | 21 | hr = BootstrapperApplicationRun(pApplication); |
182 | hModule = NULL; | 22 | ExitOnFailure(hr, "Failed to run WiX internal UI bootstrapper application."); |
183 | 23 | ||
184 | LExit: | 24 | LExit: |
185 | if (hModule) | 25 | ReleaseObject(pApplication); |
186 | { | ||
187 | ::FreeLibrary(hModule); | ||
188 | } | ||
189 | ReleaseStr(sczPrereqPath); | ||
190 | 26 | ||
191 | return hr; | 27 | return 0; |
192 | } | 28 | } |
diff --git a/src/ext/Bal/wixiuiba/wixiuiba.def b/src/ext/Bal/wixiuiba/wixiuiba.def deleted file mode 100644 index 4488df94..00000000 --- a/src/ext/Bal/wixiuiba/wixiuiba.def +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | ; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | |||
4 | EXPORTS | ||
5 | BootstrapperApplicationCreate | ||
6 | BootstrapperApplicationDestroy | ||
diff --git a/src/ext/Bal/wixiuiba/wixiuiba.rc b/src/ext/Bal/wixiuiba/wixiuiba.rc new file mode 100644 index 00000000..a029458e --- /dev/null +++ b/src/ext/Bal/wixiuiba/wixiuiba.rc | |||
@@ -0,0 +1 @@ | |||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | |||
diff --git a/src/ext/Bal/wixiuiba/wixiuiba.vcxproj b/src/ext/Bal/wixiuiba/wixiuiba.vcxproj index 29c7cb50..6b20db30 100644 --- a/src/ext/Bal/wixiuiba/wixiuiba.vcxproj +++ b/src/ext/Bal/wixiuiba/wixiuiba.vcxproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" Toolsxmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <ItemGroup Label="ProjectConfigurations"> | 5 | <ItemGroup Label="ProjectConfigurations"> |
6 | <ProjectConfiguration Include="Debug|ARM64"> | 6 | <ProjectConfiguration Include="Debug|ARM64"> |
7 | <Configuration>Debug</Configuration> | 7 | <Configuration>Debug</Configuration> |
@@ -31,39 +31,58 @@ | |||
31 | 31 | ||
32 | <PropertyGroup Label="Globals"> | 32 | <PropertyGroup Label="Globals"> |
33 | <ProjectGuid>{0F73E566-925C-448D-99CB-3A7F5DF399C8}</ProjectGuid> | 33 | <ProjectGuid>{0F73E566-925C-448D-99CB-3A7F5DF399C8}</ProjectGuid> |
34 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 34 | <Keyword>Win32Proj</Keyword> |
35 | <ConfigurationType>Application</ConfigurationType> | ||
36 | <ProjectSubSystem>Windows</ProjectSubSystem> | ||
35 | <CharacterSet>Unicode</CharacterSet> | 37 | <CharacterSet>Unicode</CharacterSet> |
36 | <TargetName>wixiuiba</TargetName> | 38 | <Description>WiX Internal UI Bootstrapper Application</Description> |
37 | <ProjectModuleDefinitionFile>wixiuiba.def</ProjectModuleDefinitionFile> | ||
38 | </PropertyGroup> | 39 | </PropertyGroup> |
39 | 40 | ||
40 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
42 | 43 | ||
44 | <ImportGroup Label="ExtensionSettings"> | ||
45 | </ImportGroup> | ||
46 | |||
47 | <ImportGroup Label="Shared"> | ||
48 | </ImportGroup> | ||
49 | |||
43 | <PropertyGroup> | 50 | <PropertyGroup> |
44 | <ProjectAdditionalIncludeDirectories>..\wixstdba\inc</ProjectAdditionalIncludeDirectories> | 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories> |
45 | <ProjectAdditionalLinkLibraries>shlwapi.lib</ProjectAdditionalLinkLibraries> | 52 | <ProjectAdditionalLinkLibraries>stdbas.res</ProjectAdditionalLinkLibraries> |
46 | </PropertyGroup> | 53 | </PropertyGroup> |
47 | 54 | ||
55 | <ItemDefinitionGroup> | ||
56 | <Link> | ||
57 | <DelayLoadDLLs>version.dll</DelayLoadDLLs> | ||
58 | <AdditionalOptions>/DEPENDENTLOADFLAG:0x800 %(AdditionalOptions)</AdditionalOptions> | ||
59 | </Link> | ||
60 | </ItemDefinitionGroup> | ||
61 | |||
62 | <ItemGroup> | ||
63 | <ClInclude Include="precomp.h" /> | ||
64 | <ClInclude Include="wixiuiba.h" /> | ||
65 | </ItemGroup> | ||
48 | <ItemGroup> | 66 | <ItemGroup> |
49 | <ClCompile Include="precomp.cpp"> | 67 | <ClCompile Include="precomp.cpp"> |
50 | <PrecompiledHeader>Create</PrecompiledHeader> | 68 | <PrecompiledHeader>Create</PrecompiledHeader> |
51 | </ClCompile> | 69 | </ClCompile> |
52 | <ClCompile Include="WixInternalUIBootstrapperApplication.cpp" /> | ||
53 | <ClCompile Include="wixiuiba.cpp" /> | 70 | <ClCompile Include="wixiuiba.cpp" /> |
54 | </ItemGroup> | 71 | </ItemGroup> |
72 | |||
55 | <ItemGroup> | 73 | <ItemGroup> |
56 | <ClInclude Include="precomp.h" /> | 74 | <Manifest Include="..\stdbas\stdbas.manifest" /> |
57 | <ClInclude Include="WixInternalUIBootstrapperApplication.h" /> | 75 | <ResourceCompile Include="wixiuiba.rc" /> |
58 | <ClInclude Include="wixiuiba.h" /> | ||
59 | </ItemGroup> | 76 | </ItemGroup> |
77 | |||
60 | <ItemGroup> | 78 | <ItemGroup> |
61 | <None Include="wixiuiba.def" /> | 79 | <ProjectReference Include="..\stdbas\stdbas.vcxproj"> |
80 | <Project>{DBBF5F32-BAEA-46A8-99A0-17277A906456}</Project> | ||
81 | </ProjectReference> | ||
62 | </ItemGroup> | 82 | </ItemGroup> |
63 | 83 | ||
64 | <ItemGroup> | 84 | <ItemGroup> |
65 | <PackageReference Include="WixToolset.BalUtil" /> | 85 | <PackageReference Include="WixToolset.BalUtil" /> |
66 | |||
67 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 86 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
68 | </ItemGroup> | 87 | </ItemGroup> |
69 | 88 | ||
diff --git a/src/ext/Bal/wixlib/BalExtension_platform.wxi b/src/ext/Bal/wixlib/BalExtension_platform.wxi deleted file mode 100644 index bb922317..00000000 --- a/src/ext/Bal/wixlib/BalExtension_platform.wxi +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?include ..\..\caDecor.wxi ?> | ||
6 | |||
7 | <Fragment> | ||
8 | <BootstrapperApplication Id="WixDotNetCoreBootstrapperApplicationHost$(var.Suffix)"> | ||
9 | <BootstrapperApplicationDll Id="WixDotNetCoreBootstrapperApplicationHost" SourceFile="!(bindpath.dnchost.$(var.platform))\dnchost.dll" /> | ||
10 | <Payload SourceFile="!(bindpath.wixstdba.$(var.platform))\wixstdba.dll" Name="dncpreq.dll" /> | ||
11 | </BootstrapperApplication> | ||
12 | </Fragment> | ||
13 | |||
14 | <Fragment> | ||
15 | <BootstrapperApplication Id="WixDotNetCoreBootstrapperApplicationHost.Standard$(var.Suffix)"> | ||
16 | <PayloadGroupRef Id="DncPreqStandardPayloads" /> | ||
17 | </BootstrapperApplication> | ||
18 | <BootstrapperApplicationRef Id="WixDotNetCoreBootstrapperApplicationHost$(var.Suffix)" /> | ||
19 | </Fragment> | ||
20 | |||
21 | <Fragment> | ||
22 | <BootstrapperApplication Id="WixInternalUIBootstrapperApplication$(var.Suffix)"> | ||
23 | <BootstrapperApplicationDll Id="WixInternalUIBootstrapperApplication" SourceFile="!(bindpath.wixiuiba.$(var.platform))\wixiuiba.dll" /> | ||
24 | <Payload SourceFile="!(bindpath.wixstdba.$(var.platform))\wixstdba.dll" Name="prereqba.dll" /> | ||
25 | </BootstrapperApplication> | ||
26 | </Fragment> | ||
27 | |||
28 | <Fragment> | ||
29 | <BootstrapperApplication Id="WixInternalUIBootstrapperApplication.Standard$(var.Suffix)"> | ||
30 | <PayloadGroupRef Id="WixIuibaStandardPayloads" /> | ||
31 | </BootstrapperApplication> | ||
32 | <BootstrapperApplicationRef Id="WixInternalUIBootstrapperApplication$(var.Suffix)" /> | ||
33 | </Fragment> | ||
34 | |||
35 | <Fragment> | ||
36 | <BootstrapperApplication Id="WixStandardBootstrapperApplication$(var.Suffix)"> | ||
37 | <BootstrapperApplicationDll Id="WixStandardBootstrapperApplication" SourceFile="!(bindpath.wixstdba.$(var.platform))\wixstdba.dll" /> | ||
38 | </BootstrapperApplication> | ||
39 | </Fragment> | ||
40 | |||
41 | <Fragment> | ||
42 | <BootstrapperApplication Id="WixStandardBootstrapperApplication.RtfLicense$(var.Suffix)"> | ||
43 | <PayloadGroupRef Id="WixStdbaRtfLicensePayloads" /> | ||
44 | </BootstrapperApplication> | ||
45 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
46 | </Fragment> | ||
47 | |||
48 | <Fragment> | ||
49 | <BootstrapperApplication Id="WixStandardBootstrapperApplication.RtfLargeLicense$(var.Suffix)"> | ||
50 | <PayloadGroupRef Id="WixStdbaRtfLargeLicensePayloads" /> | ||
51 | </BootstrapperApplication> | ||
52 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
53 | </Fragment> | ||
54 | |||
55 | <Fragment> | ||
56 | <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkLicense$(var.Suffix)"> | ||
57 | <PayloadGroupRef Id="WixStdbaHyperlinkLicensePayloads" /> | ||
58 | </BootstrapperApplication> | ||
59 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
60 | </Fragment> | ||
61 | |||
62 | <Fragment> | ||
63 | <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkLargeLicense$(var.Suffix)"> | ||
64 | <PayloadGroupRef Id="WixStdbaHyperlinkLargeLicensePayloads" /> | ||
65 | </BootstrapperApplication> | ||
66 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
67 | </Fragment> | ||
68 | |||
69 | <Fragment> | ||
70 | <BootstrapperApplication Id="WixStandardBootstrapperApplication.HyperlinkSidebarLicense$(var.Suffix)"> | ||
71 | <PayloadGroupRef Id="WixStdbaHyperlinkSidebarLicensePayloads" /> | ||
72 | </BootstrapperApplication> | ||
73 | <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication$(var.Suffix)" /> | ||
74 | </Fragment> | ||
75 | </Include> | ||
diff --git a/src/ext/Bal/wixlib/Dnc.wxs b/src/ext/Bal/wixlib/Dnc.wxs deleted file mode 100644 index 242bb30e..00000000 --- a/src/ext/Bal/wixlib/Dnc.wxs +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <!-- | ||
6 | Dnc.wxs - .NET Core BA resources. | ||
7 | --> | ||
8 | <Fragment> | ||
9 | <PayloadGroup Id="DncPreqStandardPayloads"> | ||
10 | <Payload Name="mbapreq.thm" SourceFile="!(wix.DncPreqbaThemeXml=SourceDir\dncpreq.thm)" /> | ||
11 | <Payload Name="mbapreq.png" SourceFile="!(wix.DncPreqbaLogo=SourceDir\mbapreq.png)" /> | ||
12 | <Payload Name="mbapreq.wxl" SourceFile="!(wix.DncPreqbaThemeWxl=SourceDir\dncpreq.wxl)" /> | ||
13 | </PayloadGroup> | ||
14 | </Fragment> | ||
15 | </Wix> | ||
diff --git a/src/ext/Bal/wixlib/Mba.wxs b/src/ext/Bal/wixlib/Mba.wxs deleted file mode 100644 index 2d407c88..00000000 --- a/src/ext/Bal/wixlib/Mba.wxs +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <!-- | ||
6 | Mba.wxs - Managed BA resources. | ||
7 | --> | ||
8 | <Fragment> | ||
9 | <PayloadGroup Id="WixManagedBootstrapperApplicationHostManagedPayloads"> | ||
10 | <Payload SourceFile="WixToolset.Mba.Host.dll" /> | ||
11 | </PayloadGroup> | ||
12 | </Fragment> | ||
13 | <Fragment> | ||
14 | <PayloadGroup Id="MbaPreqStandardPayloads"> | ||
15 | <Payload Name="mbapreq.thm" SourceFile="!(wix.PreqbaThemeXml=SourceDir\mbapreq.thm)" /> | ||
16 | <Payload Name="mbapreq.png" SourceFile="!(wix.PreqbaLogo=SourceDir\mbapreq.png)" /> | ||
17 | <Payload Name="mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl=SourceDir\mbapreq.wxl)" /> | ||
18 | <Payload Name="1028\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1028=SourceDir\1028\mbapreq.wxl)" /> | ||
19 | <Payload Name="1029\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1029=SourceDir\1029\mbapreq.wxl)" /> | ||
20 | <Payload Name="1030\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1030=SourceDir\1030\mbapreq.wxl)" /> | ||
21 | <Payload Name="1031\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1031=SourceDir\1031\mbapreq.wxl)" /> | ||
22 | <Payload Name="1032\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1032=SourceDir\1032\mbapreq.wxl)" /> | ||
23 | <Payload Name="1035\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1035=SourceDir\1035\mbapreq.wxl)" /> | ||
24 | <Payload Name="1036\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1036=SourceDir\1036\mbapreq.wxl)" /> | ||
25 | <Payload Name="1038\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1038=SourceDir\1038\mbapreq.wxl)" /> | ||
26 | <Payload Name="1040\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1040=SourceDir\1040\mbapreq.wxl)" /> | ||
27 | <Payload Name="1041\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1041=SourceDir\1041\mbapreq.wxl)" /> | ||
28 | <Payload Name="1042\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1042=SourceDir\1042\mbapreq.wxl)" /> | ||
29 | <Payload Name="1043\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1043=SourceDir\1043\mbapreq.wxl)" /> | ||
30 | <Payload Name="1044\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1044=SourceDir\1044\mbapreq.wxl)" /> | ||
31 | <Payload Name="1045\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1045=SourceDir\1045\mbapreq.wxl)" /> | ||
32 | <Payload Name="1046\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1046=SourceDir\1046\mbapreq.wxl)" /> | ||
33 | <Payload Name="1049\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1049=SourceDir\1049\mbapreq.wxl)" /> | ||
34 | <Payload Name="1051\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1051=SourceDir\1051\mbapreq.wxl)" /> | ||
35 | <Payload Name="1053\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1053=SourceDir\1053\mbapreq.wxl)" /> | ||
36 | <Payload Name="1055\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1055=SourceDir\1055\mbapreq.wxl)" /> | ||
37 | <Payload Name="1060\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl1060=SourceDir\1060\mbapreq.wxl)" /> | ||
38 | <Payload Name="2052\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl2052=SourceDir\2052\mbapreq.wxl)" /> | ||
39 | <Payload Name="2070\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl2070=SourceDir\2070\mbapreq.wxl)" /> | ||
40 | <Payload Name="3082\mbapreq.wxl" SourceFile="!(wix.PreqbaThemeWxl3082=SourceDir\3082\mbapreq.wxl)" /> | ||
41 | </PayloadGroup> | ||
42 | </Fragment> | ||
43 | </Wix> | ||
diff --git a/src/ext/Bal/wixlib/Mbahost_platform.wxi b/src/ext/Bal/wixlib/Mbahost_platform.wxi deleted file mode 100644 index 3ea7840f..00000000 --- a/src/ext/Bal/wixlib/Mbahost_platform.wxi +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
5 | <?include ..\..\caDecor.wxi ?> | ||
6 | |||
7 | <Fragment> | ||
8 | <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost$(var.Suffix)"> | ||
9 | <BootstrapperApplicationDll Id="WixManagedBootstrapperApplicationHost" SourceFile="!(bindpath.mbahost.$(var.platform))\mbahost.dll" /> | ||
10 | <Payload SourceFile="!(bindpath.wixstdba.$(var.platform))\wixstdba.dll" Name="mbapreq.dll" /> | ||
11 | <PayloadGroupRef Id="WixManagedBootstrapperApplicationHostManagedPayloads" /> | ||
12 | </BootstrapperApplication> | ||
13 | </Fragment> | ||
14 | |||
15 | <Fragment> | ||
16 | <BootstrapperApplication Id="WixManagedBootstrapperApplicationHost.Standard$(var.Suffix)"> | ||
17 | <PayloadGroupRef Id="MbaPreqStandardPayloads" /> | ||
18 | </BootstrapperApplication> | ||
19 | <BootstrapperApplicationRef Id="WixManagedBootstrapperApplicationHost$(var.Suffix)" /> | ||
20 | </Fragment> | ||
21 | </Include> | ||
diff --git a/src/ext/Bal/wixlib/bal.wixproj b/src/ext/Bal/wixlib/bal.wixproj index 9e1b111a..31369115 100644 --- a/src/ext/Bal/wixlib/bal.wixproj +++ b/src/ext/Bal/wixlib/bal.wixproj | |||
@@ -7,14 +7,13 @@ | |||
7 | </PropertyGroup> | 7 | </PropertyGroup> |
8 | 8 | ||
9 | <ItemGroup> | 9 | <ItemGroup> |
10 | <BindPath Include="..\wixstdba\Resources\" /> | 10 | <BindPath Include="..\stdbas\Resources\" /> |
11 | <BindPath Include="$(OutputPath)net462" /> | 11 | <BindPath Include="$(OutputPath)net462" /> |
12 | </ItemGroup> | 12 | </ItemGroup> |
13 | 13 | ||
14 | <ItemGroup> | 14 | <ItemGroup> |
15 | <ProjectReference Include="..\dnchost\dnchost.vcxproj" Platforms="arm64,x86,x64" /> | ||
16 | <ProjectReference Include="..\mbahost\mbahost.vcxproj" Platforms="arm64,x86,x64" /> | ||
17 | <ProjectReference Include="..\wixiuiba\wixiuiba.vcxproj" Platforms="arm64,x86,x64" /> | 15 | <ProjectReference Include="..\wixiuiba\wixiuiba.vcxproj" Platforms="arm64,x86,x64" /> |
16 | <ProjectReference Include="..\wixprqba\wixprqba.vcxproj" Platforms="arm64,x86,x64" /> | ||
18 | <ProjectReference Include="..\wixstdba\wixstdba.vcxproj" Platforms="arm64,x86,x64" /> | 17 | <ProjectReference Include="..\wixstdba\wixstdba.vcxproj" Platforms="arm64,x86,x64" /> |
19 | </ItemGroup> | 18 | </ItemGroup> |
20 | 19 | ||
diff --git a/src/ext/Bal/wixlib/BalExtension_arm64.wxs b/src/ext/Bal/wixlib/bal_arm64.wxs index 9a1ca60c..4ddbfc47 100644 --- a/src/ext/Bal/wixlib/BalExtension_arm64.wxs +++ b/src/ext/Bal/wixlib/bal_arm64.wxs | |||
@@ -2,6 +2,5 @@ | |||
2 | 2 | ||
3 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 3 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
4 | <?define platform=arm64 ?> | 4 | <?define platform=arm64 ?> |
5 | <?include BalExtension_platform.wxi ?> | 5 | <?include bal_platform.wxi ?> |
6 | <?include Mbahost_platform.wxi ?> | ||
7 | </Wix> | 6 | </Wix> |
diff --git a/src/ext/Bal/wixlib/bal_platform.wxi b/src/ext/Bal/wixlib/bal_platform.wxi new file mode 100644 index 00000000..af58f4c3 --- /dev/null +++ b/src/ext/Bal/wixlib/bal_platform.wxi | |||
@@ -0,0 +1,34 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | <Include xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
4 | <?include ..\..\caDecor.wxi ?> | ||
5 | |||
6 | <Fragment> | ||
7 | <PayloadGroup Id="WixStandardBootstrapperApplication$(var.Suffix)"> | ||
8 | <Payload Id="WixStandardBootstrapperApplication$(var.Suffix)" | ||
9 | SourceFile="!(bindpath.wixstdba.$(var.platform))\wixstdba.exe" /> | ||
10 | </PayloadGroup> | ||
11 | </Fragment> | ||
12 | |||
13 | <Fragment> | ||
14 | <PayloadGroup Id="WixInternalUIBootstrapperApplication$(var.Suffix)"> | ||
15 | <Payload Id="WixInternalUIBootstrapperApplication$(var.Suffix)" | ||
16 | SourceFile="!(bindpath.wixiuiba.$(var.platform))\wixiuiba.exe" /> | ||
17 | </PayloadGroup> | ||
18 | |||
19 | <!-- Internal UI BA depends on the PrereqBA for layout and help (and prerequisites if there are any). --> | ||
20 | <BootstrapperApplicationRef Id="WixPrereqBootstrapperApplication.Primary$(var.Suffix)" /> | ||
21 | </Fragment> | ||
22 | |||
23 | <Fragment> | ||
24 | <BootstrapperApplication Id="WixPrereqBootstrapperApplication.Primary$(var.Suffix)" | ||
25 | SourceFile="!(bindpath.wixprqba.$(var.platform))\wixprqba.exe" /> | ||
26 | </Fragment> | ||
27 | |||
28 | <Fragment> | ||
29 | <BootstrapperApplication Id="WixPrereqBootstrapperApplication.Secondary$(var.Suffix)" | ||
30 | SourceFile="!(bindpath.wixprqba.$(var.platform))\wixprqba.exe" | ||
31 | Secondary="yes" /> | ||
32 | </Fragment> | ||
33 | |||
34 | </Include> | ||
diff --git a/src/ext/Bal/wixlib/BalExtension_x64.wxs b/src/ext/Bal/wixlib/bal_x64.wxs index e5252718..f2c62418 100644 --- a/src/ext/Bal/wixlib/BalExtension_x64.wxs +++ b/src/ext/Bal/wixlib/bal_x64.wxs | |||
@@ -3,6 +3,5 @@ | |||
3 | 3 | ||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
5 | <?define platform=x64 ?> | 5 | <?define platform=x64 ?> |
6 | <?include BalExtension_platform.wxi ?> | 6 | <?include bal_platform.wxi ?> |
7 | <?include Mbahost_platform.wxi ?> | ||
8 | </Wix> | 7 | </Wix> |
diff --git a/src/ext/Bal/wixlib/BalExtension_x86.wxs b/src/ext/Bal/wixlib/bal_x86.wxs index 1045160d..e00115b2 100644 --- a/src/ext/Bal/wixlib/BalExtension_x86.wxs +++ b/src/ext/Bal/wixlib/bal_x86.wxs | |||
@@ -3,6 +3,5 @@ | |||
3 | 3 | ||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
5 | <?define platform=x86 ?> | 5 | <?define platform=x86 ?> |
6 | <?include BalExtension_platform.wxi ?> | 6 | <?include bal_platform.wxi ?> |
7 | <?include Mbahost_platform.wxi ?> | ||
8 | </Wix> | 7 | </Wix> |
diff --git a/src/ext/Bal/wixlib/wixiuiba.wxs b/src/ext/Bal/wixlib/wixiuiba.wxs index 5501a23f..a7885ffb 100644 --- a/src/ext/Bal/wixlib/wixiuiba.wxs +++ b/src/ext/Bal/wixlib/wixiuiba.wxs | |||
@@ -4,9 +4,9 @@ | |||
4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
5 | <Fragment> | 5 | <Fragment> |
6 | <PayloadGroup Id="WixIuibaStandardPayloads"> | 6 | <PayloadGroup Id="WixIuibaStandardPayloads"> |
7 | <Payload Name="mbapreq.thm" SourceFile="!(wix.WixIuibaThemeXml=SourceDir\iuipreq.thm)" /> | 7 | <Payload Name="wixpreq.thm" SourceFile="!(wix.WixIuibaThemeXml=SourceDir\iuipreq.thm)" /> |
8 | <Payload Name="mbapreq.png" SourceFile="!(wix.WixIuibaLogo=SourceDir\mbapreq.png)" /> | 8 | <Payload Name="wixpreq.png" SourceFile="!(wix.WixIuibaLogo=SourceDir\wixpreq.png)" /> |
9 | <Payload Name="mbapreq.wxl" SourceFile="!(wix.WixIuibaThemeWxl=SourceDir\iuipreq.wxl)" /> | 9 | <Payload Name="wixpreq.wxl" SourceFile="!(wix.WixIuibaThemeWxl=SourceDir\wixpreq.wxl)" /> |
10 | </PayloadGroup> | 10 | </PayloadGroup> |
11 | </Fragment> | 11 | </Fragment> |
12 | </Wix> | 12 | </Wix> |
diff --git a/src/ext/Bal/wixlib/wixprqba.wxs b/src/ext/Bal/wixlib/wixprqba.wxs new file mode 100644 index 00000000..72b92f1f --- /dev/null +++ b/src/ext/Bal/wixlib/wixprqba.wxs | |||
@@ -0,0 +1,36 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
4 | <Fragment> | ||
5 | <PayloadGroup Id="WixPreqbaStandardPayloads"> | ||
6 | <Payload Name="wixpreq.thm" SourceFile="!(wix.WixPreqbaThemeXml=SourceDir\wixpreq.thm)" /> | ||
7 | <Payload Name="wixpreq.png" SourceFile="!(wix.WixPreqbaLogo=SourceDir\wixpreq.png)" /> | ||
8 | <Payload Name="wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl=SourceDir\wixpreq.wxl)" /> | ||
9 | <!-- | ||
10 | <Payload Name="1028\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1028=SourceDir\1028\wixpreq.wxl)" /> | ||
11 | <Payload Name="1029\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1029=SourceDir\1029\wixpreq.wxl)" /> | ||
12 | <Payload Name="1030\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1030=SourceDir\1030\wixpreq.wxl)" /> | ||
13 | <Payload Name="1031\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1031=SourceDir\1031\wixpreq.wxl)" /> | ||
14 | <Payload Name="1032\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1032=SourceDir\1032\wixpreq.wxl)" /> | ||
15 | <Payload Name="1035\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1035=SourceDir\1035\wixpreq.wxl)" /> | ||
16 | <Payload Name="1036\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1036=SourceDir\1036\wixpreq.wxl)" /> | ||
17 | <Payload Name="1038\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1038=SourceDir\1038\wixpreq.wxl)" /> | ||
18 | <Payload Name="1040\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1040=SourceDir\1040\wixpreq.wxl)" /> | ||
19 | <Payload Name="1041\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1041=SourceDir\1041\wixpreq.wxl)" /> | ||
20 | <Payload Name="1042\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1042=SourceDir\1042\wixpreq.wxl)" /> | ||
21 | <Payload Name="1043\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1043=SourceDir\1043\wixpreq.wxl)" /> | ||
22 | <Payload Name="1044\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1044=SourceDir\1044\wixpreq.wxl)" /> | ||
23 | <Payload Name="1045\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1045=SourceDir\1045\wixpreq.wxl)" /> | ||
24 | <Payload Name="1046\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1046=SourceDir\1046\wixpreq.wxl)" /> | ||
25 | <Payload Name="1049\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1049=SourceDir\1049\wixpreq.wxl)" /> | ||
26 | <Payload Name="1051\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1051=SourceDir\1051\wixpreq.wxl)" /> | ||
27 | <Payload Name="1053\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1053=SourceDir\1053\wixpreq.wxl)" /> | ||
28 | <Payload Name="1055\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1055=SourceDir\1055\wixpreq.wxl)" /> | ||
29 | <Payload Name="1060\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl1060=SourceDir\1060\wixpreq.wxl)" /> | ||
30 | <Payload Name="2052\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl2052=SourceDir\2052\wixpreq.wxl)" /> | ||
31 | <Payload Name="2070\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl2070=SourceDir\2070\wixpreq.wxl)" /> | ||
32 | <Payload Name="3082\wixpreq.wxl" SourceFile="!(wix.WixPreqbaThemeWxl3082=SourceDir\3082\wixpreq.wxl)" /> | ||
33 | --> | ||
34 | </PayloadGroup> | ||
35 | </Fragment> | ||
36 | </Wix> | ||
diff --git a/src/ext/Bal/mbahost/precomp.cpp b/src/ext/Bal/wixprqba/precomp.cpp index 37664a1c..37664a1c 100644 --- a/src/ext/Bal/mbahost/precomp.cpp +++ b/src/ext/Bal/wixprqba/precomp.cpp | |||
diff --git a/src/ext/Bal/wixprqba/precomp.h b/src/ext/Bal/wixprqba/precomp.h new file mode 100644 index 00000000..8844d150 --- /dev/null +++ b/src/ext/Bal/wixprqba/precomp.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #include <windows.h> | ||
6 | |||
7 | #pragma warning(push) | ||
8 | #pragma warning(disable:4458) // declaration of 'xxx' hides class member | ||
9 | #include <gdiplus.h> | ||
10 | #pragma warning(pop) | ||
11 | |||
12 | #include <msiquery.h> | ||
13 | #include <objbase.h> | ||
14 | #include <shlobj.h> | ||
15 | #include <shlwapi.h> | ||
16 | #include <stdlib.h> | ||
17 | #include <strsafe.h> | ||
18 | #include <stddef.h> | ||
19 | |||
20 | #include <dutil.h> | ||
21 | #include <apputil.h> | ||
22 | #include <memutil.h> | ||
23 | #include <dictutil.h> | ||
24 | #include <dirutil.h> | ||
25 | #include <fileutil.h> | ||
26 | #include <locutil.h> | ||
27 | #include <logutil.h> | ||
28 | #include <pathutil.h> | ||
29 | #include <resrutil.h> | ||
30 | #include <shelutil.h> | ||
31 | #include <strutil.h> | ||
32 | #include <wndutil.h> | ||
33 | #include <thmutil.h> | ||
34 | #include <verutil.h> | ||
35 | #include <uriutil.h> | ||
36 | #include <xmlutil.h> | ||
37 | |||
38 | #include <IBootstrapperEngine.h> | ||
39 | #include <IBootstrapperApplication.h> | ||
40 | |||
41 | #include <balutil.h> | ||
42 | #include <balinfo.h> | ||
43 | #include <balcondition.h> | ||
44 | |||
45 | #include <BAFunctions.h> | ||
46 | |||
47 | #include "WixStandardBootstrapperApplication.h" | ||
diff --git a/src/ext/Bal/wixprqba/wixprqba.cpp b/src/ext/Bal/wixprqba/wixprqba.cpp new file mode 100644 index 00000000..c6e5dfef --- /dev/null +++ b/src/ext/Bal/wixprqba/wixprqba.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | #include "precomp.h" | ||
4 | |||
5 | EXTERN_C int WINAPI wWinMain( | ||
6 | __in HINSTANCE hInstance, | ||
7 | __in_opt HINSTANCE /* hPrevInstance */, | ||
8 | __in_z_opt LPWSTR /*lpCmdLine*/, | ||
9 | __in int /*nCmdShow*/ | ||
10 | ) | ||
11 | { | ||
12 | HRESULT hr = S_OK; | ||
13 | IBootstrapperApplication* pApplication = NULL; | ||
14 | |||
15 | hr = CreateWixPrerequisiteBootstrapperApplication(hInstance, &pApplication); | ||
16 | ExitOnFailure(hr, "Failed to create WiX prerequisite bootstrapper application."); | ||
17 | |||
18 | hr = BootstrapperApplicationRun(pApplication); | ||
19 | ExitOnFailure(hr, "Failed to run WiX prerequisite bootstrapper application."); | ||
20 | |||
21 | LExit: | ||
22 | ReleaseObject(pApplication); | ||
23 | |||
24 | return 0; | ||
25 | } | ||
diff --git a/src/ext/Bal/wixprqba/wixprqba.rc b/src/ext/Bal/wixprqba/wixprqba.rc new file mode 100644 index 00000000..a029458e --- /dev/null +++ b/src/ext/Bal/wixprqba/wixprqba.rc | |||
@@ -0,0 +1 @@ | |||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | |||
diff --git a/src/ext/Bal/mbahost/mbahost.vcxproj b/src/ext/Bal/wixprqba/wixprqba.vcxproj index 7764e4d4..b992fe14 100644 --- a/src/ext/Bal/mbahost/mbahost.vcxproj +++ b/src/ext/Bal/wixprqba/wixprqba.vcxproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" Toolsxmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <ItemGroup Label="ProjectConfigurations"> | 5 | <ItemGroup Label="ProjectConfigurations"> |
6 | <ProjectConfiguration Include="Debug|ARM64"> | 6 | <ProjectConfiguration Include="Debug|ARM64"> |
7 | <Configuration>Debug</Configuration> | 7 | <Configuration>Debug</Configuration> |
@@ -30,46 +30,59 @@ | |||
30 | </ItemGroup> | 30 | </ItemGroup> |
31 | 31 | ||
32 | <PropertyGroup Label="Globals"> | 32 | <PropertyGroup Label="Globals"> |
33 | <ProjectGuid>{12C87C77-3547-44F8-8134-29BC915CB19D}</ProjectGuid> | 33 | <ProjectGuid>{662B4347-1BC1-4042-B628-EC92B1158F4F}</ProjectGuid> |
34 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 34 | <Keyword>Win32Proj</Keyword> |
35 | <ConfigurationType>Application</ConfigurationType> | ||
36 | <ProjectSubSystem>Windows</ProjectSubSystem> | ||
35 | <CharacterSet>Unicode</CharacterSet> | 37 | <CharacterSet>Unicode</CharacterSet> |
36 | <TargetName>mbahost</TargetName> | 38 | <Description>WiX Prerequisite Bootstrapper Application</Description> |
37 | <ProjectModuleDefinitionFile>mbahost.def</ProjectModuleDefinitionFile> | ||
38 | </PropertyGroup> | 39 | </PropertyGroup> |
39 | 40 | ||
40 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
42 | 43 | ||
44 | <ImportGroup Label="ExtensionSettings"> | ||
45 | </ImportGroup> | ||
46 | |||
47 | <ImportGroup Label="Shared"> | ||
48 | </ImportGroup> | ||
49 | |||
43 | <PropertyGroup> | 50 | <PropertyGroup> |
44 | <ProjectAdditionalIncludeDirectories>$(BaseOutputPath)obj;..\wixstdba\inc</ProjectAdditionalIncludeDirectories> | 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories> |
45 | <ProjectAdditionalLinkLibraries>shlwapi.lib</ProjectAdditionalLinkLibraries> | 52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> |
46 | </PropertyGroup> | 53 | </PropertyGroup> |
47 | 54 | ||
55 | <ItemDefinitionGroup> | ||
56 | <Link> | ||
57 | <DelayLoadDLLs>comctl32.dll;gdiplus.dll;shlwapi.dll;version.dll;wininet.dll</DelayLoadDLLs> | ||
58 | <AdditionalOptions>/DEPENDENTLOADFLAG:0x800 %(AdditionalOptions)</AdditionalOptions> | ||
59 | </Link> | ||
60 | </ItemDefinitionGroup> | ||
61 | |||
62 | <ItemGroup> | ||
63 | <ClInclude Include="precomp.h" /> | ||
64 | <ClInclude Include="resource.h" /> | ||
65 | </ItemGroup> | ||
48 | <ItemGroup> | 66 | <ItemGroup> |
49 | <ClCompile Include="mbahost.cpp" /> | ||
50 | <ClCompile Include="precomp.cpp"> | 67 | <ClCompile Include="precomp.cpp"> |
51 | <PrecompiledHeader>Create</PrecompiledHeader> | 68 | <PrecompiledHeader>Create</PrecompiledHeader> |
52 | </ClCompile> | 69 | </ClCompile> |
70 | <ClCompile Include="wixprqba.cpp" /> | ||
53 | </ItemGroup> | 71 | </ItemGroup> |
72 | |||
54 | <ItemGroup> | 73 | <ItemGroup> |
55 | <ClInclude Include="mbahost.h" /> | 74 | <Manifest Include="..\stdbas\stdbas.manifest" /> |
56 | <ClInclude Include="precomp.h" /> | 75 | <ResourceCompile Include="wixprqba.rc" /> |
57 | </ItemGroup> | ||
58 | <ItemGroup> | ||
59 | <None Include="mbahost.def" /> | ||
60 | </ItemGroup> | 76 | </ItemGroup> |
61 | 77 | ||
62 | <ItemGroup> | 78 | <ItemGroup> |
63 | <ProjectReference Include="..\WixToolset.Mba.Host\WixToolset.Mba.Host.csproj"> | 79 | <ProjectReference Include="..\stdbas\stdbas.vcxproj"> |
64 | <Project>{f2ba1935-70fa-4156-b161-fd03850b4faa}</Project> | 80 | <Project>{DBBF5F32-BAEA-46A8-99A0-17277A906456}</Project> |
65 | <ReferenceOutputAssembly>false</ReferenceOutputAssembly> | ||
66 | <SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties> | ||
67 | </ProjectReference> | 81 | </ProjectReference> |
68 | </ItemGroup> | 82 | </ItemGroup> |
69 | 83 | ||
70 | <ItemGroup> | 84 | <ItemGroup> |
71 | <PackageReference Include="WixToolset.BalUtil" /> | 85 | <PackageReference Include="WixToolset.BalUtil" /> |
72 | |||
73 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 86 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
74 | </ItemGroup> | 87 | </ItemGroup> |
75 | 88 | ||
diff --git a/src/ext/Bal/wixstdba/Resources/dncpreq.thm b/src/ext/Bal/wixstdba/Resources/dncpreq.thm deleted file mode 100644 index fda84004..00000000 --- a/src/ext/Bal/wixstdba/Resources/dncpreq.thm +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil"> | ||
3 | <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | ||
4 | <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font> | ||
5 | <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font> | ||
6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | ||
7 | |||
8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> | ||
9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/> | ||
10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label> | ||
11 | |||
12 | <Page Name="Help"> | ||
13 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label> | ||
14 | <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label> | ||
15 | <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
16 | <Text>#(loc.HelpCloseButton)</Text> | ||
17 | <CloseWindowAction /> | ||
18 | </Button> | ||
19 | </Page> | ||
20 | <Page Name="Install"> | ||
21 | <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext> | ||
22 | <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button> | ||
23 | <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
24 | <Text>#(loc.InstallDeclineButton)</Text> | ||
25 | <CloseWindowAction /> | ||
26 | </Button> | ||
27 | </Page> | ||
28 | <Page Name="Progress"> | ||
29 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label> | ||
30 | <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label> | ||
31 | <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label> | ||
32 | <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" /> | ||
33 | <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button> | ||
34 | </Page> | ||
35 | <Page Name="Success"> | ||
36 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes"> | ||
37 | <Text>#(loc.SuccessHeader)</Text> | ||
38 | </Label> | ||
39 | <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes"> | ||
40 | <Text>#(loc.SuccessRestartText)</Text> | ||
41 | </Label> | ||
42 | <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button> | ||
43 | <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
44 | <Text>#(loc.SuccessCloseButton)</Text> | ||
45 | <CloseWindowAction /> | ||
46 | </Button> | ||
47 | </Page> | ||
48 | <Page Name="Failure"> | ||
49 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FailureHeader)</Label> | ||
50 | <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext> | ||
51 | <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/> | ||
52 | <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label> | ||
53 | <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button> | ||
54 | <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
55 | <Text>#(loc.FailureCloseButton)</Text> | ||
56 | <CloseWindowAction /> | ||
57 | </Button> | ||
58 | </Page> | ||
59 | </Window> | ||
60 | </Theme> | ||
diff --git a/src/ext/Bal/wixstdba/Resources/mbapreq.wxl b/src/ext/Bal/wixstdba/Resources/mbapreq.wxl deleted file mode 100644 index c7df9ec8..00000000 --- a/src/ext/Bal/wixstdba/Resources/mbapreq.wxl +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
2 | |||
3 | |||
4 | <WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
5 | <String Id="Caption" Value="[WixBundleName] Setup" /> | ||
6 | <String Id="Title" Value="Microsoft .NET Framework required for [WixBundleName] setup" /> | ||
7 | <String Id="ConfirmCancelMessage" Value="Are you sure you want to cancel?" /> | ||
8 | <String Id="HelpHeader" Value="Setup Help" /> | ||
9 | <String Id="HelpText" Value="/passive | /quiet - displays minimal UI with no prompts or displays no UI and
 no prompts. By default UI and all prompts are displayed.

/norestart - suppress any attempts to restart. By default UI will prompt before restart.
/log log.txt - logs to a specific file. By default a log file is created in %TEMP%." /> | ||
10 | <String Id="HelpCloseButton" Value="&Close" /> | ||
11 | <String Id="InstallLicenseTerms" Value="Click the "Accept and Install" button to accept the Microsoft .NET Framework <a href="#">license terms</a>." /> | ||
12 | <String Id="InstallAcceptAndInstallButton" Value="&Accept and Install" /> | ||
13 | <String Id="InstallDeclineButton" Value="&Decline" /> | ||
14 | <String Id="ProgressHeader" Value="Setup Progress" /> | ||
15 | <String Id="ProgressLabel" Value="Processing:" /> | ||
16 | <String Id="ProgressCancelButton" Value="&Cancel" /> | ||
17 | <String Id="SuccessHeader" Value="Microsoft .NET Framework Setup Successful" /> | ||
18 | <String Id="SuccessRestartText" Value="You must restart your computer before [WixBundleName] setup can continue." /> | ||
19 | <String Id="SuccessRestartButton" Value="&Restart" /> | ||
20 | <String Id="SuccessCloseButton" Value="&Close" /> | ||
21 | <String Id="FailureHeader" Value="Setup Failed" /> | ||
22 | <String Id="FailureLogLinkText" Value="One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>." /> | ||
23 | <String Id="FailureRestartText" Value="You must restart your computer to complete the rollback of the software." /> | ||
24 | <String Id="FailureRestartButton" Value="&Restart" /> | ||
25 | <String Id="FailureCloseButton" Value="&Close" /> | ||
26 | <String Id="NET452WIN7RTMErrorMessage" Value="[WixBundleName] cannot run on Windows 7 RTM with .NET 4.5.2 installed. Install Windows 7 SP1 to run in a supported environment." /> | ||
27 | <String Id="PREREQBAINFINITELOOPErrorMessage" Value="[WixBundleName] failed to load the .NET Framework runtime even though all of the prerequisites are installed." /> | ||
28 | <String Id="FilesInUseTitle" Value="Files In Use" /> | ||
29 | <String Id="FilesInUseLabel" Value="The following applications are using files that need to be updated:" /> | ||
30 | <String Id="FilesInUseNetfxCloseRadioButton" Value="Close the &applications." /> | ||
31 | <String Id="FilesInUseCloseRadioButton" Value="Close the &applications and attempt to restart them." /> | ||
32 | <String Id="FilesInUseDontCloseRadioButton" Value="&Do not close applications. A reboot will be required." /> | ||
33 | <String Id="FilesInUseRetryButton" Value="&Retry" /> | ||
34 | <String Id="FilesInUseIgnoreButton" Value="&Ignore" /> | ||
35 | <String Id="FilesInUseExitButton" Value="E&xit" /> | ||
36 | </WixLocalization> | ||
diff --git a/src/ext/Bal/wixstdba/inc/preqba.h b/src/ext/Bal/wixstdba/inc/preqba.h deleted file mode 100644 index 25fa7105..00000000 --- a/src/ext/Bal/wixstdba/inc/preqba.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | struct PREQBA_DATA | ||
6 | { | ||
7 | HRESULT hrFatalError; | ||
8 | BOOL fAlwaysInstallPrereqs; | ||
9 | BOOL fPerformHelp; | ||
10 | BOOL fPerformLayout; | ||
11 | BOOL fCompleted; | ||
12 | }; | ||
13 | |||
14 | extern "C" typedef HRESULT(WINAPI* PFN_PREQ_BOOTSTRAPPER_APPLICATION_CREATE)( | ||
15 | __in PREQBA_DATA* pPreqData, | ||
16 | __in IBootstrapperEngine* pEngine, | ||
17 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
18 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
19 | ); | ||
diff --git a/src/ext/Bal/wixstdba/precomp.h b/src/ext/Bal/wixstdba/precomp.h index 290c125b..8844d150 100644 --- a/src/ext/Bal/wixstdba/precomp.h +++ b/src/ext/Bal/wixstdba/precomp.h | |||
@@ -35,8 +35,6 @@ | |||
35 | #include <uriutil.h> | 35 | #include <uriutil.h> |
36 | #include <xmlutil.h> | 36 | #include <xmlutil.h> |
37 | 37 | ||
38 | #include <BootstrapperEngine.h> | ||
39 | #include <BootstrapperApplication.h> | ||
40 | #include <IBootstrapperEngine.h> | 38 | #include <IBootstrapperEngine.h> |
41 | #include <IBootstrapperApplication.h> | 39 | #include <IBootstrapperApplication.h> |
42 | 40 | ||
@@ -46,20 +44,4 @@ | |||
46 | 44 | ||
47 | #include <BAFunctions.h> | 45 | #include <BAFunctions.h> |
48 | 46 | ||
49 | #include "inc\preqba.h" | 47 | #include "WixStandardBootstrapperApplication.h" |
50 | #include "wixstdba.messages.h" | ||
51 | |||
52 | HRESULT CreateBootstrapperApplication( | ||
53 | __in HMODULE hModule, | ||
54 | __in_opt PREQBA_DATA* pPrereqData, | ||
55 | __in IBootstrapperEngine* pEngine, | ||
56 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
57 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
58 | __out IBootstrapperApplication** ppApplication | ||
59 | ); | ||
60 | |||
61 | void DestroyBootstrapperApplication( | ||
62 | __in IBootstrapperApplication* pApplication, | ||
63 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
64 | __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
65 | ); | ||
diff --git a/src/ext/Bal/wixstdba/resource.h b/src/ext/Bal/wixstdba/resource.h deleted file mode 100644 index 149a8ff4..00000000 --- a/src/ext/Bal/wixstdba/resource.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | #define IDC_STATIC -1 | ||
4 | |||
5 | |||
6 | // Next default values for new objects | ||
7 | // | ||
8 | #ifdef APSTUDIO_INVOKED | ||
9 | #ifndef APSTUDIO_READONLY_SYMBOLS | ||
10 | #define _APS_NEXT_RESOURCE_VALUE 102 | ||
11 | #define _APS_NEXT_COMMAND_VALUE 40001 | ||
12 | #define _APS_NEXT_CONTROL_VALUE 1003 | ||
13 | #define _APS_NEXT_SYMED_VALUE 101 | ||
14 | #endif | ||
15 | #endif | ||
diff --git a/src/ext/Bal/wixstdba/wixstdba.cpp b/src/ext/Bal/wixstdba/wixstdba.cpp index 47f3f677..1024848d 100644 --- a/src/ext/Bal/wixstdba/wixstdba.cpp +++ b/src/ext/Bal/wixstdba/wixstdba.cpp | |||
@@ -2,9 +2,6 @@ | |||
2 | 2 | ||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 4 | ||
5 | static HINSTANCE vhInstance = NULL; | ||
6 | static IBootstrapperApplication* vpApplication = NULL; | ||
7 | |||
8 | static void CALLBACK WixstdbaTraceError( | 5 | static void CALLBACK WixstdbaTraceError( |
9 | __in_z LPCSTR szFile, | 6 | __in_z LPCSTR szFile, |
10 | __in int iLine, | 7 | __in int iLine, |
@@ -15,94 +12,28 @@ static void CALLBACK WixstdbaTraceError( | |||
15 | __in va_list args | 12 | __in va_list args |
16 | ); | 13 | ); |
17 | 14 | ||
18 | extern "C" BOOL WINAPI DllMain( | 15 | EXTERN_C int WINAPI wWinMain( |
19 | IN HINSTANCE hInstance, | 16 | __in HINSTANCE hInstance, |
20 | IN DWORD dwReason, | 17 | __in_opt HINSTANCE /* hPrevInstance */, |
21 | IN LPVOID /* pvReserved */ | 18 | __in_z_opt LPWSTR /*lpCmdLine*/, |
22 | ) | 19 | __in int /*nCmdShow*/ |
23 | { | ||
24 | switch(dwReason) | ||
25 | { | ||
26 | case DLL_PROCESS_ATTACH: | ||
27 | ::DisableThreadLibraryCalls(hInstance); | ||
28 | vhInstance = hInstance; | ||
29 | break; | ||
30 | |||
31 | case DLL_PROCESS_DETACH: | ||
32 | vhInstance = NULL; | ||
33 | break; | ||
34 | } | ||
35 | |||
36 | return TRUE; | ||
37 | } | ||
38 | |||
39 | |||
40 | extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | ||
41 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
42 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
43 | ) | 20 | ) |
44 | { | 21 | { |
45 | HRESULT hr = S_OK; | 22 | HRESULT hr = S_OK; |
46 | IBootstrapperEngine* pEngine = NULL; | 23 | IBootstrapperApplication* pApplication = NULL; |
47 | 24 | ||
48 | DutilInitialize(&WixstdbaTraceError); | 25 | DutilInitialize(&WixstdbaTraceError); |
49 | 26 | ||
50 | hr = BalInitializeFromCreateArgs(pArgs, &pEngine); | 27 | hr = CreateWixStandardBootstrapperApplication(hInstance, &pApplication); |
51 | ExitOnFailure(hr, "Failed to initialize Bal."); | 28 | ExitOnFailure(hr, "Failed to create WiX standard bootstrapper application."); |
52 | 29 | ||
53 | hr = CreateBootstrapperApplication(vhInstance, NULL, pEngine, pArgs, pResults, &vpApplication); | 30 | hr = BootstrapperApplicationRun(pApplication); |
54 | BalExitOnFailure(hr, "Failed to create bootstrapper application interface."); | 31 | ExitOnFailure(hr, "Failed to run WiX standard bootstrapper application."); |
55 | 32 | ||
56 | LExit: | 33 | LExit: |
57 | ReleaseObject(pEngine); | 34 | ReleaseObject(pApplication); |
58 | |||
59 | return hr; | ||
60 | } | ||
61 | |||
62 | |||
63 | extern "C" void WINAPI BootstrapperApplicationDestroy( | ||
64 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
65 | __in BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
66 | ) | ||
67 | { | ||
68 | if (vpApplication) | ||
69 | { | ||
70 | DestroyBootstrapperApplication(vpApplication, pArgs, pResults); | ||
71 | } | ||
72 | 35 | ||
73 | ReleaseNullObject(vpApplication); | 36 | return 0; |
74 | BalUninitialize(); | ||
75 | DutilUninitialize(); | ||
76 | } | ||
77 | |||
78 | |||
79 | extern "C" HRESULT WINAPI PrereqBootstrapperApplicationCreate( | ||
80 | __in_opt PREQBA_DATA* pPrereqData, | ||
81 | __in IBootstrapperEngine* pEngine, | ||
82 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
83 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
84 | ) | ||
85 | { | ||
86 | HRESULT hr = S_OK; | ||
87 | |||
88 | DutilInitialize(&WixstdbaTraceError); | ||
89 | |||
90 | BalInitialize(pEngine); | ||
91 | |||
92 | hr = CreateBootstrapperApplication(vhInstance, pPrereqData, pEngine, pArgs, pResults, &vpApplication); | ||
93 | BalExitOnFailure(hr, "Failed to create prerequisite bootstrapper application interface."); | ||
94 | |||
95 | LExit: | ||
96 | return hr; | ||
97 | } | ||
98 | |||
99 | |||
100 | extern "C" void WINAPI PrereqBootstrapperApplicationDestroy( | ||
101 | __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, | ||
102 | __in BOOTSTRAPPER_DESTROY_RESULTS* pResults | ||
103 | ) | ||
104 | { | ||
105 | BootstrapperApplicationDestroy(pArgs, pResults); | ||
106 | } | 37 | } |
107 | 38 | ||
108 | static void CALLBACK WixstdbaTraceError( | 39 | static void CALLBACK WixstdbaTraceError( |
diff --git a/src/ext/Bal/wixstdba/wixstdba.def b/src/ext/Bal/wixstdba/wixstdba.def deleted file mode 100644 index e377196b..00000000 --- a/src/ext/Bal/wixstdba/wixstdba.def +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | ; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | |||
4 | EXPORTS | ||
5 | BootstrapperApplicationCreate | ||
6 | BootstrapperApplicationDestroy | ||
7 | PrereqBootstrapperApplicationCreate | ||
8 | PrereqBootstrapperApplicationDestroy | ||
diff --git a/src/ext/Bal/wixstdba/wixstdba.rc b/src/ext/Bal/wixstdba/wixstdba.rc new file mode 100644 index 00000000..a029458e --- /dev/null +++ b/src/ext/Bal/wixstdba/wixstdba.rc | |||
@@ -0,0 +1 @@ | |||
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | |||
diff --git a/src/ext/Bal/wixstdba/wixstdba.vcxproj b/src/ext/Bal/wixstdba/wixstdba.vcxproj index 9df3d5fd..e8317fbf 100644 --- a/src/ext/Bal/wixstdba/wixstdba.vcxproj +++ b/src/ext/Bal/wixstdba/wixstdba.vcxproj | |||
@@ -1,7 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" Toolsxmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <ItemGroup Label="ProjectConfigurations"> | 5 | <ItemGroup Label="ProjectConfigurations"> |
6 | <ProjectConfiguration Include="Debug|ARM64"> | 6 | <ProjectConfiguration Include="Debug|ARM64"> |
7 | <Configuration>Debug</Configuration> | 7 | <Configuration>Debug</Configuration> |
@@ -31,49 +31,58 @@ | |||
31 | 31 | ||
32 | <PropertyGroup Label="Globals"> | 32 | <PropertyGroup Label="Globals"> |
33 | <ProjectGuid>{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}</ProjectGuid> | 33 | <ProjectGuid>{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}</ProjectGuid> |
34 | <ConfigurationType>DynamicLibrary</ConfigurationType> | 34 | <Keyword>Win32Proj</Keyword> |
35 | <ConfigurationType>Application</ConfigurationType> | ||
36 | <ProjectSubSystem>Windows</ProjectSubSystem> | ||
35 | <CharacterSet>Unicode</CharacterSet> | 37 | <CharacterSet>Unicode</CharacterSet> |
36 | <TargetName>WixStdBA</TargetName> | 38 | <Description>WiX Standard Bootstrapper Application</Description> |
37 | <ProjectModuleDefinitionFile>wixstdba.def</ProjectModuleDefinitionFile> | ||
38 | </PropertyGroup> | 39 | </PropertyGroup> |
39 | 40 | ||
40 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
42 | 43 | ||
44 | <ImportGroup Label="ExtensionSettings"> | ||
45 | </ImportGroup> | ||
46 | |||
47 | <ImportGroup Label="Shared"> | ||
48 | </ImportGroup> | ||
49 | |||
43 | <PropertyGroup> | 50 | <PropertyGroup> |
44 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;wixstdba.res</ProjectAdditionalLinkLibraries> | 51 | <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories> |
52 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries> | ||
45 | </PropertyGroup> | 53 | </PropertyGroup> |
46 | 54 | ||
55 | <ItemDefinitionGroup> | ||
56 | <Link> | ||
57 | <DelayLoadDLLs>comctl32.dll;gdiplus.dll;shlwapi.dll;version.dll;wininet.dll</DelayLoadDLLs> | ||
58 | <AdditionalOptions>/DEPENDENTLOADFLAG:0x800 %(AdditionalOptions)</AdditionalOptions> | ||
59 | </Link> | ||
60 | </ItemDefinitionGroup> | ||
61 | |||
47 | <ItemGroup> | 62 | <ItemGroup> |
48 | <ClCompile Include="precomp.cpp"> | ||
49 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
50 | </ClCompile> | ||
51 | <ClCompile Include="WixStandardBootstrapperApplication.cpp" /> | ||
52 | <ClCompile Include="wixstdba.cpp" /> | ||
53 | </ItemGroup> | ||
54 | <ItemGroup> | ||
55 | <ClInclude Include="inc\preqba.h" /> | ||
56 | <ClInclude Include="precomp.h" /> | 63 | <ClInclude Include="precomp.h" /> |
57 | <ClInclude Include="resource.h" /> | 64 | <ClInclude Include="resource.h" /> |
58 | </ItemGroup> | 65 | </ItemGroup> |
59 | <ItemGroup> | 66 | <ItemGroup> |
60 | <None Include="wixstdba.def" /> | 67 | <ClCompile Include="precomp.cpp"> |
68 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
69 | </ClCompile> | ||
70 | <ClCompile Include="wixstdba.cpp" /> | ||
61 | </ItemGroup> | 71 | </ItemGroup> |
72 | |||
62 | <ItemGroup> | 73 | <ItemGroup> |
63 | <None Include="packages.config" /> | 74 | <Manifest Include="..\stdbas\stdbas.manifest" /> |
75 | <ResourceCompile Include="wixstdba.rc" /> | ||
64 | </ItemGroup> | 76 | </ItemGroup> |
77 | |||
65 | <ItemGroup> | 78 | <ItemGroup> |
66 | <CustomBuild Include="wixstdba.mc"> | 79 | <ProjectReference Include="..\stdbas\stdbas.vcxproj"> |
67 | <Message>Compiling message file...</Message> | 80 | <Project>{DBBF5F32-BAEA-46A8-99A0-17277A906456}</Project> |
68 | <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z wixstdba.messages "$(InputDir)wixstdba.mc" | 81 | </ProjectReference> |
69 | rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc"</Command> | ||
70 | <Outputs>$(IntDir)wixstdba.messages.h;$(IntDir)wixstdba.messages.rc</Outputs> | ||
71 | </CustomBuild> | ||
72 | </ItemGroup> | 82 | </ItemGroup> |
73 | 83 | ||
74 | <ItemGroup> | 84 | <ItemGroup> |
75 | <PackageReference Include="WixToolset.BalUtil" /> | 85 | <PackageReference Include="WixToolset.BalUtil" /> |
76 | |||
77 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> | 86 | <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" /> |
78 | </ItemGroup> | 87 | </ItemGroup> |
79 | 88 | ||
diff --git a/src/ext/Dependency/ca/wixdepca.cpp b/src/ext/Dependency/ca/wixdepca.cpp index 87610420..dc967a1d 100644 --- a/src/ext/Dependency/ca/wixdepca.cpp +++ b/src/ext/Dependency/ca/wixdepca.cpp | |||
@@ -209,7 +209,7 @@ static HRESULT EnsureRequiredDependencies( | |||
209 | 209 | ||
210 | // Send a yes/no message with a warning icon since continuing could be detrimental. | 210 | // Send a yes/no message with a warning icon since continuing could be detrimental. |
211 | // This is sent as a USER message to better detect whether a user or dependency-aware bootstrapper is responding | 211 | // This is sent as a USER message to better detect whether a user or dependency-aware bootstrapper is responding |
212 | // or if Windows Installer or a dependency-unaware boostrapper is returning a typical default response. | 212 | // or if Windows Installer or a dependency-unaware bootstrapper is returning a typical default response. |
213 | er = WcaProcessMessage(static_cast<INSTALLMESSAGE>(INSTALLMESSAGE_USER | MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2), hDependencyRec); | 213 | er = WcaProcessMessage(static_cast<INSTALLMESSAGE>(INSTALLMESSAGE_USER | MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2), hDependencyRec); |
214 | switch (er) | 214 | switch (er) |
215 | { | 215 | { |
@@ -359,7 +359,7 @@ static HRESULT EnsureAbsentDependents( | |||
359 | 359 | ||
360 | // Send a yes/no message with a warning icon since continuing could be detrimental. | 360 | // Send a yes/no message with a warning icon since continuing could be detrimental. |
361 | // This is sent as a USER message to better detect whether a user or dependency-aware bootstrapper is responding | 361 | // This is sent as a USER message to better detect whether a user or dependency-aware bootstrapper is responding |
362 | // or if Windows Installer or a dependency-unaware boostrapper is returning a typical default response. | 362 | // or if Windows Installer or a dependency-unaware bootstrapper is returning a typical default response. |
363 | er = WcaProcessMessage(static_cast<INSTALLMESSAGE>(INSTALLMESSAGE_USER | MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2), hDependencyRec); | 363 | er = WcaProcessMessage(static_cast<INSTALLMESSAGE>(INSTALLMESSAGE_USER | MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2), hDependencyRec); |
364 | switch (er) | 364 | switch (er) |
365 | { | 365 | { |
diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/NetCore3_Platform.wxi b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/NetCore3_Platform.wxi index affe0143..e8f981ea 100644 --- a/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/NetCore3_Platform.wxi +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/TestData/UsingDotNetCorePackages/NetCore3_Platform.wxi | |||
@@ -35,7 +35,7 @@ | |||
35 | <PackageGroupRef Id="$(var.AspNetCoreRedistId)" /> | 35 | <PackageGroupRef Id="$(var.AspNetCoreRedistId)" /> |
36 | </PackageGroup> | 36 | </PackageGroup> |
37 | 37 | ||
38 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.AspNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> | 38 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.AspNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> |
39 | </Fragment> | 39 | </Fragment> |
40 | 40 | ||
41 | <Fragment> | 41 | <Fragment> |
@@ -43,7 +43,7 @@ | |||
43 | <PackageGroupRef Id="$(var.DesktopNetCoreRedistId)" /> | 43 | <PackageGroupRef Id="$(var.DesktopNetCoreRedistId)" /> |
44 | </PackageGroup> | 44 | </PackageGroup> |
45 | 45 | ||
46 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.DesktopNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> | 46 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.DesktopNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> |
47 | </Fragment> | 47 | </Fragment> |
48 | 48 | ||
49 | <Fragment> | 49 | <Fragment> |
@@ -51,7 +51,7 @@ | |||
51 | <PackageGroupRef Id="$(var.DotNetCoreRedistId)" /> | 51 | <PackageGroupRef Id="$(var.DotNetCoreRedistId)" /> |
52 | </PackageGroup> | 52 | </PackageGroup> |
53 | 53 | ||
54 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.DotNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> | 54 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.DotNetCoreRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> |
55 | </Fragment> | 55 | </Fragment> |
56 | 56 | ||
57 | <Fragment> | 57 | <Fragment> |
@@ -59,6 +59,6 @@ | |||
59 | <PackageGroupRef Id="$(var.DotNetCoreSdkRedistId)" /> | 59 | <PackageGroupRef Id="$(var.DotNetCoreSdkRedistId)" /> |
60 | </PackageGroup> | 60 | </PackageGroup> |
61 | 61 | ||
62 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.DotNetCoreSdkRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> | 62 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.DotNetCoreSdkRedistId)" LicenseUrl="$(var.NetCoreEulaLink)" /> |
63 | </Fragment> | 63 | </Fragment> |
64 | </Include> | 64 | </Include> |
diff --git a/src/ext/NetFx/wixlib/NetFx462.wxs b/src/ext/NetFx/wixlib/NetFx462.wxs index 904d2be0..57407bcd 100644 --- a/src/ext/NetFx/wixlib/NetFx462.wxs +++ b/src/ext/NetFx/wixlib/NetFx462.wxs | |||
@@ -40,7 +40,7 @@ | |||
40 | <PackageGroupRef Id="$(var.NetFx462WebId)" /> | 40 | <PackageGroupRef Id="$(var.NetFx462WebId)" /> |
41 | </PackageGroup> | 41 | </PackageGroup> |
42 | 42 | ||
43 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx462WebId)" LicenseUrl="$(var.NetFx462EulaLink)" /> | 43 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx462WebId)" LicenseUrl="$(var.NetFx462EulaLink)" /> |
44 | </Fragment> | 44 | </Fragment> |
45 | 45 | ||
46 | <Fragment> | 46 | <Fragment> |
@@ -62,6 +62,6 @@ | |||
62 | <PackageGroupRef Id="$(var.NetFx462RedistId)" /> | 62 | <PackageGroupRef Id="$(var.NetFx462RedistId)" /> |
63 | </PackageGroup> | 63 | </PackageGroup> |
64 | 64 | ||
65 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx462RedistId)" LicenseUrl="$(var.NetFx462EulaLink)" /> | 65 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx462RedistId)" LicenseUrl="$(var.NetFx462EulaLink)" /> |
66 | </Fragment> | 66 | </Fragment> |
67 | </Wix> | 67 | </Wix> |
diff --git a/src/ext/NetFx/wixlib/NetFx472.wxs b/src/ext/NetFx/wixlib/NetFx472.wxs index 15cb0de2..7d2ce72d 100644 --- a/src/ext/NetFx/wixlib/NetFx472.wxs +++ b/src/ext/NetFx/wixlib/NetFx472.wxs | |||
@@ -40,7 +40,7 @@ | |||
40 | <PackageGroupRef Id="$(var.NetFx472WebId)" /> | 40 | <PackageGroupRef Id="$(var.NetFx472WebId)" /> |
41 | </PackageGroup> | 41 | </PackageGroup> |
42 | 42 | ||
43 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx472WebId)" LicenseUrl="$(var.NetFx472EulaLink)" /> | 43 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx472WebId)" LicenseUrl="$(var.NetFx472EulaLink)" /> |
44 | </Fragment> | 44 | </Fragment> |
45 | 45 | ||
46 | <Fragment> | 46 | <Fragment> |
@@ -62,6 +62,6 @@ | |||
62 | <PackageGroupRef Id="$(var.NetFx472RedistId)" /> | 62 | <PackageGroupRef Id="$(var.NetFx472RedistId)" /> |
63 | </PackageGroup> | 63 | </PackageGroup> |
64 | 64 | ||
65 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx472RedistId)" LicenseUrl="$(var.NetFx472EulaLink)" /> | 65 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx472RedistId)" LicenseUrl="$(var.NetFx472EulaLink)" /> |
66 | </Fragment> | 66 | </Fragment> |
67 | </Wix> | 67 | </Wix> |
diff --git a/src/ext/NetFx/wixlib/NetFx48.wxs b/src/ext/NetFx/wixlib/NetFx48.wxs index fc2f97f5..395a0b47 100644 --- a/src/ext/NetFx/wixlib/NetFx48.wxs +++ b/src/ext/NetFx/wixlib/NetFx48.wxs | |||
@@ -40,7 +40,7 @@ | |||
40 | <PackageGroupRef Id="$(var.NetFx48WebId)" /> | 40 | <PackageGroupRef Id="$(var.NetFx48WebId)" /> |
41 | </PackageGroup> | 41 | </PackageGroup> |
42 | 42 | ||
43 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx48WebId)" LicenseUrl="$(var.NetFx48EulaLink)" /> | 43 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx48WebId)" LicenseUrl="$(var.NetFx48EulaLink)" /> |
44 | </Fragment> | 44 | </Fragment> |
45 | 45 | ||
46 | <Fragment> | 46 | <Fragment> |
@@ -62,6 +62,6 @@ | |||
62 | <PackageGroupRef Id="$(var.NetFx48RedistId)" /> | 62 | <PackageGroupRef Id="$(var.NetFx48RedistId)" /> |
63 | </PackageGroup> | 63 | </PackageGroup> |
64 | 64 | ||
65 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx48RedistId)" LicenseUrl="$(var.NetFx48EulaLink)" /> | 65 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx48RedistId)" LicenseUrl="$(var.NetFx48EulaLink)" /> |
66 | </Fragment> | 66 | </Fragment> |
67 | </Wix> | 67 | </Wix> |
diff --git a/src/ext/NetFx/wixlib/NetFx481.wxs b/src/ext/NetFx/wixlib/NetFx481.wxs index b0da8bb0..dc29a585 100644 --- a/src/ext/NetFx/wixlib/NetFx481.wxs +++ b/src/ext/NetFx/wixlib/NetFx481.wxs | |||
@@ -63,7 +63,7 @@ | |||
63 | <PackageGroupRef Id="$(var.NetFx481WebId)" /> | 63 | <PackageGroupRef Id="$(var.NetFx481WebId)" /> |
64 | </PackageGroup> | 64 | </PackageGroup> |
65 | 65 | ||
66 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx481WebId)" LicenseUrl="$(var.NetFx481EulaLink)" /> | 66 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx481WebId)" LicenseUrl="$(var.NetFx481EulaLink)" /> |
67 | </Fragment> | 67 | </Fragment> |
68 | 68 | ||
69 | <Fragment> | 69 | <Fragment> |
@@ -74,28 +74,28 @@ | |||
74 | <WixVariable Id="NetFx481RedistPackageDirectory" Value="redist\" Overridable="yes" /> | 74 | <WixVariable Id="NetFx481RedistPackageDirectory" Value="redist\" Overridable="yes" /> |
75 | 75 | ||
76 | <PackageGroup Id="$(var.NetFx481RedistId)"> | 76 | <PackageGroup Id="$(var.NetFx481RedistId)"> |
77 | <ExePackage | 77 | <ExePackage |
78 | CacheId="$(var.NetFx481RedistId)_AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" | 78 | CacheId="$(var.NetFx481RedistId)_AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" |
79 | InstallArguments="/q /norestart /log "[NetFx481RedistLog].html"" | 79 | InstallArguments="/q /norestart /log "[NetFx481RedistLog].html"" |
80 | PerMachine="yes" | 80 | PerMachine="yes" |
81 | DetectCondition="!(wix.NetFx481RedistDetectCondition)" | 81 | DetectCondition="!(wix.NetFx481RedistDetectCondition)" |
82 | InstallCondition="!(wix.NetFx481RedistInstallCondition)" | 82 | InstallCondition="!(wix.NetFx481RedistInstallCondition)" |
83 | Id="$(var.NetFx481RedistId)" | 83 | Id="$(var.NetFx481RedistId)" |
84 | Vital="yes" | 84 | Vital="yes" |
85 | Permanent="yes" | 85 | Permanent="yes" |
86 | Protocol="netfx4" | 86 | Protocol="netfx4" |
87 | LogPathVariable="NetFx481RedistLog" | 87 | LogPathVariable="NetFx481RedistLog" |
88 | Cache="remove"> | 88 | Cache="remove"> |
89 | 89 | ||
90 | <ExePackagePayload | 90 | <ExePackagePayload |
91 | Name="!(wix.NetFx481RedistPackageDirectory)ndp481-x86-x64-allos-enu.exe" | 91 | Name="!(wix.NetFx481RedistPackageDirectory)ndp481-x86-x64-allos-enu.exe" |
92 | DownloadUrl="$(var.NetFx481RedistLink)" | 92 | DownloadUrl="$(var.NetFx481RedistLink)" |
93 | ProductName="Microsoft .NET Framework 4.8.1" | 93 | ProductName="Microsoft .NET Framework 4.8.1" |
94 | Description="Microsoft .NET Framework 4.8.1 Setup" | 94 | Description="Microsoft .NET Framework 4.8.1 Setup" |
95 | CertificatePublicKey="0A7D1EFF01D4EBAD21E85C51499576EBAA40E676" | 95 | CertificatePublicKey="0A7D1EFF01D4EBAD21E85C51499576EBAA40E676" |
96 | CertificateThumbprint="AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" | 96 | CertificateThumbprint="AFBF0B8B6A18F7E23CCA1DDCD0AC1A55B4035173" |
97 | Size="63610344" | 97 | Size="63610344" |
98 | Version="4.8.09037.06" | 98 | Version="4.8.09037.06" |
99 | /> | 99 | /> |
100 | </ExePackage> | 100 | </ExePackage> |
101 | </PackageGroup> | 101 | </PackageGroup> |
@@ -106,6 +106,6 @@ | |||
106 | <PackageGroupRef Id="$(var.NetFx481RedistId)" /> | 106 | <PackageGroupRef Id="$(var.NetFx481RedistId)" /> |
107 | </PackageGroup> | 107 | </PackageGroup> |
108 | 108 | ||
109 | <bal:ManagedBootstrapperApplicationPrereqInformation PackageId="$(var.NetFx481RedistId)" LicenseUrl="$(var.NetFx481EulaLink)" /> | 109 | <bal:BootstrapperApplicationPrerequisiteInformation PackageId="$(var.NetFx481RedistId)" LicenseUrl="$(var.NetFx481EulaLink)" /> |
110 | </Fragment> | 110 | </Fragment> |
111 | </Wix> | 111 | </Wix> |
diff --git a/src/ext/Util/ca/test.cpp b/src/ext/Util/ca/test.cpp index c4d215f0..e9d02ed3 100644 --- a/src/ext/Util/ca/test.cpp +++ b/src/ext/Util/ca/test.cpp | |||
@@ -216,7 +216,7 @@ static DWORD WINAPI ThreadProc( | |||
216 | 216 | ||
217 | // Create the window to handle reboots without activating it. | 217 | // Create the window to handle reboots without activating it. |
218 | hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, SW_SHOWNA, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, NULL); | 218 | hWnd = ::CreateWindowExW(WS_EX_TOOLWINDOW, wc.lpszClassName, NULL, WS_POPUP | WS_VISIBLE, CW_USEDEFAULT, SW_SHOWNA, 0, 0, HWND_DESKTOP, NULL, pContext->hInstance, NULL); |
219 | ExitOnNullWithLastError(hWnd, hr, "Failed to create window."); | 219 | ExitOnNullWithLastError(hWnd, hr, "Failed to create test UI thread window."); |
220 | 220 | ||
221 | // Persist the window handle and let the caller know we've initialized. | 221 | // Persist the window handle and let the caller know we've initialized. |
222 | pContext->hWnd = hWnd; | 222 | pContext->hWnd = hWnd; |
diff --git a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs b/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs index 45147066..09ce72a5 100644 --- a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs +++ b/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs | |||
@@ -1,8 +1,6 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
2 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | 2 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="fakeba.dll" /> |
4 | <BootstrapperApplicationDll SourceFile="fakeba.dll" /> | ||
5 | </BootstrapperApplication> | ||
6 | 4 | ||
7 | <util:RegistrySearchRef Id="RegistrySearchId" /> | 5 | <util:RegistrySearchRef Id="RegistrySearchId" /> |
8 | <util:RegistrySearchRef Id="RegistrySearchId64" /> | 6 | <util:RegistrySearchRef Id="RegistrySearchId64" /> |
diff --git a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingBuiltinVariableNames.wxs b/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingBuiltinVariableNames.wxs index cc7162d7..db36f9b4 100644 --- a/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingBuiltinVariableNames.wxs +++ b/src/ext/Util/test/WixToolsetTest.Util/TestData/BundleWithSearches/BundleUsingBuiltinVariableNames.wxs | |||
@@ -1,8 +1,6 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
2 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | 2 | <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="fakeba.dll" /> |
4 | <BootstrapperApplicationDll SourceFile="fakeba.dll" /> | ||
5 | </BootstrapperApplication> | ||
6 | 4 | ||
7 | <util:RegistrySearchRef Id="RegistrySearchId" /> | 5 | <util:RegistrySearchRef Id="RegistrySearchId" /> |
8 | <util:RegistrySearchRef Id="RegistrySearchId64" /> | 6 | <util:RegistrySearchRef Id="RegistrySearchId64" /> |
diff --git a/src/ext/Util/wixext/UtilCompiler.cs b/src/ext/Util/wixext/UtilCompiler.cs index f7bb0614..6221c052 100644 --- a/src/ext/Util/wixext/UtilCompiler.cs +++ b/src/ext/Util/wixext/UtilCompiler.cs | |||
@@ -800,7 +800,7 @@ namespace WixToolset.Util | |||
800 | } | 800 | } |
801 | 801 | ||
802 | var componentKeyPath = this.CreateComponentKeyPath(); | 802 | var componentKeyPath = this.CreateComponentKeyPath(); |
803 | componentKeyPath.Id = id.Id; | 803 | componentKeyPath.Id = id; |
804 | componentKeyPath.Explicit = isKeyPath; | 804 | componentKeyPath.Explicit = isKeyPath; |
805 | componentKeyPath.Type = PossibleKeyPathType.Registry; | 805 | componentKeyPath.Type = PossibleKeyPathType.Registry; |
806 | return componentKeyPath; | 806 | return componentKeyPath; |