Commit graph

643 commits

Author SHA1 Message Date
Ignacio Etcheverry
d93c354807 Fix invalid mono log file name on Windows 2019-04-24 18:52:03 +02:00
Rémi Verschelde
3610b4fd77
Merge pull request #28179 from neikeq/welp
Use StringBuilder in C# bindings generator
2019-04-22 11:52:30 +02:00
Ignacio Roldán Etcheverry
7be498499b
Merge pull request #27820 from ForLoveOfCats/master
Mono: Convert all items to string before printing
2019-04-20 04:12:22 +02:00
ForLoveOfCats
25f563c4c8 Mono: Convert all items to string before printing 2019-04-19 12:59:22 -04:00
Rémi Verschelde
b29df348e2
Merge pull request #28192 from akien-mga/doc-unused-demos
doc: Drop unused <demos> tag, sync classref
2019-04-19 12:50:42 +02:00
Rémi Verschelde
6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Ignacio Etcheverry
f64aa02933 Use StringBuilder in C# bindings generator
- Also fixed generation of empty summary comments when no comment should have been generated.
2019-04-19 02:11:39 +02:00
Ignacio Roldán Etcheverry
392f1491e1
Merge pull request #28161 from neikeq/exception-hook-no-abort
Mono: Use exit(status) instead of abort() in exception hook
2019-04-18 16:26:54 +02:00
Ignacio Etcheverry
8759c0e31a Mono: Use exit(status) instead of abort() in exception hook 2019-04-18 15:01:50 +02:00
Ignacio Etcheverry
2b9557c920 C#: Add missing ToString() override methods
Godot.Object, Array, Dictionary and RID were missing ToString() override methods
2019-04-18 14:48:13 +02:00
Ignacio Etcheverry
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
lupoDharkael
145a45fd3f Fix code completion not working with class_name 2019-04-16 22:27:13 +02:00
Ignacio Roldán Etcheverry
b7cf4c2050
Merge pull request #27950 from Nonnu42/contrib
Fixes #17233 allowing C# to override _GetPropertyList
2019-04-12 16:43:27 +02:00
Nuno Cardoso
d011c8e109 Fixes #17233 allowing C# to override _GetPropertyList 2019-04-12 03:09:03 +01:00
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Ignacio Roldán Etcheverry
9ab17b664d
Merge pull request #27809 from neikeq/github-pls
Workaround for syntax highlighting issue in GitHub
2019-04-08 22:13:13 +02:00
Ignacio Etcheverry
7a4cf6339d Workaround for syntax highlighting issue in GitHub 2019-04-08 14:52:01 +02:00
Rémi Verschelde
6a2b8a263e
Merge pull request #26458 from neikeq/mono-build-cleanup
Mono: Add CPPPATH only to env_mono and cleanup build scripts
2019-04-08 12:50:51 +02:00
Rémi Verschelde
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
Rémi Verschelde
7f3373d79f
Merge pull request #27452 from Chaosus/direction_to
Added method to retrieve a direction vector from one point to another
2019-04-08 12:00:54 +02:00
Rémi Verschelde
d211aff777
Merge pull request #27231 from Chaosus/smoothstep
Added smoothstep built-in function
2019-04-08 10:03:42 +02:00
Ignacio Etcheverry
2873206aa6 Mono: Add compiler flags to env_mono instead of env
This way we avoid possible conflicts with other modules. Specially with include paths.
2019-04-07 19:03:13 +02:00
Ignacio Etcheverry
6bb29eb847 Mono: Reorganize build scripts
All build scripts, other than config.py and SCSub, are now located in the build_scripts subdirectory.
2019-04-07 19:03:09 +02:00
Chaosus
514a3fb96a Added smoothstep built-in function 2019-04-07 14:11:26 +03:00
Hendrikto
49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
Ignacio Etcheverry
2f3328a039 Fix wrong method binds and registered class 2019-04-06 16:12:59 +02:00
Ignacio Etcheverry
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
Ignacio Etcheverry
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
Ignacio Etcheverry
92b02cb027 C#: Some important Array and Dictionary interface changes
Array now implements IList instead of IList<object, object>.
Dictionary now implements IDictionary instead of IDictionary<object, object>.
2019-04-06 11:00:40 +02:00
Ignacio Etcheverry
e82b2def8e Mono: Buildsystem support for finding MSBuild from VS2019 2019-04-06 01:32:41 +02:00
Ignacio Etcheverry
ad2127a3e8 Replace a few #if/#elif with #ifdef and "#elif defined" 2019-04-05 23:41:51 +02:00
Rémi Verschelde
a61ad365f5
Merge pull request #27677 from akien-mga/Wimplicit-fallthrough
Fix -Wimplicit-fallthrough warnings from GCC 8
2019-04-05 16:12:45 +02:00
Chaosus
55f3bd97a2 Added direction_to method to vectors 2019-04-05 17:09:57 +03:00
Rémi Verschelde
63d3a42f82
Merge pull request #27465 from neikeq/road-to-lang-agnostic-docs-is-going-to-be-tough
EditorHelp: Improve enum ref resolving and add constant ref support
2019-04-05 15:19:21 +02:00
Rémi Verschelde
fc370b3feb Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.
2019-04-05 15:14:53 +02:00
ForLoveOfCats
444242a080 Mono: Make missing default constructor error more foolproof 2019-04-04 16:56:02 -04:00
ForLoveOfCats
46e79e6fad Mono: Makes GD.Convert take Variant.Type instead of int 2019-04-04 16:07:48 -04:00
Ignacio Etcheverry
0338e55a6e Fix memory leak introduced in bb6814a 2019-04-02 22:56:17 +02:00
Rémi Verschelde
e3bd84fa57
Merge pull request #27485 from Faless/io/encode_decode_safety_pr
Safer encode/decode variant.
2019-04-01 17:00:40 +02:00
Fabio Alessandrelli
393e62b98a Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).
2019-04-01 15:53:19 +02:00
Rémi Verschelde
39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
Ignacio Etcheverry
c8aa85189a EditorHelp, makerst: Improve enum ref resolving and constant ref support
Enum reference resolving will now search in the @GlobalScope if no class is specified and the enum cannot be resolved in the current class.
Added support for constant references in EditorHelp, e.g.: [constant KEY_ENTER] or [constant Control.FOCUS_CLICK]. It supports enum constants (the enum name must not be included).
2019-03-29 23:40:31 +01:00
Ignacio Etcheverry
bb6814aef0 C#: Add DynamicGodotObject class
Expands to Object.call, Object.set and Object.get for accessing members. This means it can also access members from scripts written in other languages, like GDScript.
2019-03-29 00:53:48 +01:00
Ignacio Roldán Etcheverry
e453934824
Merge pull request #27359 from neikeq/who-reads-docs-anyway
C#: Bindings generator now translates BBCode docs to XML comments
2019-03-23 20:49:59 +01:00
Ignacio Etcheverry
1ad16b3d4a C#: Bindings generator now translates BBCode docs to XML comments 2019-03-23 20:39:55 +01:00
Ignacio Roldán Etcheverry
96abb695f2
Merge pull request #27270 from shartte/fix-generics-parsing
Fix parsing of generic type declarations in C# source files
2019-03-20 18:34:28 +01:00
Sebastian Hartte
7440295ad1 Add support for new MSBuild directory naming introduced in VS 2019. 2019-03-20 17:57:20 +01:00
Sebastian Hartte
34366bc27f Fix parsing of generic type declarations in C# source files. 2019-03-20 17:23:11 +01:00
Rémi Verschelde
3b5a0f34d4
Merge pull request #27014 from neikeq/csharp-update-exports-only-in-editor
C#: Update exports only in the editor
2019-03-13 20:07:06 +01:00
Ignacio Etcheverry
5e354162f1 C#: Update exports only in the editor 2019-03-13 16:26:47 +01:00
Rémi Verschelde
4326fd5a7e Mono: Update welcome message with current state 2019-03-12 19:35:02 +01:00
Ignacio Etcheverry
e9e7aab8eb Mono: Some assembly referencing changes and cleanup
Apparently we don't need to call mono_debug_close_image ourselves and we can call mono_image_close right away as it's not our duty to keep that reference.
2019-03-10 18:55:31 +01:00
Ignacio Etcheverry
4299332ecc Mono: Fix assemblies path String incorrectly constructed from utf8
Also fixed a wrong ifdef that was causing Mono to never be initialized if mscorlib was not found (which was the case with the utf8 assemblies path bug this commit fixes).
This condition was meant for exported projects only, not for the editor only.
2019-03-09 23:00:03 +01:00
Ignacio Roldán Etcheverry
65487ed4ed
Merge pull request #26746 from shartte/godot-trace-listener
Add a custom TraceListener on Startup for Mono
2019-03-08 07:05:41 +01:00
Ignacio Etcheverry
a4825c2f8b Fix CSharpInstance::set not working with base classes 2019-03-08 00:12:19 +01:00
Rémi Verschelde
6ee3002237
Merge pull request #26773 from neikeq/issue-26628
Mono: Fix crash with exported field of custom Reference derived type
2019-03-07 22:54:03 +01:00
Ignacio Etcheverry
c5f8b0960a Mono: Fix crash with exported field of custom Reference derived type 2019-03-07 22:38:31 +01:00
Ignacio Etcheverry
17a55861f1
Merge pull request #26770 from neikeq/issue-26675
Mono: Partially implement some Godot debug api functions
2019-03-07 22:00:59 +01:00
Ignacio Etcheverry
47407ba2df
Merge pull request #26761 from Chaosus/fix_mono_wrap
Fix division by zero at wrap functions in mono
2019-03-07 21:34:03 +01:00
Ignacio Etcheverry
8e2e0795bb Mono: Partially implement some Godot debug api functions
Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
2019-03-07 21:02:57 +01:00
Sebastian Hartte
37d448fca7 Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot. 2019-03-07 21:00:19 +01:00
Chaosus
752055ccba Fix division by zero at wrap functions in mono 2019-03-07 22:57:12 +03:00
Ignacio Etcheverry
4c0b0a6bdd
Merge pull request #26765 from neikeq/issue-25959
Mono: Fix crash when re-using script binding after domain reloading
2019-03-07 20:50:37 +01:00
Ignacio Etcheverry
e904f814c8 Mono: Fix crash when re-using script binding after domain reloading 2019-03-07 19:55:40 +01:00
Sebastian Hartte
f8a6a6c8a2 Update scripts exports even when normal script instances are created to better support tool scripts with exported variables. 2019-03-07 18:52:43 +01:00
Rémi Verschelde
64923ff277
Merge pull request #26713 from neikeq/print-msbuild-command
Print MSBuild command if also printing output
2019-03-06 18:22:57 +01:00
Ignacio Etcheverry
0b68677112 Print MSBuild command if also printing output 2019-03-06 17:10:14 +01:00
Ignacio Etcheverry
db7928849b
Merge pull request #26712 from neikeq/issue-26681
Mono: Make 'Build' button generate solution if it doesn't exist
2019-03-06 16:54:51 +01:00
Ignacio Etcheverry
c97db904a0 Mono: Make 'Build' button generate solution if it doesn't exist 2019-03-06 16:36:53 +01:00
Ignacio Etcheverry
6492de800f
Merge pull request #26661 from neikeq/issue-17601
Mono: Fix array field being assigned MonoArray** instead of MonoArray*
2019-03-05 23:03:25 +01:00
Ignacio Etcheverry
c6ac7333a6 Mono: Fix array field being assigned MonoArray** instead of MonoArray*
Fixes #17601
2019-03-05 21:46:55 +01:00
Rémi Verschelde
0a7de5472f
Merge pull request #26591 from neikeq/oi
Mono: Add option to print MSBuild output and improve out of sync error
2019-03-04 18:36:10 +01:00
Ignacio Etcheverry
8877b07f4c Mono: Add option to print MSBuild output and improve out of sync error 2019-03-04 16:05:08 +01:00
Carter Anderson
839ed2d092 Add mono log profiler support 2019-03-02 23:32:03 -08:00
Ignacio Etcheverry
42c57eef13 C#: Fix parsing of class full name when the base has generics
Also we no longer ignore base classes with generics, since we don't really care about that.
2019-03-01 00:23:23 +01:00
Ignacio Etcheverry
22b41ab2fe Mono: Fail on script instance creation if constructor was not found
Previously this would result in NULL dereferencing. Now we fail with an error.
2019-02-28 23:22:46 +01:00
Ignacio Etcheverry
5a4475fce3 Mono: Make sure the generated RootNamespace is a valid identifier 2019-02-28 22:26:15 +01:00
Ignacio Etcheverry
b69569415f
Merge pull request #26411 from neikeq/issue-26195
C#: Add Array.Resize(int) method
2019-02-28 18:53:14 +01:00
Ignacio Etcheverry
32cd8ba9bd C#: Add Array.Resize(int) method 2019-02-28 18:33:42 +01:00
Rémi Verschelde
372152220b
Merge pull request #26159 from marxin/fix-Wsuggest-attribute=format
Fix -Wsuggest-attribute=format warnings.
2019-02-27 09:23:26 +01:00
Rémi Verschelde
426a6fdc17
Merge pull request #26134 from marxin/fix-Wsign-compare
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
marxin
e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
marxin
aff84ec55d Fix -Wsuggest-attribute=format warnings. 2019-02-27 06:56:50 +01:00
Ignacio Etcheverry
3e0846e65b Mono: Some editor usability improvements
- Move "Mono" popup menu from the top right corner to `Projects -> Tools` as a submenu.
- Add "Build solution" button to the top right corner. Makes it more visible and quicker to access.
- Fix build list in the bottom panel unselect an item when clicking on empty space. Previously it would hide the issues panel but the item would remain selected, making it impossible to display the issues panel again if there was only one item.
2019-02-27 02:45:21 +01:00
Ignacio Etcheverry
823fb59e10 Remove problematic VS Code hint path on Windows 2019-02-27 02:43:53 +01:00
Ignacio Etcheverry
da3776a40a C#: Fix Vector2.AngleToPoint
Fixes #26209
2019-02-23 23:28:31 +01:00
Rémi Verschelde
07fbc34195
Merge pull request #26203 from neikeq/csharp-basis
C#: Basis fixes and cleanup
2019-02-23 20:53:03 +01:00
Ignacio Etcheverry
2c26e7f174 C#: Basis fixes and cleanup
Fix Basis operator[int]. Now it returns columns instead of rows.
Fix Transform2D.AfficeInverse() mutating rather than returning a new Transform2D.
2019-02-23 18:22:30 +01:00
marxin
8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Ignacio Etcheverry
9421da57ad C#: Add 'Singleton' property to singleton wrapper class
This property returns an instance of the singleton.
The purpose of this is to allow using methods from the base class like 'Connect'.
Since all Godot singletons inherit Object, the type of the returned instance is Godot.Object.
2019-02-19 22:38:22 +01:00
Ignacio Etcheverry
aa5b99821b
Merge pull request #26065 from neikeq/csharp-fix-gd-range
C#: Make GD.Range return IEnumerable instead of array
2019-02-19 19:27:37 +01:00
Ignacio Etcheverry
0826b79035 C#: Make GD.Range return IEnumerable instead of array
- Make NodePath and RID sealed classes.
- Renamed rand_range to RandRange.
2019-02-19 18:46:18 +01:00
Ignacio Etcheverry
1174d10e3c
Merge pull request #25890 from neikeq/issue-25818
Fix Godot.Reference marshalling from MonoObject* to Variant
2019-02-19 15:05:05 +01:00
Ignacio Etcheverry
29fd942dd6
Merge pull request #26039 from neikeq/throw_objectdisposedexception
C#: Throw ObjectDisposedException from disposed wrapper classes
2019-02-19 01:02:20 +01:00
Ignacio Etcheverry
e1f01bf2ac
Merge pull request #26038 from neikeq/csharp_rand_funcs
C#: Add random functions to GD class
2019-02-19 00:52:01 +01:00
Ignacio Etcheverry
efd5d4bcf9 C#: Throw ObjectDisposedException from disposed wrapper classes 2019-02-19 00:37:15 +01:00
Ignacio Etcheverry
ce67808818 C#: Add random functions to GD class 2019-02-19 00:35:19 +01:00
RomanAkberov
041a7bbeba C#: fix Quat.Equals. 2019-02-19 01:01:05 +07:00
Ignacio Etcheverry
a8dfe9ff7f Don't print 'Cannot find Mono in the registry' if bundled with Godot
Closes #24753
2019-02-15 19:52:32 +01:00
Ignacio Etcheverry
d17ba9a140 Mono: Fix export template build errors
Fixes #25903
2019-02-15 19:52:22 +01:00