summaryrefslogtreecommitdiff
path: root/modules/mono/editor/GodotTools
AgeCommit message (Collapse)Author
2021-08-12Use real_t and double where appropriate in ParticlesAaron Franke
2021-08-06Ensure MSBuildPanel buttons are instantiatedRaul Santos
2021-08-03Fix the editor theme application for the Mono build logYuri Sizov
2021-07-27Ignore paths with invalid chars in PathWhichRaul Santos
2021-07-26Use Array.Empty instead of allocating a every timeRaul Santos
Use `System.Array.Empty<T>` to get an empty array instead of allocating a new one every time. Since arrays are immutable there is no need to allocate them every time.
2021-07-23Add a simple C# .editorconfigAaron Franke
2021-07-15Mono: Remove info dialog discouraging use in productionRémi Verschelde
While there are still various bugs to solve and features to implement, the C# support as of Godot 3.4 is fairly mature and already used by a number of users in production. Now that we default to dotnet CLI as build tool, it also seems to be more reliable than MSBuild. The documentation can (and does for the most part) point out some caveats that users should be aware of, but this info dialog has outlived its intended purpose.
2021-06-23Fixing mono build after instance() -> instanciate() name changeGrzegorz Puławski
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-13Improve & fix Mono buildPedro J. Estébanez
- Fix C++ compile errors about pending variable renames after the `Reference` to `RefCount` change. - Fix C# compile errors due to the recent rename of `EnablePlugin()` and `Build()`, which are now underscore-prefixed in bindings. - Additional rename: `godot_icall_Reference_Dtor` to `godot_icall_RefCounted_Dtor`.
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-03-06Add C# source generator for a new ScriptPath attributeIgnacio Etcheverry
This source generator adds a newly introduced attribute, `ScriptPath` to all classes that: - Are top-level classes (not inner/nested). - Have the `partial` modifier. - Inherit `Godot.Object`. - The class name matches the file name. A build error is thrown if the generator finds a class that meets these conditions but is not declared `partial`, unless the class is annotated with the `DisableGodotGenerators` attribute. We also generate an `AssemblyHasScripts` assembly attribute which Godot uses to get all the script classes in the assembly, eliminating the need for Godot to search them. We can also avoid searching in assemblies that don't have this attribute. This will be good for performance in the future once we support multiple assemblies with Godot script classes. This is an example of what the generated code looks like: ``` using Godot; namespace Foo { [ScriptPathAttribute("res://Player.cs")] // Multiple partial declarations are allowed [ScriptPathAttribute("res://Foo/Player.cs")] partial class Player {} } [assembly:AssemblyHasScripts(new System.Type[] { typeof(Foo.Player) })] ``` The new attributes replace script metadata which we were generating by determining the namespace of script classes with a very simple parser. This fixes several issues with the old approach related to parser errors and conditional compilation. It also makes the task part of the MSBuild project build, rather than a separate step executed by the Godot editor.
2021-02-04[Mono] Use the same search logic for both `MSBuild` and `dotnet`, add custom ↵bruvzg
search paths on macOS.
2021-01-28Fix off by one error navigating to line number in RiderIvan Shakhov
Fixes https://github.com/JetBrains/godot-support/issues/61
2021-01-19Cleanup: Remove executable bit from files which don't need itRémi Verschelde
Drop unused xpmfix.sh script.
2021-01-13Update Mono module to use new execute method.Marcel Admiraal
2020-12-14Mono: Add extra WASM framework assemblies on game exportIgnacio Etcheverry
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@9d75cff174fa3599a9d90f9bce53f0a86154db1e
2020-12-05C#: Fix very slow build log update in the editorIgnacio Etcheverry
2020-10-23C#: Make editor create NuGet fallback folder for Godot packagesIgnacio Etcheverry
Main benefits: - Projects can be built offline. Previously you needed internet access the first time building to download the packages. - Changes to packages like Godot.NET.Sdk can be easily tested before publishing. This was already possible but required too many manual steps. - First time builds are a bit faster, as the Sdk package doesn't need to be downloaded. In practice, the package is very small so it makes little difference. Bumped Godot.NET.Sdk to 4.0.0-dev3 in order to enable the recent changes regarding '.mono/' -> '.godot/mono/'.
2020-10-23C#: Re-work solution build output panelIgnacio Etcheverry
- 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 'MSBuild' and now display an error/warning icon if the last build had issues.
2020-10-08Adressed ReviewLorenz Junglas
Identifier "macOS" => "MacOS" Platform/SDK name reverted to "osx"
2020-10-08C# GodotTools: Replace platform Identifier "OSX" with "macOS"Lorenz Junglas
Because `Strings OS_OSX::get_name() const` now returns "macOS" (15a9f94346c211b7afe96af500cb3405aabcf6b8) The C# GodotTools were still using "OSX" as identifier a few things were borken (e.g. dotnet/msbuild detection).
2020-09-23Rename the ".mono" folder to ".godot/mono"Aaron Franke
2020-09-18Fix typos with codespellRémi Verschelde
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-13C#: Fix csproj not synced on file move/removal from FS dockIgnacio Etcheverry
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.
2020-09-08C#: Use BOM when creating a solutionIgnacio Etcheverry
At least on Windows there seems to be issues if the solution has no BOM and contains a project with cyrillic chars.
2020-09-06Handle csproj "Remove" globsAlex de la Mare
MSBuild Item returns empty strings if an attribute isn't set (which caused an IndexOutOfRangeException in NormalizePath). We were treating Excludes incorrectly, Remove directives provide the intended behaviour in the auto-including csproj format.
2020-09-04Merge pull request #41753 from neikeq/csharp-hide-build-button-if-no-projRémi Verschelde
C#: Hide Build button if there's no solution to build
2020-09-04Merge pull request #41747 from neikeq/issue-41446Rémi Verschelde
Fix parsing of C# files with spaces in the path
2020-09-04Merge pull request #41750 from neikeq/issue-41745Rémi Verschelde
C#: Fix Godot failing to find class namespace
2020-09-04C#: Hide Build button if there's no solution to buildIgnacio Etcheverry
Same as we do with the bottom panel. Mainly to avoid bothering if the project is not using C#.
2020-09-04C#: Fix Godot failing to find class namespaceIgnacio Etcheverry
2020-09-04Fix parsing of C# files with spaces in the pathIgnacio Etcheverry
2020-09-03C#: Fix Windows detection for copying MSBuild stubIgnacio Etcheverry
Previous condition checked only the host platform. This was a problem as our official builds are from Linux.
2020-08-30C#: Fix InvalidCastException on exportIgnacio Etcheverry
2020-08-29Mono: Improve MSBuildFinder logic on WindowsThaina Yu
Support detecting both 32-bit and 64-bit installations of `vswhere.exe`.
2020-08-24C#: Fix 'Parameter toolsPath cannot be null' errorIgnacio Etcheverry
2020-08-21Merge pull request #41410 from neikeq/no-bom-on-csproj-creationRémi Verschelde
C#: Save newly created csproj files without BOM
2020-08-21Merge pull request #41409 from neikeq/fix-null-in-msbuild-loggerRémi Verschelde
C#: Fix null exception in our MSBuild logger
2020-08-21C#: Save newly created csproj files without BOMIgnacio Etcheverry
2020-08-21C#: Fix null exception in our MSBuild loggerIgnacio Etcheverry
2020-08-21Mono/C#: Fix editor using wrong project assembly path in rare casesIgnacio Etcheverry
We were removing invalid path characters from the name in C++ code, but the C# editor code wasn't.
2020-08-19C#: Fix editor unable to play game after IDE PlayRequestIgnacio Etcheverry
The editor wasn't clearing the debugger agent settings properly after a processing a play request from an IDE. This caused consequent play attempts to fail if not launched from the IDE, as the game would still attempt and fail to connect to the debugger. The concrete cause: Forgetting to clear the `GODOT_MONO_DEBUGGER_AGENT` environment variable.
2020-07-25C#: Switch games to MSBuild Sdks and .NET StandardIgnacio Etcheverry
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-22C#: Fix restore not called when building game projectsIgnacio Etcheverry
2020-07-13Commit other files changed by file_format.shAaron Franke
2020-06-30Change assembly watcher after notification changesG'lek
Fixed Mono not building after #39986 was merged due to a constant that got renamed.
2020-06-26Merge pull request #39837 from neikeq/fix-invalid-unbox-long-as-intRémi Verschelde
Mono/C#: Fix InvalidCast because of attempt to unbox long as int
2020-06-25Mono/C#: Use /restore instead of /t:restore when buildingIgnacio Etcheverry
Documentation recommends not to use /t:restore together with other targets (like /t:build), as it messes with the environment.
2020-06-25Mono/C#: Fix InvalidCast because of attempt to unbox long as intIgnacio Etcheverry