Commit graph

476 commits

Author SHA1 Message Date
Ignacio Etcheverry
7f596270f3 Fix exporting assemblies from wrong output path
This is the whole reason 'fill_search_dirs' was added for, yet somehow I forgot to pass the config parameter.
2019-02-10 18:37:42 +01:00
Ignacio Etcheverry
24a2ae7f3c Do not initialize Mono if 'res://.mono/' and mscorlib are missing
This is needed to avoid aborting due to missing mscorlib for projects that do not use C#.
If 'res://.mono/' exists, then we assume the project uses C#, in which case a missing mscorlib should still abort.
2019-02-10 18:34:37 +01:00
Ignacio Etcheverry
4aa4916b11 Mono: Workaround to fix 'flushing' errors when building at editor startup 2019-02-05 18:51:24 +01:00
Ignacio Etcheverry
919fa75803
Merge pull request #25574 from neikeq/ss
Mono: Lifetime fixes for CSharpInstance and instance binding data
2019-02-03 07:36:33 +01:00
Ignacio Etcheverry
d8593747e0 Mono: Fix default debugger agent argument never being used 2019-02-03 06:51:07 +01:00
Ignacio Etcheverry
3233083f63 Mono: Lifetime fixes for CSharpInstance and instance binding data
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.

Also fixed godot_icall_Object_weakref return reference being freed before returning.
2019-02-03 06:47:25 +01:00
Ignacio Etcheverry
4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry
065828d159 Mono: Fix MonoPosixHelper not being found 2019-02-03 05:38:47 +01:00
Ignacio Etcheverry
d3c51a5dfb Mono: Cleanup 2019-02-03 05:38:40 +01:00
Rémi Verschelde
57c0082533 Mono: Test Windows binaries with lowercase extension
To help users writing good cross-platform code, Godot's
`FileAccessWindows:open()` will issue a warning on case mismatch, which
happens here with capitalized extensions given by `PATHEXT` compared to
actual file extensions which are lowercase 99% of the time.

Fixes #25368.
2019-01-27 11:54:32 +01:00
Ignacio Etcheverry
bc8b61bb06 Mono: Fix hot reload build errors and cleanup 2019-01-22 18:33:36 +01:00
Ignacio Etcheverry
077e489773 Mono: Add assembly reloading to running games
Add environment variable to specify a custom --debugger-agent for mono.
2019-01-21 22:44:09 +01:00
Ignacio Etcheverry
0ac5be8368 Fix C# script metadata creation error due to missing directory 2019-01-21 00:57:03 +01:00
Ignacio Etcheverry
ca8100f29f Workaround for bug with Mono's MSBuild and BaseIntermediateOutputPath
BaseIntermediateOutputPath seems to be empty by default. The workaround is to explicitly set it.

Also fixed passing char instead of char[] to String.Split. Why was this even working with Mono?
2019-01-21 00:38:28 +01:00
Ignacio Etcheverry
ce36351065
Merge pull request #25080 from neikeq/mm-c
C# Bindings Generator: Fix vararg methods with custom return type
2019-01-18 01:30:43 +01:00
Ignacio Etcheverry
e8a1d4babd
Merge pull request #25079 from neikeq/mm-b
C#: Fix trying to build when there's no solution
2019-01-18 01:23:15 +01:00
Ignacio Etcheverry
8f26c54c40 C# Bindings Generator: Fix vararg methods with custom return type 2019-01-18 01:03:44 +01:00
Ignacio Etcheverry
9cd24b4f6d C#: Fix trying to build when there's no solution
This would cause errors that shouldn't happen unless there was something to build.
2019-01-18 01:03:15 +01:00
Ignacio Etcheverry
b48dd1bdaf C#: Fix crash due to missing gchandle ref null check 2019-01-17 23:15:20 +01:00
Rémi Verschelde
658296856c
Merge pull request #24877 from neikeq/issue-24280
Fix properties being lost when reloading placeholder GDScript instance
2019-01-10 18:02:57 +01:00
Rémi Verschelde
e5f1d19352 Consistency in resource format saver/loader de-registration
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()',
and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already
(which shouldn't happen since we're only unregistering things that we previously
registered.

Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative,
missed in #20552 which was last amended before #19501 was merged.
2019-01-10 12:45:57 +01:00
Ignacio Etcheverry
ea85ff0dc2 Fix properties being lost when reloading placeholder GDScript instance
During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing.
The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance.

I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
2019-01-10 01:58:50 +01:00
Hein-Pieter van Braam
ee0c4a97b3 Use 'release_debug' for mono export templates
This fixes the previously wrong PR

Because we don't actually ship 'debug' templates to users make sure
the mono exporter picks the correct 'data' directory for export
templates.

This fixes #24752
2019-01-08 01:44:54 +01:00
Hein-Pieter van Braam
dd766bae78 Use 'release_debug' for mono export templates
Because we don't actually ship 'debug' templates to users make sure
the mono exporter picks the correct 'data' directory for export
templates.

This fixes #24752
2019-01-07 18:19:35 +00:00
Rémi Verschelde
1808241d16
Merge pull request #24688 from Supatier/add-additional-vscode-name
Add code-oss, vscode-oss, and visual-studio-code-oss to vscode path
2019-01-03 21:32:41 +01:00
supatier
ab7f102b14 Add code-oss, vscode-oss, and visual-studio-code-oss to vscode path 2019-01-02 05:40:34 +07:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
d1f3b622f0 Fix missing/malformed license headers 2019-01-01 12:46:36 +01:00
Rémi Verschelde
dcc7f2b54b
Merge pull request #24545 from akien-mga/osxcross-mono
SCons: Allow building Mono module with OSXCross
2018-12-30 15:07:18 +01:00
Supatier
b173eed8aa
Fix Godot unable to find VSCode binary
VSCode's executable name is not uniform and godot only search for "code".
2018-12-27 15:16:29 +07:00
Kelly Thomas
a5e38586ce fix capitalization for antiquewhite 2018-12-23 08:00:35 +08:00
Rémi Verschelde
d52100f4ff SCons: Allow building Mono module with OSXCross
Improve the test logic to only assume that we're building for macOS
if OSXCROSS_ROOT is defined *and* we requested p=osx.

Supersedes #24480.
2018-12-22 12:36:19 +01:00
Kelly Thomas
09496d93b1 [Mono] Color - add ColorN(), Colors - add named color properties 2018-12-21 15:01:32 +08:00
Rémi Verschelde
9c7bc127b9
Merge pull request #24385 from hpvb/reduce-string-coew
Reduce String CoW
2018-12-16 19:13:35 +01:00
Hein-Pieter van Braam
4e25e5066b Reduce String CoW
By introducing an intermediate proxy class for the array subscript
operator for String and CharString we can control better when CowData
will actually CoW.

This should improve performance of String usage for most cases.
2018-12-16 16:51:38 +01:00
Rémi Verschelde
9df7ed59fb
Merge pull request #19501 from Zylann/custom_loaders
Added basic support for custom resource savers and loaders
2018-12-16 14:26:56 +01:00
Marc Gilleron
065e2670af Added basic support for custom resource savers and loaders 2018-12-15 05:34:53 +00:00
Ben Rog-Wilhelm
b26487a2b4 Tweaks after feedback 2018-12-08 00:54:12 -08:00
Ben Rog-Wilhelm
f13f2d512f Implement CSharpScript::get_script_method_list and related functionality. 2018-12-07 23:54:40 -08:00
Ignacio Etcheverry
f6f2be7577 Fix crash due to ~CSharpInstance() being called on freed instance
This would be the case when calling SetScript on an object with a C# script.
2018-12-01 02:28:24 +01:00
Ignacio Etcheverry
5fd3ef4e78 Implement CSharpScript::is_valid() 2018-11-30 21:45:44 +01:00
Ignacio Etcheverry
989b93d6a4
Merge pull request #24091 from neikeq/ii
C#: Improve tool script support and fix reloading issues
2018-11-30 21:39:13 +01:00
Ignacio Etcheverry
b9b7dcdf00 C#: Improve tool script support and fix reloading issues 2018-11-30 20:43:06 +01:00
Juan Linietsky
3a93499f89 Allow signal connecting even if script is invalid (only when compiled with tools), fixes #17070 2018-11-27 19:55:37 -03:00
Carter Anderson
d339824f15 Parse C# generics and type constraints correctly 2018-11-24 18:29:23 -08:00
Ignacio Etcheverry
d275d848b3 C#: Replace calls to old of old Basis(Vec3,Vec3,Vec3) constructor 2018-11-20 22:23:09 +01:00
Rémi Verschelde
173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Ignacio Etcheverry
5712daf2d9
Merge pull request #23833 from neikeq/hh
C#: Fix Basis(Vec3,Vec3,Vec3) constructor
2018-11-20 06:13:29 +01:00
Ignacio Etcheverry
bf94eed60c C#: Fix Basis(Vec3,Vec3,Vec3) constructor
Now it sets axes in order to match GDScript implementation.
2018-11-20 02:08:22 +01:00
Ignacio Etcheverry
43e3582058
Merge pull request #23505 from zorbathut/zorbathut/updateproject
Add option for automatic project updating.
2018-11-08 18:06:24 +01:00