Commit graph

231 commits

Author SHA1 Message Date
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Ignacio Etcheverry c4fa027614 Improve C# bindings generator errors for default param values 2019-09-24 15:09:54 +02:00
Ignacio Etcheverry 95c685143a C#: Make sure cs_glue_version is present when building export templates 2019-09-20 17:41:20 +02:00
Ignacio Roldán Etcheverry da2af72d73
Merge pull request #32022 from neikeq/fix-mono-export-windows-backslash
Mono: Fix PCK assembly paths when exporting from Windows
2019-09-07 21:39:27 +02:00
Ignacio Etcheverry 93897fb884 Fix missing method for internal_MonoWindowsInstallRoot 2019-09-07 02:31:01 +02:00
Ignacio Etcheverry e439581198 Mono: Fix PCK assembly paths when exporting from Windows
Assembly paths were written to PCK files with backslash as path separator and PackedData only supports forward slash.
This would make exported games unable to find the assemblies.
2019-09-07 02:19:25 +02:00
Rémi Verschelde a5e0aa32d9
Merge pull request #31770 from neikeq/supercedes-31008
Fix GodotTools.ProjectEditor HintPaths for referenced packages
2019-08-29 21:16:49 +02:00
Ignacio Etcheverry 6d2883c9bf Fix GodotTools.ProjectEditor HintPaths for referenced packages 2019-08-29 18:19:01 +02:00
Rémi Verschelde 92ead83913 Mono: Fix OSX build due to invalid function call 2019-08-27 09:48:54 +02:00
Rémi Verschelde 57afa90f0c
Merge pull request #31652 from Calinou/csharp-alpha-dialog-android
Mention Android support in the C# alpha dialog message
2019-08-26 10:18:27 +02:00
Ignacio Etcheverry 3af8bd071e Set C# 7 as LangVersion for GodotTools and Godot API projects
This will make it harder for someone to accidentally commit code that requires a newer version.
2019-08-25 15:53:47 +02:00
Hugo Locurcio 27f5ab2d7b
Mention Android support in the C# alpha dialog message 2019-08-25 15:08:32 +02:00
lamonte 1df0e88ae8 default is only supported by 7.1, reverted to support 7.0 out of the box (no conflict) 2019-08-25 06:48:37 -05:00
Ignacio Etcheverry dae2a335c5 Make sure '.mono/metadata/' exists before creating file
Fixes #31549
2019-08-22 14:32:55 +02:00
Rémi Verschelde 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
Ignacio Etcheverry 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
Ignacio Etcheverry 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
Ignacio Roldán Etcheverry 6697ad2c4f
Merge pull request #30842 from neikeq/fix-custom-props-msbuild
Mono: Fix custom defines for Mono's MSBuild; remove xbuild
2019-07-26 18:33:52 +02:00
Ignacio Etcheverry 8821569689 Mono: Fix custom defines for Mono's MSBuild; remove xbuild
Mono's MSBuild and System/VisualStudio's MSBuild expect a different format for surrounding property values with quotes on the command line.

xbuild does not seem to support semicolons in property values from the command line: https://xamarin.github.io/bugzilla-archives/16/16465/bug.html
It's a good time to just remove xbuild support entirely.
2019-07-26 17:17:17 +02:00
Ignacio Etcheverry 4e84478f4e Fix incorrectly updating csproj and not closing build issues file 2019-07-25 21:06:40 +02:00
Ignacio Etcheverry c0cdbb7938 Mono: Fix regression: external editors not working on Windows 2019-07-24 23:19:24 +02:00
Ignacio Etcheverry 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
Ignacio Etcheverry 4061e132ff Mono: Add old TTRs to GodotTools 2019-07-11 13:59:06 +02:00
Ignacio Roldán Etcheverry 2c6daf73f3
Merge pull request #30502 from neikeq/chotto-matte-kudasai
Mono: Fix Api HintPath and update old game projects
2019-07-10 22:36:06 +02:00
Ignacio Roldán Etcheverry 1700ab9bc6
Merge pull request #30501 from neikeq/dispose-godotsharpexport
Mono: Fix null dereference in EditorExportPlatformAndroid
2019-07-10 22:35:54 +02:00
Ignacio Etcheverry 9eb0729a05 Mono: Fix Api HintPath and update old game projects
Fixed Api assembly references with more than one HintPath.
Also made the editor update old C# projects use the new Api assembly HintPaths.
2019-07-10 22:00:31 +02:00
Ignacio Etcheverry 2a8294ff24 Mono: Fix null dereference in EditorExportPlatformAndroid
We need to dispose the GodotSharpExport export plugin before the editor destroys EditorSettings. Otherwise, if the GC disposes it at a later time, EditorExportPlatformAndroid will be freed after EditorSettings already was, and its device polling thread will try to access the EditorSettings singleton, resulting in null dereferencing.
2019-07-10 21:51:47 +02:00
Ignacio Roldán Etcheverry c3da4f854d
Merge pull request #30486 from neikeq/fix-indexoutofbounds-msbuildfinder
Fix IndexOutOfBounds in FindMsBuildToolsPathOnWindows
2019-07-10 21:43:17 +02:00
Ignacio Roldán Etcheverry 8b778f6234
Merge pull request #30489 from neikeq/fix-nullexc-on-gengameproj
Mono: Fix null exception in GenerateGameProject
2019-07-10 15:40:25 +02:00
Ignacio Etcheverry caf20492cf Mono: Fix null exception in GenerateGameProject
Also fix pdb files for GodotTools.*.dll assemblies not being copied to the output directory.
2019-07-10 15:03:05 +02:00
Ignacio Etcheverry ace0c6ce38 Fix IndexOutOfBounds in FindMsBuildToolsPathOnWindows 2019-07-10 13:30:03 +02:00
Ignacio Etcheverry 2da83a278b Mono: Add missing GodotTools.sln 2019-07-10 12:30:12 +02:00
Ignacio Etcheverry 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
Ignacio Etcheverry 2c83255013 Fix C# bindings detection of abstract classes
ClassDB::can_instance was changed recently breaking our code, as the editor is not yet initialized. Check ClassInfo::creation_func directly.
2019-07-08 15:13:57 +02:00
Ignacio Etcheverry b0cbf4e2b2 Fix InvalidCastException when loading script metadata
Old value wasn't string so we have to keep that in mind
2019-07-08 15:12:04 +02:00
Ignacio Etcheverry aa9908e4f6 Script API methods must return Ref<T> instead of Reference*
ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
2019-07-05 09:38:28 +02:00
Ignacio Etcheverry 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
Ignacio Etcheverry 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
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Rémi Verschelde 89ce9a6f46 Mono: Fix -Wduplicated-branches warning 2019-06-15 18:01:34 +02:00
Ignacio Etcheverry 14df9e5cb2 Android build and export for the mono module 2019-06-03 17:09:24 +02:00
ShyRed 5dc50327cf Escape quote char for non-Windows OS
Quote char appears to be ignored by ProcessStartInfo on non-Windows operating systems, so it needs to be escaped.
2019-05-29 19:13:16 +02:00
ShyRed 60e711a115 Add Godot constants to Mono project builds
This adds constants to projects build via Godot Mono which allows project to conditionally react to different operating systems and 32/64 Bit architecture. Additionally .NET libraries could support multiple engines like Unity and Godot at the same time when compiled from Godot and reacting to definitions.
2019-05-26 08:07:55 +02:00
Ignacio Etcheverry 04ebf294f3 C#: Implement ScriptInstance::to_string
Create a blacklist of methods that must not be generated. Includes: "to_string", "_to_string" and "_init".
2019-05-24 00:40:20 +02:00
Rémi Verschelde 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
Ignacio Etcheverry 3380565e4b C#: Generate the correct integer and floating point types 2019-04-27 01:30:46 +02:00
Ignacio Etcheverry 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
Ignacio Etcheverry 340252727b C#: Mark generated property accessor methods as Obsolete
- Methods that act as accessors for properties in the same class (like `GetPosition` and `SetPosition` are for `Position`) are now marked as obsolete. They will be made private in the future.
2019-04-25 20:34:35 +02:00