Mono: Show custom error explaining that UWP is not supported #64778
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.
Fixes #64490.
It's slightly hacky because I left the door open for people potentially providing their own Mono-enabled UWP templates. I'm not aware of anyone actually having implemented such support, but who knows (I guess if someone really cares they could figure out how to use IL2CPP to compile the C# code to C++ in the template, and thus be able to use a non-Mono UWP template to export their game).
Initially I was thinking that this might be needed for Pineapple's Mono support on Xbox, but reading again I see they're using GDKX so it shouldn't matter. CC @wkubiak anyway FYI.
My first implementation was skipping the whole
export.cpp
logic, which fully hides the "UWP" entry from the list, but then you get an error if you e.g. have a GDScript project with a configured UWP preset and you then load it in a Mono build (e.g. to start using C# additionally). And this error can't be removed until you editexport_presets.cfg
manually to remove the section about UWP, since it doesn't show in the UI to do so.