Commit Graph

888 Commits

Author SHA1 Message Date
Rémi Verschelde 543fa16b4c
Merge pull request #68233 from raulsntos/dotnet/raise-events
C#: Generate strongly-typed method to raise signal events and fix event accessibility
2024-09-27 13:53:11 +02:00
Raul Santos da37998dc8
C#: Generate On{EventName} method to raise signal events 2024-09-26 20:10:53 +02:00
Thaddeus Crews 9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Rémi Verschelde ea8d20d35b
Merge pull request #96955 from Delsin-Yu/generator-based-CreateManagedForGodotObjectBinding
[.NET] Replace Reflection-Based implementation with Generated one in `CreateManagedForGodotObjectBinding`
2024-09-23 16:13:49 +02:00
Rémi Verschelde c65ab71230
Merge pull request #94953 from raulsntos/dotnet/signals-with-typed-arrays
C#: Generate signal delegates with typed arrays
2024-09-23 12:27:45 +02:00
Raul Santos 445e822bcf
C#: Generate signal event with the same accessibility as the delegate 2024-09-23 03:38:18 +02:00
DE YU 307224927c Replace Reflection-Based implementation with Generated one
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-09-22 18:01:14 +08:00
Rémi Verschelde 2f078e501c
Merge pull request #97198 from raulsntos/dotnet/open-visual-studio-with-dotnet-cli
C#: Use dotnet CLI to launch `OpenVisualStudio.dll`
2024-09-20 16:06:46 +02:00
Matt Enad d6c0a53ecf Add error messages to binding generator 2024-09-19 13:31:05 -04:00
Raul Santos ec189b1574
C#: Use dotnet CLI to launch OpenVisualStudio.dll
Use the DLL instead of the EXE, so we can rely on the dotnet CLI handling the architecture.
2024-09-19 19:23:01 +02:00
Raul Santos 0aa46e19c5
C#: Fallback to CoreCLR/MonoVM hosting APIs when hostfxr/NativeAOT fails
Some platforms don't support hostfxr but we can use the coreclr/monosgen library directly to initialize the runtime.

Android exports now use the `android` runtime identifier instead of `linux-bionic`, this removes the restrictions we previously had:
- Adds support for all Android architectures (arm32, arm64, x32, and x64), previously only the 64-bit architectures were supported.
- Loads `System.Security.Cryptography.Native.Android` (the .NET library that binds to the Android OS crypto functions).
2024-09-16 17:07:03 +02:00
Rémi Verschelde f8fbb860f5
Merge pull request #95840 from raulsntos/char_metadata
Add metadata for `char16_t` and `char32_t`
2024-09-12 09:25:19 +02:00
Raul Santos aaffab8afb
Add metadata for `char16_t` and `char32_t`
We don't seem to expose any API that uses `char16_t` yet, but I added it anyway since we make the type info for it.

I didn't add anything for `wchar_t` because we are not making a type info so maybe we don't have a need for it yet, it could be added in the future.

To prevent breaking compatibility with the C# bindings, we ignore the `char32_t` metadata and still use `System.Int64`.
2024-09-12 02:15:55 +02:00
kit 5e1c9d68aa Extract editor main screen 2024-09-09 11:06:18 -04:00
Thaddeus Crews 9853a69144
Implement typed dictionaries 2024-09-04 10:27:26 -05:00
Raul Santos 4c14421602
C#: Use export platform to determine the target OS and log errors
- Use the export platform's `get_os_name` to determine the platform name instead of guessing from the features.
- Use the export platform's `add_message` to add error messages instead of a custom error dialog. Integrates .NET error messages with the export log dialog.
2024-08-30 12:45:24 +02:00
RedOrbweaver 81799b8fa3 Fix build logger unable to handle an event without an associated file 2024-08-29 20:33:47 +02:00
Rémi Verschelde cb96fc95c3
Merge pull request #92316 from alula/msvc-clang
Add support for compiling with VS clang-cl toolset
2024-08-29 10:36:17 +02:00
Alula 346cbc7f1f
Add support for compiling with VS clang-cl toolset 2024-08-28 13:30:44 -05:00
bruvzg d528f28275 [Windows] Fix OS.open_dynamic_library 2024-08-28 20:12:09 +03:00
Daylily-Zeleen 3d575801ce Allow ClassDB to create a Object without postinitialization for GDExtension. 2024-08-20 20:19:02 +08:00
Raul Santos c2efbf3012
C#: Use Godot's LipO implementation instead of Xcode's lipo command 2024-08-17 17:52:35 +02:00
Rémi Verschelde 0d0eb71694
Merge pull request #94599 from juanjp600/node-array-export-diagnostic
C#: Fix GD0107 not applying to arrays and dictionaries containing nodes
2024-08-16 23:45:26 +02:00
Rémi Verschelde 0bf8bee544
Merge pull request #94693 from jonatanrojderd/master
[C#] Change the `VisualShaderNodeCustom` template to use the correct override types and signatures
2024-08-16 14:32:20 +02:00
Jonatan Röjder Delnavaz 74389e8395 * Changed the VisualShaderNodeCustom template to use the correct overrides and added the GlobalClass attribute 2024-08-16 07:26:53 +02:00
Rémi Verschelde c2a4942850
Bump version to 4.4-dev
Mr. Godot still didn't show up...
2024-08-15 11:39:34 +02:00
Raul Santos f3841d644e
C#: Generate signal delegates with typed arrays
Signals with typed arrays were generating C# delegates with untyped arrays.
2024-07-30 18:39:03 +02:00
Juan Pablo Arce 8aa444d212 Fix GD0107 not applying to arrays and dictionaries containing nodes 2024-07-24 02:20:29 -03:00
Raul Santos 65cd0c86f9
C#: Escape generated members 2024-06-15 19:07:42 +02:00
Rémi Verschelde c0eb347946
Merge pull request #91557 from AThousandShips/dotnet_doc_fix
[C#] Unexpose `GodotSharp`
2024-05-21 11:22:40 +02:00
Marius Hanl 32be459e54 Fix ContextMenu Copy Error is off in MSBuild Panel 2024-05-15 22:55:05 +02:00
Gaoyao Massimo Hu e3270113ca
Remove useless isFirstEntry and useless source.Append("else ") 2024-05-14 07:44:56 +01:00
Gaoyao Massimo Hu 06b716d8b3
Fix C# Hint NodeType and ResourceType HintString 2024-05-08 16:22:52 +01:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde 9ef50524d0
Merge pull request #91696 from akien-mga/style-file-format
Style: Trim trailing whitespace and ensure newline at EOF
2024-05-08 12:31:32 +02:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
Paul Joannon c2d72a691f
Specify a runtime rollforward for OpenVisualStudio
Use `LatestMajor`

Fixes #91638
2024-05-07 19:40:25 +02:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
A Thousand Ships aff2e47bff
[C#] Unexpose `GodotSharp`
This class seems to have been exposed accidentally, and breaks
documentation on non-mono builds, requiring hacks
2024-05-04 14:09:42 +02:00
Rémi Verschelde 9ed8399514
Merge pull request #91509 from akien-mga/dotnet-fix-generating-glue-in-project-folder
.NET: Prevent generating mono glue in project folder
2024-05-04 11:52:32 +02:00
Rémi Verschelde 629e91acff
Merge pull request #91479 from Repiteo/dotnet/sln-csproj-attributes
C#: Fix attributes for `sln`/`csproj` files
2024-05-04 11:52:29 +02:00
Thaddeus Crews 64f2e8b64f
Dotnet: Fix attributes for `sln`/`csproj` files 2024-05-03 12:21:51 -05:00
Rémi Verschelde baec8da3b3
.NET: Prevent generating mono glue in project folder
Fixes #83128.
2024-05-03 14:24:35 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Rémi Verschelde 4eaafc8fa8
Merge pull request #91375 from paulloz/dotnet/prevent-generator-crash-on-exported-unconstructed-generic-arrays
C#: Fix generator crash w/ generic arrays
2024-05-02 12:46:42 +02:00
Raul Santos 1510f88ae1
C#: Ignore late bound methods in MustBeVariantAnalyzer
If symbol is late bound (as is the case when using `dynamic`) we can't obtain the symbol to analyze the usage of `[MustBeVariant]`.
2024-05-01 03:18:21 +02:00
Paul Joannon aba787393f
C#: Fix generator crash w/ generic arrays 2024-04-30 22:22:09 +02:00
Konstantin Kretov 2b46e009fa
Fill copyright field in .csproj files
This ensures that nuget packages will have both license and copyright fields filled.
2024-04-26 11:41:04 +02:00
Rémi Verschelde 1a6e4ce906
Merge pull request #90002 from raulsntos/dotnet/expose-property-accessors
C#: Make internal properties and property accessors public (but hidden)
2024-04-22 12:51:42 +02:00
bruvzg bf558adcdd
[.NET] Disable output embedding on macOS, move it to the advanced options on other platforms. 2024-04-09 17:47:39 +03:00