diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 10:12:50 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-13 13:13:48 -0500 |
commit | 866413ec39c573a50b7ec0753f643918a1939dee (patch) | |
tree | 2470d79151e45a379a98cc7b1f54ba08a7c0057e /src/api | |
parent | 17d4ba9d93814cffa688e9152d11a340f9e0f754 (diff) | |
download | wix-866413ec39c573a50b7ec0753f643918a1939dee.tar.gz wix-866413ec39c573a50b7ec0753f643918a1939dee.tar.bz2 wix-866413ec39c573a50b7ec0753f643918a1939dee.zip |
Only allow MsiPackage and MspPackage inside MSI transactions.
Improve 64-bit package detection.
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/wix/WixToolset.Data/ErrorMessages.cs | 24 | ||||
-rw-r--r-- | src/api/wix/WixToolset.Data/WarningMessages.cs | 6 |
2 files changed, 27 insertions, 3 deletions
diff --git a/src/api/wix/WixToolset.Data/ErrorMessages.cs b/src/api/wix/WixToolset.Data/ErrorMessages.cs index a833452d..186acd29 100644 --- a/src/api/wix/WixToolset.Data/ErrorMessages.cs +++ b/src/api/wix/WixToolset.Data/ErrorMessages.cs | |||
@@ -1494,9 +1494,24 @@ namespace WixToolset.Data | |||
1494 | return Message(null, Ids.MissingValidatorExtension, "The validator requires at least one extension. Add \"ValidatorExtension, Wix\" for the default implementation."); | 1494 | return Message(null, Ids.MissingValidatorExtension, "The validator requires at least one extension. Add \"ValidatorExtension, Wix\" for the default implementation."); |
1495 | } | 1495 | } |
1496 | 1496 | ||
1497 | public static Message MsiTransactionX86BeforeX64(SourceLineNumber sourceLineNumbers) | 1497 | public static Message MsiTransactionInvalidPackage(SourceLineNumber sourceLineNumbers, string packageId, string packageType) |
1498 | { | 1498 | { |
1499 | return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64, "MSI transactions must install all x64 packages before any x86 package."); | 1499 | return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage, "Invalid package '{0}' in MSI transaction. It is type '{1}' but must be Msi or Msp.", packageId, packageType); |
1500 | } | ||
1501 | |||
1502 | public static Message MsiTransactionInvalidPackage2(SourceLineNumber sourceLineNumbers) | ||
1503 | { | ||
1504 | return Message(sourceLineNumbers, Ids.MsiTransactionInvalidPackage2, "Location of rollback boundary related to previous error."); | ||
1505 | } | ||
1506 | |||
1507 | public static Message MsiTransactionX86BeforeX64Package(SourceLineNumber sourceLineNumbers, string x64PackageId, string x86PackageId) | ||
1508 | { | ||
1509 | return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package, "Package '{0}' is x64 but Package '{1}' is x86. MSI transactions must install all x64 packages before any x86 package.", x64PackageId, x86PackageId); | ||
1510 | } | ||
1511 | |||
1512 | public static Message MsiTransactionX86BeforeX64Package2(SourceLineNumber sourceLineNumbers) | ||
1513 | { | ||
1514 | return Message(sourceLineNumbers, Ids.MsiTransactionX86BeforeX64Package2, "Location of x86 package related to previous error."); | ||
1500 | } | 1515 | } |
1501 | 1516 | ||
1502 | public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2) | 1517 | public static Message MultipleEntrySections(SourceLineNumber sourceLineNumbers, string sectionName1, string sectionName2) |
@@ -2672,7 +2687,7 @@ namespace WixToolset.Data | |||
2672 | InlineDirectorySyntaxRequiresPath = 387, | 2687 | InlineDirectorySyntaxRequiresPath = 387, |
2673 | InsecureBundleFilename = 388, | 2688 | InsecureBundleFilename = 388, |
2674 | PayloadMustBeRelativeToCache = 389, | 2689 | PayloadMustBeRelativeToCache = 389, |
2675 | MsiTransactionX86BeforeX64 = 390, | 2690 | MsiTransactionX86BeforeX64Package = 390, |
2676 | NoSourceFiles = 391, | 2691 | NoSourceFiles = 391, |
2677 | WixiplSourceFileIsExclusive = 392, | 2692 | WixiplSourceFileIsExclusive = 392, |
2678 | UnableToConvertFieldToNumber = 393, | 2693 | UnableToConvertFieldToNumber = 393, |
@@ -2692,6 +2707,9 @@ namespace WixToolset.Data | |||
2692 | MissingPackagePayload = 407, | 2707 | MissingPackagePayload = 407, |
2693 | ExpectedAttributeWithoutOtherAttributes = 408, | 2708 | ExpectedAttributeWithoutOtherAttributes = 408, |
2694 | InvalidBundleCondition = 409, | 2709 | InvalidBundleCondition = 409, |
2710 | MsiTransactionX86BeforeX64Package2 = 410, | ||
2711 | MsiTransactionInvalidPackage = 411, | ||
2712 | MsiTransactionInvalidPackage2 = 412, | ||
2695 | } | 2713 | } |
2696 | } | 2714 | } |
2697 | } | 2715 | } |
diff --git a/src/api/wix/WixToolset.Data/WarningMessages.cs b/src/api/wix/WixToolset.Data/WarningMessages.cs index 0c026b68..ecd76392 100644 --- a/src/api/wix/WixToolset.Data/WarningMessages.cs +++ b/src/api/wix/WixToolset.Data/WarningMessages.cs | |||
@@ -222,6 +222,11 @@ namespace WixToolset.Data | |||
222 | return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary, "The RollbackBoundary '{0}' was discarded because it was not followed by a package. Without a package the rollback boundary doesn't do anything. Verify that the RollbackBoundary element is not followed by another RollbackBoundary and that the element is not at the end of the chain.", rollbackBoundaryId); | 222 | return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary, "The RollbackBoundary '{0}' was discarded because it was not followed by a package. Without a package the rollback boundary doesn't do anything. Verify that the RollbackBoundary element is not followed by another RollbackBoundary and that the element is not at the end of the chain.", rollbackBoundaryId); |
223 | } | 223 | } |
224 | 224 | ||
225 | public static Message DiscardedRollbackBoundary2(SourceLineNumber sourceLineNumbers) | ||
226 | { | ||
227 | return Message(sourceLineNumbers, Ids.DiscardedRollbackBoundary2, "Location of rollback boundary related to previous warning."); | ||
228 | } | ||
229 | |||
225 | public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser) | 230 | public static Message DiscouragedAllUsersValue(SourceLineNumber sourceLineNumbers, string path, string machineOrUser) |
226 | { | 231 | { |
227 | return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.", path, machineOrUser); | 232 | return Message(sourceLineNumbers, Ids.DiscouragedAllUsersValue, "Bundles require a package to be either per-machine or per-user. The MSI '{0}' ALLUSERS Property is set to '2' which may change from per-user to per-machine at install time. The Bundle will assume the package is per-{1} and will not work correctly if that changes. If possible, remove the Property with Id='ALLUSERS' and use Package/@InstallScope attribute instead.", path, machineOrUser); |
@@ -821,6 +826,7 @@ namespace WixToolset.Data | |||
821 | InvalidEnvironmentVariable = 1157, | 826 | InvalidEnvironmentVariable = 1157, |
822 | WindowsInstallerFileTooLarge = 1158, | 827 | WindowsInstallerFileTooLarge = 1158, |
823 | UnavailableBundleConditionVariable = 1159, | 828 | UnavailableBundleConditionVariable = 1159, |
829 | DiscardedRollbackBoundary2 = 1160, | ||
824 | } | 830 | } |
825 | } | 831 | } |
826 | } | 832 | } |