Mono: Show custom error explaining that UWP is not supported

Fixes #64490.

(cherry picked from commit ceef056146)
This commit is contained in:
Rémi Verschelde 2022-08-23 12:47:53 +02:00
parent e1e03297f1
commit a027a2efaa

View file

@ -29,6 +29,7 @@
/*************************************************************************/
#include "export.h"
#include "core/bind/core_bind.h"
#include "core/crypto/crypto_core.h"
#include "core/io/marshalls.h"
@ -42,6 +43,12 @@
#include "editor/editor_node.h"
#include "platform/uwp/logo.gen.h"
// Mono build doesn't support UWP, so we show a specific error.
// We don't bypass the whole logic so that it doesn't lose potential UWP presets
// added to export_presets.cfg from a non-Mono build (and in case third-parties
// actually have Mono-enabled UWP templates they can use).
#include "modules/modules_enabled.gen.h" // For mono.
#include "thirdparty/minizip/unzip.h"
#include "thirdparty/minizip/zip.h"
@ -1110,6 +1117,16 @@ public:
}
valid = dvalid || rvalid;
#ifdef MODULE_MONO_ENABLED
// If this is a Mono build, provide a custom error so that users are not confused.
// We don't bypass the whole logic to check templates because third-parties might have
// Mono-enabled UWP builds using this path.
r_missing_templates = false; // Don't warn about those.
r_error = TTR("Godot's Mono version does not support the UWP platform. Use the standard build (no C# support) if you wish to target UWP.");
return false;
#endif // MODULE_MONO_ENABLED
r_missing_templates = !valid;
// Validate the rest of the configuration.