summaryrefslogtreecommitdiff
path: root/modules/mono/build_scripts/mono_configure.py
AgeCommit message (Collapse)Author
2022-09-26SCons: Unify tools/target build type configurationRémi Verschelde
Implements https://github.com/godotengine/godot-proposals/issues/3371. New `target` presets ==================== The `tools` option is removed and `target` changes to use three new presets, which match the builds users are familiar with. These targets control the default optimization level and enable editor-specific and debugging code: - `editor`: Replaces `tools=yes target=release_debug`. * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2` - `template_debug`: Replaces `tools=no target=release_debug`. * Defines: `DEBUG_ENABLED`, `-O2`/`/O2` - `template_release`: Replaces `tools=no target=release`. * Defines: `-O3`/`/O2` New `dev_build` option ====================== The previous `target=debug` is now replaced by a separate `dev_build=yes` option, which can be used in combination with either of the three targets, and changes the following: - `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`), enables generating debug symbols, does not define `NDEBUG` so `assert()` works in thirdparty libraries, adds a `.dev` suffix to the binary name. Note: Unlike previously, `dev_build` defaults to off so that users who compile Godot from source get an optimized and small build by default. Engine contributors should now set `dev_build=yes` in their build scripts or IDE configuration manually. Changed binary names ==================== The name of generated binaries and object files are changed too, to follow this format: `godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]` For example: - `godot.linuxbsd.editor.dev.arm64` - `godot.windows.template_release.double.x86_64.mono.exe` Be sure to update your links/scripts/IDE config accordingly. More flexible `optimize` and `debug_symbols` options ==================================================== The optimization level and whether to generate debug symbols can be further specified with the `optimize` and `debug_symbols` options. So the default values listed above for the various `target` and `dev_build` combinations are indicative and can be replaced when compiling, e.g.: `scons p=linuxbsd target=template_debug dev_build=yes optimize=debug` will make a "debug" export template with dev-only code enabled, `-Og` optimization level for GCC/Clang, and debug symbols. Perfect for debugging complex crashes at runtime in an exported project.
2022-09-07C#: Replace libnethost dependency to find hostfxrIgnacio Roldán Etcheverry
We want to replace libnethost as it gives us issues with some compilers. Our implementation tries to mimic libnethost's hostfxr_resolver search logic. We try to use the same function names for easier comparing in case we need to update this in the future.
2022-08-29[Web] Rename JavaScript platform to Web.Fabio Alessandrelli
Also rename export name from "HTML5" to "Web".
2022-08-26.NET: Change NETCore.App version detection to use highest matchRémi Verschelde
`libnethost.a` detection failed on my Linux system (Mageia 9, using Fedora 36 dotnet repos), because it used the first match which isn't the one matching the rest of the SDK: ``` $ dotnet --list-runtimes Microsoft.AspNetCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] ``` No idea why I still have 6.0.5 installed but it should pick the highest I guess.
2022-08-25C#: Fix buildsystem when `dotnet --info` does not specify archIgnacio Roldán Etcheverry
For some installations the architecture information is not printed.
2022-08-25Merge pull request #55778 from aaronfranke/use-arch-btwRémi Verschelde
[skip ci]
2022-08-25Unify bits, arch, and android_arch into env["arch"]Aaron Franke
Fully removes the `bits` option and adapts the code that relied on it. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-08-25[macOS] Check .NET binary architecture, and search for the cross compile SDK ↵bruvzg
in the subfolders.
2022-08-24Remove mentions of the Server platform from the Mono moduleAaron Franke
2022-08-22C#: Upgrade to .NET 6 (5.0 -> 6.0)Ignacio Roldán Etcheverry
2022-08-22C#/netcore: Add base desktop game export implementationIgnacio Roldán Etcheverry
This base implementation is still very barebones but it defines the path for how exporting will work (at least when embedding the .NET runtime). Many manual steps are still needed, which should be automatized in the future. For example, in addition to the API assemblies, now you also need to copy the GodotPlugins assembly to each game project.
2022-08-22Fix detection of .NET Sdk from snap and allow higher versionsIgnacio Roldán Etcheverry
2022-08-22C#: Fallback to `dotnet --info` to determine .NET RIDIgnacio Roldán Etcheverry
Some Linux distros use their distro name as the RID for directory names. If the .NET Host directory cannot be found with the generic RID, try to get the rid from `dotnet --info`. The generic RID should still be the first choice. Some platforms like Windows 10 define the RID as `win10-x64` but still use the generic `win-x64` for directory names. Co-authored-by: Lewis James <lewiji+github@gmail.com>
2022-08-22C#: Begin move to .NET CoreIgnacio Roldán Etcheverry
We're targeting .NET 5 for now to make development easier while .NET 6 is not yet released. TEMPORARY REGRESSIONS --------------------- Assembly unloading is not implemented yet. As such, many Godot resources are leaked at exit. This will be re-implemented later together with assembly hot-reloading.
2022-07-21Rename OSX to macOS and iPhoneOS to iOS.bruvzg
2021-07-01Remove unused code related to Travis CIHugo Locurcio
2020-12-17Merge pull request #44105 from neikeq/mono-wasm-m2n-hookRémi Verschelde
Mono: Make Godot provide its own WASM m2n trampolines
2020-12-14Mono: Don't use -rdynamic when compiling for WASMIgnacio Etcheverry
`-rdynamic` was causing the emsdk linker to silently fail to generate the output `.wasm` file (even though exit code was 0).
2020-12-06Mono: Add mono_bcl SCons option for a custom BCL locationIgnacio Etcheverry
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).
2020-09-25Enable the `copy_mono_root` SCons option by defaultHugo Locurcio
This closes #41652.
2020-09-10Remove unused Python imports.Marcel Admiraal
2020-07-26CI: Install master version of psf/blackRémi Verschelde
Until https://github.com/psf/black/pull/1328 makes it in a stable release, we have to use the latest from Git. Apply new style fixes done by latest black.
2020-06-15Fix dynamic linking of MSVC Mono with MinGW GodotIgnacio Etcheverry
2020-03-31Mono/C#: Add iOS supportIgnacio Etcheverry
Right now, games only work on devices when exported with FullAOT+Interpreter. There are some issues left that need to addressed for FullAOT alone. Right now, it's giving issues with the Godot.NativeCalls static constructor.
2020-03-31Mono/C#: Fix MinGW build not supporting `.lib` librariesIgnacio Etcheverry
MinGW should support both its own format `.a` and MSVC's format `.lib`, but Mono's module was only using the former. With this change it's now possible to build with MinGW and link the official Mono for Windows which is built with MSVC.
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-26Multiple changes to DisplayServerX11Mateo Kuruk Miccino
- Travis: Change x11 to linuxbsd - SCons: Change x11 plataform to linuxbsd - Plugins: Remove ; to avoid fallthrough warning - DisplayServerX11: Implement set_icon - DisplayServerX11: Fix X11 bug when a window was erased from windows map, all the changes from that erased windows are sending to the main window - DisplayServerX11: Reorder create_window commands - DisplayServerX11: Change every Size2 to Size2i and Rect2 to Rect2i where it belongs + More X11 fixes which have been integrated directly back into reduz's original commits while rebasing the branch.
2020-03-05Mono: Fix detection of Apple platforms in build scriptRémi Verschelde
2019-12-18Mono: Copy native and btls libs on macOSRémi Verschelde
2019-12-04Mono/C#: Several android fixesIgnacio Etcheverry
- Added correct config file for android dllmaps. - Fix __Internal DllImports with a dlopen fallback. - Add missing P/Invoke functions and internal calls expected by the monodroid BCL and our custom version of the 'Android.Runtime.AndroidEnvironment' class (this last one can be found in the godot-mono-builds repo). - Make sure to set 'btls' instead of 'legacy' as the default TLS provider on Android.
2019-11-29Mono/C#: Add option to export assemblies outside of PCKIgnacio Etcheverry
When using this options, assemblies will be saved in the Assemblies folder of the data directory: 'data_AppName/Assemblies/'.
2019-11-19Mono/C#: Bundle libmono-btls-shared.dll on Windows if it existsIgnacio Etcheverry
2019-11-13Mono/C#: WebAssembly supportIgnacio Etcheverry
2019-10-21Added the server platform checks to template dir and shared lib copyJoshLee0915
2019-09-04Split the Android platform java logic into an Android library module (`lib`) ↵fhuya
and an application module (`app`). The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-08-12Always use lists for `LIBS` in SConsHugo Locurcio
This closes #31288.
2019-07-05Re-write mono module editor code in C#Ignacio Etcheverry
Make the build system automatically build the C# Api assemblies to be shipped with the editor. Make the editor, editor player and debug export templates use Api assemblies built with debug symbols. Always run MSBuild to build the editor tools and Api assemblies when building Godot. Several bugs fixed related to assembly hot reloading and restoring state. Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
2019-07-03Merge pull request #30292 from neikeq/android_fixesRémi Verschelde
Mono: Android build and shared libraries fixes
2019-07-03Mono: Android build and shared libraries fixesIgnacio Etcheverry
Fix location of Mono's shared libraries. Fix build failing if the directory 'platform/android/java/libs/{target}/{abi}' doesn't exist.
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-06-04Mono: Fix SCons options added to the wrong environmentIgnacio Etcheverry
2019-06-03Android build and export for the mono moduleIgnacio Etcheverry
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-07Mono: Add compiler flags to env_mono instead of envIgnacio Etcheverry
This way we avoid possible conflicts with other modules. Specially with include paths.
2019-04-07Mono: Reorganize build scriptsIgnacio Etcheverry
All build scripts, other than config.py and SCSub, are now located in the build_scripts subdirectory.