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