| 1 | // 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. |
| 2 | |
| 3 | namespace WixToolset.BootstrapperApplications |
| 4 | { |
| 5 | using System; |
| 6 | using System.Resources; |
| 7 | using WixToolset.Data; |
| 8 | |
| 9 | public static class BalWarnings |
| 10 | { |
| 11 | public static Message IuibaForceCachePrereq(SourceLineNumber sourceLineNumbers) |
| 12 | { |
| 13 | return Message(sourceLineNumbers, Ids.IuibaForceCachePrereq, "WixInternalUIBootstrapperApplication does not support the value of 'force' for Cache on prereq packages. Prereq packages are only cached when they need to be installed."); |
| 14 | } |
| 15 | |
| 16 | public static Message IuibaPrereqPackageAfterPrimaryPackage(SourceLineNumber sourceLineNumbers) |
| 17 | { |
| 18 | return Message(sourceLineNumbers, Ids.IuibaPrereqPackageAfterPrimaryPackage, "When using WixInternalUIBootstrapperApplication, all prereq packages should be before the primary package in the chain. The prereq packages are always installed before the primary package."); |
| 19 | } |
| 20 | |
| 21 | public static Message IuibaPrimaryPackageDisplayInternalUICondition(SourceLineNumber sourceLineNumbers) |
| 22 | { |
| 23 | return Message(sourceLineNumbers, Ids.IuibaPrimaryPackageDisplayInternalUICondition, "WixInternalUIBootstrapperApplication ignores DisplayInternalUICondition for the primary package so that the MSI UI is always shown."); |
| 24 | } |
| 25 | |
| 26 | public static Message IuibaPrimaryPackageInstallCondition(SourceLineNumber sourceLineNumbers) |
| 27 | { |
| 28 | return Message(sourceLineNumbers, Ids.IuibaPrimaryPackageInstallCondition, "WixInternalUIBootstrapperApplication ignores InstallCondition for the primary package so that the MSI UI is always shown."); |
| 29 | } |
| 30 | |
| 31 | public static Message UnmarkedBAFunctionsDLL(SourceLineNumber sourceLineNumbers) |
| 32 | { |
| 33 | return Message(sourceLineNumbers, Ids.UnmarkedBAFunctionsDLL, "WixStandardBootstrapperApplication doesn't automatically load BAFunctions.dll. Use the bal:BAFunctions attribute to indicate that it should be loaded."); |
| 34 | } |
| 35 | |
| 36 | public static Message DeprecatedBAFactoryAssemblyAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) |
| 37 | { |
| 38 | return Message(sourceLineNumbers, Ids.DeprecatedBAFactoryAssemblyAttribute, "The {0}/@{1} attribute has been deprecated. Move the Payload/@SourceFile attribute to be the BootstrapperApplication/@SourceFile attribute and remove the Payload element.", elementName, attributeName); |
| 39 | } |
| 40 | |
| 41 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
| 42 | { |
| 43 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); |
| 44 | } |
| 45 | |
| 46 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) |
| 47 | { |
| 48 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); |
| 49 | } |
| 50 | |
| 51 | public enum Ids |
| 52 | { |
| 53 | UnmarkedBAFunctionsDLL = 6501, |
| 54 | IuibaForceCachePrereq = 6502, |
| 55 | IuibaPrimaryPackageInstallCondition = 6503, |
| 56 | IuibaPrimaryPackageDisplayInternalUICondition = 6504, |
| 57 | IuibaPrereqPackageAfterPrimaryPackage = 6505, |
| 58 | DeprecatedBAFactoryAssemblyAttribute = 6506, |
| 59 | } |
| 60 | } |
| 61 | } |