Commit graph

958 commits

Author SHA1 Message Date
Rémi Verschelde
558d524bcb Mono: Don't use C++17 [[maybe_unused]] to preserve C++14 compatibility
The 3.2 branch compiles against the C++14 standard to keep good compatibility
with somewhat older compilers.

Fixes #45839.
2021-03-05 23:28:09 +01:00
Shane Liesegang
4d06a5c2b0 Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 42eb09ddcc)
2021-03-04 12:21:17 +01:00
Aaron Franke
b2d723b039 Add generic support to PackedScene.Instance
(cherry picked from commit 3f50954ced)
2021-03-02 10:26:14 +01:00
Pedro J. Estébanez
6f4f49c1d5 Make glue generation shutdown more graceful
(cherry picked from commit 23907e6f19)
2021-02-22 21:40:16 +01:00
Pedro J. Estébanez
6d89f675b1 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez
4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
bruvzg
9e4cecc8ea [Mono] Use the same search logic for both MSBuild and dotnet, add custom search paths on macOS.
(cherry picked from commit e304f716c7)
2021-02-05 09:29:29 +01:00
zaevi
f94dffd2de
Fix C# string.Hash()
(cherry picked from commit baac70c27e)
2021-02-02 13:30:54 +01:00
Ivan Shakhov
7ecc2561cd
Fix off by one error navigating to line number in Rider
Fixes https://github.com/JetBrains/godot-support/issues/61

(cherry picked from commit deef9a73a5)
2021-02-02 13:02:46 +01:00
Aaron Franke
226528097e
[3.2] Backport hex_to_int/bin_to_int zero check and C# changes 2021-01-28 09:24:44 -05:00
Ignacio Etcheverry
44d8669364
C#: Fix System.Collections.Generic.List marshalling
(cherry picked from commit da90364adf)
2021-01-26 17:00:17 +01:00
Rémi Verschelde
9f2c24e8ce
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.

(cherry picked from commit 76c6007aa6)
2021-01-26 17:00:15 +01:00
magian1127
cb679dc434 C # mono supports Unicode code 2021-01-18 16:34:10 +08:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rémi Verschelde
188609e5ab
CI: Update to clang-format 11 and apply ternary operator changes
(cherry picked from commit af878716f2)
2021-01-13 16:14:35 +01:00
Eyad
d4bfa5a684
Fixes #42149 and fixes indentation errors to pass clang-format
(cherry picked from commit be1c161b0b)
2020-12-29 16:02:01 +01:00
Ignacio Etcheverry
bf942447a3
Mono: Add extra WASM framework assemblies on game export
This is needed with newer Mono versions, at least with Mono 6.12+

Depends on the following commit from our build scripts:
godotengine/godot-mono-builds@9d75cff174

(cherry picked from commit b98e8b11e6)
2020-12-29 16:01:59 +01:00
Ignacio Etcheverry
1a5e985ed4 [3.2] Mono: Make Godot provide its own WASM m2n trampolines
This depends on a custom Mono patch from this commit:
godotengine/godot-mono-builds@0e312939bd
2020-12-14 19:46:41 +01:00
Ignacio Etcheverry
2c89152b33 Mono: Don't use -rdynamic when compiling for WASM
`-rdynamic` was causing the emsdk linker to silently fail to
generate the output `.wasm` file (even though exit code was 0).
2020-12-13 21:46:38 +01:00
Rémi Verschelde
31cd9e560c
Mono: Fix GodotTools build after invalid cherry-pick
I wrongly resolved the cherry-pick conflict in c5acdfb5f5.
2020-12-10 17:54:37 +01:00
Hugo Locurcio
8542d6ecd5
Tweak log file names for consistency between Mono and non-Mono logs
- Avoid spaces in Mono log file names.
- Use a `.log` extension for Mono logs, just like non-Mono logs.
- Use periods to separate hours/minutes/seconds for non-Mono logs.

(cherry picked from commit 4d81776fc9)
2020-12-09 11:22:05 +01:00
Ignacio Etcheverry
a624448197
Mono: Add mono_bcl SCons option for a custom BCL location
Makes it let's bothersome to work with builds from our
godotengine/godot-mono-builds scripts, as they write the
BCL into an output directory separate from the runtime
(which is good as two runtimes may share the same BCL).

(cherry picked from commit dd5ace219d)
2020-12-09 11:22:05 +01:00
Ignacio Etcheverry
2725ce6798
Fix unhandled exception re-thrown in the editor
(cherry picked from commit bbaf854956)
2020-12-09 11:22:05 +01:00
Ignacio Etcheverry
c5acdfb5f5
C#: Fix very slow build log update in the editor
(cherry picked from commit b0eb9061e4)
2020-12-09 11:22:05 +01:00
Ignacio Etcheverry
a07589e2ad C#: Bump Godot.NET.Sdk version to 3.2.4 2020-12-06 01:12:10 +01:00
Ignacio Etcheverry
cd339ff002 C#: Remove ProjectTypeGuids from Godot.NET.Sdk
The property has no effect as the older VS project system doesn't
work with Sdk style projects.

The presence of the property was preventing Visual Studio for Mac
from opening the project if the Godot extension is not installed.
2020-12-06 01:12:10 +01:00
Ignacio Etcheverry
d639941446 C#: Fix targeting .NETFramework with Godot.NET.Sdk and .NET 5
Our target was overriding the official one, while not doing its job
assuming it was already taken care of...
2020-12-06 01:12:10 +01:00
Ignacio Etcheverry
9b24d5f2d0 C#: Don't overwrite newer Godot.NET.Sdk patch version in csproj
Allow game projects to use a Godot.NET.Sdk with a newer patch version.
The major and minor version are still required to be the same.

For example: Allow a Godot 3.2.4 C# project to use a hypothetical
3.2.5 version of Godot.NET.Sdk.
2020-12-06 01:11:31 +01:00
Aaron Franke
3b10458a5d
Add HexEncode to C#
(cherry picked from commit 6b54d7dde1)
2020-11-17 12:02:00 +01:00
Aaron Franke
e3419a7fe1
Add LStrip and RStrip to C# strings
(cherry picked from commit c89af1d433)
2020-11-17 12:01:59 +01:00
Aaron Franke
9c83b8ed70
[3.2] Improve comments in Color documentation 2020-11-14 04:56:18 -05:00
Yuri Roubinsky
23620ff046
[Mono] Added Shuffle method to Array
(cherry picked from commit 156e4043b4)
2020-11-11 15:30:57 +01:00
Aaron Franke
1bb81488bb
Minor clamp and float fixes
(cherry picked from commit ee79fc627c)
2020-11-11 15:30:57 +01:00
Rémi Verschelde
0237d42809
Merge pull request #42547 from neikeq/3.2-rework-csharp-build-panel
[3.2] C#: Re-work solution build output panel
2020-10-20 15:12:30 +02:00
Aaron Franke
730d42d8a4
Add GetStringFromUTF8 and GetStringFromASCII
(cherry picked from commit 029de52001)
2020-10-19 16:10:01 +02:00
Rémi Verschelde
9bbfa929bc
Mono: Fix typo in Godot.NET.Sdk.nuspec
Fixes #42666.

(cherry picked from commit 1af3cf15c2)
2020-10-19 16:09:59 +02:00
Ignacio Etcheverry
fdfba05fab [3.2] C#: Re-work solution build output panel
- Removed item list that displayed multiple build
  configurations launched. Now we only display
  the last build that was launched.
- Display build output next to the issues list.
  Its visibility can be toggled off/on.
  This build output is obtained from the MSBuild
  process rather than the MSBuild logger. As such
  it displays some MSBuild fatal errors that
  previously couldn't be displayed.
- Added a context menu to the issues list with
  the option to copy the issue text.
- Replaced the 'Build Project' button in the panel
  with a popup menu with the options:
  - Build Solution
  - Rebuild Solution
  - Clean Solution
- The bottom panel button was renamed from 'Mono'
  to '.NET' and now display an error/warning icon
  if the last build had issues.
2020-10-11 16:51:54 +02:00
Sergey Minakov
5d1284204d iOS: port ARC support 2020-10-06 00:23:25 +03:00
Eduardo Rodrigues
f14e569ab3
Fix error message when exporting a write-only property without a setter
(cherry picked from commit aca0cede67)
2020-10-01 16:00:43 +02:00
Hugo Locurcio
7b3f9ebb94
Enable the copy_mono_root SCons option by default
This closes #41652.

(cherry picked from commit cfd564b385)
2020-09-29 13:57:55 +02:00
Aaron Franke
ea3bbbe0f2
Add concatenation support and a new ctor to Godot.Collections.Array
(cherry picked from commit a4dcd48d16)
2020-09-24 14:43:10 +02:00
Ricardo Alcantara
197b375b89
Basis RotationQuat should be public.
(cherry picked from commit a676b8ea66)
2020-09-24 14:43:08 +02:00
Aaron Franke
1dcbcaaa0d
Change inequality comparison operators to use exact equality
(cherry picked from commit d0a1399a1b)
2020-09-24 14:43:08 +02:00
Zae
e5b357cfb1
Fix C# string.IsAbsPath()
(cherry picked from commit b5eea5cfd4)
2020-09-24 14:43:08 +02:00
Raul Santos
cf45fa7f36
Fix ExprMatch stackoverflow
(cherry picked from commit d425cf6fed)
2020-09-24 14:43:07 +02:00
Rémi Verschelde
c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Tom Daffin
46b4e82f92
Add mono log message to error for fatal errors
(cherry picked from commit c15fb42d45)
2020-09-14 12:07:12 +02:00
Ignacio Etcheverry
cdc9fe154f
C#: Fix csproj not synced on file move/removal from FS dock
When NormalizePath was called with an absolute
path (with drive letter) on Windows, it would
prepend a file path separator to the path, e.g.:
'\C:\Program Files\'.
Apparently this was still accepted as a valid
path by DotNetGlob and it stopped working when
we switched to MSBuildGlob.

(cherry picked from commit 1db0395950)
2020-09-13 12:35:34 +02:00
Ignacio Etcheverry
8c5ed68847
C#: Use BOM when creating a solution
At least on Windows there seems to be issues if
the solution has no BOM and contains a project
with cyrillic chars.

(cherry picked from commit 1c74fa4242)
2020-09-08 22:02:24 +02:00
Ignacio Etcheverry
e72ee23c43 [3.2] C#: Fix endless reload loop if project has unicode chars
The assembly modified time wasn't picked properly
as the path was treated as latin-1, so the file
watcher was constantly firing the event.
2020-09-08 19:47:47 +02:00