Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(UWP) Another Round of Code Cleanups #17974

Merged
merged 4 commits into from
Aug 26, 2023
Merged

(UWP) Another Round of Code Cleanups #17974

merged 4 commits into from
Aug 26, 2023

Conversation

GABO1423
Copy link
Contributor

@GABO1423 GABO1423 commented Aug 25, 2023

To quote myself on PR #17973:

In theory we could do this for every single file in the assets folder, removing the need to use this command:

robocopy "..\Assets\." "Content\." /xd "mime" /E /R:0 /W:0

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 and robocopy "..\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:

image

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.

@hrydgard
Copy link
Owner

Both the other PRs are merged now :) feel free to rebase or merge from master, and I'll merge.

This was removed temporarily so we could add the folder, we can add it back now.
`MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance`
Also fix misplaced Asset file
@GABO1423
Copy link
Contributor Author

GABO1423 commented Aug 26, 2023

@hrydgard This is ready to go now!

EDIT: Before merging, just one question, is the imgconv.sh script used for anything now? Figured I could delete it quickly.

@hrydgard
Copy link
Owner

hrydgard commented Aug 26, 2023

It's not actively used, it was used once to convert/resize some images. If we ever change the logo, might want to run it again :)

@hrydgard hrydgard merged commit 25e7c04 into hrydgard:master Aug 26, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants