aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2021-12-12 16:54:43 -0500
committerBob Arnson <github@bobs.org>2021-12-17 09:03:18 -0500
commit3542ddd0b007673f3fc338bd53c3b807c3ed7308 (patch)
tree6fe632b659587011586788d0968d9687f3b28535 /src
parentac27477c7ec5697c0b3c9a5c809f9eee118dd7b6 (diff)
downloadwix-3542ddd0b007673f3fc338bd53c3b807c3ed7308.tar.gz
wix-3542ddd0b007673f3fc338bd53c3b807c3ed7308.tar.bz2
wix-3542ddd0b007673f3fc338bd53c3b807c3ed7308.zip
Fix ids for DependencyExtension.
Diffstat (limited to 'src')
-rw-r--r--src/api/wix/WixToolset.Data/WindowsInstaller/WindowsInstallerTableDefinitions.cs10
-rw-r--r--src/ext/Dependency/ca/wixdepca.cpp42
-rw-r--r--src/ext/Dependency/test/WixToolsetTest.Dependency/DependencyExtensionFixture.cs6
-rw-r--r--src/wix/WixToolset.Core.Burn/Bundles/ProcessMsiPackageCommand.cs4
-rw-r--r--src/wix/WixToolset.Core/CompilerWarnings.cs4
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/DependencyExtensionFixture.cs4
6 files changed, 35 insertions, 35 deletions
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
1733 ); 1733 );
1734 1734
1735 public static readonly TableDefinition WixDependencyProvider = new TableDefinition( 1735 public static readonly TableDefinition WixDependencyProvider = new TableDefinition(
1736 "WixDependencyProvider", 1736 "Wix4DependencyProvider",
1737 SymbolDefinitions.WixDependencyProvider, 1737 SymbolDefinitions.WixDependencyProvider,
1738 new[] 1738 new[]
1739 { 1739 {
@@ -1748,7 +1748,7 @@ namespace WixToolset.Data.WindowsInstaller
1748 ); 1748 );
1749 1749
1750 public static readonly TableDefinition WixDependency = new TableDefinition( 1750 public static readonly TableDefinition WixDependency = new TableDefinition(
1751 "WixDependency", 1751 "Wix4Dependency",
1752 SymbolDefinitions.WixDependency, 1752 SymbolDefinitions.WixDependency,
1753 new[] 1753 new[]
1754 { 1754 {
@@ -1762,12 +1762,12 @@ namespace WixToolset.Data.WindowsInstaller
1762 ); 1762 );
1763 1763
1764 public static readonly TableDefinition WixDependencyRef = new TableDefinition( 1764 public static readonly TableDefinition WixDependencyRef = new TableDefinition(
1765 "WixDependencyRef", 1765 "Wix4DependencyRef",
1766 SymbolDefinitions.WixDependencyRef, 1766 SymbolDefinitions.WixDependencyRef,
1767 new[] 1767 new[]
1768 { 1768 {
1769 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), 1769 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),
1770 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), 1770 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),
1771 }, 1771 },
1772 symbolIdIsPrimaryKey: false 1772 symbolIdIsPrimaryKey: false
1773 ); 1773 );
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 @@
6#define INITIAL_STRINGDICT_SIZE 4 6#define INITIAL_STRINGDICT_SIZE 4
7 7
8LPCWSTR vcsDependencyProviderQuery = 8LPCWSTR vcsDependencyProviderQuery =
9 L"SELECT `WixDependencyProvider`.`WixDependencyProvider`, `WixDependencyProvider`.`Component_`, `WixDependencyProvider`.`ProviderKey`, `WixDependencyProvider`.`Attributes` " 9 L"SELECT `Wix4DependencyProvider`.`Wix4DependencyProvider`, `Wix4DependencyProvider`.`Component_`, `Wix4DependencyProvider`.`ProviderKey`, `Wix4DependencyProvider`.`Attributes` "
10 L"FROM `WixDependencyProvider`"; 10 L"FROM `Wix4DependencyProvider`";
11enum eDependencyProviderQuery { dpqId = 1, dpqComponent, dpqProviderKey, dpqAttributes }; 11enum eDependencyProviderQuery { dpqId = 1, dpqComponent, dpqProviderKey, dpqAttributes };
12 12
13LPCWSTR vcsDependencyQuery = 13LPCWSTR vcsDependencyQuery =
14 L"SELECT `WixDependency`.`WixDependency`, `WixDependencyProvider`.`Component_`, `WixDependency`.`ProviderKey`, `WixDependency`.`MinVersion`, `WixDependency`.`MaxVersion`, `WixDependency`.`Attributes` " 14 L"SELECT `Wix4Dependency`.`Wix4Dependency`, `Wix4DependencyProvider`.`Component_`, `Wix4Dependency`.`ProviderKey`, `Wix4Dependency`.`MinVersion`, `Wix4Dependency`.`MaxVersion`, `Wix4Dependency`.`Attributes` "
15 L"FROM `WixDependencyProvider`, `WixDependency`, `WixDependencyRef` " 15 L"FROM `Wix4DependencyProvider`, `Wix4Dependency`, `Wix4DependencyRef` "
16 L"WHERE `WixDependency`.`WixDependency` = `WixDependencyRef`.`WixDependency_` AND `WixDependencyProvider`.`WixDependencyProvider` = `WixDependencyRef`.`WixDependencyProvider_`"; 16 L"WHERE `Wix4Dependency`.`Wix4Dependency` = `Wix4DependencyRef`.`Wix4Dependency_` AND `Wix4DependencyProvider`.`Wix4DependencyProvider` = `Wix4DependencyRef`.`Wix4DependencyProvider_`";
17enum eDependencyComponentQuery { dqId = 1, dqComponent, dqProviderKey, dqMinVersion, dqMaxVersion, dqAttributes }; 17enum eDependencyComponentQuery { dqId = 1, dqComponent, dqProviderKey, dqMinVersion, dqMaxVersion, dqAttributes };
18 18
19static HRESULT EnsureRequiredDependencies( 19static HRESULT EnsureRequiredDependencies(
@@ -134,8 +134,8 @@ static HRESULT EnsureRequiredDependencies(
134 UINT cDependencies = 0; 134 UINT cDependencies = 0;
135 PMSIHANDLE hDependencyRec = NULL; 135 PMSIHANDLE hDependencyRec = NULL;
136 136
137 // Skip the dependency check if the WixDependency table is missing (no dependencies to check for). 137 // Skip the dependency check if the Wix4Dependency table is missing (no dependencies to check for).
138 hr = WcaTableExists(L"WixDependency"); 138 hr = WcaTableExists(L"Wix4Dependency");
139 if (S_FALSE == hr) 139 if (S_FALSE == hr)
140 { 140 {
141 WcaLog(LOGMSG_STANDARD, "Skipping the dependency check since no dependencies are authored."); 141 WcaLog(LOGMSG_STANDARD, "Skipping the dependency check since no dependencies are authored.");
@@ -143,7 +143,7 @@ static HRESULT EnsureRequiredDependencies(
143 } 143 }
144 144
145 // If the table exists but not the others, the database was not authored correctly. 145 // If the table exists but not the others, the database was not authored correctly.
146 ExitOnFailure(hr, "Failed to check if the WixDependency table exists."); 146 ExitOnFailure(hr, "Failed to check if the Wix4Dependency table exists.");
147 147
148 // Initialize the dictionary to keep track of unique dependency keys. 148 // Initialize the dictionary to keep track of unique dependency keys.
149 hr = DictCreateStringList(&sdDependencies, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE); 149 hr = DictCreateStringList(&sdDependencies, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE);
@@ -159,10 +159,10 @@ static HRESULT EnsureRequiredDependencies(
159 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 159 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
160 { 160 {
161 hr = WcaGetRecordString(hRec, dqId, &sczId); 161 hr = WcaGetRecordString(hRec, dqId, &sczId);
162 ExitOnFailure(hr, "Failed to get WixDependency.WixDependency."); 162 ExitOnFailure(hr, "Failed to get Wix4Dependency.Wix4Dependency.");
163 163
164 hr = WcaGetRecordString(hRec, dqComponent, &sczComponent); 164 hr = WcaGetRecordString(hRec, dqComponent, &sczComponent);
165 ExitOnFailure(hr, "Failed to get WixDependencyProvider.Component_."); 165 ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Component_.");
166 166
167 // Skip the current component if its not being installed or reinstalled. 167 // Skip the current component if its not being installed or reinstalled.
168 tComponentAction = WcaGetComponentToDo(sczComponent); 168 tComponentAction = WcaGetComponentToDo(sczComponent);
@@ -173,16 +173,16 @@ static HRESULT EnsureRequiredDependencies(
173 } 173 }
174 174
175 hr = WcaGetRecordString(hRec, dqProviderKey, &sczProviderKey); 175 hr = WcaGetRecordString(hRec, dqProviderKey, &sczProviderKey);
176 ExitOnFailure(hr, "Failed to get WixDependency.ProviderKey."); 176 ExitOnFailure(hr, "Failed to get Wix4Dependency.ProviderKey.");
177 177
178 hr = WcaGetRecordString(hRec, dqMinVersion, &sczMinVersion); 178 hr = WcaGetRecordString(hRec, dqMinVersion, &sczMinVersion);
179 ExitOnFailure(hr, "Failed to get WixDependency.MinVersion."); 179 ExitOnFailure(hr, "Failed to get Wix4Dependency.MinVersion.");
180 180
181 hr = WcaGetRecordString(hRec, dqMaxVersion, &sczMaxVersion); 181 hr = WcaGetRecordString(hRec, dqMaxVersion, &sczMaxVersion);
182 ExitOnFailure(hr, "Failed to get WixDependency.MaxVersion."); 182 ExitOnFailure(hr, "Failed to get Wix4Dependency.MaxVersion.");
183 183
184 hr = WcaGetRecordInteger(hRec, dqAttributes, &iAttributes); 184 hr = WcaGetRecordInteger(hRec, dqAttributes, &iAttributes);
185 ExitOnFailure(hr, "Failed to get WixDependency.Attributes."); 185 ExitOnFailure(hr, "Failed to get Wix4Dependency.Attributes.");
186 186
187 // Check the registry to see if the required providers (dependencies) exist. 187 // Check the registry to see if the required providers (dependencies) exist.
188 hr = DepCheckDependency(hkHive, sczProviderKey, sczMinVersion, sczMaxVersion, iAttributes, sdDependencies, &rgDependencies, &cDependencies); 188 hr = DepCheckDependency(hkHive, sczProviderKey, sczMinVersion, sczMaxVersion, iAttributes, sdDependencies, &rgDependencies, &cDependencies);
@@ -278,15 +278,15 @@ static HRESULT EnsureAbsentDependents(
278 UINT cDependents = 0; 278 UINT cDependents = 0;
279 PMSIHANDLE hDependencyRec = NULL; 279 PMSIHANDLE hDependencyRec = NULL;
280 280
281 // Skip the dependent check if the WixDependencyProvider table is missing (no dependency providers). 281 // Skip the dependent check if the Wix4DependencyProvider table is missing (no dependency providers).
282 hr = WcaTableExists(L"WixDependencyProvider"); 282 hr = WcaTableExists(L"Wix4DependencyProvider");
283 if (S_FALSE == hr) 283 if (S_FALSE == hr)
284 { 284 {
285 WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored."); 285 WcaLog(LOGMSG_STANDARD, "Skipping the dependents check since no dependency providers are authored.");
286 ExitFunction1(hr = S_OK); 286 ExitFunction1(hr = S_OK);
287 } 287 }
288 288
289 ExitOnFailure(hr, "Failed to check if the WixDependencyProvider table exists."); 289 ExitOnFailure(hr, "Failed to check if the Wix4DependencyProvider table exists.");
290 290
291 // Split the IGNOREDEPENDENCIES property for use below if set. If it is "ALL", then quit now. 291 // Split the IGNOREDEPENDENCIES property for use below if set. If it is "ALL", then quit now.
292 hr = SplitIgnoredDependents(&sdIgnoredDependents); 292 hr = SplitIgnoredDependents(&sdIgnoredDependents);
@@ -317,10 +317,10 @@ static HRESULT EnsureAbsentDependents(
317 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 317 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
318 { 318 {
319 hr = WcaGetRecordString(hRec, dpqId, &sczId); 319 hr = WcaGetRecordString(hRec, dpqId, &sczId);
320 ExitOnFailure(hr, "Failed to get WixDependencyProvider.WixDependencyProvider."); 320 ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Wix4DependencyProvider.");
321 321
322 hr = WcaGetRecordString(hRec, dpqComponent, &sczComponent); 322 hr = WcaGetRecordString(hRec, dpqComponent, &sczComponent);
323 ExitOnFailure(hr, "Failed to get WixDependencyProvider.Component."); 323 ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Component.");
324 324
325 // Skip the current component if its not being uninstalled. 325 // Skip the current component if its not being uninstalled.
326 tComponentAction = WcaGetComponentToDo(sczComponent); 326 tComponentAction = WcaGetComponentToDo(sczComponent);
@@ -331,10 +331,10 @@ static HRESULT EnsureAbsentDependents(
331 } 331 }
332 332
333 hr = WcaGetRecordString(hRec, dpqProviderKey, &sczProviderKey); 333 hr = WcaGetRecordString(hRec, dpqProviderKey, &sczProviderKey);
334 ExitOnFailure(hr, "Failed to get WixDependencyProvider.ProviderKey."); 334 ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.ProviderKey.");
335 335
336 hr = WcaGetRecordInteger(hRec, dpqAttributes, &iAttributes); 336 hr = WcaGetRecordInteger(hRec, dpqAttributes, &iAttributes);
337 ExitOnFailure(hr, "Failed to get WixDependencyProvider.Attributes."); 337 ExitOnFailure(hr, "Failed to get Wix4DependencyProvider.Attributes.");
338 338
339 // Check the registry to see if the provider has any dependents registered. 339 // Check the registry to see if the provider has any dependents registered.
340 hr = DepCheckDependents(hkHive, sczProviderKey, iAttributes, sdIgnoredDependents, &rgDependents, &cDependents); 340 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
17 var folder = TestData.Get(@"TestData\UsingProvides"); 17 var folder = TestData.Get(@"TestData\UsingProvides");
18 var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder }); 18 var build = new Builder(folder, typeof(DependencyExtensionFactory), new[] { folder });
19 19
20 var results = build.BuildAndQuery(Build, "CustomAction", "WixDependencyProvider") 20 var results = build.BuildAndQuery(Build, "CustomAction", "Wix4DependencyProvider")
21 .Select(r => Regex.Replace(r, "{[^}]*}", "{*}")) 21 .Select(r => Regex.Replace(r, "{[^}]*}", "{*}"))
22 .ToArray(); 22 .ToArray();
23 WixAssert.CompareLineByLine(new[] 23 WixAssert.CompareLineByLine(new[]
24 { 24 {
25 "CustomAction:Wix4DependencyCheck_X86\t1\tDependencyCA_X86\tWixDependencyCheck\t", 25 "CustomAction:Wix4DependencyCheck_X86\t1\tDependencyCA_X86\tWixDependencyCheck\t",
26 "CustomAction:Wix4DependencyRequire_X86\t1\tDependencyCA_X86\tWixDependencyRequire\t", 26 "CustomAction:Wix4DependencyRequire_X86\t1\tDependencyCA_X86\tWixDependencyRequire\t",
27 "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", 27 "Wix4DependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t",
28 "WixDependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t", 28 "Wix4DependencyProvider:depTpv28q7slcxvXPWmU4Z0GfbiI.4\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t{*}\t\t\t",
29 }, results); 29 }, results);
30 } 30 }
31 31
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
488 488
489 private void ImportDependencyProviders(Database db, WixBundleMsiPackageSymbol msiPackage) 489 private void ImportDependencyProviders(Database db, WixBundleMsiPackageSymbol msiPackage)
490 { 490 {
491 if (db.TableExists("WixDependencyProvider")) 491 if (db.TableExists("Wix4DependencyProvider"))
492 { 492 {
493 using (var view = db.OpenExecuteView("SELECT `WixDependencyProvider`, `ProviderKey`, `Version`, `DisplayName`, `Attributes` FROM `WixDependencyProvider`")) 493 using (var view = db.OpenExecuteView("SELECT `WixDependencyProvider`, `ProviderKey`, `Version`, `DisplayName`, `Attributes` FROM `Wix4DependencyProvider`"))
494 { 494 {
495 foreach (var record in view.Records) 495 foreach (var record in view.Records)
496 { 496 {
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
33 33
34 public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id) 34 public static Message ProvidesKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
35 { 35 {
36 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); 36 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);
37 } 37 }
38 38
39 public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id) 39 public static Message RequiresKeyNotFound(SourceLineNumber sourceLineNumbers, string id)
40 { 40 {
41 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); 41 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);
42 } 42 }
43 43
44 public static Message Win64Component(SourceLineNumber sourceLineNumbers, string componentId) 44 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
164 var folder = TestData.Get(@"TestData\UsingProvides"); 164 var folder = TestData.Get(@"TestData\UsingProvides");
165 var build = new Builder(folder, null, new[] { folder }); 165 var build = new Builder(folder, null, new[] { folder });
166 166
167 var results = build.BuildAndQuery(Build, "WixDependencyProvider"); 167 var results = build.BuildAndQuery(Build, "Wix4DependencyProvider");
168 Assert.Equal(new[] 168 Assert.Equal(new[]
169 { 169 {
170 "WixDependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t", 170 "Wix4DependencyProvider:dep74OfIcniaqxA7EprRGBw4Oyy3r8\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tUsingProvides\t\t\t",
171 }, results); 171 }, results);
172 } 172 }
173 173