Commit graph

26 commits

Author SHA1 Message Date
Ignacio Etcheverry
0b68677112 Print MSBuild command if also printing output 2019-03-06 17:10:14 +01:00
Ignacio Etcheverry
8877b07f4c Mono: Add option to print MSBuild output and improve out of sync error 2019-03-04 16:05:08 +01:00
Ignacio Etcheverry
5a4475fce3 Mono: Make sure the generated RootNamespace is a valid identifier 2019-02-28 22:26:15 +01:00
Ignacio Etcheverry
9115c6ab15
Merge pull request #25803 from neikeq/yy
Windows: Default to system MSBuild and add VSCode hint path
2019-02-11 22:25:11 +01:00
Ignacio Etcheverry
9a08b90472 Default to MSBuild from VS Build Tools instead of Mono's
Don't pass FrameworkPathOverride to MSBuild. It's causing issues with some nuget packages.
2019-02-11 22:03:37 +01:00
Ignacio Etcheverry
5f8c30fbca Mono: Create player script metadata when building manually
Previously this was only done when building the script for running the game. This was a problem because the user could want to build the project manually with the "Build project" button, to then run the game from the command line or similar.
2019-02-08 22:49:27 +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
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
Carter Anderson
d339824f15 Parse C# generics and type constraints correctly 2018-11-24 18:29:23 -08:00
Ignacio Etcheverry
02d5ff4cd0 Improve the C# API projects generation
- Now there is only one solution that contains both GodotSharp and GodotSharpEditor project. Previously we had one solution for each project
- GodotSharpEditor reference GodotShatp with a 'ProjectReference'. Previously it was a 'Reference' to the assembly
- This also simplifies the command line option to generate this solution: 'godot --generate-cs-api <OutputDir>'
2018-11-08 01:05:22 +01:00
Ignacio Etcheverry
1aac95a737 Parse C# script namespace and class
- Added a very simple parser that can extract the namespace and class name of a C# script.
2018-10-25 18:00:24 +02:00
Ignacio Etcheverry
92af2e620b Do not generate API project GUIDs randomly 2018-10-25 18:00:24 +02:00
Ignacio Etcheverry
611a476224 Support globs in csproj includes 2018-10-25 18:00:17 +02:00
Ignacio Etcheverry
3a9b23bcc2 Check if directory exists before trying to delete it 2018-10-08 23:03:58 +02:00
Ignacio Etcheverry
d7ece43b74 Mono: Editor and export template dependencies and fixes
- Bundle editor dependencies:
    - 'GodotSharp': Root data directory for the editor
        - 'Tools': Editor dependencies. Only GodotSharp.dll for now.
        - 'Api': Prebuilt GodotSharp and GodotSharpEditor API assemblies.
        - 'Mono': Mono files to bundle with the editor.
            - 'bin': (Optional, not used for now) Mono bin directory.
            - 'etc': Mono configuration files.
            - 'lib': Mono dependency shared libraries.
            - 'lib/mono/4.5': Framework assemblies.
    - Added build option to copy the required files from the mono installation to 'GodotSharp/Mono'. Enable with 'copy_mono_root=yes'. Disabled by default.

- Export template dependencies:
    - 'data_AppName'/'data_Godot':
        - 'Mono': Mono files to bundle with the game.
            - 'etc': Mono configuration files.
            - 'lib': Mono dependency shared libraries.
    - The data directory is generated when compiling and must be bundled with the export templates. In the case of OSX, the data directory must be placed inside the 'osx.zip' export template.
    - In OSX, alternative location for directories (needed for app bundles) are:
        - 'data_AppName/Mono/etc' --> '../Resources/GodotSharp/Mono/etc'
        - 'data_AppName/Mono/lib' --> '../Frameworks/GodotSharp/Mono/lib'

- The editor can bundle prebuilt API assemblies.
    - Generate them with a tools build by running: `--generate-cs-core-api <GodotSharp_OutputDir> --generate-cs-editor-api <GodotSharpEditor_OutputDir> <GodotSharp_OutputDir>/bin/Release/GodotSharp.dll` (This command will be simplified in the future and both projects will be in the same solution)
    - Build the solutions and copy the output files to '#bin/GodotSharp/Api'.
- Fixed API assembly being added twice during the export process.
2018-10-03 19:16:29 +02:00
Ignacio Etcheverry
50f6dbff87 Mono: Fix opening code editors in OSX and cleanup 2018-09-17 20:00:19 +02:00
Kelly Thomas
17516822f9 allow undefined GODOT_DEBUG_MSBUILD environment variable 2018-06-06 22:31:54 +08:00
Ignacio Etcheverry
25f10b3c40 Mono: Fix passing wrong logger assembly path to MSBuild
- Add option to print MSBuild's stdout and stderr instead of redirecting it. This can be enabled by setting the environment variable: Godot_DEBUG_MSBUILD=1
2018-06-05 22:18:43 +02:00
Ignacio Etcheverry
01397a10d9 Mono: Project building fixes
- Set (Csc/Vbc/Fsc)ToolExe environment variables to point to the batch files in Mono's bin directory when building with Mono's MSBuild.
- Set Mono's MSBuild as the default build tool on Windows.
- Generate projects with portable DebugType instead of full.
2018-05-17 01:26:23 +02:00
Rémi Verschelde
5bc2cf257b Convert DOS line endings to Unix line endings
Should fix issues some of us have with `misc/dist/uwp_template/AppxManifest.xml`
always showing up as modified.
Might cause issues on Windows due to the removal of BOMs or change of line endings
in some of the Mono, UWP or gradlew.bat files, we will test and adapt if need be.
2017-11-05 11:37:59 +01:00
Ignacio Etcheverry
15e30187ee Fix regression from #12473 and #12388 2017-10-29 10:11:20 +01:00
Ignacio Etcheverry
9f469887fc Buildsystem improvements for the Mono module
- Make sure to search the mono installation directory for the right architecture in the windows registry.
- Do not build GodotSharpTools directly to #bin dir. Instead build to the default output path and copy it. This way we avoid MSBuild adding files we don't want to #bin.
- Add hint path for MSBuild in OSX.
- Copy shared library on Unix if not statically linking.
- Use vswhere to search MSBuild and search for 14.0 tools version in the registry instead of 4.0.
- SCons will only fallback xbuild when msbuild is not found if 'xbuild_fallback=yes' is passed to the command.
- Use mono's assembly path as FrameworkPathOverride if using with system's MSBuild (not mono's fork).
- Cleanup.
2017-10-29 04:26:13 +01:00
Ignacio Etcheverry
14280ac44b Quote MSBuild arguments. Fixes #11892 2017-10-07 01:21:11 +02:00
Ignacio Etcheverry
df22bbd7ed Add C# script to csproj when attaching it to an object 2017-10-05 00:10:51 +02:00
Ignacio Etcheverry
b4d758e067 Add alternative search locations for msbuild 2017-10-05 00:08:38 +02:00
Ignacio Etcheverry
e36fb95c50 Added mono module 2017-10-03 00:01:26 +02:00