diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 10:14:45 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 13:13:48 -0500 |
| commit | 4c3640ad5ef05b5be44df2aee2a23baa40471422 (patch) | |
| tree | b9aab6744e812298db3f4a98bc389ec5f212e80d /src | |
| parent | 3704a5547766581b15690b6535d03568afcfc2a0 (diff) | |
| download | wix-4c3640ad5ef05b5be44df2aee2a23baa40471422.tar.gz wix-4c3640ad5ef05b5be44df2aee2a23baa40471422.tar.bz2 wix-4c3640ad5ef05b5be44df2aee2a23baa40471422.zip | |
Write EngineVersion, ProtocolVersion, and Win64 to the Burn manifest.
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs | 8 | ||||
| -rw-r--r-- | src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs | 8 | ||||
| -rw-r--r-- | src/burn/Directory.Build.props | 4 | ||||
| -rw-r--r-- | src/burn/engine/engine.vcxproj | 32 | ||||
| -rw-r--r-- | src/burn/engine/manifest.cpp | 50 | ||||
| -rw-r--r-- | src/burn/engine/precomp.h | 1 | ||||
| -rw-r--r-- | src/burn/test/BurnUnitTest/BurnTestFixture.h | 2 | ||||
| -rw-r--r-- | src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj | 4 | ||||
| -rw-r--r-- | src/burn/test/BurnUnitTest/ManifestTest.cpp | 10 | ||||
| -rw-r--r-- | src/burn/test/BurnUnitTest/precomp.h | 2 | ||||
| -rw-r--r-- | src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs | 2 | ||||
| -rw-r--r-- | src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs | 5 | ||||
| -rw-r--r-- | src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs | 113 | ||||
| -rw-r--r-- | src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj | 2 | ||||
| -rw-r--r-- | src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | 44 |
15 files changed, 230 insertions, 57 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs index 24e63881..8d930580 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleBundlePackageSymbol.cs | |||
| @@ -12,6 +12,7 @@ namespace WixToolset.Data | |||
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), | 13 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.EngineVersion), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Version), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.Version), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.InstallCommand), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.InstallCommand), IntermediateFieldType.String), |
| 17 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.RepairCommand), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundleBundlePackageSymbolFields.RepairCommand), IntermediateFieldType.String), |
| @@ -29,6 +30,7 @@ namespace WixToolset.Data.Symbols | |||
| 29 | { | 30 | { |
| 30 | Attributes, | 31 | Attributes, |
| 31 | BundleId, | 32 | BundleId, |
| 33 | EngineVersion, | ||
| 32 | Version, | 34 | Version, |
| 33 | InstallCommand, | 35 | InstallCommand, |
| 34 | RepairCommand, | 36 | RepairCommand, |
| @@ -66,6 +68,12 @@ namespace WixToolset.Data.Symbols | |||
| 66 | set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleId, value); | 68 | set => this.Set((int)WixBundleBundlePackageSymbolFields.BundleId, value); |
| 67 | } | 69 | } |
| 68 | 70 | ||
| 71 | public string EngineVersion | ||
| 72 | { | ||
| 73 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.EngineVersion]; | ||
| 74 | set => this.Set((int)WixBundleBundlePackageSymbolFields.EngineVersion, value); | ||
| 75 | } | ||
| 76 | |||
| 69 | public string Version | 77 | public string Version |
| 70 | { | 78 | { |
| 71 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.Version]; | 79 | get => (string)this.Fields[(int)WixBundleBundlePackageSymbolFields.Version]; |
diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs index 01e18728..9f205ce6 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedBundlePackageSymbol.cs | |||
| @@ -12,6 +12,7 @@ namespace WixToolset.Data | |||
| 12 | { | 12 | { |
| 13 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), | 13 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Attributes), IntermediateFieldType.Number), |
| 14 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.BundleId), IntermediateFieldType.String), |
| 15 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.EngineVersion), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ManifestNamespace), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ManifestNamespace), IntermediateFieldType.String), |
| 16 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ProtocolVersion), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.ProtocolVersion), IntermediateFieldType.Number), |
| 17 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Version), IntermediateFieldType.String), | 18 | new IntermediateFieldDefinition(nameof(WixBundleHarvestedBundlePackageSymbolFields.Version), IntermediateFieldType.String), |
| @@ -30,6 +31,7 @@ namespace WixToolset.Data.Symbols | |||
| 30 | { | 31 | { |
| 31 | Attributes, | 32 | Attributes, |
| 32 | BundleId, | 33 | BundleId, |
| 34 | EngineVersion, | ||
| 33 | ManifestNamespace, | 35 | ManifestNamespace, |
| 34 | ProtocolVersion, | 36 | ProtocolVersion, |
| 35 | Version, | 37 | Version, |
| @@ -69,6 +71,12 @@ namespace WixToolset.Data.Symbols | |||
| 69 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.BundleId, value); | 71 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.BundleId, value); |
| 70 | } | 72 | } |
| 71 | 73 | ||
| 74 | public string EngineVersion | ||
| 75 | { | ||
| 76 | get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.EngineVersion].AsString(); | ||
| 77 | set => this.Set((int)WixBundleHarvestedBundlePackageSymbolFields.EngineVersion, value); | ||
| 78 | } | ||
| 79 | |||
| 72 | public string ManifestNamespace | 80 | public string ManifestNamespace |
| 73 | { | 81 | { |
| 74 | get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.ManifestNamespace].AsString(); | 82 | get => this.Fields[(int)WixBundleHarvestedBundlePackageSymbolFields.ManifestNamespace].AsString(); |
diff --git a/src/burn/Directory.Build.props b/src/burn/Directory.Build.props index f929fa2b..6050781d 100644 --- a/src/burn/Directory.Build.props +++ b/src/burn/Directory.Build.props | |||
| @@ -7,4 +7,8 @@ | |||
| 7 | </PropertyGroup> | 7 | </PropertyGroup> |
| 8 | 8 | ||
| 9 | <Import Project="..\Directory.Build.props" /> | 9 | <Import Project="..\Directory.Build.props" /> |
| 10 | |||
| 11 | <PropertyGroup> | ||
| 12 | <BurnGeneratedHeaderDirectory>$(BaseIntermediateOutputPath)..\</BurnGeneratedHeaderDirectory> | ||
| 13 | </PropertyGroup> | ||
| 10 | </Project> | 14 | </Project> |
diff --git a/src/burn/engine/engine.vcxproj b/src/burn/engine/engine.vcxproj index 5c4860f1..b5cfcb45 100644 --- a/src/burn/engine/engine.vcxproj +++ b/src/burn/engine/engine.vcxproj | |||
| @@ -35,13 +35,14 @@ | |||
| 35 | <TargetName>engine</TargetName> | 35 | <TargetName>engine</TargetName> |
| 36 | <CharacterSet>Unicode</CharacterSet> | 36 | <CharacterSet>Unicode</CharacterSet> |
| 37 | <Description>Native component of WixToolset.Burn</Description> | 37 | <Description>Native component of WixToolset.Burn</Description> |
| 38 | <CustomBuildBeforeTargets>ClCompile</CustomBuildBeforeTargets> | ||
| 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 | ||
| 43 | <PropertyGroup> | 44 | <PropertyGroup> |
| 44 | <ProjectAdditionalIncludeDirectories>..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;$(ProjectAdditionalIncludeDirectories)</ProjectAdditionalIncludeDirectories> | 45 | <ProjectAdditionalIncludeDirectories>..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;$(BurnGeneratedHeaderDirectory);$(ProjectAdditionalIncludeDirectories)</ProjectAdditionalIncludeDirectories> |
| 45 | </PropertyGroup> | 46 | </PropertyGroup> |
| 46 | 47 | ||
| 47 | <ImportGroup Label="ExtensionSettings"> | 48 | <ImportGroup Label="ExtensionSettings"> |
| @@ -144,14 +145,15 @@ | |||
| 144 | <ClInclude Include="variant.h" /> | 145 | <ClInclude Include="variant.h" /> |
| 145 | </ItemGroup> | 146 | </ItemGroup> |
| 146 | 147 | ||
| 147 | <ItemGroup> | 148 | <ItemDefinitionGroup> |
| 148 | <CustomBuild Include="engine.mc"> | 149 | <CustomBuildStep> |
| 149 | <Message>Compiling message file...</Message> | 150 | <Message>Compiling message file...</Message> |
| 150 | <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z engine.messages "$(InputDir)engine.mc" | 151 | <Command>mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z engine.messages "$(InputDir)engine.mc" |
| 151 | rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | 152 | rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> |
| 153 | <Inputs>$(InputDir)engine.mc</Inputs> | ||
| 152 | <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc</Outputs> | 154 | <Outputs>$(IntDir)engine.messages.h;$(IntDir)engine.messages.rc</Outputs> |
| 153 | </CustomBuild> | 155 | </CustomBuildStep> |
| 154 | </ItemGroup> | 156 | </ItemDefinitionGroup> |
| 155 | 157 | ||
| 156 | <Target Name="SetWixVersion" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="ClCompile"> | 158 | <Target Name="SetWixVersion" DependsOnTargets="__SetPropertiesFromGit" BeforeTargets="ClCompile"> |
| 157 | <PropertyGroup> | 159 | <PropertyGroup> |
| @@ -160,14 +162,26 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | |||
| 160 | <rup>$(GitBaseVersionPatch)</rup> | 162 | <rup>$(GitBaseVersionPatch)</rup> |
| 161 | <rpr>$(GitCommits)</rpr> | 163 | <rpr>$(GitCommits)</rpr> |
| 162 | <szVerMajorMinorBuild>$(rmj).$(rmm).$(rup).$(rpr)</szVerMajorMinorBuild> | 164 | <szVerMajorMinorBuild>$(rmj).$(rmm).$(rup).$(rpr)</szVerMajorMinorBuild> |
| 163 | <wixver>rmj=$(rmj);rmm=$(rmm);rup=$(rup);rpr=$(rpr);szVerMajorMinorBuild="$(szVerMajorMinorBuild)"</wixver> | ||
| 164 | </PropertyGroup> | 165 | </PropertyGroup> |
| 165 | 166 | ||
| 166 | <ItemGroup> | 167 | <ItemGroup> |
| 167 | <ClCompile> | 168 | <BurnVersionLines Include=" |
| 168 | <PreprocessorDefinitions>$(wixver);%(PreprocessorDefinitions)</PreprocessorDefinitions> | 169 | // <auto-generated/> |
| 169 | </ClCompile> | 170 | #ifndef _VERSION_FILE_H_ |
| 171 | #define _VERSION_FILE_H_ | ||
| 172 | |||
| 173 | #define szVerMajorMinorBuild "$(szVerMajorMinorBuild)" | ||
| 174 | #define wzVerMajorMinorBuild L"$(szVerMajorMinorBuild)" | ||
| 175 | #define rmj $(rmj) | ||
| 176 | #define rmm $(rmm) | ||
| 177 | #define rup $(rup) | ||
| 178 | #define rpr $(rpr) | ||
| 179 | |||
| 180 | #endif | ||
| 181 | "/> | ||
| 170 | </ItemGroup> | 182 | </ItemGroup> |
| 183 | |||
| 184 | <WriteLinesToFile Overwrite="true" File="$(BurnGeneratedHeaderDirectory)engine.version.h" Lines="@(BurnVersionLines)" /> | ||
| 171 | </Target> | 185 | </Target> |
| 172 | 186 | ||
| 173 | <ItemGroup> | 187 | <ItemGroup> |
diff --git a/src/burn/engine/manifest.cpp b/src/burn/engine/manifest.cpp index 7e16de13..0cd10dbb 100644 --- a/src/burn/engine/manifest.cpp +++ b/src/burn/engine/manifest.cpp | |||
| @@ -7,6 +7,11 @@ static HRESULT ParseFromXml( | |||
| 7 | __in IXMLDOMDocument* pixdDocument, | 7 | __in IXMLDOMDocument* pixdDocument, |
| 8 | __in BURN_ENGINE_STATE* pEngineState | 8 | __in BURN_ENGINE_STATE* pEngineState |
| 9 | ); | 9 | ); |
| 10 | #if DEBUG | ||
| 11 | static void ValidateHarvestingAttributes( | ||
| 12 | __in IXMLDOMDocument* pixdDocument | ||
| 13 | ); | ||
| 14 | #endif | ||
| 10 | 15 | ||
| 11 | // function definitions | 16 | // function definitions |
| 12 | 17 | ||
| @@ -43,6 +48,10 @@ extern "C" HRESULT ManifestLoadXmlFromBuffer( | |||
| 43 | hr = XmlLoadDocumentFromBuffer(pbBuffer, cbBuffer, &pixdDocument); | 48 | hr = XmlLoadDocumentFromBuffer(pbBuffer, cbBuffer, &pixdDocument); |
| 44 | ExitOnFailure(hr, "Failed to load manifest as XML document."); | 49 | ExitOnFailure(hr, "Failed to load manifest as XML document."); |
| 45 | 50 | ||
| 51 | #if DEBUG | ||
| 52 | ValidateHarvestingAttributes(pixdDocument); | ||
| 53 | #endif | ||
| 54 | |||
| 46 | hr = ParseFromXml(pixdDocument, pEngineState); | 55 | hr = ParseFromXml(pixdDocument, pEngineState); |
| 47 | 56 | ||
| 48 | LExit: | 57 | LExit: |
| @@ -162,3 +171,44 @@ LExit: | |||
| 162 | ReleaseObject(pixeBundle); | 171 | ReleaseObject(pixeBundle); |
| 163 | return hr; | 172 | return hr; |
| 164 | } | 173 | } |
| 174 | |||
| 175 | #if DEBUG | ||
| 176 | static void ValidateHarvestingAttributes( | ||
| 177 | __in IXMLDOMDocument* pixdDocument | ||
| 178 | ) | ||
| 179 | { | ||
| 180 | HRESULT hr = S_OK; | ||
| 181 | IXMLDOMElement* pixeBundle = NULL; | ||
| 182 | LPWSTR sczEngineVersion = NULL; | ||
| 183 | DWORD dwProtocolVersion = 0; | ||
| 184 | BOOL fWin64 = FALSE; | ||
| 185 | |||
| 186 | hr = pixdDocument->get_documentElement(&pixeBundle); | ||
| 187 | ExitOnFailure(hr, "Failed to get document element."); | ||
| 188 | |||
| 189 | hr = XmlGetAttributeEx(pixeBundle, L"EngineVersion", &sczEngineVersion); | ||
| 190 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@EngineVersion attribute."); | ||
| 191 | |||
| 192 | hr = XmlGetAttributeUInt32(pixeBundle, L"ProtocolVersion", &dwProtocolVersion); | ||
| 193 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@ProtocolVersion attribute."); | ||
| 194 | |||
| 195 | hr = XmlGetYesNoAttribute(pixeBundle, L"Win64", &fWin64); | ||
| 196 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get BurnManifest/@Win64 attribute."); | ||
| 197 | |||
| 198 | Assert(CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczEngineVersion, -1, wzVerMajorMinorBuild, -1)); | ||
| 199 | |||
| 200 | Assert(BURN_PROTOCOL_VERSION == dwProtocolVersion); | ||
| 201 | |||
| 202 | #if !defined(_WIN64) | ||
| 203 | Assert(!fWin64); | ||
| 204 | #else | ||
| 205 | Assert(fWin64); | ||
| 206 | #endif | ||
| 207 | |||
| 208 | LExit: | ||
| 209 | AssertSz(SUCCEEDED(hr), "Failed to get harvesting attributes."); | ||
| 210 | |||
| 211 | ReleaseStr(sczEngineVersion); | ||
| 212 | ReleaseObject(pixeBundle); | ||
| 213 | } | ||
| 214 | #endif | ||
diff --git a/src/burn/engine/precomp.h b/src/burn/engine/precomp.h index c83c1e74..19a6d48b 100644 --- a/src/burn/engine/precomp.h +++ b/src/burn/engine/precomp.h | |||
| @@ -103,4 +103,5 @@ | |||
| 103 | #include "EngineForApplication.h" | 103 | #include "EngineForApplication.h" |
| 104 | #include "EngineForExtension.h" | 104 | #include "EngineForExtension.h" |
| 105 | #include "engine.messages.h" | 105 | #include "engine.messages.h" |
| 106 | #include "engine.version.h" | ||
| 106 | #include "engine.h" | 107 | #include "engine.h" |
diff --git a/src/burn/test/BurnUnitTest/BurnTestFixture.h b/src/burn/test/BurnUnitTest/BurnTestFixture.h index 103972ef..470c81c1 100644 --- a/src/burn/test/BurnUnitTest/BurnTestFixture.h +++ b/src/burn/test/BurnUnitTest/BurnTestFixture.h | |||
| @@ -33,7 +33,7 @@ namespace Bootstrapper | |||
| 33 | 33 | ||
| 34 | this->testDirectory = WixBuildTools::TestSupport::TestData::Get(); | 34 | this->testDirectory = WixBuildTools::TestSupport::TestData::Get(); |
| 35 | 35 | ||
| 36 | LogInitialize(::GetModuleHandleW(NULL)); | 36 | LogInitialize(::GetModuleHandleW(L"BurnUnitTest.dll")); |
| 37 | 37 | ||
| 38 | LogSetLevel(REPORT_DEBUG, FALSE); | 38 | LogSetLevel(REPORT_DEBUG, FALSE); |
| 39 | 39 | ||
diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj index b0159840..b05666b2 100644 --- a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj +++ b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj | |||
| @@ -39,8 +39,8 @@ | |||
| 39 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 39 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
| 40 | 40 | ||
| 41 | <PropertyGroup> | 41 | <PropertyGroup> |
| 42 | <ProjectAdditionalIncludeDirectories>$(ProjectAdditionalIncludeDirectories);..\..\engine;..\..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories> | 42 | <ProjectAdditionalIncludeDirectories>$(ProjectAdditionalIncludeDirectories);$(BurnGeneratedHeaderDirectory);..\..\engine;..\..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories> |
| 43 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib</ProjectAdditionalLinkLibraries> | 43 | <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;engine.res</ProjectAdditionalLinkLibraries> |
| 44 | </PropertyGroup> | 44 | </PropertyGroup> |
| 45 | 45 | ||
| 46 | <ItemGroup> | 46 | <ItemGroup> |
diff --git a/src/burn/test/BurnUnitTest/ManifestTest.cpp b/src/burn/test/BurnUnitTest/ManifestTest.cpp index 6973c772..d899e3f9 100644 --- a/src/burn/test/BurnUnitTest/ManifestTest.cpp +++ b/src/burn/test/BurnUnitTest/ManifestTest.cpp | |||
| @@ -30,7 +30,13 @@ namespace Bootstrapper | |||
| 30 | try | 30 | try |
| 31 | { | 31 | { |
| 32 | LPCSTR szDocument = | 32 | LPCSTR szDocument = |
| 33 | "<Bundle>" | 33 | "<BurnManifest EngineVersion='" szVerMajorMinorBuild "' ProtocolVersion='1' Win64='" |
| 34 | #if !defined(_WIN64) | ||
| 35 | "no" | ||
| 36 | #else | ||
| 37 | "yes" | ||
| 38 | #endif | ||
| 39 | "'>" | ||
| 34 | " <UX UxDllPayloadId='ux.dll'>" | 40 | " <UX UxDllPayloadId='ux.dll'>" |
| 35 | " <Payload Id='ux.dll' FilePath='ux.dll' Packaging='embedded' SourcePath='ux.dll' Hash='000000000000' />" | 41 | " <Payload Id='ux.dll' FilePath='ux.dll' Packaging='embedded' SourcePath='ux.dll' Hash='000000000000' />" |
| 36 | " </UX>" | 42 | " </UX>" |
| @@ -38,7 +44,7 @@ namespace Bootstrapper | |||
| 38 | " <Variable Id='Variable1' Type='numeric' Value='1' Hidden='no' Persisted='no' />" | 44 | " <Variable Id='Variable1' Type='numeric' Value='1' Hidden='no' Persisted='no' />" |
| 39 | " <RegistrySearch Id='Search1' Type='exists' Root='HKLM' Key='SOFTWARE\\Microsoft' Variable='Variable1' Condition='0' />" | 45 | " <RegistrySearch Id='Search1' Type='exists' Root='HKLM' Key='SOFTWARE\\Microsoft' Variable='Variable1' Condition='0' />" |
| 40 | " <CommandLine Variables='upperCase' />" | 46 | " <CommandLine Variables='upperCase' />" |
| 41 | "</Bundle>"; | 47 | "</BurnManifest>"; |
| 42 | 48 | ||
| 43 | hr = CacheInitialize(&engineState.cache, &engineState.internalCommand); | 49 | hr = CacheInitialize(&engineState.cache, &engineState.internalCommand); |
| 44 | TestThrowOnFailure(hr, L"Failed initialize cache."); | 50 | TestThrowOnFailure(hr, L"Failed initialize cache."); |
diff --git a/src/burn/test/BurnUnitTest/precomp.h b/src/burn/test/BurnUnitTest/precomp.h index ded9fc2d..11e54284 100644 --- a/src/burn/test/BurnUnitTest/precomp.h +++ b/src/burn/test/BurnUnitTest/precomp.h | |||
| @@ -71,6 +71,8 @@ | |||
| 71 | #include "splashscreen.h" | 71 | #include "splashscreen.h" |
| 72 | #include "detect.h" | 72 | #include "detect.h" |
| 73 | 73 | ||
| 74 | #include "engine.version.h" | ||
| 75 | |||
| 74 | #pragma managed | 76 | #pragma managed |
| 75 | #include <vcclr.h> | 77 | #include <vcclr.h> |
| 76 | 78 | ||
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs index 4f1c7d84..25ad88cf 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs | |||
| @@ -111,8 +111,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 111 | protected const uint BURN_SECTION_OFFSET_ATTACHEDCONTAINERSIZE0 = 52; | 111 | protected const uint BURN_SECTION_OFFSET_ATTACHEDCONTAINERSIZE0 = 52; |
| 112 | protected const uint BURN_SECTION_MIN_SIZE = BURN_SECTION_OFFSET_ATTACHEDCONTAINERSIZE0; | 112 | protected const uint BURN_SECTION_MIN_SIZE = BURN_SECTION_OFFSET_ATTACHEDCONTAINERSIZE0; |
| 113 | 113 | ||
| 114 | // Keep in sync with burn\engine\inc\engine.h | ||
| 114 | protected const uint BURN_SECTION_MAGIC = 0x00f14300; | 115 | protected const uint BURN_SECTION_MAGIC = 0x00f14300; |
| 115 | protected const uint BURN_SECTION_VERSION = 0x00000002; | 116 | protected const uint BURN_SECTION_VERSION = 0x00000002; |
| 117 | public const uint BURN_PROTOCOL_VERSION = 0x00000001; | ||
| 116 | 118 | ||
| 117 | protected string fileExe; | 119 | protected string fileExe; |
| 118 | protected uint peOffset = UInt32.MaxValue; | 120 | protected uint peOffset = UInt32.MaxValue; |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs index 508395f5..68f5002f 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs | |||
| @@ -70,6 +70,11 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 70 | 70 | ||
| 71 | writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace); | 71 | writer.WriteStartElement("BurnManifest", BurnCommon.BurnNamespace); |
| 72 | 72 | ||
| 73 | // Write attributes to support harvesting bundles. | ||
| 74 | writer.WriteAttributeString("EngineVersion", $"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}"); | ||
| 75 | writer.WriteAttributeString("ProtocolVersion", BurnCommon.BURN_PROTOCOL_VERSION.ToString()); | ||
| 76 | writer.WriteAttributeString("Win64", this.BundleSymbol.Platform == Platform.X86 ? "no" : "yes"); | ||
| 77 | |||
| 73 | // Write the condition, if there is one | 78 | // Write the condition, if there is one |
| 74 | if (null != this.BundleSymbol.Condition) | 79 | if (null != this.BundleSymbol.Condition) |
| 75 | { | 80 | { |
diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs index 47231ccb..c5a1aee0 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessBundlePackageCommand.cs | |||
| @@ -72,7 +72,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 72 | 72 | ||
| 73 | this.ChainPackage.Win64 = harvestedBundlePackage.Win64; | 73 | this.ChainPackage.Win64 = harvestedBundlePackage.Win64; |
| 74 | this.BundlePackage.BundleId = Guid.Parse(harvestedBundlePackage.BundleId).ToString("B").ToUpperInvariant(); | 74 | this.BundlePackage.BundleId = Guid.Parse(harvestedBundlePackage.BundleId).ToString("B").ToUpperInvariant(); |
| 75 | this.BundlePackage.SupportsBurnProtocol = harvestedBundlePackage.ProtocolVersion == 1; // Keep in sync with burn\engine\inc\engine.h | 75 | this.BundlePackage.EngineVersion = harvestedBundlePackage.EngineVersion; |
| 76 | this.BundlePackage.SupportsBurnProtocol = harvestedBundlePackage.ProtocolVersion == BurnCommon.BURN_PROTOCOL_VERSION; | ||
| 76 | 77 | ||
| 77 | var supportsArpSystemComponent = BurnCommon.BurnV3Namespace != harvestedBundlePackage.ManifestNamespace; | 78 | var supportsArpSystemComponent = BurnCommon.BurnV3Namespace != harvestedBundlePackage.ManifestNamespace; |
| 78 | if (!supportsArpSystemComponent && !this.ChainPackage.Visible) | 79 | if (!supportsArpSystemComponent && !this.ChainPackage.Visible) |
| @@ -104,6 +105,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 104 | { | 105 | { |
| 105 | bool win64; | 106 | bool win64; |
| 106 | string bundleId; | 107 | string bundleId; |
| 108 | string engineVersion; | ||
| 107 | int protocolVersion; | 109 | int protocolVersion; |
| 108 | string manifestNamespace; | 110 | string manifestNamespace; |
| 109 | bool perMachine; | 111 | bool perMachine; |
| @@ -133,50 +135,8 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 133 | this.TrackedFiles.Add(this.BackendHelper.TrackFile(filePath, TrackedFileType.Temporary, sourceLineNumbers)); | 135 | this.TrackedFiles.Add(this.BackendHelper.TrackFile(filePath, TrackedFileType.Temporary, sourceLineNumbers)); |
| 134 | } | 136 | } |
| 135 | 137 | ||
| 136 | switch (burnReader.MachineType) | ||
| 137 | { | ||
| 138 | case BurnCommon.IMAGE_FILE_MACHINE_AM33: | ||
| 139 | case BurnCommon.IMAGE_FILE_MACHINE_ARM: | ||
| 140 | case BurnCommon.IMAGE_FILE_MACHINE_ARMNT: | ||
| 141 | case BurnCommon.IMAGE_FILE_MACHINE_I386: | ||
| 142 | case BurnCommon.IMAGE_FILE_MACHINE_LOONGARCH32: | ||
| 143 | case BurnCommon.IMAGE_FILE_MACHINE_M32R: | ||
| 144 | win64 = false; | ||
| 145 | break; | ||
| 146 | case BurnCommon.IMAGE_FILE_MACHINE_AMD64: | ||
| 147 | case BurnCommon.IMAGE_FILE_MACHINE_ARM64: | ||
| 148 | case BurnCommon.IMAGE_FILE_MACHINE_IA64: | ||
| 149 | case BurnCommon.IMAGE_FILE_MACHINE_LOONGARCH64: | ||
| 150 | win64 = true; | ||
| 151 | break; | ||
| 152 | case BurnCommon.IMAGE_FILE_MACHINE_EBC: | ||
| 153 | case BurnCommon.IMAGE_FILE_MACHINE_MIPS16: | ||
| 154 | case BurnCommon.IMAGE_FILE_MACHINE_MIPSFPU: | ||
| 155 | case BurnCommon.IMAGE_FILE_MACHINE_MIPSFPU16: | ||
| 156 | case BurnCommon.IMAGE_FILE_MACHINE_POWERPC: | ||
| 157 | case BurnCommon.IMAGE_FILE_MACHINE_POWERPCFP: | ||
| 158 | case BurnCommon.IMAGE_FILE_MACHINE_R4000: | ||
| 159 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV32: | ||
| 160 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV64: | ||
| 161 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV128: | ||
| 162 | case BurnCommon.IMAGE_FILE_MACHINE_SH3: | ||
| 163 | case BurnCommon.IMAGE_FILE_MACHINE_SH3DSP: | ||
| 164 | case BurnCommon.IMAGE_FILE_MACHINE_SH4: | ||
| 165 | case BurnCommon.IMAGE_FILE_MACHINE_SH5: | ||
| 166 | case BurnCommon.IMAGE_FILE_MACHINE_THUMB: | ||
| 167 | case BurnCommon.IMAGE_FILE_MACHINE_WCEMIPSV2: | ||
| 168 | default: | ||
| 169 | win64 = false; | ||
| 170 | this.Messaging.Write(BurnBackendWarnings.UnknownCoffMachineType(sourceLineNumbers, sourcePath, burnReader.MachineType)); | ||
| 171 | break; | ||
| 172 | } | ||
| 173 | |||
| 174 | bundleId = burnReader.BundleId.ToString("B").ToUpperInvariant(); | 138 | bundleId = burnReader.BundleId.ToString("B").ToUpperInvariant(); |
| 175 | 139 | ||
| 176 | // Assume that the .wixburn section version will change when the Burn protocol changes. | ||
| 177 | // This should be a safe assumption since we will need to add the protocol version to the section to support this harvesting. | ||
| 178 | protocolVersion = burnReader.Version == 2 ? 1 : 0; | ||
| 179 | |||
| 180 | try | 140 | try |
| 181 | { | 141 | { |
| 182 | var document = new XmlDocument(); | 142 | var document = new XmlDocument(); |
| @@ -189,6 +149,10 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 189 | return null; | 149 | return null; |
| 190 | } | 150 | } |
| 191 | 151 | ||
| 152 | engineVersion = document.DocumentElement.GetAttribute("EngineVersion"); | ||
| 153 | protocolVersion = this.ProcessProtocolVersion(burnReader, document); | ||
| 154 | win64 = this.ProcessWin64(burnReader, document, sourceLineNumbers, sourcePath); | ||
| 155 | |||
| 192 | manifestNamespace = document.DocumentElement.NamespaceURI; | 156 | manifestNamespace = document.DocumentElement.NamespaceURI; |
| 193 | 157 | ||
| 194 | namespaceManager.AddNamespace("burn", document.DocumentElement.NamespaceURI); | 158 | namespaceManager.AddNamespace("burn", document.DocumentElement.NamespaceURI); |
| @@ -227,6 +191,7 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 227 | { | 191 | { |
| 228 | Win64 = win64, | 192 | Win64 = win64, |
| 229 | BundleId = bundleId, | 193 | BundleId = bundleId, |
| 194 | EngineVersion = engineVersion, | ||
| 230 | ManifestNamespace = manifestNamespace, | 195 | ManifestNamespace = manifestNamespace, |
| 231 | ProtocolVersion = protocolVersion, | 196 | ProtocolVersion = protocolVersion, |
| 232 | PerMachine = perMachine, | 197 | PerMachine = perMachine, |
| @@ -236,6 +201,68 @@ namespace WixToolset.Core.Burn.Bundles | |||
| 236 | }); | 201 | }); |
| 237 | } | 202 | } |
| 238 | 203 | ||
| 204 | private int ProcessProtocolVersion(BurnReader burnReader, XmlDocument document) | ||
| 205 | { | ||
| 206 | var protocolVersionValue = document.DocumentElement.GetAttribute("ProtocolVersion"); | ||
| 207 | |||
| 208 | if (Int32.TryParse(protocolVersionValue, out var protocolVersion)) | ||
| 209 | { | ||
| 210 | return protocolVersion; | ||
| 211 | } | ||
| 212 | |||
| 213 | // Assume that the .wixburn section version will change when the Burn protocol changes. | ||
| 214 | // This should be a safe assumption since only old bundles should be missing the ProtocolVersion from the manifest. | ||
| 215 | return burnReader.Version == 2 ? 1 : 0; | ||
| 216 | } | ||
| 217 | |||
| 218 | private bool ProcessWin64(BurnReader burnReader, XmlDocument document, SourceLineNumber sourceLineNumbers, string sourcePath) | ||
| 219 | { | ||
| 220 | var win64Value = document.DocumentElement.GetAttribute("Win64"); | ||
| 221 | |||
| 222 | switch (win64Value) | ||
| 223 | { | ||
| 224 | case "yes": | ||
| 225 | return true; | ||
| 226 | case "no": | ||
| 227 | return false; | ||
| 228 | } | ||
| 229 | |||
| 230 | switch (burnReader.MachineType) | ||
| 231 | { | ||
| 232 | case BurnCommon.IMAGE_FILE_MACHINE_ARM: | ||
| 233 | case BurnCommon.IMAGE_FILE_MACHINE_ARMNT: | ||
| 234 | case BurnCommon.IMAGE_FILE_MACHINE_I386: | ||
| 235 | case BurnCommon.IMAGE_FILE_MACHINE_LOONGARCH32: | ||
| 236 | return false; | ||
| 237 | case BurnCommon.IMAGE_FILE_MACHINE_AMD64: | ||
| 238 | case BurnCommon.IMAGE_FILE_MACHINE_ARM64: | ||
| 239 | case BurnCommon.IMAGE_FILE_MACHINE_IA64: | ||
| 240 | case BurnCommon.IMAGE_FILE_MACHINE_LOONGARCH64: | ||
| 241 | return true; | ||
| 242 | case BurnCommon.IMAGE_FILE_MACHINE_AM33: | ||
| 243 | case BurnCommon.IMAGE_FILE_MACHINE_EBC: | ||
| 244 | case BurnCommon.IMAGE_FILE_MACHINE_M32R: | ||
| 245 | case BurnCommon.IMAGE_FILE_MACHINE_MIPS16: | ||
| 246 | case BurnCommon.IMAGE_FILE_MACHINE_MIPSFPU: | ||
| 247 | case BurnCommon.IMAGE_FILE_MACHINE_MIPSFPU16: | ||
| 248 | case BurnCommon.IMAGE_FILE_MACHINE_POWERPC: | ||
| 249 | case BurnCommon.IMAGE_FILE_MACHINE_POWERPCFP: | ||
| 250 | case BurnCommon.IMAGE_FILE_MACHINE_R4000: | ||
| 251 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV32: | ||
| 252 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV64: | ||
| 253 | case BurnCommon.IMAGE_FILE_MACHINE_RISCV128: | ||
| 254 | case BurnCommon.IMAGE_FILE_MACHINE_SH3: | ||
| 255 | case BurnCommon.IMAGE_FILE_MACHINE_SH3DSP: | ||
| 256 | case BurnCommon.IMAGE_FILE_MACHINE_SH4: | ||
| 257 | case BurnCommon.IMAGE_FILE_MACHINE_SH5: | ||
| 258 | case BurnCommon.IMAGE_FILE_MACHINE_THUMB: | ||
| 259 | case BurnCommon.IMAGE_FILE_MACHINE_WCEMIPSV2: | ||
| 260 | default: | ||
| 261 | this.Messaging.Write(BurnBackendWarnings.UnknownCoffMachineType(sourceLineNumbers, sourcePath, burnReader.MachineType)); | ||
| 262 | return false; | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 239 | private long ProcessPackages(XmlDocument document, XmlNamespaceManager namespaceManager) | 266 | private long ProcessPackages(XmlDocument document, XmlNamespaceManager namespaceManager) |
| 240 | { | 267 | { |
| 241 | long packageInstallSize = 0; | 268 | long packageInstallSize = 0; |
diff --git a/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj b/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj index 46f2583d..4d1c91f9 100644 --- a/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj +++ b/src/wix/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | <DebugType>embedded</DebugType> | 10 | <DebugType>embedded</DebugType> |
| 11 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | 11 | <PublishRepositoryUrl>true</PublishRepositoryUrl> |
| 12 | <CreateDocumentationFile>true</CreateDocumentationFile> | 12 | <CreateDocumentationFile>true</CreateDocumentationFile> |
| 13 | |||
| 14 | <GitThisAssembly>true</GitThisAssembly> | ||
| 13 | </PropertyGroup> | 15 | </PropertyGroup> |
| 14 | 16 | ||
| 15 | <ItemGroup> | 17 | <ItemGroup> |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 45bc284c..0dd29e38 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | |||
| @@ -109,6 +109,28 @@ namespace WixToolsetTest.CoreIntegration | |||
| 109 | var extractedBextManifestData = File.ReadAllText(Path.Combine(baFolderPath, "BundleExtensionData.xml"), Encoding.UTF8); | 109 | var extractedBextManifestData = File.ReadAllText(Path.Combine(baFolderPath, "BundleExtensionData.xml"), Encoding.UTF8); |
| 110 | Assert.Equal(extractedBextManifestData, bextManifestData); | 110 | Assert.Equal(extractedBextManifestData, bextManifestData); |
| 111 | 111 | ||
| 112 | foreach (XmlAttribute attribute in extractResult.ManifestDocument.DocumentElement.Attributes) | ||
| 113 | { | ||
| 114 | switch (attribute.LocalName) | ||
| 115 | { | ||
| 116 | case "EngineVersion": | ||
| 117 | Assert.Equal($"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}", attribute.Value); | ||
| 118 | break; | ||
| 119 | case "ProtocolVersion": | ||
| 120 | Assert.Equal("1", attribute.Value); | ||
| 121 | break; | ||
| 122 | case "Win64": | ||
| 123 | Assert.Equal("no", attribute.Value); | ||
| 124 | break; | ||
| 125 | case "xmlns": | ||
| 126 | Assert.Equal("http://wixtoolset.org/schemas/v4/2008/Burn", attribute.Value); | ||
| 127 | break; | ||
| 128 | default: | ||
| 129 | Assert.False(true, $"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'"); | ||
| 130 | break; | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 112 | var commandLineElements = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:CommandLine"); | 134 | var commandLineElements = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:CommandLine"); |
| 113 | var commandLineElement = (XmlNode)Assert.Single(commandLineElements); | 135 | var commandLineElement = (XmlNode)Assert.Single(commandLineElements); |
| 114 | Assert.Equal("<CommandLine Variables='upperCase' />", commandLineElement.GetTestXml()); | 136 | Assert.Equal("<CommandLine Variables='upperCase' />", commandLineElement.GetTestXml()); |
| @@ -190,6 +212,28 @@ namespace WixToolsetTest.CoreIntegration | |||
| 190 | 212 | ||
| 191 | var extractResult = BundleExtractor.ExtractAllContainers(null, exePath, baFolderPath, attachedFolderPath, extractFolderPath); | 213 | var extractResult = BundleExtractor.ExtractAllContainers(null, exePath, baFolderPath, attachedFolderPath, extractFolderPath); |
| 192 | extractResult.AssertSuccess(); | 214 | extractResult.AssertSuccess(); |
| 215 | |||
| 216 | foreach (XmlAttribute attribute in extractResult.ManifestDocument.DocumentElement.Attributes) | ||
| 217 | { | ||
| 218 | switch (attribute.LocalName) | ||
| 219 | { | ||
| 220 | case "EngineVersion": | ||
| 221 | Assert.Equal($"{ThisAssembly.Git.BaseVersion.Major}.{ThisAssembly.Git.BaseVersion.Minor}.{ThisAssembly.Git.BaseVersion.Patch}.{ThisAssembly.Git.Commits}", attribute.Value); | ||
| 222 | break; | ||
| 223 | case "ProtocolVersion": | ||
| 224 | Assert.Equal("1", attribute.Value); | ||
| 225 | break; | ||
| 226 | case "Win64": | ||
| 227 | Assert.Equal("yes", attribute.Value); | ||
| 228 | break; | ||
| 229 | case "xmlns": | ||
| 230 | Assert.Equal("http://wixtoolset.org/schemas/v4/2008/Burn", attribute.Value); | ||
| 231 | break; | ||
| 232 | default: | ||
| 233 | Assert.False(true, $"Attribute: '{attribute.LocalName}', Value: '{attribute.Value}'"); | ||
| 234 | break; | ||
| 235 | } | ||
| 236 | } | ||
| 193 | } | 237 | } |
| 194 | } | 238 | } |
| 195 | 239 | ||
