From 3542ddd0b007673f3fc338bd53c3b807c3ed7308 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Sun, 12 Dec 2021 16:54:43 -0500 Subject: Fix ids for DependencyExtension. --- .../WindowsInstallerTableDefinitions.cs | 10 +++--- src/ext/Dependency/ca/wixdepca.cpp | 42 +++++++++++----------- .../DependencyExtensionFixture.cs | 6 ++-- .../Bundles/ProcessMsiPackageCommand.cs | 4 +-- src/wix/WixToolset.Core/CompilerWarnings.cs | 4 +-- .../DependencyExtensionFixture.cs | 4 +-- 6 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs index a64593ec..d2519aef 100644 --- a/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs +++ b/src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs @@ -1733,7 +1733,7 @@ namespace WixToolset.Data.WindowsInstaller ); public static readonly TableDefinition WixDependencyProvider = new TableDefinition( - "WixDependencyProvider", + "Wix4DependencyProvider", SymbolDefinitions.WixDependencyProvider, new[] { @@ -1748,7 +1748,7 @@ namespace WixToolset.Data.WindowsInstaller ); public static readonly TableDefinition WixDependency = new TableDefinition( - "WixDependency", + "Wix4Dependency", SymbolDefinitions.WixDependency, new[] { @@ -1762,12 +1762,12 @@ namespace WixToolset.Data.WindowsInstaller ); public static readonly TableDefinition WixDependencyRef = new TableDefinition( - "WixDependencyRef", + "Wix4DependencyRef", SymbolDefinitions.WixDependencyRef, new[] { - new ColumnDefinition("WixDependencyProvider_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependencyProvider", keyColumn: 1, description: "Foreign key into the Component table.", modularizeType: ColumnModularizeType.Column), - new ColumnDefinition("WixDependency_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "WixDependency", keyColumn: 1, description: "Foreign key into the WixDependency table.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("WixDependencyProvider_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4DependencyProvider", keyColumn: 1, description: "Foreign key into the Component table.", modularizeType: ColumnModularizeType.Column), + new ColumnDefinition("WixDependency_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4Dependency", keyColumn: 1, description: "Foreign key into the WixDependency table.", modularizeType: ColumnModularizeType.Column), }, symbolIdIsPrimaryKey: false ); diff --git a/src/ext/Dependency/ca/wixdepca.cpp b/src/ext/Dependency/ca/wixdepca.cpp index d6433707..efb19ea2 100644 --- a/src/ext/Dependency/ca/wixdepca.cpp +++ b/src/ext/Dependency/ca/wixdepca.cpp @@ -6,14 +6,14 @@ #define INITIAL_STRINGDICT_SIZE 4 LPCWSTR vcsDependencyProviderQuery = - L"SELECT `WixDependencyProvider`.`WixDependencyProvider`, `WixDependencyProvider`.`Component_`, `WixDependencyProvider`.`ProviderKey`, `WixDependencyProvider`.`Attributes` " - L"FROM `WixDependencyProvider`"; + L"SELECT `Wix4DependencyProvider`.`Wix4DependencyProvider`, `Wix4DependencyProvider`.`Component_`, `Wix4DependencyProvider`.`ProviderKey`, `Wix4DependencyProvider`.`Attributes` " + L"FROM `Wix4DependencyProvider`"; enum eDependencyProviderQuery { dpqId = 1, dpqComponent, dpqProviderKey, dpqAttributes }; LPCWSTR vcsDependencyQuery = - L"SELECT `WixDependency`.`WixDependency`, `WixDependencyProvider`.`Component_`, `WixDependency`.`ProviderKey`, `WixDependency`.`MinVersion`, `WixDependency`.`MaxVersion`, `WixDependency`.`Attributes` " - L"FROM `WixDependencyProvider`, `WixDependency`, `WixDependencyRef` " - L"WHERE `WixDependency`.`WixDependency` = `WixDependencyRef`.`WixDependency_` AND `WixDependencyProvider`.`WixDependencyProvider` = `WixDependencyRef`.`WixDependencyProvider_`"; + L"SELECT `Wix4Dependency`.`Wix4Dependency`, `Wix4DependencyProvider`.`Component_`, `Wix4Dependency`.`ProviderKey`, `Wix4Dependency`.`MinVersion`, `Wix4Dependency`.`MaxVersion`, `Wix4Dependency`.`Attributes` " + L"FROM `Wix4DependencyProvider`, `Wix4Dependency`, `Wix4DependencyRef` " + L"WHERE `Wix4Dependency`.`Wix4Dependency` = `Wix4DependencyRef`.`Wix4Dependency_` AND `Wix4DependencyProvider`.`Wix4DependencyProvider` = `Wix4DependencyRef`.`Wix4DependencyProvider_`"; enum eDependencyComponentQuery { dqId = 1, dqComponent, dqProviderKey, dqMinVersion, dqMaxVersion, dqAttributes }; static HRESULT EnsureRequiredDependencies( @@ -134,8 +134,8 @@ static HRESULT EnsureRequiredDependencies( UINT cDependencies = 0; PMSIHANDLE hDependencyRec = NULL; - // Skip the dependency check if the WixDependency table is missing (no dependencies to check for). - hr = WcaTableExists(L"WixDependency"); + // Skip the dependency check if the Wix4Dependency table is missing (no dependencies to check for). + hr = WcaTableExists(L"Wix4Dependency"); if (S_FALSE == hr) { WcaLog(LOGMSG_STANDARD, "Skipping the dependency check since no dependencies are authored."); @@ -143,7 +143,7 @@ static HRESULT EnsureRequiredDependencies( } // If the table exists but not the others, the database was not authored correctly. - ExitOnFailure(hr, "Failed to check if the WixDependency table exists."); + ExitOnFailure(hr, "Failed to check if the Wix4Dependency table exists."); // Initialize the dictionary to keep track of unique dependency keys. hr = DictCreateStringList(&sdDependencies, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE); @@ -159,10 +159,10 @@ static HRESULT EnsureRequiredDependencies( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { hr = WcaGetRecordString(hRec, dqId, &sczId); - ExitOnFailure(hr, "Failed to get WixDependency.WixDependency."); + ExitOnFailure(hr, "Failed to get Wix4Dependency.Wix4Dependency."); hr = WcaGetRecordString(hRec, dqComponent, &sczComponent); - ExitOnFailure(hr, "Failed to get WixDependencyProvider.Component_."); + ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Component_."); // Skip the current component if its not being installed or reinstalled. tComponentAction = WcaGetComponentToDo(sczComponent); @@ -173,16 +173,16 @@ static HRESULT EnsureRequiredDependencies( } hr = WcaGetRecordString(hRec, dqProviderKey, &sczProviderKey); - ExitOnFailure(hr, "Failed to get WixDependency.ProviderKey."); + ExitOnFailure(hr, "Failed to get Wix4Dependency.ProviderKey."); hr = WcaGetRecordString(hRec, dqMinVersion, &sczMinVersion); - ExitOnFailure(hr, "Failed to get WixDependency.MinVersion."); + ExitOnFailure(hr, "Failed to get Wix4Dependency.MinVersion."); hr = WcaGetRecordString(hRec, dqMaxVersion, &sczMaxVersion); - ExitOnFailure(hr, "Failed to get WixDependency.MaxVersion."); + ExitOnFailure(hr, "Failed to get Wix4Dependency.MaxVersion."); hr = WcaGetRecordInteger(hRec, dqAttributes, &iAttributes); - ExitOnFailure(hr, "Failed to get WixDependency.Attributes."); + ExitOnFailure(hr, "Failed to get Wix4Dependency.Attributes."); // Check the registry to see if the required providers (dependencies) exist. hr = DepCheckDependency(hkHive, sczProviderKey, sczMinVersion, sczMaxVersion, iAttributes, sdDependencies, &rgDependencies, &cDependencies); @@ -278,15 +278,15 @@ static HRESULT EnsureAbsentDependents( UINT cDependents = 0; PMSIHANDLE hDependencyRec = NULL; - // Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers). - hr = WcaTableExists(L"WixDependencyProvider"); + // Skip the dependent check if the Wix4DependencyProvider table is missing (no dependency providers). + hr = WcaTableExists(L"Wix4DependencyProvider"); if (S_FALSE == hr) { WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored."); ExitFunction1(hr = S_OK); } - ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists."); + ExitOnFailure(hr, "Failed to check if the Wix4DependencyProvider table exists."); // Split the IGNOREDEPENDENCIES property for use below if set. If it is "ALL", then quit now. hr = SplitIgnoredDependents(&sdIgnoredDependents); @@ -317,10 +317,10 @@ static HRESULT EnsureAbsentDependents( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { hr = WcaGetRecordString(hRec, dpqId, &sczId); - ExitOnFailure(hr, "Failed to get WixDependencyProvider.WixDependencyProvider."); + ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Wix4DependencyProvider."); hr = WcaGetRecordString(hRec, dpqComponent, &sczComponent); - ExitOnFailure(hr, "Failed to get WixDependencyProvider.Component."); + ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Component."); // Skip the current component if its not being uninstalled. tComponentAction = WcaGetComponentToDo(sczComponent); @@ -331,10 +331,10 @@ static HRESULT EnsureAbsentDependents( } hr = WcaGetRecordString(hRec, dpqProviderKey, &sczProviderKey); - ExitOnFailure(hr, "Failed to get WixDependencyProvider.ProviderKey."); + ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.ProviderKey."); hr = WcaGetRecordInteger(hRec, dpqAttributes, &iAttributes); - ExitOnFailure(hr, "Failed to get WixDependencyProvider.Attributes."); + ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Attributes."); // Check the registry to see if the provider has any dependents registered. hr = DepCheckDependents(hkHive, sczProviderKey, iAttributes, sdIgnoredDependents, &rgDependents, &cDependents); diff --git a/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs b/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs index 708ae658..bce128e8 100644 --- a/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs +++ b/src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs @@ -17,15 +17,15 @@ namespace WixToolsetTest.Dependency var folder = TestData.Get(@"TestData\UsingProvides"); var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder }); - var results = build.BuildAndQuery(Build, "CustomAction", "WixDependencyProvider") + var results = build.BuildAndQuery(Build, "CustomAction", "Wix4DependencyProvider") .Select(r => Regex.Replace(r, "{[^}]*}", "{*}")) .ToArray(); WixAssert.CompareLineByLine(new[] { "CustomAction:Wix4DependencyCheck_X86\t1\tDependencyCA_X86\tWixDependencyCheck\t", "CustomAction:Wix4DependencyRequire_X86\t1\tDependencyCA_X86\tWixDependencyRequire\t", - "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", - "WixDependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t", + "Wix4DependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", + "Wix4DependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t", }, results); } diff --git a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs index d42a591a..b1477c5a 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs @@ -488,9 +488,9 @@ namespace WixToolset.Core.Burn.Bundles private void ImportDependencyProviders(Database db, WixBundleMsiPackageSymbol msiPackage) { - if (db.TableExists("WixDependencyProvider")) + if (db.TableExists("Wix4DependencyProvider")) { - using (var view = db.OpenExecuteView("SELECT `WixDependencyProvider`, `ProviderKey`, `Version`, `DisplayName`, `Attributes` FROM `WixDependencyProvider`")) + using (var view = db.OpenExecuteView("SELECT `WixDependencyProvider`, `ProviderKey`, `Version`, `DisplayName`, `Attributes` FROM `Wix4DependencyProvider`")) { foreach (var record in view.Records) { diff --git a/src/wix/WixToolset.Core/CompilerWarnings.cs b/src/wix/WixToolset.Core/CompilerWarnings.cs index 5c11b878..7fca29bb 100644 --- a/src/wix/WixToolset.Core/CompilerWarnings.cs +++ b/src/wix/WixToolset.Core/CompilerWarnings.cs @@ -33,12 +33,12 @@ namespace WixToolset.Core public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id) { - return Message(sourceLineNumbers, Ids.ProvidesKeyNotFound, "The provider key with identifier {0} was not found in the WixDependencyProvider table. Related registry rows will not be removed from authoring.", id); + return Message(sourceLineNumbers, Ids.ProvidesKeyNotFound, "The provider key with identifier {0} was not found in the Wix4DependencyProvider table. Related registry rows will not be removed from authoring.", id); } public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id) { - return Message(sourceLineNumbers, Ids.RequiresKeyNotFound, "The dependency key with identifier {0} was not found in the WixDependency table. Related registry rows will not be removed from authoring.", id); + return Message(sourceLineNumbers, Ids.RequiresKeyNotFound, "The dependency key with identifier {0} was not found in the Wix4Dependency table. Related registry rows will not be removed from authoring.", id); } public static Message Win64Component(SourceLineNumber sourceLineNumbers, string componentId) diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs index 840b411e..4195a2a6 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs @@ -164,10 +164,10 @@ namespace WixToolsetTest.CoreIntegration var folder = TestData.Get(@"TestData\UsingProvides"); var build = new Builder(folder, null, new[] { folder }); - var results = build.BuildAndQuery(Build, "WixDependencyProvider"); + var results = build.BuildAndQuery(Build, "Wix4DependencyProvider"); Assert.Equal(new[] { - "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", + "Wix4DependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", }, results); } -- cgit v1.2.3-55-g6feb