From c86f75bcc104d5dc457fa2900a3ebb9c38f6ff65 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 30 Dec 2021 15:11:35 -0600 Subject: Revert .wixburn version since the format didn't change. --- src/burn/engine/inc/engine.h | 8 ++++++++ src/burn/engine/precomp.h | 1 + src/burn/engine/section.cpp | 8 -------- src/burn/stub/StubSection.cpp | 9 ++++----- src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs | 5 ++--- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/burn/engine/inc/engine.h b/src/burn/engine/inc/engine.h index 808bb91a..b80b4213 100644 --- a/src/burn/engine/inc/engine.h +++ b/src/burn/engine/inc/engine.h @@ -2,6 +2,14 @@ // 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. +// constants + +// If these defaults ever change, be sure to update constants in wix\WixToolset.Core.Burn\Bundles\BurnCommon.cs as well. +#define BURN_SECTION_NAME ".wixburn" +#define BURN_SECTION_MAGIC 0x00f14300 +#define BURN_SECTION_VERSION 0x00000002 + + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/burn/engine/precomp.h b/src/burn/engine/precomp.h index f76bb198..3b4d989b 100644 --- a/src/burn/engine/precomp.h +++ b/src/burn/engine/precomp.h @@ -101,3 +101,4 @@ #include "EngineForApplication.h" #include "EngineForExtension.h" #include "engine.messages.h" +#include "engine.h" diff --git a/src/burn/engine/section.cpp b/src/burn/engine/section.cpp index a9c7927e..989bfb17 100644 --- a/src/burn/engine/section.cpp +++ b/src/burn/engine/section.cpp @@ -3,14 +3,6 @@ #include "precomp.h" -// constants - -// If these defaults ever change, be sure to update constants in burn\stub\StubSection.cpp as well. -#define BURN_SECTION_NAME ".wixburn" -#define BURN_SECTION_MAGIC 0x00f14300 -#define BURN_SECTION_VERSION 0x00000003 -#define MANIFEST_CABINET_TOKEN L"0" - // structs typedef struct _BURN_SECTION_HEADER { diff --git a/src/burn/stub/StubSection.cpp b/src/burn/stub/StubSection.cpp index 2191a138..62d3e91e 100644 --- a/src/burn/stub/StubSection.cpp +++ b/src/burn/stub/StubSection.cpp @@ -2,12 +2,11 @@ #include "precomp.h" -#pragma section(".wixburn",read) +#pragma section(BURN_SECTION_NAME,read) -// If these defaults ever change, be sure to update constants in burn\engine\section.cpp as well. -#pragma data_seg(push, ".wixburn") -static DWORD dwMagic = 0x00f14300; -static DWORD dwVersion = 0x00000003; +#pragma data_seg(push, BURN_SECTION_NAME) +static DWORD dwMagic = BURN_SECTION_MAGIC; +static DWORD dwVersion = BURN_SECTION_VERSION; static GUID guidBundleId = { }; diff --git a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs index 27fad5b3..733f7c00 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs @@ -83,8 +83,7 @@ namespace WixToolset.Core.Burn.Bundles protected const UInt32 BURN_SECTION_MIN_SIZE = BURN_SECTION_OFFSET_ATTACHEDCONTAINERSIZE0; protected const UInt32 BURN_SECTION_MAGIC = 0x00f14300; - protected const UInt32 BURN_SECTION_VERSION = 0x00000003; - protected const UInt32 BURN_SECTION_COMPATIBLE_VERSION = 0x00000002; + protected const UInt32 BURN_SECTION_VERSION = 0x00000002; protected string fileExe; protected UInt32 peOffset = UInt32.MaxValue; @@ -191,7 +190,7 @@ namespace WixToolset.Core.Burn.Bundles } this.Version = BurnCommon.ReadUInt32(bytes, BURN_SECTION_OFFSET_VERSION); - if ((BURN_SECTION_VERSION != this.Version) && (BURN_SECTION_COMPATIBLE_VERSION != this.Version)) + if (BURN_SECTION_VERSION != this.Version) { this.Messaging.Write(BurnBackendErrors.IncompatibleWixBurnSection(this.fileExe, this.Version)); return false; -- cgit v1.2.3-55-g6feb