Commit graph

1086 commits

Author SHA1 Message Date
mega-bit
93f297e1d5 Fix typos in GodotSharp code docs
(cherry picked from commit 0ca96ae2c1)
2020-07-24 10:31:57 +02:00
Ignacio Etcheverry
accc30e5e0 C#: Fix restore not called when building game projects
(cherry picked from commit 4a30289eee)
2020-07-24 10:31:57 +02:00
Aaron Franke
e10a1e078f
[3.2] Add C# XML documentation to core C# math types 2020-07-21 21:22:54 -04:00
Andy Maloney
502a3d580f Remove override keyword from csharp_script.h to fix build errors
Fixes godotengine/godot#40572
2020-07-21 13:17:58 -04:00
endlesstravel
13d4813ddf fix crash when pass null in print array in GD.print
fix crash when pass null in print array in GD.print 2

fix crash when pass null in print array in GD.print 3

fix space

(cherry picked from commit d2461bad63)
2020-07-03 15:38:07 +02:00
Rémi Verschelde
d6ff55f30b
Merge pull request #39784 from neikeq/3.2-visualstudio-support
[3.2] C#: Add Visual Studio support
2020-06-26 20:49:35 +02:00
Ignacio Etcheverry
c682410379 Mono/C#: Fix unhandled exception not being printed
For some reason `mono_unhandled_exception` is not
printing the exception as its comment claims.
Use `mono_print_unhandled_exception` instead.

(cherry picked from commit f87ae395ee)
2020-06-26 08:10:24 +02:00
Rémi Verschelde
c8586d3837
Merge pull request #39840 from neikeq/3.2-use-/restore-instead-of-/t-restore
[3.2] Mono/C#: Use /restore instead of /t:restore when building
2020-06-26 08:08:40 +02:00
Ignacio Etcheverry
abc453f9b6 [3.2] Mono/C#: Use /restore instead of /t:restore when building
Documentation recommends not to use /t:restore
together with other targets (like /t:build),
as it messes with the environment.
2020-06-25 23:57:44 +02:00
Ignacio Etcheverry
7af6a4cc50 [3.2] Fix DebugPlay request handler ignoring BuildBeforePlaying
This must have been missed when backporting the new protocol to 3.2.
2020-06-25 21:20:44 +02:00
Ignacio Etcheverry
d0f365fe0f [3.2] C#: Fix completion request with case insensitive resource path
Sometimes Visual Studio documents have the root path all in upper case.
Since Godot doesn't support loading resource files with a case insensitive path,
this makes script resource loading to fail when the Godot editor gets code
completion requests from Visual Studio.
This fix allows the resource path part of the path to be case insensitive. It
still doesn't support cases where the rest of the path is also case insensitive.
For that we would need a proper API for comparing paths. However, this fix
should be enough for our current cases.
2020-06-23 21:04:08 +02:00
Ignacio Etcheverry
d8af79140e [3.2] C#: Add VisualStudio support 2020-06-23 21:01:54 +02:00
Rémi Verschelde
327479472e Revert "return boxed long when marshalling a godot int to mono runtime in dynamic contexts"
This reverts commit 42a31501a8.

It breaks compat as is and needs some further work before it can be
cherry-picked for 3.2.x.
2020-06-22 08:35:21 +02:00
Michael Belousov
42a31501a8 return boxed long when marshalling a godot int to mono runtime in dynamic contexts
(cherry picked from commit 60fcefba69)
2020-06-19 16:17:27 +02:00
Hugo Locurcio
88c22cb648 Document Mono-specific classes
This fully documents all Mono-specific classes.

(cherry picked from commit 24a8d43272)
2020-06-18 11:33:18 +02:00
Rémi Verschelde
bf913d6917 DocData: Skip language-specific ClassDoc without methods/constants
Removes the useless `@C#`, `@NativeScript` and `@VisualScript` entries.

(cherry picked from commit ba0db95909)
2020-06-18 11:29:28 +02:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
NutmegStudio
96a3b91eee Fixes building mono release templates
(cherry picked from commit a77f633161)
2020-06-04 12:09:40 +02:00
Maganty Rushyendra
e34929feaa Update Mono C# warning to reflect latest list of platforms supported
Simple fix for #38627. iOS (#20268) and HTML5 (#20270) removed from list of exceptions
for platforms supported in warning message.

(cherry picked from commit 3d03be7a56)
2020-06-04 12:09:39 +02:00
Ignacio Etcheverry
f0bc3482d4 Mono/C#: Don't try to load project assembly in project manager
This was causing an error message when launching the manager,
because there is no project assembly to load.

(cherry picked from commit d7e21ecd63)
2020-05-25 16:34:15 +02:00
Ignacio Etcheverry
0da84b50c0 Mono/C#: Fix values not updated in remote inspector
(cherry picked from commit 51e1614d28)
2020-05-25 11:46:03 +02:00
Ignacio Etcheverry
ce09d0c5e1 Add SCons option to not build C# solutions 2020-05-22 03:12:54 +02:00
Ignacio Etcheverry
6dfd80673a Mono/C#: Remove script load error about not a Godot.Object
Any C# file can be loaded as script and at load
time we don't yet know if it's actually meant to
be used as a script. As such, such an check can
result in a lot of false errors.

If the file is really meant to be used as a
script, an error would be printed later when
attempting to instantiate it any way.

(cherry picked from commit 38cd2152e6)
2020-05-20 11:41:01 +02:00
pepegadeveloper123
23d51ac325 Fix inherited C# scene not inheriting parent's fields (3.2)
When a child scene inherits a parent scene with a C# root node, the
parent scene's export variables appear to assume values set in the
parent scene, in the child scene's Inspector. However, when the child
scene is played, the parent scene's export variables assume default
values.
When a node is created, it inherits its parent C# script's fields from
the map CSharpScriptInstance::script->member_info. However this map was
not initialized outside the editor, and this commit ensured it is. This
fixes issues #36480 and #37581.
This is a manual backport of PR #38638 for 3.2.
2020-05-16 11:18:58 +02:00
Ignacio Etcheverry
3928fe200f [3.2] C#: Support for building with the dotnet CLI
By adding a reference to the 'Microsoft.NETFramework.ReferenceAssemblies' nuget
package, we can build projects targeting .NET Framework with the dotnet CLI.
By referencing this package we also don't need to install Mono on Linux/macOS
or .NET Framework on Windows, as the assemblies are taken from the package.
2020-05-11 19:48:50 +02:00
Ignacio Etcheverry
683e19306e Mono: Use msbuild instead of nuget.exe for restoring
- Make GodotTools output directly to the SCons output directory.
- Removed xbuild_fallback from the build system.

(cherry picked from commit b61ffef0ab)
2020-05-11 11:01:13 +02:00
Ignacio Etcheverry
34132d2f67 Mono: Fix hot-reloading of nested classes
(cherry picked from commit e0a001549e)
2020-05-11 11:01:13 +02:00
Ignacio Etcheverry
fb2e00a854 [3.2] C#: Rewrite GodotTools messaging protocol 2020-05-10 21:05:00 +02:00
Nannaquin
9e4de37e88 Fix growMargin() not returning modified Rect2/Rect2i
(cherry picked from commit 0ac6f4c40b)
2020-05-01 10:56:58 +02:00
Ignacio Etcheverry
8cdcb410e0 Mono/C#: Fix load hook not called for some assemblies on domain reload
(cherry picked from commit f5510262bc)
2020-04-27 10:15:24 +02:00
Ignacio Etcheverry
a98d44f654 C#: Fix always saving copy of csproj even with no changes
This was a regression from 93d7ec8836 (#38110).
Mono's old implementation of Microsoft.Build hardcodes HasUnsavedChanges to
always return true.
This workaround can be reverted once we switch to official Microsoft.Build.

(cherry picked from commit 81f13f6171)
2020-04-27 10:15:07 +02:00
Ignacio Etcheverry
6aca932659 C#: Revert marshalling of IDictionary/IEnumerable implementing types
Added marshalling for `System.Collections.Generic.List<T>` and
`System.Collections.Generic.Dictionary<TKey, TValue>`.
2020-04-23 15:36:01 +02:00
Ignacio Etcheverry
dfdb7bdc87 Mono/C#: Fix assemblies being reloaded a second time unnecesarily
(cherry picked from commit c9882e61e2)
2020-04-23 11:34:42 +02:00
Ignacio Etcheverry
cf729f2111 Mono/C#: Allow exporting System.Array of type Godot.Object
(cherry picked from commit 0fec3cb5ed)
2020-04-23 11:17:23 +02:00
Ignacio Etcheverry
317d8decad Mono/C#: Allow debugging exported games
- Include PDB files in exported games.
- Release export templates also allow debugging now.

Right now the only way to enable debugging in exported games is with the  environment variables, which may be cumbersome or not even possible on some platforms.

(cherry picked from commit 71fc87e101)
2020-04-23 11:15:35 +02:00
Ignacio Etcheverry
08f41f474b C#: Save copy of sln and csproj before applying fixes
(cherry picked from commit 93d7ec8836)
2020-04-23 11:14:57 +02:00
Rémi Verschelde
cb1366f006 Mono: Fix include for Android support
This was a typo in #37153.

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 408fab8442)
2020-04-18 22:02:07 +02:00
Ignacio Etcheverry
445f1c6e7b Mono/C#: Add iOS support
Right now, games only work on devices when exported with FullAOT+Interpreter.
There are some issues left that need to addressed for FullAOT alone. Right now,
it's giving issues with the Godot.NativeCalls static constructor.
2020-04-14 18:03:10 +02:00
Ignacio Etcheverry
6b38fe691a Mono/C#: Fix MinGW build not supporting .lib libraries
MinGW should support both its own format `.a` and MSVC's format `.lib`, but Mono's module was only using the former. With this change it's now possible to build with MinGW and link the official Mono for Windows which is built with MSVC.
2020-04-14 18:03:10 +02:00
Hugo Locurcio
dd4569f15c Remove syntax highlighting for C# verbatim strings due to bugs
This closes #32336.

(cherry picked from commit 49efd6093e)
2020-04-06 18:18:38 +02:00
Ivan.Shakhov
66e4c8be23 fix RiderPathLocator - searching for toolbox on Mac
(cherry picked from commit dc16b8742a)
2020-04-06 18:15:20 +02:00
Ignacio Etcheverry
bda993dd79 C#: Fix uses of old Configuration names
(cherry picked from commit 66c0b7ce98)
2020-04-06 18:14:07 +02:00
Andrii Doroshenko (Xrayez)
8fedcfbed2 Generate command line help text for mono module
(cherry picked from commit 94b6c1363c)
2020-03-25 11:38:54 +01:00
Ivan.Shakhov
9d0518cf80 Fix warning: Property not found: mono/editor/editor_path_optional (#36995)
(cherry picked from commit 05946be2f1)
2020-03-25 11:38:54 +01:00
Ignacio Etcheverry
d46fcbb16a C#: Replace uses of old Configuration and update old csprojs
(cherry picked from commit 1b634785b5)
2020-03-25 11:38:54 +01:00
Ivan Shakhov
b874e84147 reorder solution configurations + migration
(cherry picked from commit ce01b83c4a)
2020-03-25 11:38:54 +01:00
Ignacio Etcheverry
d1a5f8dbf2 [3.2] Sync csproj when files are changed from the Godot FileSystem dock 2020-03-18 17:57:45 +01:00
Phischermen
69c1805735 Added parameters to Load()
(cherry picked from commit 1b0819bd59)
2020-03-06 23:55:25 +01:00
Rémi Verschelde
4c325c0732 Mono: Fix detection of Apple platforms in build script
(cherry picked from commit 5b040ef2e8)
2020-03-06 23:51:26 +01:00
Ivan Shakhov
88f0cd0b27 On Windows find Rider installed for CurrentUser
(cherry picked from commit c95e20a089)
2020-03-04 12:40:15 +01:00
Raul Santos
447acafa97 Fix missing null check in Mono Binding of GD.print
(cherry picked from commit 6b9c22542f)
2020-03-04 12:40:15 +01:00
Ivan Shakhov
f0b63b47aa use Rider MSBuild on Windows, when Rider is selected as external editor
(cherry picked from commit a9c2ab81cf)
2020-03-04 12:40:14 +01:00
Ivan Shakhov
8337cc5f7d Support toolbox custom "Tools install location", by reading .settings.json
(cherry picked from commit 33af53c1a6)
2020-03-04 12:40:14 +01:00
Rémi Verschelde
57de8397b2 Fix Mono check for unsafe object references
(cherry picked from commit 09534e2922)
2020-02-14 16:10:06 +01:00
Raul Santos
0fb35401d4 Avoid going out of bounds in IsSubsequenceOf
Closes #35598

(cherry picked from commit 4b79ef5ebe)
2020-02-14 16:03:18 +01:00
Aaron Franke
9a396a4e07 [Mono] Basis/Transforms Array operator comments and improvements
The behavior for Basis and Transform2D is unchanged, and Transform gets new behavior. All of the behavior is identical to GDScript's behavior. 

(cherry picked from commit 0a39c7b354)
2020-02-14 15:53:59 +01:00
Fabián L
04cfcb3ba0 Fixed GetNodeOrNull<T>
GetNodeOrNull<T> was using GetNode instead of GetNodeOrNull

(cherry picked from commit f595486076)
2020-02-06 13:02:07 +01:00
Rémi Verschelde
c96f08dc86
Merge pull request #35527 from neikeq/issue-35259
Mono/C#: Fix _update_exports possible crash with Reference types
2020-01-24 21:51:57 +01:00
Rémi Verschelde
75ab07546b
Merge pull request #35524 from neikeq/issue-35496
Fix C# preprocessor infinite loop and incorrect parsing of `#if!`
2020-01-24 21:51:38 +01:00
Ignacio Etcheverry
966a126186 Mono/C#: Fix _update_exports possible crash with Reference types
The code was attempting to dynamic cast the native instance to Reference after
the managed instance was disposed. As the managed instance acts as a Ref,
the native instance was freed during that disposal.
This made the dynamic cast fail and we attempted to memdelete a second time.

The fix is to make the dynamic cast before disposal.
2020-01-24 18:28:40 +01:00
Ignacio Etcheverry
0604b1839d Fix C# preprocessor infinite loop and incorrect parsing of #if! 2020-01-24 17:53:17 +01:00
Rémi Verschelde
55f580b24a
Merge pull request #35491 from neikeq/issue-35450
Mono/C#: Lighten up unsafe reference checks
2020-01-23 23:06:58 +01:00
Ignacio Etcheverry
55b2e58a98 Mono/C#: Lighten up unsafe reference checks
Because of the weird case with multi-threading and ResourceLoader, it can be the case that a resource is GCed while being referenced again in the main thread. In such cases, a new unsafe reference is created before the finalizer thread removes the previous one.
2020-01-23 21:23:32 +01:00
Rémi Verschelde
cadf946863
Merge pull request #35478 from neikeq/issue-32260
Mono/C#: Add setting to include I18N assemblies in the exported game
2020-01-23 18:24:15 +01:00
Ignacio Etcheverry
59ec19d5a8 Mono/C#: Add setting to include I18N assemblies in the exported game 2020-01-23 17:47:09 +01:00
Rémi Verschelde
b75fff5a56
Merge pull request #35473 from neikeq/default-to-net47
Mono/C#: Default to net47 for new projects
2020-01-23 17:23:33 +01:00
Ignacio Etcheverry
82b0899e54 Mono/C#: Add Basis.Slerp, update Quat.Xform and add some math checks 2020-01-23 16:13:28 +01:00
Ignacio Etcheverry
d9ff5f7fc2 Mono/C#: Default to net47 for new projects 2020-01-23 15:57:47 +01:00
Ignacio Etcheverry
d53c15b12c Make script class parser errors to not abort the build
As our script class parser is error prone, we should not impede the build from continuing because of a parsing error.
This should be reverted in the future once we switch to Roslyn.
2020-01-21 20:07:26 +01:00
Ignacio Etcheverry
378fc592b1 Add dummy preprocessor for the C# script class parser
No attempts are made at conditional compilation. The main if branch is always assumed to be true.
2020-01-21 19:57:38 +01:00
Ignacio Etcheverry
e4330e33e6 Mono/C#: Fix error when parsing nested generics
Also fixed the editor not including the parse error message in the error.
2020-01-20 19:08:08 +01:00
Ignacio Etcheverry
a6105c8ea0 Fix ClassDB API portability with some android and editor classes
- `EditorNavigationMeshGenerator` was being registered as part of the Core API,
even after d3f48f88bb. We must make sure to
set Editor as the current ClassDB API type before creating an instance.

- The `VisualScriptEngineSingleton.constant` property has a property hint string
that's different between tools and non-tools builds. This commit makes the
hint string to no longer be set in `_bind_methods`, and to instead set it in
`_validate_property`. This way it's ignored when calculating the API hash.

- `JavaClassWrapper` is now registered in ClassDB on all platforms,
using a dummy implementation on platforms other than Android.
This fixes API portability between Android and other platforms.

- Updated `--class-db-json` command to ignore non-virtual methods that start
with an underscore (see: 4be87c6016).
2020-01-19 20:15:13 +01:00
Ignacio Roldán Etcheverry
1191d26ddc
Merge pull request #35208 from neikeq/mono-lazy-thread-attach
Mono/C#: Script interface calls now attach the current thread
2020-01-16 21:27:08 +01:00
Ignacio Etcheverry
d68b9c20d6 Mono/C#: Script interface calls now attach the current thread
Added guards to all C# script interface calls to attach the current thread
for the current scope if the thread is not already attached.
This is far from ideal, as attaching the thread is not cheap and all managed
thread local storage is lost when we detach the thread at the end of the calls.
However, it's the best we can do for now to avoid crashing
when an unattached thread tries to interact with C# code.
2020-01-16 17:47:36 +01:00
Ignacio Etcheverry
1a40f250bd Mono/C#: Fix false positive in unsafe reference checks 2020-01-15 23:46:42 +01:00
Rémi Verschelde
9b8d1383ce Mono: Fix parsing assembly names as UTF-8
Fixes #27185.
2020-01-15 11:51:03 +01:00
Ignacio Etcheverry
a6a5ef0fd6 Mono/C#: Add error checks to detect possible Reference leaks 2020-01-13 21:00:07 +01:00
Ignacio Etcheverry
ea737db43c Mono/C#: Fix _update_exports() leaking temporary Object/Node instances 2020-01-13 20:58:46 +01:00
dankan1890
51c601d2e3 [Mono]: the C# script icon is now visible in the editor. 2020-01-03 22:49:22 +01:00
Rémi Verschelde
399e53e8c3
Merge pull request #34784 from neikeq/fix-hintpath-godottools
Mono/C#: Fix wrong HintPath for package in GodotTools
2020-01-03 16:34:08 +01:00
Ignacio Etcheverry
9ce0ddcf0d Mono/C#: Fix wrong HintPath for package in GodotTools 2020-01-03 15:53:16 +01:00
Aaron Franke
68ba2588b8
[Mono] Color arithmetic operators 2020-01-03 06:00:14 -05:00
Aaron Franke
0b3f1cc70a
[Mono] Make Sign methods consistent with GDScript and System.Math 2020-01-02 16:41:41 -05:00
Ignacio Etcheverry
c1ff3ef9e8 Mono/C#: Fix comment generation for non-constant param default
- Generate the comment for the param, even if the method has no description.
- Generate the comment outside the <summary> element.
2020-01-02 18:10:02 +01:00
Ignacio Etcheverry
f3aa793ba3 Mono/C#: Fix bindings generator with void vararg methods
Commit 4d727f1ee6 made it possible for vararg
methods to return void. This broke the C# bindings generator which was
assuming in one place that vararg methods always return Variant.
2020-01-02 18:02:48 +01:00
Ignacio Etcheverry
844a8d215b Mono/C#: Make 'GD.Print' and its variants fallback to 'ToString()'
Up until now, 'GD.Print' would convert parameters first to
Variant and only then to String. This meant parameters that cannot be
converted to Variant would be printed as "Null".
This commit makes 'GD.Print' fallback to 'System.Object.ToString()'
if the parameter could not be converted to Variant.
The same applies to all 'GD.Print' variants:
'GD.PrintS', 'GD.PrintT', 'GD.PrintErr' and 'GD.PrintRaw'.
2020-01-02 13:54:20 +01:00
Ignacio Etcheverry
ea75ea50d2 Mono/C#: Fix GD.PrintErr now showing in the Output panel 2020-01-02 13:13:22 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Ignacio Roldán Etcheverry
7fddf5eb7c
Merge pull request #34699 from van800/godot-guid
Custom property for Godot generated project
2019-12-31 20:28:14 +01:00
Rémi Verschelde
edf2ed5e50
Merge pull request #34582 from timothyqiu/forward-decl
Cleans up headers included in editor_node.h
2019-12-30 16:28:47 +01:00
Ivan Shakhov
af2e6e12d1 add custom property to csproj, which identifies that project is generated by Godot 2019-12-30 16:16:47 +01:00
Dan Kramer
1b26f2c505 Fix msbuild target argument 2019-12-29 17:03:21 -05:00
Ignacio Etcheverry
86274b9fc9 Mono/C#: Re-structure API solution and GodotTools post-build target
Previously we had a placeholder solution called 'Managed' to benefit from
tooling while editing the a part of the C# API.
Later the bindings generator would create the final 'GodotSharp' solution
including these C# files as well as the auto-generated C# API.
Now we replaced the 'Managed' solution with the final 'GodotSharp' solution
which is no longer auto-generated, and the bindings generator only takes
care of the auto-generated C# API.
This has the following benefits:
- It's less confusing as there will no longer be two versions of the same file
(the original and a generated copy of it). Now there's only one.
- We no longer need placeholder for auto-generated API classes, like Node or
Resource. We used them for benefiting from tooling. Now we can just use the
auto-generated API itself.
- Simplifies the build system and bindings generator. Removed lot of code
that is not needed anymore.

Also added a post-build target to the GodotTools project to copy the output to
the data dir. This makes it easy to iterate when doing changes to GodotTools,
as SCons doesn't have to be executed anymore just to copy these new files.
2019-12-28 20:48:55 +01:00
Ignacio Roldán Etcheverry
318c693516
Merge pull request #34595 from van800/mac_rider
Fix search for Rider path on Mac
2019-12-26 02:16:55 +01:00
Ignacio Roldán Etcheverry
f90e8c41a2
Merge pull request #34604 from neikeq/issue-27674
Mono/C#: Fix memory leak with new Reference instances created from C#
2019-12-25 20:47:07 +01:00
Ignacio Etcheverry
0ef635c0e3 Mono/C#: Fix memory leak with new Reference instances created from C# 2019-12-25 19:33:59 +01:00
Ivan.Shakhov
682dd04b2d fix Rider path on Mac 2019-12-25 00:14:31 +01:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Dan Kramer
097d1c9383 add suggested fix 2019-12-21 13:26:29 -05:00
Rémi Verschelde
a10449bbbc
Merge pull request #34514 from neikeq/remove-dep-on-mono-posix
Mono/C#: Remove GodotTools dependency on the Mono.Posix assembly
2019-12-21 17:07:18 +01:00
Ignacio Etcheverry
5a3ccf4f14 Mono/C#: Remove GodotTools dependency on the Mono.Posix assembly
MSBuild on Windows uses the system .NET Framework BCL instead of Mono's. Because
of this, it may not be able to find the Mono.Posix assembly, so it's better
not to depend on it. We needed Mono.Posix to call Syscall.access, so we can
replace this with an internal call that does the same in C++.
2019-12-21 15:55:45 +01:00
Rémi Verschelde
2a4c528d06
Merge pull request #34465 from neikeq/no-hardcode-debugger-wait
Mono/C#: Remove hard-coded debugger wait at initialization
2019-12-19 21:27:59 +01:00
Ignacio Etcheverry
f3c6c63b94 Mono/C#: Remove hard-coded debugger wait at initialization
Up until now debug builds would always wait up to 500 ms during initialization
to give time for debuggers to attach to the game.
We no longer want this as it increases startup time unnecesarily.
The way forward is to setup the debugger agent as client instead of server.
This way it's the game that connect to the debugger, not the other way around.
If server mode is still desired, suspend=y can be used to indefinitely wait
for the debugger to attach. This all can be specified with the environment
variable 'GODOT_MONO_DEBUGGER_AGENT' when launching the game.
2019-12-19 17:07:20 +01:00
Ignacio Etcheverry
98dc07f25f Mono/C#: Fix Variant -> MonoString* when type is Variant:NIL
`Variant::operator String()` returns "Null" if the type is `Variant:NIL`.
We must consider that and return a null `MonoString*` instead when marshalling.
This was also causing a "Null" error to be displayed when exporting a game
because null string members would be set to "Null" during hot-reload.
2019-12-19 16:51:32 +01:00
Rémi Verschelde
1c6b9bfdff Mono: Copy native and btls libs on macOS 2019-12-18 08:39:37 +01:00
Ignacio Etcheverry
20d7013c60 Mono/C#: Fix project export and fix FindLast/GetFile regression
d09193b08a introduced a regression in
StringExtensions.FindLast. StringExtensions.GetFile was also affected as it
relies on FindLast. This in turn broke the project exporter as it uses GetFile.
The cause of the regression is that now FindLast is calling LastIndexOf
with 'startIndex: 0'. This should be 'startIndex: str.Length - 1' instead.

Also fixed another regression in the project exporter:
de7c2ad21b moved 'GodotTools/GodotSharpExport.cs'
to 'GodotTools/Export/ExportPlugin.cs' and in doing so accidently reverted
the changes from commit e439581198.
2019-12-17 13:06:41 +01:00
Rémi Verschelde
c3ea4ea9b7
Merge pull request #34382 from van800/profiler
Allow attaching any external profiler, including JetBrains dotTrace
2019-12-16 22:00:36 +01:00
Ivan Shakhov
7c64779516 Allow attaching any external profiler, including JetBrains dotTrace 2019-12-16 20:34:30 +01:00
Rémi Verschelde
a866028a7a Mono: Enable threads suspend workaround on Windows
This appears to be necessary for current official builds cross-compiled
with MinGW from Linux, using Mono 6.6.0.160.

Follow-up to #31784, see #29812 for details.
2019-12-16 15:40:26 +01:00
Rémi Verschelde
12ee35737f
Merge pull request #34334 from neikeq/issue-33503
Mono/C#: Fix class parser bug with 'where T : struct'
2019-12-13 20:13:28 +01:00
Ignacio Etcheverry
f2a2293709 Mono/C#: Fix class parser incorrectly handling nested namespaces
It would incorrectly error thinking the nested namespace is being declared inside a struct/class. This was because of an incorrect nesting level being used for classes and structs.
2019-12-13 19:55:32 +01:00
Ignacio Etcheverry
c1ab956dd0 Mono/C#: Fix class parser bug with 'where T : struct'
The struct decl parsing was outdated. Make both struct decl and class declparsing share the same code.
2019-12-13 19:50:42 +01:00
Rémi Verschelde
9f68626fb2 doc: Sync classref with current source
Also apply clang-format.
2019-12-13 10:41:06 +01:00
Rémi Verschelde
d39284a65f
Merge pull request #34295 from aaronfranke/potato-knishes
[Mono] Fix string Find methods having reversed case sensitivity
2019-12-13 08:47:26 +01:00
Aaron Franke
d09193b08a
Fix string Find methods having reversed case sensitivity 2019-12-12 02:21:16 -05:00
Aaron Franke
5771f9959c
Mono formatting
No space for casting, add spaces inside braces, 4 space indentation, remove trailing indentation, remove BOM.
2019-12-11 16:32:47 -05:00
Rémi Verschelde
cd9d513285
Merge pull request #34181 from van800/rider
Support Rider as external editor for Godot mono version
2019-12-11 09:20:31 +01:00
Ivan Shakhov
8fbc9d33fd Support Rider as External Editor 2019-12-11 08:39:04 +01:00
Jonas
11258db001
Fix missing null checks in Mono Binding of GD
The print methods of mono binding was missing null checks for the params
2019-12-06 11:56:50 +01:00
Ignacio Roldán Etcheverry
6544a0e908
Merge pull request #34018 from dsge/show-template-directory-path-in-error-message
Make sure to include the path in the "Data template directory not found" error message
2019-12-05 14:17:23 +01:00
Ignacio Etcheverry
066ae9d83b Mono/C#: Several android fixes
- Added correct config file for android dllmaps.
- Fix __Internal DllImports with a dlopen fallback.
- Add missing P/Invoke functions and internal calls expected by the monodroid BCL and our custom version of the 'Android.Runtime.AndroidEnvironment' class (this last one can be found in the godot-mono-builds repo).
- Make sure to set 'btls' instead of 'legacy' as the default TLS provider on Android.
2019-12-04 19:03:42 +01:00
Ignacio Etcheverry
3797f19926 C#: Add Duplicate method to the Array and Dictionary bindings 2019-12-04 15:22:30 +01:00
dsge
81cae314b4 Make sure to include the path in the "Data template directory not found" error message 2019-11-30 15:44:18 +01:00
Rémi Verschelde
fa0e682027
Merge pull request #33982 from neikeq/issue-29349
Mono/C#: Add option to export assemblies outside of PCK
2019-11-29 11:37:18 +01:00
Ignacio Etcheverry
85d8c42763 Mono/C#: Fix crash on exported games that don't use C# 2019-11-29 01:35:46 +01:00
Ignacio Etcheverry
66de28eda8 Mono/C#: Add option to export assemblies outside of PCK
When using this options, assemblies will be saved in the Assemblies folder of the  data directory: 'data_AppName/Assemblies/'.
2019-11-29 00:36:05 +01:00
Rémi Verschelde
636bc5c32f
Merge pull request #33828 from neikeq/貴様
Mono/C#: Prevent SCons from building API solutions in parallel
2019-11-23 11:24:48 +01:00
Ignacio Etcheverry
ebdd2bc474 Mono/C#: Prevent SCons from building API solutions in parallel 2019-11-22 23:42:24 +01:00
Rémi Verschelde
c41c24562d Style: Add missing copyright headers 2019-11-22 08:37:09 +01:00
Ignacio Roldán Etcheverry
63b321dbbb
Merge pull request #33791 from neikeq/issue-33761
C#: Fix PathWhich on Windows when name already has extension
2019-11-21 21:34:12 +01:00
Ignacio Etcheverry
f91416d9ac C#: Fix PathWhich on Windows when name already has extension
Also make the Posix version of PathWhich check if the file has executable access.
2019-11-21 14:53:00 +01:00
Rémi Verschelde
73323a2838
Merge pull request #33763 from neikeq/issue-33725
Fix C# export error dialog showing up when it should not
2019-11-20 13:23:20 +01:00
Ignacio Etcheverry
d79aeca599 Fix C# export error dialog showing up when it should not 2019-11-20 13:07:26 +01:00
Ignacio Etcheverry
3f247ea507 Mono/C#: Bundle libmono-btls-shared.dll on Windows if it exists 2019-11-19 17:22:06 +01:00
Ignacio Etcheverry
008769aee9 C#: Throw NullReferenceException for null NodePath/RID params 2019-11-18 12:23:54 +01:00
Ignacio Etcheverry
8cbe4a3db4 Make C# internal calls return structs as ref parameters
The Mono IL interpreter's WebAssembly to native trampolines don't support passing structs by value, so we need to do it this way.

Also now we pass and return long, ulong, float and double as ref parameters as well. This is due to missing trampolines for float and long types. This is likely a temporary workaround that will be reverted in the future. The correct solution would be to patch 'mono/mini/m2n-gen.cs' when building the Mono runtime for WASM in order to generate the trampolines we need.
2019-11-15 03:22:25 +01:00
Ignacio Etcheverry
2b67924a0b Mono/C#: Initial exporter support for AOT compilation 2019-11-15 03:22:18 +01:00
Ignacio Etcheverry
de7c2ad21b Mono/C#: WebAssembly support 2019-11-13 21:41:11 +01:00
Ignacio Roldán Etcheverry
953f37f49b
Merge pull request #33249 from JoshLee0915/MonoHeadlessServer
Added missing server platform checks to template dir and shared lib copy in mono_configure.py
2019-11-12 14:57:29 +01:00
Rémi Verschelde
77816fea8b
Merge pull request #32477 from aaronfranke/equal-approx-separate
Make is_equal_approx separate and make == exact again
2019-11-07 14:54:15 +01:00
Aaron Franke
4922a48a9e
[Mono] Alphabetize Mathf 2019-10-29 10:10:24 -04:00
Rémi Verschelde
e96319c7f3
Merge pull request #32670 from aaronfranke/mono-plane
[Mono] Change Plane intersect methods to return nullable Vector3
2019-10-23 21:44:05 +02:00
JoshLee0915
cbd98d0fcf Added the server platform checks to template dir and shared lib copy 2019-10-21 20:47:24 -06:00
Aaron Franke
218f38c7ec
Expose is_equal_approx and restore == to be exact again
This commit changes behavior for GDScript and C#.

Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
2019-10-14 16:48:59 -04:00
Aaron Franke
86922ff70b
Make is_equal_approx separate for structures
This commit adds exposed behavior for C#
2019-10-14 16:46:54 -04:00
Ignacio Etcheverry
8a0c0371d4 C#: Fix regression from #32732 caused a crash on domain reload 2019-10-12 21:27:56 +02:00
Rémi Verschelde
3cc94b2c0b Mono: Fix template build after #32732 2019-10-11 15:17:36 +02:00
Ignacio Etcheverry
8c438a2197 C#: Fix detection of outdated release Godot API assemblies 2019-10-11 01:46:06 +02:00
Aaron Franke
643874f8ca
[Mono] Change Plane intersect methods to return nullable Vector3 2019-10-08 22:47:22 -04:00
Rémi Verschelde
f3f2fdfbab Mono: Fix detection of MsBuild from Visual Studio
This was a wrong check as an exit code of 0 means success,
not failure. It used to be fine as blocking mode always returned
-2, but this was changed in #32033 to return the exit code.

Fixes #32424.
2019-10-03 14:13:41 +02:00
Ignacio Roldán Etcheverry
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
Ignacio Etcheverry
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
Rémi Verschelde
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
Rémi Verschelde
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
Ignacio Etcheverry
2325fb11a8 Mono: Improve API assembly load error message on exported games 2019-09-25 22:32:39 +02:00
Ignacio Etcheverry
5ff4e0516b Mono: Don't use project settings for debugger agent on exported games 2019-09-25 22:03:24 +02:00
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
Rémi Verschelde
9c116f4f1d
Merge pull request #32223 from neikeq/cs_glue_version_fix
C#: Make sure cs_glue_version is present when building export templates
2019-09-20 17:46:34 +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
Rémi Verschelde
f9db6ad8c5
Merge pull request #31919 from m4gr3d/use_aar_for_custom_build
Leverage Android archive (AAR) file for Godot custom build
2019-09-19 20:22:09 +02:00
Chaosus89
46bb523db7 [Mono] Corrected rectangle intersection 2019-09-16 09:49:04 +03:00
Rémi Verschelde
24e1039eb6
Merge pull request #32045 from neikeq/fix-cannot-create-mono-log-file
Mono: Fix unable to create log file due to str_format bug
2019-09-08 22:31:52 +02:00
Ignacio Etcheverry
3dcd7e54f4 Mono: Fix unable to create log file due to str_format bug 2019-09-08 19:40:17 +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
fhuya
7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
iwek7
617797c47c Adds skip-breakpoints feature 2019-09-03 20:49:09 +02:00
Aaron Franke
f8b4cf0fc4
Check for exact equality before approximate equality 2019-09-01 14:02:14 -04:00
Ignacio Etcheverry
5a6070dde3 Mono: Force preemptive thread suspend mode as a temporary workaround 2019-08-30 01:33:50 +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
65d1b0b427
Merge pull request #31729 from aaronfranke/mono-color
[Mono] Various Color fixes and improvements
2019-08-28 21:29:47 +02:00
Rémi Verschelde
538328898b Style: Fix copyright headers in new files 2019-08-28 09:19:52 +02:00
Rémi Verschelde
185072015f
Merge pull request #31606 from toasteater/fix/nativescript-new-json-return-type
Fix the return type of NativeScript::new in API json
2019-08-28 09:15:40 +02:00
Aaron Franke
34ab6549b1
[Mono] Various Color improvements
I also slid in a fix to C++ Vector3 > and >=
2019-08-27 22:05:18 -04:00
Rémi Verschelde
92ead83913 Mono: Fix OSX build due to invalid function call 2019-08-27 09:48:54 +02:00
toasteater
e2121c97ae Make VarArg methods return types show up as Variant in API json
VarArg methods have the return type Object in the API json for GDNative. This
can cause undefined behavior in some language bindings due to lack of
documentation on VarArg methods' behavior.

This changes the MethodInfo of:

- CSharpScript::_new
- GDScript::_new
- PluginScript::_new
2019-08-26 16:36:51 +00:00
Ignacio Roldán Etcheverry
be99e7b68f
Merge pull request #31680 from neikeq/fix-android-gen-sources
Fix 'android_mono_config.gen.cpp' not compiled first time it's generated
2019-08-26 18:28:12 +02:00
Ignacio Etcheverry
aa805e2699 Fix 'android_mono_config.gen.cpp' not compiled first time it's generated 2019-08-26 17:46:57 +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
Rémi Verschelde
51d50e167d
Merge pull request #31094 from aaronfranke/vector-sign-mod-etc
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-23 09:07:47 +02:00
Ignacio Etcheverry
dae2a335c5 Make sure '.mono/metadata/' exists before creating file
Fixes #31549
2019-08-22 14:32:55 +02:00
Aaron Franke
092346d82b
Add Vector2/3 sign and posmod functions, misc additions
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
2019-08-17 18:31:55 -04: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
Hugo Locurcio
05daf5c78b
Always use lists for LIBS in SCons
This closes #31288.
2019-08-12 22:31:55 +02:00
Ignacio Etcheverry
bda461c2b1 Add C# language editor icon 2019-08-12 18:57:26 +02:00
Ignacio Roldán Etcheverry
3c78837218
Merge pull request #31322 from neikeq/mono-gitignore-override-sln
Make git no longer ignore solution files inside the mono module
2019-08-12 16:50:18 +02:00
Ignacio Etcheverry
33c0d47273 Make git no longer ignore solution files inside the mono module 2019-08-12 15:59:06 +02:00
Aaron Franke
85f13a0d24
Add Basis constants and format Transform constants 2019-08-09 11:34:54 -07: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
Aaron Franke
50fd2deede
[Mono] Make all structs seralizable 2019-08-07 18:34:52 -07:00
Rémi Verschelde
ba541bceca
Merge pull request #31077 from qarmin/coverity_bugs
Change some code proposed by Coverity and Cppcheck
2019-08-07 13:49:33 +02:00
qarmin
e0b5b21863 Add some code changes/fixes proposed by Coverity and Clang Tidy 2019-08-07 12:54:30 +02:00
Aaron Franke
a9c10450bd
[Core] [Mono] Optimize Wrap functions
Use is_zero_approx(), avoid a negative, and also rename "rng" to "range".
2019-08-04 20:38:38 -07:00
Ignacio Etcheverry
57fe284fe6 C#: Fix Color.ToHtml() 2019-08-04 05:04:39 +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
Aaron Franke
7dbbb5eac7
[Mono] Deprecate Set methods
These silently fail, so they should be removed. I accidentally added most of these last year, trying to make everything else consistent with Quat, sorry!

Also, a few tiny nitpicking changes are included, like whitespace and misspellings.
2019-07-28 17:49:22 -04:00
Ignacio Etcheverry
d54df7b904 C#: Fix Transform2D.AffineInverse() 2019-07-27 02:15:29 +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 Roldán Etcheverry
a82420fbe8
Merge pull request #30825 from neikeq/heya
Fix incorrectly updating csproj and not closing build issues file
2019-07-26 16:54:11 +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
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
Ignacio Etcheverry
c0cdbb7938 Mono: Fix regression: external editors not working on Windows 2019-07-24 23:19:24 +02:00
Ignacio Etcheverry
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
Chaosus
080c0bb7fe Added count method to String 2019-07-23 18:55:54 +03:00
Ignacio Etcheverry
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
Ignacio Roldán Etcheverry
4379395892
Merge pull request #30710 from neikeq/issue-30526
Fix mono module build errors for release templates
2019-07-20 16:20:49 +02:00
Ignacio Etcheverry
ec679dfffa Fix mono module build errors for release templates 2019-07-20 15:52:26 +02:00
Chaosus
6694c119d0 Added lerp_angles built-in function
Co-authored-by: Xrayez <https://github.com/Xrayez>
Co-authored-by: DleanJeans <https://github.com/DleanJeans>
2019-07-20 12:59:41 +03:00
Ignacio Roldán Etcheverry
7f3490c5e1
Merge pull request #30584 from neikeq/yatta
Mono: Better handling of missing/outdated API assemblies
2019-07-14 19:39:26 +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
unknown
f236b460e5 Some small fixes to warnings in python scripts 2019-07-11 22:26:04 +05:30
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 Roldán Etcheverry
63c4d5af72
Merge pull request #30485 from neikeq/remove-frameworkpathoverride-from-scons
SCons no longer passes FrameworkPathOverride to MSBuild
2019-07-10 13:35:40 +02:00
Ignacio Etcheverry
ace0c6ce38 Fix IndexOutOfBounds in FindMsBuildToolsPathOnWindows 2019-07-10 13:30:03 +02:00
Ignacio Etcheverry
c0a4f12fcc SCons no longer passes FrameworkPathOverride to MSBuild 2019-07-10 13:19:52 +02:00
Ignacio Etcheverry
2da83a278b Mono: Add missing GodotTools.sln 2019-07-10 12:30:12 +02:00
Ignacio Etcheverry
d3f48f88bb Fix EditorNavigationMeshGenerator registered in Core API
Also added an option to output a json file with all the ClassDB registered classes and its members. This can be used to compare the API of two different builds by a simple diff.
2019-07-09 23:33:29 +02:00
Rémi Verschelde
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
Ignacio Etcheverry
4af03e52bd Make SCons check for System MSBuild before Mono's 2019-07-09 16:49:06 +02:00
Ignacio Etcheverry
df6d1656fe Fix export templates ignoring assemblies in 'res://.mono/assemblies' 2019-07-09 16:49:02 +02:00
Rémi Verschelde
29ca79bd68
Merge pull request #30428 from neikeq/gitcheckout-b
Misc Mono Fixes
2019-07-09 08:26:48 +02:00
Ignacio Etcheverry
069af23bdb Mono: Fix build errors with tools=no 2019-07-08 18:07:20 +02:00
Ignacio Etcheverry
dd22cc7527 C#: Fix some crashes during assemblies reloading 2019-07-08 18:07:20 +02:00
Ignacio Etcheverry
aa3b8f7dbb Fix Godot.Object.ToString() infinite recursion
Should not be using Variant to String conversion as that would call ToString() again
2019-07-08 18:07:20 +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
qarmin
9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +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
Rémi Verschelde
e4699aa047
Merge pull request #30293 from neikeq/issue-29734
Mono: Fix Array IndexOutOfRangeException not being thrown
2019-07-03 21:26:25 +02:00
Rémi Verschelde
e1478b7a87
Merge pull request #30292 from neikeq/android_fixes
Mono: Android build and shared libraries fixes
2019-07-03 21:26:12 +02:00
Ignacio Etcheverry
3abe6961dc Mono: Fix Array IndexOutOfRangeException not being thrown 2019-07-03 17:56:08 +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
Rémi Verschelde
b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00