(UWP) Another Round of Code Cleanups #17974
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To quote myself on PR #17973:
Well, this is that idea put in practice. As the Git diffs show, we shaved a lot of code from these files, while still producing a complete package. An added side-effect of this approach is if a new shader, sound effect, or language file is added, we don't need to manually add it to the vcxproj files. They will be detected and used automatically!
I also changed how the UWP Asset files are handled, it seemed more logical to handle them in a similar matter to how the
assets
folder and its contents were handled previously. This removes the need for two PreBuild commands as well:mkdir Assets
androbocopy "..\Assets\." "Content\." /xd "mime" /E /R:0 /W:0
.Another change is the simplification of how we handle the appxmanifest files. Before, we had two files (Normal and Gold) that would overwrite a default manifest during build time. However, the Normal file was redundant since it's identical to the regular manifest file, so we can just use it instead of overwriting it when using the Release and Debug configurations. When using the UWP Gold configuration, the old behavior is still intact. As a bonus, I also added the Gold manifest to the Visual Studio Solution Explorer to allow for easier editing:
Finally, this PR also resolves a build warning that occurred near the end of the compilation, should improve the build speeds a bit.
This is meant to be a companion PR to #17973, which handles some of the debugger files already. So until that PR and ideally also #17952 are merged, I'll keep this as a draft. In the meantime, besides the Cl check, you can test if these changes work by simply making a appx/msix package and making sure that the
Content
folder is filled correctly.