summaryrefslogtreecommitdiff
path: root/modules/mono/SCsub
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-03 09:44:53 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-07-05 09:38:23 +0200
commit270af6fa089ccfb93ace68ada8d476bd902b10fa (patch)
treefee771a4f58a8d799f70d37547391831f52b5cd2 /modules/mono/SCsub
parent7b569e91c0c6b84965cad416b8e86dcfdacbcfc4 (diff)
Re-write mono module editor code in C#
Make the build system automatically build the C# Api assemblies to be shipped with the editor. Make the editor, editor player and debug export templates use Api assemblies built with debug symbols. Always run MSBuild to build the editor tools and Api assemblies when building Godot. Several bugs fixed related to assembly hot reloading and restoring state. Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
Diffstat (limited to 'modules/mono/SCsub')
-rw-r--r--modules/mono/SCsub28
1 files changed, 20 insertions, 8 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index 6c3ecee272..cc60e64a11 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -1,5 +1,8 @@
#!/usr/bin/env python
+import build_scripts.tls_configure as tls_configure
+import build_scripts.mono_configure as mono_configure
+
Import('env')
Import('env_modules')
@@ -26,27 +29,36 @@ if env_mono['mono_glue']:
import os.path
if not os.path.isfile('glue/mono_glue.gen.cpp'):
- raise RuntimeError('Missing mono glue sources. Did you forget to generate them?')
+ raise RuntimeError("Mono glue sources not found. Did you forget to run '--generate-mono-glue'?")
if env_mono['tools'] or env_mono['target'] != 'release':
env_mono.Append(CPPDEFINES=['GD_MONO_HOT_RELOAD'])
# Configure Thread Local Storage
-import build_scripts.tls_configure as tls_configure
-
conf = Configure(env_mono)
tls_configure.configure(conf)
env_mono = conf.Finish()
# Configure Mono
-import build_scripts.mono_configure as mono_configure
-
mono_configure.configure(env, env_mono)
-# Build GodotSharpTools
+# Build Godot API solution
+
+if env_mono['tools'] and env_mono['mono_glue']:
+ import build_scripts.api_solution_build as api_solution_build
+ api_solution_build.build(env_mono)
-import build_scripts.godotsharptools_build as godotsharptools_build
+# Build GodotTools
-godotsharptools_build.build(env_mono)
+if env_mono['tools']:
+ import build_scripts.godot_tools_build as godot_tools_build
+ if env_mono['mono_glue']:
+ godot_tools_build.build(env_mono)
+ else:
+ # Building without the glue sources so the Godot API solution may be missing.
+ # GodotTools depends on the Godot API solution. As such, we will only build
+ # GodotTools.ProjectEditor which doesn't depend on the Godot API solution and
+ # is required by the bindings generator in order to be able to generated it.
+ godot_tools_build.build_project_editor_only(env_mono)