Fix parsing large values for ChainPackage/@InstallSize.
Fixes #4388
Sean Hall committed
Jun 13, 2021 at 21:25 UTC
acc86b43089a84b08fc9ae50d2a3e6a280a9c0ef
3 files changed
+7
-3
src/wix/WixToolset.Core/Compiler_Bundle.cs
+3
-3
@@ -1962,7 +1962,7 @@ namespace WixToolset.Core
1962
var perMachine = YesNoDefaultType.NotSet;
1963
string detectCondition = null;
1964
string protocol = null;
1965
- var installSize = CompilerConstants.IntegerNotSet;
1965
+ long? installSize = null;
1966
string msuKB = null;
1967
var enableFeatureSelection = YesNoType.NotSet;
1968
var forcePerMachine = YesNoType.NotSet;
@@ -2082,7 +2082,7 @@ namespace WixToolset.Core
2082
allowed = (packageType == WixBundlePackageType.Exe);
2083
break;
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;
2087
case "KB":
2088
msuKB = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
@@ -2314,7 +2314,7 @@ namespace WixToolset.Core
2314
chainPackageSymbol.PerMachine = perMachine;
2315
}
2316
2317
- if (CompilerConstants.IntegerNotSet != installSize)
2317
+ if (installSize.HasValue)
2318
{
2319
chainPackageSymbol.InstallSize = installSize;
2320
}
src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+3
@@ -274,6 +274,9 @@ namespace WixToolsetTest.CoreIntegration
274
var intermediate = Intermediate.Load(wixOutput);
275
var section = intermediate.Sections.Single();
276
277
+ var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Where(x => x.Id.Id == "NetFx462Web").Single();
278
+ Assert.Equal(Int64.MaxValue, packageSymbol.InstallSize);
279
+
280
var payloadSymbol = section.Symbols.OfType<WixBundlePayloadSymbol>().Where(x => x.Id.Id == "NetFx462Web").Single();
281
Assert.Equal(Int64.MaxValue, payloadSymbol.FileSize);
282
}
src/wix/test/WixToolsetTest.CoreIntegration/TestData/SingleExeBundle/SingleExeRemotePayload.wxs
+1
@@ -8,6 +8,7 @@
8
PerMachine="yes"
9
DetectCondition="A"
10
InstallCondition="B"
11
+ InstallSize="9223372036854775807"
12
Id="NetFx462Web"
13
Vital="yes"
14
Permanent="yes"