diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-06-13 21:25:52 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-06-13 21:45:35 -0600 |
commit | acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef (patch) | |
tree | 1a775fcec2011cb9a08d498a3e0a6484a331dead | |
parent | 30f296a09d7b19fa8852c1f9cf18ac2693999627 (diff) | |
download | wix-acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef.tar.gz wix-acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef.tar.bz2 wix-acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef.zip |
Fix parsing large values for ChainPackage/@InstallSize.
Fixes #4388
3 files changed, 7 insertions, 3 deletions
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 | |||
1962 | var perMachine = YesNoDefaultType.NotSet; | 1962 | var perMachine = YesNoDefaultType.NotSet; |
1963 | string detectCondition = null; | 1963 | string detectCondition = null; |
1964 | string protocol = null; | 1964 | string protocol = null; |
1965 | var installSize = CompilerConstants.IntegerNotSet; | 1965 | long? installSize = null; |
1966 | string msuKB = null; | 1966 | string msuKB = null; |
1967 | var enableFeatureSelection = YesNoType.NotSet; | 1967 | var enableFeatureSelection = YesNoType.NotSet; |
1968 | var forcePerMachine = YesNoType.NotSet; | 1968 | var forcePerMachine = YesNoType.NotSet; |
@@ -2082,7 +2082,7 @@ namespace WixToolset.Core | |||
2082 | allowed = (packageType == WixBundlePackageType.Exe); | 2082 | allowed = (packageType == WixBundlePackageType.Exe); |
2083 | break; | 2083 | break; |
2084 | case "InstallSize": | 2084 | case "InstallSize": |
2085 | installSize = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, Int32.MaxValue); | 2085 | installSize = this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, Int64.MaxValue); |
2086 | break; | 2086 | break; |
2087 | case "KB": | 2087 | case "KB": |
2088 | msuKB = this.Core.GetAttributeValue(sourceLineNumbers, attrib); | 2088 | msuKB = this.Core.GetAttributeValue(sourceLineNumbers, attrib); |
@@ -2314,7 +2314,7 @@ namespace WixToolset.Core | |||
2314 | chainPackageSymbol.PerMachine = perMachine; | 2314 | chainPackageSymbol.PerMachine = perMachine; |
2315 | } | 2315 | } |
2316 | 2316 | ||
2317 | if (CompilerConstants.IntegerNotSet != installSize) | 2317 | if (installSize.HasValue) |
2318 | { | 2318 | { |
2319 | chainPackageSymbol.InstallSize = installSize; | 2319 | chainPackageSymbol.InstallSize = installSize; |
2320 | } | 2320 | } |
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 | |||
274 | var intermediate = Intermediate.Load(wixOutput); | 274 | var intermediate = Intermediate.Load(wixOutput); |
275 | var section = intermediate.Sections.Single(); | 275 | var section = intermediate.Sections.Single(); |
276 | 276 | ||
277 | var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Where(x => x.Id.Id == "NetFx462Web").Single(); | ||
278 | Assert.Equal(Int64.MaxValue, packageSymbol.InstallSize); | ||
279 | |||
277 | var payloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Where(x => x.Id.Id == "NetFx462Web").Single(); | 280 | var payloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Where(x => x.Id.Id == "NetFx462Web").Single(); |
278 | Assert.Equal(Int64.MaxValue, payloadSymbol.FileSize); | 281 | Assert.Equal(Int64.MaxValue, payloadSymbol.FileSize); |
279 | } | 282 | } |
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 @@ | |||
8 | PerMachine="yes" | 8 | PerMachine="yes" |
9 | DetectCondition="A" | 9 | DetectCondition="A" |
10 | InstallCondition="B" | 10 | InstallCondition="B" |
11 | InstallSize="9223372036854775807" | ||
11 | Id="NetFx462Web" | 12 | Id="NetFx462Web" |
12 | Vital="yes" | 13 | Vital="yes" |
13 | Permanent="yes" | 14 | Permanent="yes" |