From acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 13 Jun 2021 21:25:52 -0500 Subject: Fix parsing large values for ChainPackage/@InstallSize. Fixes #4388 --- src/wix/WixToolset.Core/Compiler_Bundle.cs | 6 +++--- src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs | 3 +++ .../TestData/SingleExeBundle/SingleExeRemotePayload.wxs | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs index a72d434d..03f0ca0e 100644 --- a/src/wix/WixToolset.Core/Compiler_Bundle.cs +++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs @@ -1962,7 +1962,7 @@ namespace WixToolset.Core var perMachine = YesNoDefaultType.NotSet; string detectCondition = null; string protocol = null; - var installSize = CompilerConstants.IntegerNotSet; + long? installSize = null; string msuKB = null; var enableFeatureSelection = YesNoType.NotSet; var forcePerMachine = YesNoType.NotSet; @@ -2082,7 +2082,7 @@ namespace WixToolset.Core allowed = (packageType == WixBundlePackageType.Exe); break; case "InstallSize": - installSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); + installSize = this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, Int64.MaxValue); break; case "KB": msuKB = this.Core.GetAttributeValue(sourceLineNumbers, attrib); @@ -2314,7 +2314,7 @@ namespace WixToolset.Core chainPackageSymbol.PerMachine = perMachine; } - if (CompilerConstants.IntegerNotSet != installSize) + if (installSize.HasValue) { chainPackageSymbol.InstallSize = installSize; } diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index c9ae049e..0bea3af9 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs @@ -274,6 +274,9 @@ namespace WixToolsetTest.CoreIntegration var intermediate = Intermediate.Load(wixOutput); var section = intermediate.Sections.Single(); + var packageSymbol = section.Symbols.OfType().Where(x => x.Id.Id == "NetFx462Web").Single(); + Assert.Equal(Int64.MaxValue, packageSymbol.InstallSize); + var payloadSymbol = section.Symbols.OfType().Where(x => x.Id.Id == "NetFx462Web").Single(); Assert.Equal(Int64.MaxValue, payloadSymbol.FileSize); } diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs index 0d459f02..29dc78e7 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs @@ -8,6 +8,7 @@ PerMachine="yes" DetectCondition="A" InstallCondition="B" + InstallSize="9223372036854775807" Id="NetFx462Web" Vital="yes" Permanent="yes" -- cgit v1.2.3-55-g6feb