Commit Graph

29445 Commits

Author SHA1 Message Date
Ignacio Etcheverry ced77b1e9b C#: Switch games to MSBuild Sdks and .NET Standard
Godot.NET.Sdk
-------------

Godot uses its own custom MSBuild Sdk for game
projects. This new Sdk adds its own functionality
on top of 'Microsoft.NET.Sdk'.

The new Sdk is resolved from the NuGet package.

All the default boilerplate was moved from game
projects to the Sdk. The default csproj for
game project can now be as simple as:

```
<Project Sdk="Godot.NET.Sdk/4.0.0-dev2">
  <PropertyGroup>
    <TargetFramework>netstandard2.1</TargetFramework>
  </PropertyGroup>
</Project>
```

Source files are included by automatically so
Godot no longer needs to keep the csproj in sync
when creating new source files.

Define constants
----------------

Godot defines a list of constants for conditional
compilation. When exporting games, this list also
included engine 'features' and platform 'bits'.
There were a few problems with that:

- The 'features' constants were only defined when
  exporting games. Not when building the game for
  running in the editor player.
- If the project was built externally by an IDE,
  the constants wouldn't be defined at all.

The new Sdk assigns default values to these
constants when not built from the Godot editor,
i.e.: when built from an IDE or from the command
line. The default define constants are determined
from the system MSBuild is running on.

However, it's not possible for MSBuild to
determine the set of supported engine features.
It's also not possible to determine if a project
is being built to run on a 32-bit or 64-bit
Godot executable.

As such the 'features' and 'bits' constants had
to be removed.
The benefit of checking those at compile time
was questionable, and they can still be checked
at runtime.

The new list of define constants includes:

- GODOT
- GODOT_<PLATFORM>
  Defaults to the platform MSBuild is running on.
- GODOT_<PC/MOBILE/WEB>
- TOOLS
  When building with the 'Debug' configuration
  (editor and editor player).
- GODOT_REAL_T_IS_DOUBLE
  Not defined by default unless $(GodotRealTIsDouble)
  is overriden to be 'true'.

.NET Standard
-------------

The target framework of game projects was changed
to 'netstandard2.1'.
2020-07-25 19:22:01 +02:00
Rémi Verschelde 0cd98ec7e1
Merge pull request #40600 from akien-mga/vs-duplicate-branches-warning
VisualScript: Fix -Wduplicate-branches warning
2020-07-22 17:29:22 +02:00
Rémi Verschelde 938e2e966f
Merge pull request #40599 from akien-mga/vulkan-init-structs
Vulkan: Fix struct init for VkClearAttachment
2020-07-22 17:00:40 +02:00
Rémi Verschelde 9a586defed VisualScript: Fix -Wduplicate-branches warning
When VSDEBUG is a no-op (default), those branches did the same (nothing).
2020-07-22 16:57:28 +02:00
Rémi Verschelde dfdfee04df Vulkan: Fix struct init for VkClearAttachment
The changes from #38835 were not sufficient to fix #38829, as VkClearAttachment
still had uninitialized member structs in its VkClearColor member struct.

The struct rabbit hole goes deep and trying to do validation as done in #38829
doesn't appear realistic.
2020-07-22 16:31:22 +02:00
Rémi Verschelde f54fd5ac10
Merge pull request #38835 from madmiraal/fix-38829
Fix may be used unitialized warnings in _render_pass_create() and  _draw_list_insert_clear_region().
2020-07-22 16:12:54 +02:00
Rémi Verschelde 72d449b53e
Merge pull request #40596 from neikeq/fix-msbuild-restore-not-called
C#: Fix restore not called when building game projects
2020-07-22 14:47:38 +02:00
Ignacio Etcheverry 4a30289eee C#: Fix restore not called when building game projects 2020-07-22 14:28:47 +02:00
Rémi Verschelde e196b8127c
Merge pull request #40590 from Calinou/doc-inputeventmousemotion-polling-rate
Document polling rate limitations in InputEventMouseMotion
2020-07-22 13:17:03 +02:00
Hugo Locurcio 924b7ea2f5 Document polling rate limitations in InputEventMouseMotion
This closes #40579.
2020-07-22 10:25:13 +02:00
Rémi Verschelde 1ab0644532
Merge pull request #40217 from theoway/visible_line_count_fix
Fixes the get_visible_line_count() of rich text label
2020-07-22 09:50:26 +02:00
Rémi Verschelde d8c3fba1d4
Merge pull request #40588 from nekomatata/virtual-keyboard-disable
Add option to disable virtual keyboard for LineEdit
2020-07-22 09:33:47 +02:00
Rémi Verschelde 0397ddf9d5
Merge pull request #40583 from aaronfranke/cs-xml-plane
Fix XML in Plane.cs
2020-07-22 09:30:02 +02:00
PouleyKetchoupp 0aa56e3ab8 Add option to disable virtual keyboard for LineEdit
Co-authored-by: Alexander Holland <alexander.holland@live.de>
2020-07-22 08:19:05 +02:00
Aaron Franke ad96b6314c
Fix XML in Plane.cs 2020-07-21 20:13:51 -04:00
Rémi Verschelde a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Rémi Verschelde 25d59a5a1a
Merge pull request #40398 from thebestnom/android_keyboard_modifiers_and_arrows
Android: Keyboard modifier and arrow key support for text edit
2020-07-21 21:56:01 +02:00
Rémi Verschelde bb2c0d3c3a
Merge pull request #40501 from aaronfranke/core-docs-cs
Update core documentation to match recent C# changes
2020-07-21 21:28:55 +02:00
Andy Maloney 4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
thebestnom 166103c759 Android: Keyboard modifier and arrow key support 2020-07-21 22:13:24 +03:00
Rémi Verschelde 60fab23262
Merge pull request #32908 from Nehluxhes/node_update_twice
Remove duplicate displayed node update call
2020-07-21 21:09:47 +02:00
Rémi Verschelde 22ed721d15
Merge pull request #40448 from Paulb23/fix_txt_close_crash
Fix crash when closing a TextFile
2020-07-21 21:08:39 +02:00
Rémi Verschelde e73de413db
Merge pull request #40457 from Calinou/doc-basebutton-pressed-toggled
Mention `toggled` signal for pressed state in BaseButton documentation
2020-07-21 21:05:58 +02:00
Aaron Franke 83e324d670
Update core documentation to match recent C# changes
Also a few minor API changes like adding AABB.abs()

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-07-21 14:44:53 -04:00
Rémi Verschelde 41d6c96590
Merge pull request #40567 from akien-mga/travis-emscripten-latest
Travis: Back to latest emsdk, use embedded mode properly
2020-07-21 20:11:46 +02:00
Nehluxhes c85d04a771 Remove duplicate node update call 2020-07-21 19:47:44 +02:00
Rémi Verschelde 15917ee39f Travis: Back to latest emsdk, use embedded mode properly
Reverts and supersedes #39168 and #40563.
2020-07-21 17:19:06 +02:00
Rémi Verschelde 01fb1f189f
Merge pull request #40512 from yrk06/ExposeInertiaTensorMaster
Add Method get_inverse_inertia_tensor
2020-07-21 16:49:24 +02:00
Yerik a91103ac89 Add Method get_inverse_inertia_tensor 2020-07-21 11:33:41 -03:00
Rémi Verschelde 103b46733a
Merge pull request #40533 from zaevi/fix_clipboard_crlf
fix crlf for clipboard
2020-07-21 16:06:43 +02:00
Rémi Verschelde f6b6d51052
Merge pull request #40562 from nekomatata/osxcross-vulkan-layer
Fix Vulkan layer creation when compiling with OSXCross
2020-07-21 12:57:52 +02:00
Rémi Verschelde 15d07f489d
Merge pull request #40565 from akien-mga/enetgodot-style
ENetGodot: Apply clang-format and style guide
2020-07-21 12:57:32 +02:00
Rémi Verschelde d78976b1d9
Merge pull request #40548 from nekomatata/osxcross-min-version-10.12
Set minimum osx version to 10.12 for OSXCross compilation
2020-07-21 12:57:12 +02:00
PouleyKetchoupp 08b0fd4330 Set minimum osx version to 10.12 for OSXCross compilation
Fixes this compilation error:

In file included from thirdparty/vulkan/vk_mem_alloc.cpp:7:
thirdparty/vulkan/vk_mem_alloc.h:3691:18: error: 'shared_mutex' is unavailable: introduced in macOS 10.12
            std::shared_mutex m_Mutex;
                 ^
/home/[user]/sources/osxcross/target/bin/../SDK/MacOSX10.14.sdk/usr/include/c++/v1/shared_mutex:178:58: note: 'shared_mutex' has been explicitly marked unavailable here
class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
2020-07-21 12:37:56 +02:00
PouleyKetchoupp ce34b77c4a Fix MoltenVK layer creation when compiling with OSXCross 2020-07-21 12:37:20 +02:00
Rémi Verschelde e060a28183
Merge pull request #40560 from akien-mga/tileseteditor-polygon-size-crash
TileSet Editor: Check polygon size before indexing
2020-07-21 11:54:21 +02:00
Rémi Verschelde 896e7193d8 ENetGodot: Apply clang-format and style guide 2020-07-21 11:48:14 +02:00
Rémi Verschelde 6f428f2494 TileSet Editor: Check polygon size before indexing
Fixes #39722.
2020-07-21 11:18:19 +02:00
Rémi Verschelde fa3ac7deae
Merge pull request #40563 from akien-mga/travis-pin-emscripten-1.39.19
Travis: Pin Emscripten version to 1.39.19
2020-07-21 11:07:23 +02:00
Rémi Verschelde ca325856cf Travis: Pin Emscripten version to 1.39.19
1.39.20 dropped support for the no-embedded mode we use since #39168,
as our detection logic hasn't been fixed yet to support the embedded
mode.
2020-07-21 10:02:59 +02:00
Rémi Verschelde 15a97679bb
Merge pull request #40476 from Calinou/doc-visibilitynotifier
Improve the VisibilityNotifier and VisibilityEnabler class descriptions
2020-07-20 23:50:08 +02:00
Rémi Verschelde ca5033e8ab
Merge pull request #40463 from Calinou/doc-editorsettings
Complete the EditorSettings class documentation
2020-07-20 23:48:23 +02:00
Rémi Verschelde 2334a1cf19
Merge pull request #40493 from Calinou/doc-editor-plugins-interfaces
Document several editor-related classes to 100% completion
2020-07-20 23:47:50 +02:00
Rémi Verschelde 6746f8b890
Merge pull request #40477 from Calinou/doc-vector-dot
Document `Vector2.dot()` and `Vector3.dot()` more extensively
2020-07-20 23:46:28 +02:00
Rémi Verschelde b7aa474680
Merge pull request #40422 from amanj120/forward_port_bundle_pr_resources
Create strings.xml files in the Gradle project to handle localization
2020-07-20 22:26:44 +02:00
Rémi Verschelde 80a8a36ca1
Merge pull request #39801 from ChristopheLY/tween-bool-state
bug with Tween.is_active, fixes #39760
2020-07-20 22:23:43 +02:00
Rémi Verschelde 0a1dd5b6e4
Merge pull request #38763 from fire/38751
Allow gltf2 morph targets including animations with no default value…
2020-07-20 22:22:16 +02:00
Chistpohe LY d60617de10 bug with Tween.is_active, fixes #39760 2020-07-20 19:36:02 +02:00
Rémi Verschelde aada93afc0
Merge pull request #40491 from RandomShaper/font_avail_chars
Add DynamicFont::get_available_chars()
2020-07-20 19:18:53 +02:00
Pedro J. Estébanez 80a5df4821 Add DynamicFont::get_available_chars() 2020-07-20 17:44:39 +02:00