Browse Source

Merge pull request #71728 from akien-mga/doc-preserve-mono-settings

doc: Define dummy Mono settings to keep them in doctool
Rémi Verschelde 2 years ago
parent
commit
fe17e6d2f2
1 changed files with 8 additions and 0 deletions
  1. 8 0
      main/main.cpp

+ 8 - 0
main/main.cpp

@@ -2431,6 +2431,14 @@ bool Main::start() {
 			ERR_FAIL_COND_V_MSG(da.is_null(), false, "Argument supplied to --doctool must be a valid directory path.");
 		}
 
+#ifndef MODULE_MONO_ENABLED
+		// Hack to define .NET-specific project settings even on non-.NET builds,
+		// so that we don't lose their descriptions and default values in DocTools.
+		// Default values should be synced with mono_gd/gd_mono.cpp.
+		GLOBAL_DEF("dotnet/project/assembly_name", "");
+		GLOBAL_DEF("dotnet/project/solution_directory", "");
+#endif
+
 		Error err;
 		DocTools doc;
 		doc.generate(doc_base);