From 581c320e04949300d6c3bee71fb5fc1a557f9263 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 16 Mar 2022 10:30:35 -0700 Subject: Warn when an MSI or cabinet installed by an MSI is too large Fixes 6408 --- src/api/wix/WixToolset.Data/WarningMessages.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/api') diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs index f555fd93..0c026b68 100644 --- a/src/api/wix/WixToolset.Data/WarningMessages.cs +++ b/src/api/wix/WixToolset.Data/WarningMessages.cs @@ -673,6 +673,16 @@ namespace WixToolset.Data return Message(null, Ids.InvalidEnvironmentVariable, "The {0} environment variable is set to an invalid value of '{1}'. The default value '{2}' will be used instead.", environmentVariable, value, defaultValue); } + public static Message WindowsInstallerFileTooLarge(SourceLineNumber sourceLineNumbers, string path, string fileDescription) + { + if (String.IsNullOrEmpty(fileDescription)) + { + fileDescription = "MSI or cabinet"; + } + + return Message(sourceLineNumbers, Ids.WindowsInstallerFileTooLarge, "The Windows Installer does not support {0} files larger than 2GB in size. Reduce the size or number of files embedded in '{1}' or the installation will likely fail with an unexpected error.", fileDescription, path); + } + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) { return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); @@ -809,6 +819,7 @@ namespace WixToolset.Data DetectConditionRecommended = 1153, CollidingModularizationTypes = 1156, InvalidEnvironmentVariable = 1157, + WindowsInstallerFileTooLarge = 1158, UnavailableBundleConditionVariable = 1159, } } -- cgit v1.2.3-55-g6feb