Add missing Binary simple reference for UI.wixext dll.
Sean Hall committed
Jul 5, 2022 at 10:33 UTC
a3a3b2aca8978b9ff00d64a3be20ce6525ee78cd
2 files changed
+125
-25
src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
+124
-25
@@ -20,14 +20,27 @@ namespace WixToolsetTest.UI
20
var bindFolder = TestData.Get(@"TestData\data");
21
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
22
23
- var results = build.BuildAndQuery(Build, "Dialog", "CustomAction");
23
+ var results = build.BuildAndQuery(Build, "Binary", "Dialog", "CustomAction");
24
Assert.Single(results, result => result.StartsWith("Dialog:AdvancedWelcomeEulaDlg\t"));
25
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerMachineFolder\t"));
26
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerUserFolder\t"));
27
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerMachineFolder\t"));
28
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerUserFolder\t"));
29
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\t"));
30
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\t"));
25
+ WixAssert.CompareLineByLine(new[]
26
+ {
27
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
28
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
29
+ "Binary:WixUI_Bmp_New\t[Binary data]",
30
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
31
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
32
+ "Binary:WixUI_Ico_Info\t[Binary data]",
33
+ "Binary:WixUiCa_X86\t[Binary data]",
34
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
35
+ WixAssert.CompareLineByLine(new[]
36
+ {
37
+ "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
38
+ "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
39
+ "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
40
+ "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t",
41
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\tPrintEula\t",
42
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\tValidatePath\t",
43
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
44
}
45
46
[Fact]
@@ -37,14 +50,27 @@ namespace WixToolsetTest.UI
50
var bindFolder = TestData.Get(@"TestData\data");
51
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
52
40
- var results = build.BuildAndQuery(BuildX64, "Dialog", "CustomAction");
53
+ var results = build.BuildAndQuery(BuildX64, "Binary", "Dialog", "CustomAction");
54
Assert.Single(results, result => result.StartsWith("Dialog:AdvancedWelcomeEulaDlg\t"));
42
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerMachineFolder\t"));
43
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerUserFolder\t"));
44
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerMachineFolder\t"));
45
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerUserFolder\t"));
46
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIPrintEula\t65\tWixUiCa_X64\t"));
47
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIValidatePath\t65\tWixUiCa_X64\t"));
55
+ WixAssert.CompareLineByLine(new[]
56
+ {
57
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
58
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
59
+ "Binary:WixUI_Bmp_New\t[Binary data]",
60
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
61
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
62
+ "Binary:WixUI_Ico_Info\t[Binary data]",
63
+ "Binary:WixUiCa_X64\t[Binary data]",
64
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
65
+ WixAssert.CompareLineByLine(new[]
66
+ {
67
+ "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
68
+ "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
69
+ "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
70
+ "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t",
71
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X64\tPrintEula\t",
72
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X64\tValidatePath\t",
73
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
74
}
75
76
[Fact]
@@ -54,14 +80,27 @@ namespace WixToolsetTest.UI
80
var bindFolder = TestData.Get(@"TestData\data");
81
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
82
57
- var results = build.BuildAndQuery(BuildARM64, "Dialog", "CustomAction");
83
+ var results = build.BuildAndQuery(BuildARM64, "Binary", "Dialog", "CustomAction");
84
Assert.Single(results, result => result.StartsWith("Dialog:AdvancedWelcomeEulaDlg\t"));
59
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerMachineFolder\t"));
60
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetDefaultPerUserFolder\t"));
61
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerMachineFolder\t"));
62
- Assert.Single(results, result => result.StartsWith("CustomAction:WixSetPerUserFolder\t"));
63
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIPrintEula\t65\tWixUiCa_A64\t"));
64
- Assert.Single(results, result => result.StartsWith("CustomAction:WixUIValidatePath\t65\tWixUiCa_A64\t"));
85
+ WixAssert.CompareLineByLine(new[]
86
+ {
87
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
88
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
89
+ "Binary:WixUI_Bmp_New\t[Binary data]",
90
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
91
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
92
+ "Binary:WixUI_Ico_Info\t[Binary data]",
93
+ "Binary:WixUiCa_A64\t[Binary data]",
94
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
95
+ WixAssert.CompareLineByLine(new[]
96
+ {
97
+ "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
98
+ "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
99
+ "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
100
+ "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t",
101
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_A64\tPrintEula\t",
102
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_A64\tValidatePath\t",
103
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
104
}
105
106
[Fact]
@@ -71,10 +110,25 @@ namespace WixToolsetTest.UI
110
var bindFolder = TestData.Get(@"TestData\data");
111
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
112
74
- var results = build.BuildAndQuery(Build, "Dialog", "CustomAction");
113
+ var results = build.BuildAndQuery(Build, "Binary", "Dialog", "CustomAction");
114
Assert.Single(results, result => result.StartsWith("Dialog:WelcomeDlg\t"));
115
Assert.Single(results, result => result.StartsWith("Dialog:CustomizeDlg\t"));
116
Assert.Empty(results.Where(result => result.StartsWith("Dialog:SetupTypeDlg\t")));
117
+ WixAssert.CompareLineByLine(new[]
118
+ {
119
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
120
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
121
+ "Binary:WixUI_Bmp_New\t[Binary data]",
122
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
123
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
124
+ "Binary:WixUI_Ico_Info\t[Binary data]",
125
+ "Binary:WixUiCa_X86\t[Binary data]",
126
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
127
+ WixAssert.CompareLineByLine(new[]
128
+ {
129
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\tPrintEula\t",
130
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\tValidatePath\t",
131
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
132
}
133
134
[Fact]
@@ -84,8 +138,23 @@ namespace WixToolsetTest.UI
138
var bindFolder = TestData.Get(@"TestData\data");
139
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
140
87
- var results = build.BuildAndQuery(Build, "Dialog", "CustomAction");
141
+ var results = build.BuildAndQuery(Build, "Binary", "Dialog", "CustomAction");
142
Assert.Single(results, result => result.StartsWith("Dialog:InstallDirDlg\t"));
143
+ WixAssert.CompareLineByLine(new[]
144
+ {
145
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
146
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
147
+ "Binary:WixUI_Bmp_New\t[Binary data]",
148
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
149
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
150
+ "Binary:WixUI_Ico_Info\t[Binary data]",
151
+ "Binary:WixUiCa_X86\t[Binary data]",
152
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
153
+ WixAssert.CompareLineByLine(new[]
154
+ {
155
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\tPrintEula\t",
156
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\tValidatePath\t",
157
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
158
}
159
160
[Fact]
@@ -95,8 +164,23 @@ namespace WixToolsetTest.UI
164
var bindFolder = TestData.Get(@"TestData\data");
165
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
166
98
- var results = build.BuildAndQuery(Build, "Dialog", "CustomAction");
167
+ var results = build.BuildAndQuery(Build, "Binary", "Dialog", "CustomAction");
168
Assert.Single(results, result => result.StartsWith("Dialog:WelcomeEulaDlg\t"));
169
+ WixAssert.CompareLineByLine(new[]
170
+ {
171
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
172
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
173
+ "Binary:WixUI_Bmp_New\t[Binary data]",
174
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
175
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
176
+ "Binary:WixUI_Ico_Info\t[Binary data]",
177
+ "Binary:WixUiCa_X86\t[Binary data]",
178
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
179
+ WixAssert.CompareLineByLine(new[]
180
+ {
181
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\tPrintEula\t",
182
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\tValidatePath\t",
183
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
184
}
185
186
[Fact]
@@ -144,10 +228,25 @@ namespace WixToolsetTest.UI
228
var bindFolder = TestData.Get(@"TestData\data");
229
var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
230
147
- var results = build.BuildAndQuery(Build, "Dialog", "CustomAction");
231
+ var results = build.BuildAndQuery(Build, "Binary", "Dialog", "CustomAction");
232
Assert.Single(results, result => result.StartsWith("Dialog:WelcomeDlg\t"));
233
Assert.Single(results, result => result.StartsWith("Dialog:CustomizeDlg\t"));
234
Assert.Single(results, result => result.StartsWith("Dialog:SetupTypeDlg\t"));
235
+ WixAssert.CompareLineByLine(new[]
236
+ {
237
+ "Binary:WixUI_Bmp_Banner\t[Binary data]",
238
+ "Binary:WixUI_Bmp_Dialog\t[Binary data]",
239
+ "Binary:WixUI_Bmp_New\t[Binary data]",
240
+ "Binary:WixUI_Bmp_Up\t[Binary data]",
241
+ "Binary:WixUI_Ico_Exclam\t[Binary data]",
242
+ "Binary:WixUI_Ico_Info\t[Binary data]",
243
+ "Binary:WixUiCa_X86\t[Binary data]",
244
+ }, results.Where(r => r.StartsWith("Binary:")).ToArray());
245
+ WixAssert.CompareLineByLine(new[]
246
+ {
247
+ "CustomAction:WixUIPrintEula\t65\tWixUiCa_X86\tPrintEula\t",
248
+ "CustomAction:WixUIValidatePath\t65\tWixUiCa_X86\tValidatePath\t",
249
+ }, results.Where(r => r.StartsWith("CustomAction:")).ToArray());
250
}
251
252
[Fact]
src/ext/UI/wixext/UICompiler.cs
+1
@@ -90,6 +90,7 @@ namespace WixToolset.UI
90
// in the UI .wixlib.
91
var platform = this.Context.Platform == Platform.ARM64 ? "A64" : this.Context.Platform.ToString();
92
var source = $"WixUiCa_{platform}";
93
+ this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.Binary, source);
94
95
section.AddSymbol(new CustomActionSymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WixUIPrintEula"))
96
{