From e3ee5838a76306943adacb5c5a42b4b9c2052157 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Mon, 8 Jun 2020 14:01:47 -0700 Subject: [PATCH] Move all wildcards into targets or expand them (#6406) Wildcards are not allowed in toplevel ItemGroups in vcxproj; they must be generated by targets. We mostly use wildcards for pulling in PRI files that are dumped on disk by the translation tool. We don't want to check those in, so we can't expand references to them. To that end, I've introduced a new target that will take a list of folders containing resw files and expand wildcards under them. All[1] other wildcards have been moved into their respective targets _or_ simply expanded. [1]: Nothing has complained about the resource wildcards in CascadiaResources.build.items, so I haven't exploded it yet. Fixes #6214. --- .../spell-check/dictionary/dictionary.txt | 1 + .github/actions/spell-check/expect/expect.txt | 1 + build/rules/CollectWildcardResources.targets | 38 +++++++++++++++++++ .../CascadiaPackage/CascadiaPackage.wapproj | 5 ++- .../TestHostApp/TestHostApp.vcxproj | 34 ++++++++--------- .../TerminalApp/lib/TerminalAppLib.vcxproj | 5 ++- .../TerminalConnection.vcxproj | 5 ++- .../TerminalControl/TerminalControl.vcxproj | 5 ++- .../TerminalControl.vcxproj.filters | 2 +- .../WindowsTerminal/WindowsTerminal.vcxproj | 31 +++++++-------- .../WindowsTerminalUniversal.vcxproj | 5 ++- .../WindowsTerminalUniversal.vcxproj.filters | 2 +- src/dep/fmt/fmt.vcxproj | 16 +++++++- 13 files changed, 107 insertions(+), 43 deletions(-) create mode 100644 build/rules/CollectWildcardResources.targets diff --git a/.github/actions/spell-check/dictionary/dictionary.txt b/.github/actions/spell-check/dictionary/dictionary.txt index 9bb4f2b81..cce4445c5 100644 --- a/.github/actions/spell-check/dictionary/dictionary.txt +++ b/.github/actions/spell-check/dictionary/dictionary.txt @@ -470900,6 +470900,7 @@ wild-born wild-brained wild-bred wildcard +wildcards wildcat wildcats wildcatted diff --git a/.github/actions/spell-check/expect/expect.txt b/.github/actions/spell-check/expect/expect.txt index e148c528a..75b1af043 100644 --- a/.github/actions/spell-check/expect/expect.txt +++ b/.github/actions/spell-check/expect/expect.txt @@ -1746,6 +1746,7 @@ popup POPUPATTR PORFLG positionals +posix POSTCHARBREAKS POSX POSXSCROLL diff --git a/build/rules/CollectWildcardResources.targets b/build/rules/CollectWildcardResources.targets new file mode 100644 index 000000000..b56898909 --- /dev/null +++ b/build/rules/CollectWildcardResources.targets @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + <_OCFoundPRIFiles Include="@(PRIResource)" /> + + + + + + diff --git a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj index 3d8b7acb1..3ad32773e 100644 --- a/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj +++ b/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj @@ -46,8 +46,9 @@ - + + @@ -148,4 +149,6 @@ + + diff --git a/src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj b/src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj index 954cdd522..c3eddb2ea 100644 --- a/src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj +++ b/src/cascadia/LocalTests_TerminalApp/TestHostApp/TestHostApp.vcxproj @@ -123,27 +123,27 @@ - - - - - + + + + + diff --git a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj index 7480e2f37..9710eb85d 100644 --- a/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj +++ b/src/cascadia/TerminalApp/lib/TerminalAppLib.vcxproj @@ -233,7 +233,8 @@ - + + @@ -345,4 +346,6 @@ + + diff --git a/src/cascadia/TerminalConnection/TerminalConnection.vcxproj b/src/cascadia/TerminalConnection/TerminalConnection.vcxproj index cb98eb8f7..9c3713ea0 100644 --- a/src/cascadia/TerminalConnection/TerminalConnection.vcxproj +++ b/src/cascadia/TerminalConnection/TerminalConnection.vcxproj @@ -59,7 +59,8 @@ - + + @@ -95,4 +96,6 @@ + + diff --git a/src/cascadia/TerminalControl/TerminalControl.vcxproj b/src/cascadia/TerminalControl/TerminalControl.vcxproj index 1a664a089..217d524c4 100644 --- a/src/cascadia/TerminalControl/TerminalControl.vcxproj +++ b/src/cascadia/TerminalControl/TerminalControl.vcxproj @@ -86,7 +86,8 @@ - + + @@ -133,4 +134,6 @@ $(OpenConsoleDir)src\cascadia\inc;$(OpenConsoleDir)src\types\inc;%(AdditionalIncludeDirectories) + + diff --git a/src/cascadia/TerminalControl/TerminalControl.vcxproj.filters b/src/cascadia/TerminalControl/TerminalControl.vcxproj.filters index 750374d2c..004f3cafb 100644 --- a/src/cascadia/TerminalControl/TerminalControl.vcxproj.filters +++ b/src/cascadia/TerminalControl/TerminalControl.vcxproj.filters @@ -45,7 +45,7 @@ - + Resources diff --git a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj index 93c82ef6b..eb184f88c 100644 --- a/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj +++ b/src/cascadia/WindowsTerminal/WindowsTerminal.vcxproj @@ -115,21 +115,6 @@ - - - x86 - $(Platform) - - - - - <_OpenConsoleVCLibToCopy Include="$(VCToolsRedistInstallDir)\$(ReasonablePlatform)\Microsoft.VC142.CRT\*.dll"> - %(Filename)%(Extension) - - - - - + + + + + x86 + $(Platform) + + + + + <_OpenConsoleVCLibToCopy Include="$(VCToolsRedistInstallDir)\$(ReasonablePlatform)\Microsoft.VC142.CRT\*.dll" /> + $(ProjectName) BuiltProjectOutputGroup + %(Filename)%(Extension) - + diff --git a/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj b/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj index 888b644b6..fb1fb0bbe 100644 --- a/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj +++ b/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj @@ -123,9 +123,10 @@ - + + @@ -173,4 +174,6 @@ + + diff --git a/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj.filters b/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj.filters index eacb86e82..5e4623e0d 100644 --- a/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj.filters +++ b/src/cascadia/WindowsTerminalUniversal/WindowsTerminalUniversal.vcxproj.filters @@ -23,7 +23,7 @@ Resources - + Resources diff --git a/src/dep/fmt/fmt.vcxproj b/src/dep/fmt/fmt.vcxproj index 749b755b6..8c54989df 100644 --- a/src/dep/fmt/fmt.vcxproj +++ b/src/dep/fmt/fmt.vcxproj @@ -16,10 +16,22 @@ - + + - + + + + + + + + + + + +