Commit Graph

195 Commits

Author SHA1 Message Date
2b67924a0b Mono/C#: Initial exporter support for AOT compilation 2019-11-15 03:22:18 +01:00
de7c2ad21b Mono/C#: WebAssembly support 2019-11-13 21:41:11 +01:00
8a0c0371d4 C#: Fix regression from #32732 caused a crash on domain reload 2019-10-12 21:27:56 +02:00
3cc94b2c0b Mono: Fix template build after #32732 2019-10-11 15:17:36 +02:00
8c438a2197 C#: Fix detection of outdated release Godot API assemblies 2019-10-11 01:46:06 +02:00
763a4d8402 Merge pull request #32401 from neikeq/Kisaama!
Mono: Don't compare API hashes on release builds
2019-09-28 03:31:37 +02:00
1509890dbc Mono: Don't compare API hashes on release builds
API hashes cannot be calculated on release builds, as bindings information is lacking. Therefore, we should not be comparing it with the generated glue hash as they will never match.
2019-09-28 01:07:57 +02:00
e067a54988 Merge pull request #32353 from neikeq/yamero
Mono: Improve API assembly load error message on exported games
2019-09-26 07:31:03 +02:00
0a10e07124 Merge pull request #32352 from neikeq/issue-32237
Mono: Don't use project settings for debugger agent on exported games
2019-09-26 07:29:25 +02:00
2325fb11a8 Mono: Improve API assembly load error message on exported games 2019-09-25 22:32:39 +02:00
5ff4e0516b Mono: Don't use project settings for debugger agent on exported games 2019-09-25 22:03:24 +02:00
dec10dd776 Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
95c685143a C#: Make sure cs_glue_version is present when building export templates 2019-09-20 17:41:20 +02:00
3dcd7e54f4 Mono: Fix unable to create log file due to str_format bug 2019-09-08 19:40:17 +02:00
5a6070dde3 Mono: Force preemptive thread suspend mode as a temporary workaround 2019-08-30 01:33:50 +02:00
538328898b Style: Fix copyright headers in new files 2019-08-28 09:19:52 +02:00
aa805e2699 Fix 'android_mono_config.gen.cpp' not compiled first time it's generated 2019-08-26 17:46:57 +02:00
8995d95da0 Merge pull request #31347 from neikeq/monodevelop-addin
C#: Add Ide Connection library and server for the editor
2019-08-14 11:39:41 +02:00
c55ce204b3 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'modules/mono'
And 'CRASH_*_MSG' as well.

Also make error messages puntuation and quotation more consistent.
2019-08-09 12:13:21 +02:00
0b94203a79 C#: Add Ide Connection library and server for the editor
This will be used for communicating between the Godot editor and external IDEs/editors, for things like opening files, triggering hot-reload and running the game with a debugger attached.
2019-08-04 01:57:53 +02:00
c9befa63d2 Mono: Don't try to update project assemblies from project manager
Previously, when running the project manager, we would try to load the API assemblies from the project and fail because we were not editing any project. This would make us try to copy the prebuilt API assemblies to the project. Since there is no project, it would try to copy them to the executable location. This would fail if Godot doesn't have permissions to write to that location.
This commit fixes that by instead trying to load the prebuilt API assemblies in the first place, if running the project manager.
2019-07-25 17:52:45 +02:00
513cc78f85 Mono: Add option to keep running after unhandled exceptions
By default, an unhandled exception will cause the application to be terminated; but the project setting `mono/unhandled_exception_policy` was added to change this behaviour.
The editor is hard-coded to never terminate because of unhandled exceptions, as that would make writing editor plugins a painful task, and we cannot kill the editor because of a mistake in a thirdparty plugin.
2019-07-24 23:19:15 +02:00
0197d86ab4 Mono: Fix editor API assembly not being updated
If both the core and editor API assemblies are missing or out of sync, Godot will only update the former and then abort when trying to load them again because the latter was not updated. Godot will update it correctly the next time it's started, but this should not be needed and it should work the first time. This commit fixes that.
2019-07-22 00:16:24 +02:00
ec679dfffa Fix mono module build errors for release templates 2019-07-20 15:52:26 +02:00
e59ac40712 Mono: Better handling of missing/outdated API assemblies
Remove the old API assembly invalidation system. It's pretty simple since now the editor has a hard dependency on the API assemblies and SCons takes care of prebuilding them.
If we fail to load a project's API assembly because it was either missing or outdated, we just copy the prebuilt assemblies to the project and try again. We also do this when creating the solution and before building, just in case the user removed them from the disk after they were loaded.
This way the API assemblies will be always loaded successfully. If they are not, it's a bug.

Also fixed:

- EditorDef was behaving like GlobalDef in GodotTools.
- NullReferenceException because we can't serialize System.WeakReference yet. Use Godot.WeakRef in the mean time.
2019-07-14 19:17:07 +02:00
d2e620b8fc Merge pull request #30463 from neikeq/fix-search-dirs
Fix export templates ignoring assemblies in 'res://.mono/assemblies'
2019-07-09 21:59:32 +02:00
df6d1656fe Fix export templates ignoring assemblies in 'res://.mono/assemblies' 2019-07-09 16:49:02 +02:00
069af23bdb Mono: Fix build errors with tools=no 2019-07-08 18:07:20 +02:00
5ed3d34cd9 Fix --generate-mono-glue bug when directory doesn't exist
DirAccess::get_full_path(path) only works if the path exists. Implement our own abspath function.
2019-07-08 18:07:15 +02:00
270af6fa08 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.
2019-07-05 09:38:23 +02:00
9f1a8ce6a2 Mono: Android build and shared libraries fixes
Fix location of Mono's shared libraries.
Fix build failing if the directory 'platform/android/java/libs/{target}/{abi}' doesn't exist.
2019-07-03 17:48:12 +02:00
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
14df9e5cb2 Android build and export for the mono module 2019-06-03 17:09:24 +02:00
e2375f487c Merge pull request #29079 from neikeq/oopsie
Fix C# build error in MarshalUtils debug code
2019-05-21 19:54:34 +02:00
9b76c56098 Fix C# build error in MarshalUtils debug code 2019-05-21 19:09:00 +02:00
66b930a266 Replace call to 'mono_runtime_object_init' with manual ctor invoking 2019-05-21 00:06:04 +02:00
5a4bf4f369 C#: Marshalling support for IEnumerable<> and IDictionary<,>
Also fixed the hint string of exported members.
2019-05-18 19:39:56 +02:00
470b80cc55 C#: Support resource type hint in exported arrays
- Elements of types like PackedScene will display with the special editor for such type.
2019-04-29 21:20:05 +02:00
554c0ea90b Merge pull request #28423 from neikeq/dont-forget-to-think-a-name-for-this-branch
C#: Deprecate accessor methods and generate correct int and float types
2019-04-29 16:56:25 +02:00
791e1294c3 Mono: Lazily load scripts metadata file
- Only load the scripts metadata file when it's really needed. This way we avoid false errors, when there is no C# project,  about missing scripts metadata file.
2019-04-26 19:53:44 +02:00
c20a3823a2 C# bindings generator cleanup
- Normal log messages are no longer warnings.
- BindingsGenerator is no longer a singleton.
- Added a log function.
2019-04-25 20:34:28 +02:00
d93c354807 Fix invalid mono log file name on Windows 2019-04-24 18:52:03 +02:00
8759c0e31a Mono: Use exit(status) instead of abort() in exception hook 2019-04-18 15:01:50 +02:00
20e5e2fec7 Mono: Logging improvements
- The default log level in debug builds is now 'info' instead of 'debug'.
- Add option to specify a different log level with the 'GODOT_MONO_LOG_LEVEL' environment variable.
- The name of log files is now a readable date and time.
- Always print the log file path (previously it was printed only it in verbose mode).
2019-04-17 23:03:32 +02:00
918de768a5 Merge pull request #27711 from neikeq/ifdef-clang-tidy
Replace a few #if/#elif with #ifdef and "#elif defined"
2019-04-08 12:24:30 +02:00
480d4c6fba C#: Support type hints for exported Arrays
Added the code for Dictionary as well, but it's not yet supported by the Godot inspector.
2019-04-06 12:14:43 +02:00
187e6ae26d C#: Add marshalling support for IEnumerable and IDictionary
Added constructor that takes IEnumerable for Array and IEnumerable<T> for Array<T>.
Added constructor that takes IDictionary for Dictionary and IDictionary<TKey, TValue> for Dictionary<TKey, TValue>.
2019-04-06 12:14:37 +02:00
ad2127a3e8 Replace a few #if/#elif with #ifdef and "#elif defined" 2019-04-05 23:41:51 +02:00