From 8ec8f5b0091fce08be88acee1f49dbf2edf040a9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 2 Mar 2021 17:26:47 -0600 Subject: Update dependencies and integrate changes. --- src/Samples/bafunctions/bafunctions.vcxproj | 12 +++---- src/Samples/bafunctions/packages.config | 6 ++-- src/dnchost/dnchost.cpp | 23 ++----------- src/dnchost/dnchost.vcxproj | 12 +++---- src/dnchost/packages.config | 6 ++-- src/mbahost/mbahost.vcxproj | 12 +++---- src/mbahost/packages.config | 6 ++-- .../examples/TestEngine/Example.TestEngine.vcxproj | 12 +++---- src/test/examples/TestEngine/packages.config | 6 ++-- src/wixext/BalBurnBackendExtension.cs | 24 ++++++++++++++ src/wixext/BalCompiler.cs | 38 +++++++++++----------- .../Symbols/WixBalBAFactoryAssemblySymbol.cs | 8 +++++ src/wixstdba/packages.config | 6 ++-- src/wixstdba/wixstdba.vcxproj | 12 +++---- 14 files changed, 98 insertions(+), 85 deletions(-) (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 9e51292e..53a3ccb9 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -2,9 +2,9 @@ - - - + + + @@ -73,9 +73,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + diff --git a/src/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index 946209d8..8b492f22 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/src/dnchost/dnchost.cpp b/src/dnchost/dnchost.cpp index 503537c0..8ca326fc 100644 --- a/src/dnchost/dnchost.cpp +++ b/src/dnchost/dnchost.cpp @@ -169,9 +169,6 @@ static HRESULT LoadDncConfiguration( HRESULT hr = S_OK; IXMLDOMDocument* pixdManifest = NULL; IXMLDOMNode* pixnHost = NULL; - IXMLDOMNode* pixnPayload = NULL; - LPWSTR sczPayloadId = NULL; - LPWSTR sczPayloadXPath = NULL; LPWSTR sczPayloadName = NULL; DWORD dwBool = 0; @@ -187,21 +184,8 @@ static HRESULT LoadDncConfiguration( BalExitOnRootFailure(hr, "Failed to find WixBalBAFactoryAssembly element in bootstrapper application config."); } - hr = XmlGetAttributeEx(pixnHost, L"PayloadId", &sczPayloadId); - BalExitOnFailure(hr, "Failed to get WixBalBAFactoryAssembly/@PayloadId."); - - hr = StrAllocFormatted(&sczPayloadXPath, L"/BootstrapperApplicationData/WixPayloadProperties[@Payload='%ls']", sczPayloadId); - BalExitOnFailure(hr, "Failed to format BAFactoryAssembly payload XPath."); - - hr = XmlSelectSingleNode(pixdManifest, sczPayloadXPath, &pixnPayload); - if (S_FALSE == hr) - { - hr = E_NOTFOUND; - } - BalExitOnFailure(hr, "Failed to find WixPayloadProperties node for BAFactoryAssembly PayloadId: %ls.", sczPayloadId); - - hr = XmlGetAttributeEx(pixnPayload, L"Name", &sczPayloadName); - BalExitOnFailure(hr, "Failed to get BAFactoryAssembly payload Name."); + hr = XmlGetAttributeEx(pixnHost, L"FilePath", &sczPayloadName); + BalExitOnFailure(hr, "Failed to get WixBalBAFactoryAssembly/@FilePath."); hr = PathConcat(pArgs->pCommand->wzBootstrapperWorkingFolder, sczPayloadName, &pState->sczBaFactoryAssemblyPath); BalExitOnFailure(hr, "Failed to create BaFactoryAssemblyPath."); @@ -250,9 +234,6 @@ static HRESULT LoadDncConfiguration( LExit: ReleaseStr(sczPayloadName); - ReleaseObject(pixnPayload); - ReleaseStr(sczPayloadXPath); - ReleaseStr(sczPayloadId); ReleaseObject(pixnHost); ReleaseObject(pixdManifest); diff --git a/src/dnchost/dnchost.vcxproj b/src/dnchost/dnchost.vcxproj index 9c04849c..c5b6b416 100644 --- a/src/dnchost/dnchost.vcxproj +++ b/src/dnchost/dnchost.vcxproj @@ -4,9 +4,9 @@ - - - + + + Debug @@ -99,8 +99,8 @@ - - - + + + \ No newline at end of file diff --git a/src/dnchost/packages.config b/src/dnchost/packages.config index f60d813a..61787995 100644 --- a/src/dnchost/packages.config +++ b/src/dnchost/packages.config @@ -7,7 +7,7 @@ - - - + + + \ No newline at end of file diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index 4677d32a..7df76c02 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -5,9 +5,9 @@ - - - + + + @@ -99,8 +99,8 @@ - - - + + + \ No newline at end of file diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index 584038b6..71960076 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -4,7 +4,7 @@ - - - + + + \ No newline at end of file diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj index 9f186450..0a669452 100644 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ b/src/test/examples/TestEngine/Example.TestEngine.vcxproj @@ -1,9 +1,9 @@ - - - + + + Debug @@ -76,8 +76,8 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + \ No newline at end of file diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config index 946209d8..8b492f22 100644 --- a/src/test/examples/TestEngine/packages.config +++ b/src/test/examples/TestEngine/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/src/wixext/BalBurnBackendExtension.cs b/src/wixext/BalBurnBackendExtension.cs index 5e647b1c..6e639c1b 100644 --- a/src/wixext/BalBurnBackendExtension.cs +++ b/src/wixext/BalBurnBackendExtension.cs @@ -43,6 +43,11 @@ namespace WixToolset.Bal var isDNC = baId.StartsWith("WixDotNetCoreBootstrapperApplicationHost"); var isSCD = isDNC && this.VerifySCD(section); + if (isDNC) + { + this.FinalizeBAFactorySymbol(section); + } + if (isStdBA || isMBA || isDNC) { this.VerifyBAFunctions(section); @@ -54,6 +59,25 @@ namespace WixToolset.Bal } } + private void FinalizeBAFactorySymbol(IntermediateSection section) + { + var factorySymbol = section.Symbols.OfType().SingleOrDefault(); + if (null == factorySymbol) + { + return; + } + + var factoryPayloadSymbol = section.Symbols.OfType() + .Where(p => p.Id.Id == factorySymbol.PayloadId) + .SingleOrDefault(); + if (null == factoryPayloadSymbol) + { + return; + } + + factorySymbol.FilePath = factoryPayloadSymbol.Name; + } + private void VerifyBAFunctions(IntermediateSection section) { WixBalBAFunctionsSymbol baFunctionsSymbol = null; diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index 441ad004..267345e7 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs @@ -136,7 +136,7 @@ namespace WixToolset.Bal case "MsiPackage": case "MspPackage": var displayInternalUICondition = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attribute); - section.AddSymbol(new WixBalPackageInfoSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, packageId)) + section.AddSymbol(new WixBalPackageInfoSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, packageId)) { PackageId = packageId, DisplayInternalUICondition = displayInternalUICondition, @@ -247,7 +247,7 @@ namespace WixToolset.Bal if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) { // There can only be one. - var id = new Identifier(AccessModifier.Public, "TheBAFactoryAssembly"); + var id = new Identifier(AccessModifier.Global, "TheBAFactoryAssembly"); section.AddSymbol(new WixBalBAFactoryAssemblySymbol(sourceLineNumbers, id) { PayloadId = payloadId, @@ -551,7 +551,7 @@ namespace WixToolset.Bal { if (!String.IsNullOrEmpty(launchTarget)) { - section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTarget")) + section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "LaunchTarget")) { Value = launchTarget, Type = WixBundleVariableType.Formatted, @@ -560,7 +560,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(launchTargetElevatedId)) { - section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchTargetElevatedId")) + section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "LaunchTargetElevatedId")) { Value = launchTargetElevatedId, Type = WixBundleVariableType.Formatted, @@ -569,7 +569,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(launchArguments)) { - section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchArguments")) + section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "LaunchArguments")) { Value = launchArguments, Type = WixBundleVariableType.Formatted, @@ -578,7 +578,7 @@ namespace WixToolset.Bal if (YesNoType.Yes == launchHidden) { - section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchHidden")) + section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "LaunchHidden")) { Value = "yes", Type = WixBundleVariableType.Formatted, @@ -588,7 +588,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(launchWorkingDir)) { - section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "LaunchWorkingFolder")) + section.AddSymbol(new WixBundleVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "LaunchWorkingFolder")) { Value = launchWorkingDir, Type = WixBundleVariableType.Formatted, @@ -597,7 +597,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(licenseFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaLicenseRtf")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaLicenseRtf")) { Value = licenseFile, }); @@ -605,7 +605,7 @@ namespace WixToolset.Bal if (null != licenseUrl) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaLicenseUrl")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaLicenseUrl")) { Value = licenseUrl, }); @@ -613,7 +613,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(logoFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaLogo")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaLogo")) { Value = logoFile, }); @@ -621,7 +621,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(logoSideFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaLogoSide")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaLogoSide")) { Value = logoSideFile, }); @@ -629,7 +629,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(themeFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaThemeXml")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaThemeXml")) { Value = themeFile, }); @@ -637,7 +637,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(localizationFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "WixStdbaThemeWxl")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixStdbaThemeWxl")) { Value = localizationFile, }); @@ -761,7 +761,7 @@ namespace WixToolset.Bal { if (!String.IsNullOrEmpty(logoFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaLogo")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "PreqbaLogo")) { Value = logoFile, }); @@ -769,7 +769,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(themeFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaThemeXml")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "PreqbaThemeXml")) { Value = themeFile, }); @@ -777,7 +777,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(localizationFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "PreqbaThemeWxl")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "PreqbaThemeWxl")) { Value = localizationFile, }); @@ -864,7 +864,7 @@ namespace WixToolset.Bal { if (!String.IsNullOrEmpty(logoFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaLogo")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "DncPreqbaLogo")) { Value = logoFile, }); @@ -872,7 +872,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(themeFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeXml")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "DncPreqbaThemeXml")) { Value = themeFile, }); @@ -880,7 +880,7 @@ namespace WixToolset.Bal if (!String.IsNullOrEmpty(localizationFile)) { - section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Public, "DncPreqbaThemeWxl")) + section.AddSymbol(new WixVariableSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "DncPreqbaThemeWxl")) { Value = localizationFile, }); diff --git a/src/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs b/src/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs index 0423a52f..52042e4c 100644 --- a/src/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs +++ b/src/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs @@ -12,6 +12,7 @@ namespace WixToolset.Bal new[] { new IntermediateFieldDefinition(nameof(WixBalBAFactorySymbolFields.PayloadId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBalBAFactorySymbolFields.FilePath), IntermediateFieldType.String), }, typeof(WixBalBAFactoryAssemblySymbol)); } @@ -24,6 +25,7 @@ namespace WixToolset.Bal.Symbols public enum WixBalBAFactorySymbolFields { PayloadId, + FilePath, } public class WixBalBAFactoryAssemblySymbol : IntermediateSymbol @@ -43,5 +45,11 @@ namespace WixToolset.Bal.Symbols get => this.Fields[(int)WixBalBAFactorySymbolFields.PayloadId].AsString(); set => this.Set((int)WixBalBAFactorySymbolFields.PayloadId, value); } + + public string FilePath + { + get => this.Fields[(int)WixBalBAFactorySymbolFields.FilePath].AsString(); + set => this.Set((int)WixBalBAFactorySymbolFields.FilePath, value); + } } } \ No newline at end of file diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index 584038b6..71960076 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -4,7 +4,7 @@ - - - + + + \ No newline at end of file diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index 7bd7d10f..e83d60f2 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -5,9 +5,9 @@ - - - + + + @@ -94,8 +94,8 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" - - - + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb