diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:32:42 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:53:29 +1000 |
| commit | a79ce0b907676e50332139b4c4a8acb5d22a4b46 (patch) | |
| tree | eff9680cd53166f0f73934e02dfe5112384838f1 /src | |
| parent | b7faab06259d3afdc3205024a0004ace72157cbe (diff) | |
| download | wix-a79ce0b907676e50332139b4c4a8acb5d22a4b46.tar.gz wix-a79ce0b907676e50332139b4c4a8acb5d22a4b46.tar.bz2 wix-a79ce0b907676e50332139b4c4a8acb5d22a4b46.zip | |
Add support for FDD in DotNetCoreBootstrapperApplicationHost.
Diffstat (limited to 'src')
17 files changed, 415 insertions, 12 deletions
diff --git a/src/dnchost/dnchost.cpp b/src/dnchost/dnchost.cpp index 0fad58c1..503537c0 100644 --- a/src/dnchost/dnchost.cpp +++ b/src/dnchost/dnchost.cpp | |||
| @@ -97,15 +97,22 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | |||
| 97 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application factory."); | 97 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application factory."); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading .NET Core SCD bootstrapper application."); | 100 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading .NET Core %ls bootstrapper application.", DNCHOSTTYPE_FDD == vstate.type ? L"FDD" : L"SCD"); |
| 101 | 101 | ||
| 102 | hr = vstate.pAppFactory->Create(pArgs, pResults); | 102 | hr = vstate.pAppFactory->Create(pArgs, pResults); |
| 103 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application."); | 103 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application."); |
| 104 | } | 104 | } |
| 105 | else // fallback to the prerequisite BA. | 105 | else // fallback to the prerequisite BA. |
| 106 | { | 106 | { |
| 107 | hrHostInitialization = E_DNCHOST_SCD_RUNTIME_FAILURE; | 107 | if (DNCHOSTTYPE_SCD == vstate.type) |
| 108 | BalLogError(hr, "The self-contained .NET Core runtime failed to load. This is an unrecoverable error."); | 108 | { |
| 109 | hrHostInitialization = E_DNCHOST_SCD_RUNTIME_FAILURE; | ||
| 110 | BalLogError(hr, "The self-contained .NET Core runtime failed to load. This is an unrecoverable error."); | ||
| 111 | } | ||
| 112 | else | ||
| 113 | { | ||
| 114 | hrHostInitialization = S_OK; | ||
| 115 | } | ||
| 109 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x%08x.", hr); | 116 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x%08x.", hr); |
| 110 | 117 | ||
| 111 | hr = CreatePrerequisiteBA(hrHostInitialization, pEngine, vstate.sczAppBase, pArgs, pResults); | 118 | hr = CreatePrerequisiteBA(hrHostInitialization, pEngine, vstate.sczAppBase, pArgs, pResults); |
| @@ -166,6 +173,7 @@ static HRESULT LoadDncConfiguration( | |||
| 166 | LPWSTR sczPayloadId = NULL; | 173 | LPWSTR sczPayloadId = NULL; |
| 167 | LPWSTR sczPayloadXPath = NULL; | 174 | LPWSTR sczPayloadXPath = NULL; |
| 168 | LPWSTR sczPayloadName = NULL; | 175 | LPWSTR sczPayloadName = NULL; |
| 176 | DWORD dwBool = 0; | ||
| 169 | 177 | ||
| 170 | hr = XmlLoadDocumentFromFile(pArgs->pCommand->wzBootstrapperApplicationDataPath, &pixdManifest); | 178 | hr = XmlLoadDocumentFromFile(pArgs->pCommand->wzBootstrapperApplicationDataPath, &pixdManifest); |
| 171 | BalExitOnFailure(hr, "Failed to load BalManifest '%ls'", pArgs->pCommand->wzBootstrapperApplicationDataPath); | 179 | BalExitOnFailure(hr, "Failed to load BalManifest '%ls'", pArgs->pCommand->wzBootstrapperApplicationDataPath); |
| @@ -220,6 +228,26 @@ static HRESULT LoadDncConfiguration( | |||
| 220 | hr = StrAllocConcat(&pState->sczBaFactoryRuntimeConfigPath, L".runtimeconfig.json", 0); | 228 | hr = StrAllocConcat(&pState->sczBaFactoryRuntimeConfigPath, L".runtimeconfig.json", 0); |
| 221 | BalExitOnFailure(hr, "Failed to concat extension to runtime config path."); | 229 | BalExitOnFailure(hr, "Failed to concat extension to runtime config path."); |
| 222 | 230 | ||
| 231 | pState->type = DNCHOSTTYPE_FDD; | ||
| 232 | |||
| 233 | hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixDncOptions", &pixnHost); | ||
| 234 | if (S_FALSE == hr) | ||
| 235 | { | ||
| 236 | ExitFunction1(hr = S_OK); | ||
| 237 | } | ||
| 238 | BalExitOnFailure(hr, "Failed to find WixDncOptions element in bootstrapper application config."); | ||
| 239 | |||
| 240 | hr = XmlGetAttributeNumber(pixnHost, L"SelfContainedDeployment", &dwBool); | ||
| 241 | if (S_FALSE == hr) | ||
| 242 | { | ||
| 243 | hr = S_OK; | ||
| 244 | } | ||
| 245 | else if (SUCCEEDED(hr) && dwBool) | ||
| 246 | { | ||
| 247 | pState->type = DNCHOSTTYPE_SCD; | ||
| 248 | } | ||
| 249 | BalExitOnFailure(hr, "Failed to get SelfContainedDeployment value."); | ||
| 250 | |||
| 223 | LExit: | 251 | LExit: |
| 224 | ReleaseStr(sczPayloadName); | 252 | ReleaseStr(sczPayloadName); |
| 225 | ReleaseObject(pixnPayload); | 253 | ReleaseObject(pixnPayload); |
diff --git a/src/dnchost/dnchost.h b/src/dnchost/dnchost.h index 40c506fc..22fd8f5e 100644 --- a/src/dnchost/dnchost.h +++ b/src/dnchost/dnchost.h | |||
| @@ -2,6 +2,13 @@ | |||
| 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 | ||
| 5 | enum DNCHOSTTYPE | ||
| 6 | { | ||
| 7 | DNCHOSTTYPE_UNKNOWN, | ||
| 8 | DNCHOSTTYPE_FDD, | ||
| 9 | DNCHOSTTYPE_SCD, | ||
| 10 | }; | ||
| 11 | |||
| 5 | extern "C" typedef HRESULT(WINAPI* PFN_DNCPREQ_BOOTSTRAPPER_APPLICATION_CREATE)( | 12 | extern "C" typedef HRESULT(WINAPI* PFN_DNCPREQ_BOOTSTRAPPER_APPLICATION_CREATE)( |
| 6 | __in HRESULT hrHostInitialization, | 13 | __in HRESULT hrHostInitialization, |
| 7 | __in IBootstrapperEngine* pEngine, | 14 | __in IBootstrapperEngine* pEngine, |
| @@ -21,6 +28,7 @@ struct DNCSTATE | |||
| 21 | LPWSTR sczBaFactoryAssemblyPath; | 28 | LPWSTR sczBaFactoryAssemblyPath; |
| 22 | LPWSTR sczBaFactoryDepsJsonPath; | 29 | LPWSTR sczBaFactoryDepsJsonPath; |
| 23 | LPWSTR sczBaFactoryRuntimeConfigPath; | 30 | LPWSTR sczBaFactoryRuntimeConfigPath; |
| 31 | DNCHOSTTYPE type; | ||
| 24 | HOSTFXR_STATE hostfxrState; | 32 | HOSTFXR_STATE hostfxrState; |
| 25 | IBootstrapperApplicationFactory* pAppFactory; | 33 | IBootstrapperApplicationFactory* pAppFactory; |
| 26 | HMODULE hMbapreqModule; | 34 | HMODULE hMbapreqModule; |
diff --git a/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs index f5714c67..7f40ee26 100644 --- a/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs +++ b/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs | |||
| @@ -10,6 +10,40 @@ namespace WixToolsetTest.ManagedHost | |||
| 10 | public class DncHostFixture | 10 | public class DncHostFixture |
| 11 | { | 11 | { |
| 12 | [Fact] | 12 | [Fact] |
| 13 | public void CanLoadFDDEarliestCoreMBA() | ||
| 14 | { | ||
| 15 | using (var fs = new DisposableFileSystem()) | ||
| 16 | { | ||
| 17 | var baseFolder = fs.GetFolder(); | ||
| 18 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
| 19 | var bundleFile = Path.Combine(binFolder, "FDDEarliestCoreMBA.exe"); | ||
| 20 | var baSourceFolder = TestData.Get(@"..\examples"); | ||
| 21 | var bundleSourceFolder = TestData.Get(@"TestData\EarliestCoreMBA"); | ||
| 22 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 23 | |||
| 24 | var compileResult = WixRunner.Execute(new[] | ||
| 25 | { | ||
| 26 | "build", | ||
| 27 | Path.Combine(bundleSourceFolder, "FrameworkDependentBundle.wxs"), | ||
| 28 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | ||
| 29 | "-intermediateFolder", intermediateFolder, | ||
| 30 | "-bindpath", baSourceFolder, | ||
| 31 | "-burnStub", TestEngine.BurnStubFile, | ||
| 32 | "-o", bundleFile, | ||
| 33 | }); | ||
| 34 | compileResult.AssertSuccess(); | ||
| 35 | var testEngine = new TestEngine(); | ||
| 36 | |||
| 37 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
| 38 | var logMessages = result.Output; | ||
| 39 | Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]); | ||
| 40 | Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]); | ||
| 41 | Assert.Equal("EarliestCoreBA", logMessages[2]); | ||
| 42 | Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]); | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 | [Fact] | ||
| 13 | public void CanLoadSCDEarliestCoreMBA() | 47 | public void CanLoadSCDEarliestCoreMBA() |
| 14 | { | 48 | { |
| 15 | using (var fs = new DisposableFileSystem()) | 49 | using (var fs = new DisposableFileSystem()) |
| @@ -120,6 +154,79 @@ namespace WixToolsetTest.ManagedHost | |||
| 120 | } | 154 | } |
| 121 | 155 | ||
| 122 | [Fact] | 156 | [Fact] |
| 157 | public void CanLoadFDDLatestCoreMBA() | ||
| 158 | { | ||
| 159 | using (var fs = new DisposableFileSystem()) | ||
| 160 | { | ||
| 161 | var baseFolder = fs.GetFolder(); | ||
| 162 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
| 163 | var bundleFile = Path.Combine(binFolder, "FDDLatestCoreMBA.exe"); | ||
| 164 | var baSourceFolder = TestData.Get(@"..\examples"); | ||
| 165 | var bundleSourceFolder = TestData.Get(@"TestData\LatestCoreMBA"); | ||
| 166 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 167 | |||
| 168 | var compileResult = WixRunner.Execute(new[] | ||
| 169 | { | ||
| 170 | "build", | ||
| 171 | Path.Combine(bundleSourceFolder, "FrameworkDependentBundle.wxs"), | ||
| 172 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | ||
| 173 | "-intermediateFolder", intermediateFolder, | ||
| 174 | "-bindpath", baSourceFolder, | ||
| 175 | "-burnStub", TestEngine.BurnStubFile, | ||
| 176 | "-o", bundleFile, | ||
| 177 | }); | ||
| 178 | compileResult.AssertSuccess(); | ||
| 179 | var testEngine = new TestEngine(); | ||
| 180 | |||
| 181 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder); | ||
| 182 | var logMessages = result.Output; | ||
| 183 | Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]); | ||
| 184 | Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]); | ||
| 185 | Assert.Equal("LatestCoreBA", logMessages[2]); | ||
| 186 | Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | |||
| 190 | [Fact] | ||
| 191 | public void CanReloadFDDLatestCoreMBA() | ||
| 192 | { | ||
| 193 | using (var fs = new DisposableFileSystem()) | ||
| 194 | { | ||
| 195 | var baseFolder = fs.GetFolder(); | ||
| 196 | var binFolder = Path.Combine(baseFolder, "bin"); | ||
| 197 | var bundleFile = Path.Combine(binFolder, "FDDLatestCoreMBA.exe"); | ||
| 198 | var baSourceFolder = TestData.Get(@"..\examples"); | ||
| 199 | var bundleSourceFolder = TestData.Get(@"TestData\LatestCoreMBA"); | ||
| 200 | var intermediateFolder = Path.Combine(baseFolder, "obj"); | ||
| 201 | |||
| 202 | var compileResult = WixRunner.Execute(new[] | ||
| 203 | { | ||
| 204 | "build", | ||
| 205 | Path.Combine(bundleSourceFolder, "FrameworkDependentBundle.wxs"), | ||
| 206 | "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), | ||
| 207 | "-intermediateFolder", intermediateFolder, | ||
| 208 | "-bindpath", baSourceFolder, | ||
| 209 | "-burnStub", TestEngine.BurnStubFile, | ||
| 210 | "-o", bundleFile, | ||
| 211 | }); | ||
| 212 | compileResult.AssertSuccess(); | ||
| 213 | var testEngine = new TestEngine(); | ||
| 214 | |||
| 215 | var result = testEngine.RunReloadEngine(bundleFile, baseFolder); | ||
| 216 | var logMessages = result.Output; | ||
| 217 | Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]); | ||
| 218 | Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]); | ||
| 219 | Assert.Equal("LatestCoreBA", logMessages[2]); | ||
| 220 | Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]); | ||
| 221 | Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[4]); | ||
| 222 | Assert.Equal("Reloaded 1 time(s)", logMessages[5]); // dnchost doesn't currently support unloading | ||
| 223 | Assert.Equal("Creating BA thread to run asynchronously.", logMessages[6]); | ||
| 224 | Assert.Equal("LatestCoreBA", logMessages[7]); | ||
| 225 | Assert.Equal("Shutdown,Restart,0", logMessages[8]); | ||
| 226 | } | ||
| 227 | } | ||
| 228 | |||
| 229 | [Fact] | ||
| 123 | public void CanLoadSCDLatestCoreMBA() | 230 | public void CanLoadSCDLatestCoreMBA() |
| 124 | { | 231 | { |
| 125 | using (var fs = new DisposableFileSystem()) | 232 | using (var fs = new DisposableFileSystem()) |
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/FrameworkDependentBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/FrameworkDependentBundle.wxs new file mode 100644 index 00000000..5cec494d --- /dev/null +++ b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/FrameworkDependentBundle.wxs | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 4 | <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | ||
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | ||
| 6 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json' Name='Example.EarliestCoreMBA.deps.json' /> | ||
| 7 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll' Name='Example.EarliestCoreMBA.dll' bal:BAFactoryAssembly='yes' /> | ||
| 8 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.pdb' Name='Example.EarliestCoreMBA.pdb' /> | ||
| 9 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json' Name='Example.EarliestCoreMBA.runtimeconfig.json' /> | ||
| 10 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\mbanative.dll' Name='mbanative.dll' /> | ||
| 11 | <Payload SourceFile='publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll' Name='WixToolset.Mba.Core.dll' /> | ||
| 12 | </BootstrapperApplicationRef> | ||
| 13 | <Chain> | ||
| 14 | <ExePackage SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" /> | ||
| 15 | </Chain> | ||
| 16 | </Bundle> | ||
| 17 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/SelfContainedBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/SelfContainedBundle.wxs index 4f3b2f20..d951ffc6 100644 --- a/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/SelfContainedBundle.wxs +++ b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/SelfContainedBundle.wxs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 4 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 4 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> |
| 6 | <bal:WixDotNetCoreBootstrapperApplication SelfContainedDeployment="yes" /> | ||
| 6 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> | 7 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> |
| 7 | </BootstrapperApplicationRef> | 8 | </BootstrapperApplicationRef> |
| 8 | <Chain> | 9 | <Chain> |
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/TrimmedSelfContainedBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/TrimmedSelfContainedBundle.wxs index 15dc72bb..816524ed 100644 --- a/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/TrimmedSelfContainedBundle.wxs +++ b/src/test/WixToolsetTest.ManagedHost/TestData/EarliestCoreMBA/TrimmedSelfContainedBundle.wxs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 4 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 4 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> |
| 6 | <bal:WixDotNetCoreBootstrapperApplication SelfContainedDeployment="yes" /> | ||
| 6 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> | 7 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> |
| 7 | </BootstrapperApplicationRef> | 8 | </BootstrapperApplicationRef> |
| 8 | <Chain> | 9 | <Chain> |
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/FrameworkDependentBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/FrameworkDependentBundle.wxs new file mode 100644 index 00000000..22fb3d8b --- /dev/null +++ b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/FrameworkDependentBundle.wxs | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
| 4 | <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | ||
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | ||
| 6 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json' Name='Example.LatestCoreMBA.deps.json' /> | ||
| 7 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll' Name='Example.LatestCoreMBA.dll' bal:BAFactoryAssembly='yes' /> | ||
| 8 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.pdb' Name='Example.LatestCoreMBA.pdb' /> | ||
| 9 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json' Name='Example.LatestCoreMBA.runtimeconfig.json' /> | ||
| 10 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\mbanative.dll' Name='mbanative.dll' /> | ||
| 11 | <Payload SourceFile='publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll' Name='WixToolset.Mba.Core.dll' /> | ||
| 12 | </BootstrapperApplicationRef> | ||
| 13 | <Chain> | ||
| 14 | <ExePackage SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" /> | ||
| 15 | </Chain> | ||
| 16 | </Bundle> | ||
| 17 | </Wix> | ||
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/SelfContainedBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/SelfContainedBundle.wxs index 015cc099..4b0fe38a 100644 --- a/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/SelfContainedBundle.wxs +++ b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/SelfContainedBundle.wxs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 4 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 4 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> |
| 6 | <bal:WixDotNetCoreBootstrapperApplication SelfContainedDeployment="yes" /> | ||
| 6 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> | 7 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> |
| 7 | </BootstrapperApplicationRef> | 8 | </BootstrapperApplicationRef> |
| 8 | <Chain> | 9 | <Chain> |
diff --git a/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/TrimmedSelfContainedBundle.wxs b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/TrimmedSelfContainedBundle.wxs index 39e850a8..eee87933 100644 --- a/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/TrimmedSelfContainedBundle.wxs +++ b/src/test/WixToolsetTest.ManagedHost/TestData/LatestCoreMBA/TrimmedSelfContainedBundle.wxs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 3 | xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 4 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 4 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
| 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> | 5 | <BootstrapperApplicationRef Id="DotNetCoreBootstrapperApplicationHost"> |
| 6 | <bal:WixDotNetCoreBootstrapperApplication SelfContainedDeployment="yes" /> | ||
| 6 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> | 7 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> |
| 7 | </BootstrapperApplicationRef> | 8 | </BootstrapperApplicationRef> |
| 8 | <Chain> | 9 | <Chain> |
diff --git a/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj b/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj index 1ea4522b..958c63fc 100644 --- a/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj +++ b/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj | |||
| @@ -18,12 +18,14 @@ | |||
| 18 | </PropertyGroup> | 18 | </PropertyGroup> |
| 19 | 19 | ||
| 20 | <ItemGroup> | 20 | <ItemGroup> |
| 21 | <Content Include="TestData\EarliestCoreMBA\FrameworkDependentBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | ||
| 21 | <Content Include="TestData\EarliestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> | 22 | <Content Include="TestData\EarliestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 22 | <Content Include="TestData\EarliestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> | 23 | <Content Include="TestData\EarliestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 23 | <Content Include="TestData\EarliestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | 24 | <Content Include="TestData\EarliestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 24 | <Content Include="TestData\EarliestCoreMBA\TrimmedSelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | 25 | <Content Include="TestData\EarliestCoreMBA\TrimmedSelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 25 | <Content Include="TestData\FullFramework2MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | 26 | <Content Include="TestData\FullFramework2MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 26 | <Content Include="TestData\FullFramework4MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | 27 | <Content Include="TestData\FullFramework4MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 28 | <Content Include="TestData\LatestCoreMBA\FrameworkDependentBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | ||
| 27 | <Content Include="TestData\LatestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> | 29 | <Content Include="TestData\LatestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 28 | <Content Include="TestData\LatestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> | 30 | <Content Include="TestData\LatestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| 29 | <Content Include="TestData\LatestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> | 31 | <Content Include="TestData\LatestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/> |
| @@ -67,6 +69,7 @@ | |||
| 67 | </ItemGroup> | 69 | </ItemGroup> |
| 68 | 70 | ||
| 69 | <Target Name="PublishExamples" AfterTargets="Build"> | 71 | <Target Name="PublishExamples" AfterTargets="Build"> |
| 72 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"' /> | ||
| 70 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x86 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"' /> | 73 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x86 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"' /> |
| 71 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x86 -c $(Configuration) --self-contained true -p:PublishTrimmed=true "%(CoreMBAProject.Identity)"' /> | 74 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x86 -c $(Configuration) --self-contained true -p:PublishTrimmed=true "%(CoreMBAProject.Identity)"' /> |
| 72 | </Target> | 75 | </Target> |
diff --git a/src/wixext/BalBurnBackendExtension.cs b/src/wixext/BalBurnBackendExtension.cs index 71cd2d92..c81955be 100644 --- a/src/wixext/BalBurnBackendExtension.cs +++ b/src/wixext/BalBurnBackendExtension.cs | |||
| @@ -28,15 +28,17 @@ namespace WixToolset.Bal | |||
| 28 | 28 | ||
| 29 | var isStdBA = baId.StartsWith("WixStandardBootstrapperApplication"); | 29 | var isStdBA = baId.StartsWith("WixStandardBootstrapperApplication"); |
| 30 | var isMBA = baId.StartsWith("ManagedBootstrapperApplicationHost"); | 30 | var isMBA = baId.StartsWith("ManagedBootstrapperApplicationHost"); |
| 31 | var isDNC = baId.StartsWith("DotNetCoreBootstrapperApplicationHost"); | ||
| 32 | var isSCD = isDNC && this.VerifySCD(section); | ||
| 31 | 33 | ||
| 32 | if (isStdBA || isMBA) | 34 | if (isStdBA || isMBA || isDNC) |
| 33 | { | 35 | { |
| 34 | this.VerifyBAFunctions(section); | 36 | this.VerifyBAFunctions(section); |
| 35 | } | 37 | } |
| 36 | 38 | ||
| 37 | if (isMBA) | 39 | if (isMBA || (isDNC && !isSCD)) |
| 38 | { | 40 | { |
| 39 | this.VerifyPrereqPackages(section); | 41 | this.VerifyPrereqPackages(section, isDNC); |
| 40 | } | 42 | } |
| 41 | } | 43 | } |
| 42 | 44 | ||
| @@ -78,12 +80,13 @@ namespace WixToolset.Bal | |||
| 78 | } | 80 | } |
| 79 | } | 81 | } |
| 80 | 82 | ||
| 81 | private void VerifyPrereqPackages(IntermediateSection section) | 83 | private void VerifyPrereqPackages(IntermediateSection section, bool isDNC) |
| 82 | { | 84 | { |
| 83 | var prereqInfoTuples = section.Tuples.OfType<WixMbaPrereqInformationTuple>().ToList(); | 85 | var prereqInfoTuples = section.Tuples.OfType<WixMbaPrereqInformationTuple>().ToList(); |
| 84 | if (prereqInfoTuples.Count == 0) | 86 | if (prereqInfoTuples.Count == 0) |
| 85 | { | 87 | { |
| 86 | this.Messaging.Write(BalErrors.MissingPrereq()); | 88 | var message = isDNC ? BalErrors.MissingDNCPrereq() : BalErrors.MissingMBAPrereq(); |
| 89 | this.Messaging.Write(message); | ||
| 87 | return; | 90 | return; |
| 88 | } | 91 | } |
| 89 | 92 | ||
| @@ -115,5 +118,18 @@ namespace WixToolset.Bal | |||
| 115 | } | 118 | } |
| 116 | } | 119 | } |
| 117 | } | 120 | } |
| 121 | |||
| 122 | private bool VerifySCD(IntermediateSection section) | ||
| 123 | { | ||
| 124 | var isSCD = false; | ||
| 125 | |||
| 126 | var dncOptions = section.Tuples.OfType<WixDncOptionsTuple>().SingleOrDefault(); | ||
| 127 | if (dncOptions != null) | ||
| 128 | { | ||
| 129 | isSCD = dncOptions.SelfContainedDeployment != 0; | ||
| 130 | } | ||
| 131 | |||
| 132 | return isSCD; | ||
| 133 | } | ||
| 118 | } | 134 | } |
| 119 | } | 135 | } |
diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index 33400f3b..dfe29bde 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs | |||
| @@ -63,6 +63,9 @@ namespace WixToolset.Bal | |||
| 63 | case "WixManagedBootstrapperApplicationHost": | 63 | case "WixManagedBootstrapperApplicationHost": |
| 64 | this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element); | 64 | this.ParseWixManagedBootstrapperApplicationHostElement(intermediate, section, element); |
| 65 | break; | 65 | break; |
| 66 | case "WixDotNetCoreBootstrapperApplication": | ||
| 67 | this.ParseWixDotNetCoreBootstrapperApplicationElement(intermediate, section, element); | ||
| 68 | break; | ||
| 66 | default: | 69 | default: |
| 67 | this.ParseHelper.UnexpectedElement(parentElement, element); | 70 | this.ParseHelper.UnexpectedElement(parentElement, element); |
| 68 | break; | 71 | break; |
| @@ -200,7 +203,9 @@ namespace WixToolset.Bal | |||
| 200 | case "BAFactoryAssembly": | 203 | case "BAFactoryAssembly": |
| 201 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 204 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) |
| 202 | { | 205 | { |
| 203 | section.AddTuple(new WixBalBAFactoryAssemblyTuple(sourceLineNumbers) | 206 | // There can only be one. |
| 207 | var id = new Identifier(AccessModifier.Public, "TheBAFactoryAssembly"); | ||
| 208 | section.AddTuple(new WixBalBAFactoryAssemblyTuple(sourceLineNumbers, id) | ||
| 204 | { | 209 | { |
| 205 | PayloadId = payloadId, | 210 | PayloadId = payloadId, |
| 206 | }); | 211 | }); |
| @@ -655,5 +660,84 @@ namespace WixToolset.Bal | |||
| 655 | } | 660 | } |
| 656 | } | 661 | } |
| 657 | } | 662 | } |
| 663 | |||
| 664 | /// <summary> | ||
| 665 | /// Parses a WixDotNetCoreBootstrapperApplication element for Bundles. | ||
| 666 | /// </summary> | ||
| 667 | /// <param name="node">The element to parse.</param> | ||
| 668 | private void ParseWixDotNetCoreBootstrapperApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node) | ||
| 669 | { | ||
| 670 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | ||
| 671 | string logoFile = null; | ||
| 672 | string themeFile = null; | ||
| 673 | string localizationFile = null; | ||
| 674 | var selfContainedDeployment = YesNoType.NotSet; | ||
| 675 | |||
| 676 | foreach (var attrib in node.Attributes()) | ||
| 677 | { | ||
| 678 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | ||
| 679 | { | ||
| 680 | switch (attrib.Name.LocalName) | ||
| 681 | { | ||
| 682 | case "LogoFile": | ||
| 683 | logoFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 684 | break; | ||
| 685 | case "ThemeFile": | ||
| 686 | themeFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 687 | break; | ||
| 688 | case "LocalizationFile": | ||
| 689 | localizationFile = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | ||
| 690 | break; | ||
| 691 | case "SelfContainedDeployment": | ||
| 692 | selfContainedDeployment = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
| 693 | break; | ||
| 694 | default: | ||
| 695 | this.ParseHelper.UnexpectedAttribute(node, attrib); | ||
| 696 | break; | ||
| 697 | } | ||
| 698 | } | ||
| 699 | else | ||
| 700 | { | ||
| 701 | this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); | ||
| 702 | } | ||
| 703 | } | ||
| 704 | |||
| 705 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); | ||
| 706 | |||
| 707 | if (!this.Messaging.EncounteredError) | ||
| 708 | { | ||
| 709 | if (!String.IsNullOrEmpty(logoFile)) | ||
| 710 | { | ||
| 711 | section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo")) | ||
| 712 | { | ||
| 713 | Value = logoFile, | ||
| 714 | }); | ||
| 715 | } | ||
| 716 | |||
| 717 | if (!String.IsNullOrEmpty(themeFile)) | ||
| 718 | { | ||
| 719 | section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeXml")) | ||
| 720 | { | ||
| 721 | Value = themeFile, | ||
| 722 | }); | ||
| 723 | } | ||
| 724 | |||
| 725 | if (!String.IsNullOrEmpty(localizationFile)) | ||
| 726 | { | ||
| 727 | section.AddTuple(new WixVariableTuple(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeWxl")) | ||
| 728 | { | ||
| 729 | Value = localizationFile, | ||
| 730 | }); | ||
| 731 | } | ||
| 732 | |||
| 733 | if (YesNoType.Yes == selfContainedDeployment) | ||
| 734 | { | ||
| 735 | section.AddTuple(new WixDncOptionsTuple(sourceLineNumbers) | ||
| 736 | { | ||
| 737 | SelfContainedDeployment = 1, | ||
| 738 | }); | ||
| 739 | } | ||
| 740 | } | ||
| 741 | } | ||
| 658 | } | 742 | } |
| 659 | } | 743 | } |
diff --git a/src/wixext/BalErrors.cs b/src/wixext/BalErrors.cs index 5591ae1d..bc0186c1 100644 --- a/src/wixext/BalErrors.cs +++ b/src/wixext/BalErrors.cs | |||
| @@ -18,9 +18,14 @@ namespace WixToolset.Bal | |||
| 18 | return Message(sourceLineNumbers, Ids.BAFunctionsPayloadRequiredInUXContainer, "The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container."); | 18 | return Message(sourceLineNumbers, Ids.BAFunctionsPayloadRequiredInUXContainer, "The BAFunctions DLL Payload element must be located inside the BootstrapperApplication container."); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | public static Message MissingPrereq() | 21 | public static Message MissingDNCPrereq() |
| 22 | { | 22 | { |
| 23 | return Message(null, Ids.MissingPrereq, "There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups."); | 23 | return Message(null, Ids.MissingDNCPrereq, "There must be at least one PrereqPackage when using the DotNetCoreBootstrapperApplicationHost with SelfContainedDeployment set to \"no\"."); |
| 24 | } | ||
| 25 | |||
| 26 | public static Message MissingMBAPrereq() | ||
| 27 | { | ||
| 28 | return Message(null, Ids.MissingMBAPrereq, "There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups."); | ||
| 24 | } | 29 | } |
| 25 | 30 | ||
| 26 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) | 31 | public static Message MultipleBAFunctions(SourceLineNumber sourceLineNumbers) |
| @@ -46,10 +51,11 @@ namespace WixToolset.Bal | |||
| 46 | public enum Ids | 51 | public enum Ids |
| 47 | { | 52 | { |
| 48 | AttributeRequiresPrereqPackage = 6801, | 53 | AttributeRequiresPrereqPackage = 6801, |
| 49 | MissingPrereq = 6802, | 54 | MissingMBAPrereq = 6802, |
| 50 | MultiplePrereqLicenses = 6803, | 55 | MultiplePrereqLicenses = 6803, |
| 51 | MultipleBAFunctions = 6804, | 56 | MultipleBAFunctions = 6804, |
| 52 | BAFunctionsPayloadRequiredInUXContainer = 6805, | 57 | BAFunctionsPayloadRequiredInUXContainer = 6805, |
| 58 | MissingDNCPrereq = 6806, | ||
| 53 | } | 59 | } |
| 54 | } | 60 | } |
| 55 | } | 61 | } |
diff --git a/src/wixext/Tuples/BalTupleDefinitions.cs b/src/wixext/Tuples/BalTupleDefinitions.cs index 48199f95..9a294703 100644 --- a/src/wixext/Tuples/BalTupleDefinitions.cs +++ b/src/wixext/Tuples/BalTupleDefinitions.cs | |||
| @@ -11,6 +11,7 @@ namespace WixToolset.Bal | |||
| 11 | WixBalBAFactoryAssembly, | 11 | WixBalBAFactoryAssembly, |
| 12 | WixBalBAFunctions, | 12 | WixBalBAFunctions, |
| 13 | WixBalCondition, | 13 | WixBalCondition, |
| 14 | WixDncOptions, | ||
| 14 | WixMbaPrereqInformation, | 15 | WixMbaPrereqInformation, |
| 15 | WixStdbaOptions, | 16 | WixStdbaOptions, |
| 16 | WixStdbaOverridableVariable, | 17 | WixStdbaOverridableVariable, |
| @@ -43,6 +44,9 @@ namespace WixToolset.Bal | |||
| 43 | case BalTupleDefinitionType.WixBalCondition: | 44 | case BalTupleDefinitionType.WixBalCondition: |
| 44 | return BalTupleDefinitions.WixBalCondition; | 45 | return BalTupleDefinitions.WixBalCondition; |
| 45 | 46 | ||
| 47 | case BalTupleDefinitionType.WixDncOptions: | ||
| 48 | return BalTupleDefinitions.WixDncOptions; | ||
| 49 | |||
| 46 | case BalTupleDefinitionType.WixMbaPrereqInformation: | 50 | case BalTupleDefinitionType.WixMbaPrereqInformation: |
| 47 | return BalTupleDefinitions.WixMbaPrereqInformation; | 51 | return BalTupleDefinitions.WixMbaPrereqInformation; |
| 48 | 52 | ||
| @@ -62,6 +66,7 @@ namespace WixToolset.Bal | |||
| 62 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 66 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
| 63 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 67 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
| 64 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 68 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
| 69 | WixDncOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 65 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 70 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
| 66 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 71 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
| 67 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | 72 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); |
diff --git a/src/wixext/Tuples/WixDncOptionsTuple.cs b/src/wixext/Tuples/WixDncOptionsTuple.cs new file mode 100644 index 00000000..8a36879b --- /dev/null +++ b/src/wixext/Tuples/WixDncOptionsTuple.cs | |||
| @@ -0,0 +1,47 @@ | |||
| 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.Tuples; | ||
| 7 | |||
| 8 | public static partial class BalTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition WixDncOptions = new IntermediateTupleDefinition( | ||
| 11 | BalTupleDefinitionType.WixDncOptions.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(WixDncOptionsTupleFields.SelfContainedDeployment), IntermediateFieldType.Number), | ||
| 15 | }, | ||
| 16 | typeof(WixDncOptionsTuple)); | ||
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | namespace WixToolset.Bal.Tuples | ||
| 21 | { | ||
| 22 | using WixToolset.Data; | ||
| 23 | |||
| 24 | public enum WixDncOptionsTupleFields | ||
| 25 | { | ||
| 26 | SelfContainedDeployment, | ||
| 27 | } | ||
| 28 | |||
| 29 | public class WixDncOptionsTuple : IntermediateTuple | ||
| 30 | { | ||
| 31 | public WixDncOptionsTuple() : base(BalTupleDefinitions.WixDncOptions, null, null) | ||
| 32 | { | ||
| 33 | } | ||
| 34 | |||
| 35 | public WixDncOptionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixDncOptions, sourceLineNumber, id) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public IntermediateField this[WixDncOptionsTupleFields index] => this.Fields[(int)index]; | ||
| 40 | |||
| 41 | public int SelfContainedDeployment | ||
| 42 | { | ||
| 43 | get => this.Fields[(int)WixDncOptionsTupleFields.SelfContainedDeployment].AsNumber(); | ||
| 44 | set => this.Set((int)WixDncOptionsTupleFields.SelfContainedDeployment, value); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } \ No newline at end of file | ||
diff --git a/src/wixext/bal.xsd b/src/wixext/bal.xsd index 52f9142f..ee1f8cec 100644 --- a/src/wixext/bal.xsd +++ b/src/wixext/bal.xsd | |||
| @@ -215,6 +215,42 @@ | |||
| 215 | </xs:complexType> | 215 | </xs:complexType> |
| 216 | </xs:element> | 216 | </xs:element> |
| 217 | 217 | ||
| 218 | <xs:element name="WixDotNetCoreBootstrapperApplication"> | ||
| 219 | <xs:annotation> | ||
| 220 | <xs:documentation> | ||
| 221 | Configures the DotNetCoreBootstrapperApplicationHost for a Bundle. | ||
| 222 | </xs:documentation> | ||
| 223 | <xs:appinfo> | ||
| 224 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="BootstrapperApplicationRef" /> | ||
| 225 | </xs:appinfo> | ||
| 226 | </xs:annotation> | ||
| 227 | <xs:complexType> | ||
| 228 | <xs:attribute name="LogoFile" type="xs:string"> | ||
| 229 | <xs:annotation> | ||
| 230 | <xs:documentation>Source file of the logo graphic.</xs:documentation> | ||
| 231 | </xs:annotation> | ||
| 232 | </xs:attribute> | ||
| 233 | <xs:attribute name="ThemeFile" type="xs:string"> | ||
| 234 | <xs:annotation> | ||
| 235 | <xs:documentation>Source file of the theme XML.</xs:documentation> | ||
| 236 | </xs:annotation> | ||
| 237 | </xs:attribute> | ||
| 238 | <xs:attribute name="LocalizationFile" type="xs:string"> | ||
| 239 | <xs:annotation> | ||
| 240 | <xs:documentation>Source file of the theme localization .wxl file.</xs:documentation> | ||
| 241 | </xs:annotation> | ||
| 242 | </xs:attribute> | ||
| 243 | <xs:attribute name="SelfContainedDeployment" type="YesNoType"> | ||
| 244 | <xs:annotation> | ||
| 245 | <xs:documentation> | ||
| 246 | Whether the .NET Core BA was published as self-contained (SCD). | ||
| 247 | If using PublishTrimmed in the .NET Core project, there must be an item group with <TrimmerRootAssembly Include="System.Runtime.Loader" /> | ||
| 248 | </xs:documentation> | ||
| 249 | </xs:annotation> | ||
| 250 | </xs:attribute> | ||
| 251 | </xs:complexType> | ||
| 252 | </xs:element> | ||
| 253 | |||
| 218 | <xs:attribute name="BAFactoryAssembly" type="YesNoType"> | 254 | <xs:attribute name="BAFactoryAssembly" type="YesNoType"> |
| 219 | <xs:annotation> | 255 | <xs:annotation> |
| 220 | <xs:documentation> | 256 | <xs:documentation> |
diff --git a/src/wixlib/Dnc.wxs b/src/wixlib/Dnc.wxs index a2779c19..2a27050f 100644 --- a/src/wixlib/Dnc.wxs +++ b/src/wixlib/Dnc.wxs | |||
| @@ -14,6 +14,31 @@ | |||
| 14 | </Fragment> | 14 | </Fragment> |
| 15 | 15 | ||
| 16 | <Fragment> | 16 | <Fragment> |
| 17 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost.RtfLicense' SourceFile='dnchost.dll'> | ||
| 18 | <PayloadGroupRef Id='Dnc' /> | ||
| 19 | <PayloadGroupRef Id='DncPreqStandard' /> | ||
| 20 | </BootstrapperApplication> | ||
| 21 | </Fragment> | ||
| 22 | |||
| 23 | <Fragment> | ||
| 24 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost.Minimal' SourceFile='dnchost.dll'> | ||
| 25 | <PayloadGroupRef Id='Dnc' /> | ||
| 26 | </BootstrapperApplication> | ||
| 27 | </Fragment> | ||
| 28 | |||
| 29 | <Fragment> | ||
| 30 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost.RtfLicense.Minimal' SourceFile='dnchost.dll'> | ||
| 31 | <PayloadGroupRef Id='Dnc' /> | ||
| 32 | </BootstrapperApplication> | ||
| 33 | </Fragment> | ||
| 34 | |||
| 35 | <Fragment> | ||
| 36 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost.Foundation' SourceFile='dnchost.dll'> | ||
| 37 | <PayloadGroupRef Id='Dnc' /> | ||
| 38 | </BootstrapperApplication> | ||
| 39 | </Fragment> | ||
| 40 | |||
| 41 | <Fragment> | ||
| 17 | <PayloadGroup Id='Dnc'> | 42 | <PayloadGroup Id='Dnc'> |
| 18 | <Payload Compressed='yes' SourceFile='nethost.dll' /> | 43 | <Payload Compressed='yes' SourceFile='nethost.dll' /> |
| 19 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> | 44 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> |
