summaryrefslogtreecommitdiffstats
path: root/methods.py
Commit message (Collapse)AuthorAgeFilesLines
* SCons: Remove `run_in_subprocess` dependencyThaddeus Crews2024-03-111-6/+2
|
* SCons: Ensure `with` statement where applicableThaddeus Crews2024-03-101-50/+56
|
* Enforce `\n` eol for Python writesThaddeus Crews2024-03-091-11/+13
| | | | • Ensure utf-8 encoding if previously unspecified
* Add two new COMSTR environment variablesThaddeus Crews2024-03-011-4/+11
|
* Merge pull request #88949 from shana/vs-performance-improvementRémi Verschelde2024-02-291-23/+46
|\ | | | | | | Visual Studio: Improve performance of parsing project file
| * VS: Improve performance of parsing project fileAndreia Gaita2024-02-281-23/+46
| | | | | | | | | | | | | | VS doesn't handle string parsing very well, so having all the files in one property slows down VS a lot when loading the projects. Splitting the files up into per-directory properties brings down project processing times from 20 seconds to 1 second (on my machine).
* | Display the build date in the editor and when starting the engineHugo Locurcio2024-02-271-0/+13
|/ | | | | | | | | | | | | | | This can be used to quickly see how recent a development build is, without having to look up the commit date manually. When juggling around with various builds (e.g. for benchmarking), this can also be used to ensure that you're actually running the binary you intended to run. The date stored is the date of the Git commit that is built, not the current date at the time of building the binary. This ensures binaries can remain reproducible. The version timestamp can be accessed using the `timestamp` key of the `Engine.get_version_info()` return value.
* VS: Fix user workflows with custom user VS configurationsAndreia Gaita2024-02-121-1/+19
| | | | | | | | | | | | | | Users can add additional VS project configurations with their own custom settings, but to support this workflow, we can't rely directly on $(Platform) and $(Configuration), because VS needs those to be both unique Configuration|Platform combos, and we need to allow for different combos of Configuration|Platform to point to the same scons build configuration. GodotPlatform and GodotConfiguration properties lets us decouple from the magic VS properties that we don't control, so users can add however many Platform|Configuration combos they want and still point to a specific GodotPlatform|GodotConfiguration build config.
* Add new VS proj generation logic that supports any platform that wants to opt inAndreia Gaita2024-01-311-155/+453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Custom Visual Studio project generation logic that supports any platform that has a msvs.py script, so Visual Studio can be used to run scons for any platform, with the right defines per target. Invoked with `scons vsproj=yes` To generate build configuration files for all platforms+targets+arch combinations, users should call ``` scons vsproj=yes platform=XXX target=YYY [other build flags] ``` for each combination of platform+target[+arch]. This will generate the relevant vs project files but skip the build process, so that project files can be quickly generated without waiting for a command line build. This lets project files be quickly generated even if there are build errors. All possible combinations of platform+target are created in the solution file by default, but they won't do anything until each one is set up with a scons vsproj=yes command for the respective platform in the appropriate command line. This lets users only generate the combinations they need, and VS won't have to parse settings for other combos. Only platforms that opt in to vs proj generation by having a msvs.py file in the platform folder are included. Platforms with a msvs.py file will be added to the solution, but only the current active platform+target+arch will have a build configuration generated, because we only know what the right defines/includes/flags/etc are on the active build target currently being processed by scons. Platforms that don't support an editor target will have a dummy editor target that won't do anything on build, but will have the files and configuration for the windows editor target. To generate AND build from the command line, run ``` scons vsproj=yes vsproj_gen_only=no ```
* Remove now unused `year` member from `version.py`Rémi Verschelde2024-01-251-2/+0
| | | | | We changed copyright to use "present" for the current year, so we no longer need to hardcode this and (like now) forget to bump it yearly.
* Merge pull request #85206 from bruvzg/mac_clang_version_check_updateRémi Verschelde2024-01-181-1/+30
|\ | | | | | | [macOS] Check Apple specific version instead of generic clang version.
| * [macOS] Check Apple specific version instead of generic clang version.bruvzg2023-11-221-1/+30
| |
* | use venv if detected when building godot.slnAlex Drozd2023-11-261-3/+10
| |
* | Fix generating vsproj with SCons 4.6.0+Max Hilbrunner2023-11-251-8/+11
|/
* SCons: Reduce and cleanup verbose output for SCU buildsRémi Verschelde2023-10-261-3/+0
| | | | | | | | Verbose output is meant for debugging the SCU mode itself and can be triggered by changing the `_verbose` bool manually. Prefix all prints with "SCU:" for context, and print the processed folders all at once instead of when adding the sources.
* Fix compiler detection.bruvzg2023-09-261-1/+1
|
* Updated compiler version detectionMario Liebisch2023-09-251-9/+26
| | | | | | | | | | | This fixes multiple issues/inconsistencies around `get_compiler_version()`: * With no shell allocated, launching the compiler could fail even with proper paths being set. * The return value was described as "an array of version numbers as ints", but the function actually returned a `Dictionary` (or `None`). * Not all calls were properly handling a `None` return value in case of errors. On Windows this broke compiling for me since #81869 with default settings. * Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
* SCons: Fix Python 3.12 SyntaxError with regex escape sequencesRémi Verschelde2023-09-251-7/+7
|
* fix build options configuration for Visual Studio projectsValery Zhuk2023-09-021-22/+13
|
* Build system: add option for MSVC incremental linking.ocean (they/them)2023-08-291-0/+3
|
* Carry over the windows_subsystem setting to the generated vsproj if it's not ↵Dario2023-08-121-0/+3
| | | | | | the default. Even if you specify the subsystem to be the console one, the vsproj doesn't carry over the setting, which makes working with this mode in the IDE a bit annoying since it'll regenerate the vsproj right afterwards. Since there's only two options and 'gui' is the default, we only carry over the 'console' setting.
* SCons: Move platform logo/run icon to `export` folderRémi Verschelde2023-06-201-27/+0
| | | | | | | | | | | | Follow-up to #75932. Since these icons are only used by the export plugin, it makes sense to move them and generate the headers there. The whole `detect.is_active()` logic seems to be a leftover from before times, as far back as 1.0-stable it already wasn't used for anything. So I'm removing it and moving the export icon generation to `platform_methods`, where it makes more sense.
* CI: Update static checks to black 23.3.0Rémi Verschelde2023-06-191-9/+0
| | | | And apply it to the codebase, removing empty lines at the start of blocks.
* SCU build - Change options to "yes / no"lawnjelly2023-06-081-1/+1
| | | | To save confusion for users who prefer yes / no, rather than none / dev / all.
* Single Compilation Unit build.lawnjelly2023-06-061-2/+82
| | | | | Adds support for simple SCU build (DEV_ENABLED only). This speeds up compilation by compiling multiple cpp files within a single translation unit.
* Fix forced optimization in dev_buildsmix82023-04-101-1/+1
| | | | Fixes forced optimization in dev_build.
* Fix the Python type error when creating the .sln fileHK-SHAO2023-03-251-1/+1
|
* Let VS solution name be overriddenPedro J. Estébanez2023-02-161-2/+2
|
* Merge pull request #63312 from bruvzg/one_clickRémi Verschelde2023-01-131-18/+18
|\ | | | | | | [Export] Add one-click deploy over SSH for the desktop exports.
| * [Export] Add one-click deploy over SSH for the desktop exports.bruvzg2022-12-291-18/+18
| | | | | | | | | | | | Add one-click deploy over SSH for the desktop exports. Add ZIP export option for Linux and Windows. Change export plugin icons to SVG format.
* | Support Git worktrees in generation of hash headerPedro J. Estébanez2023-01-091-0/+4
|/
* Rename `float=64` SCons option to `precision=double`Hugo Locurcio2022-12-101-3/+3
| | | | | This avoids confusion with the old `bits=64` option and building for 64-bit CPUs in general.
* .NET: Generate SdkPackageVersions.props from version.pyRémi Verschelde2022-10-051-9/+9
| | | | | | | | | | | | | | | | | Ensures that the versions always match the Godot version, albeit following SemVer 2.0 so inserting a dot between "beta" and the build number. For "stable" status, we omit the suffix as this would be interpreted as a pre-release build too. So we have: | Godot version | Nupkg version | | -------------- | -------------- | | 4.0.0-beta | 4.0.0-beta | | 4.0.0-beta2 | 4.0.0-beta.2 | | 4.0.0-rc1 | 4.0.0-rc.1 | | 4.0.0-stable | 4.0.0 |
* Various enhancements to Visual Studio solution generation.TechnoPorg2022-10-041-2/+8
| | | | | This adds support for building solutions with dev_mode and/or float=64 enabled. Additionally, it adds solution generation to the Windows CI to catch future regressions.
* Merge pull request #66718 from afestini/fix_vs_project_creationRémi Verschelde2022-10-041-3/+2
|\ | | | | | | Fix VS project creation
| * vsproj: create build targets depending on dev_buildAlexander Festini2022-10-031-3/+2
| |
* | fix methods.py ->NameError: name 'sys' is not definedjwt2022-10-021-0/+1
|/ | | | | | Update methods.py Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
* ci: add Python static analysis check via mypyJiri Suchan2022-09-301-3/+1
|
* Merge pull request #66242 from akien-mga/scons-unify-tools-targetRémi Verschelde2022-09-301-13/+12
|\
| * SCons: Unify tools/target build type configurationRémi Verschelde2022-09-261-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | SCons: Fix MSVC D9025 warning overriding opt levelRémi Verschelde2022-09-271-12/+12
|/ | | | And cleanup disable_warnings too to avoid setting `/w` / `-w` multiple times.
* Fix compilation with custom "GODOT_VERSION_STATUS"Björn Feber2022-09-251-1/+1
|
* Don't add `editor_sources` to vs_project when `tools=no`nikitalita2022-09-241-1/+2
| | | `editor_sources` was being added to the vs_project when godot is compiled with `tools=no`, which caused the build to fail.
* SCons: Add `methods.get_version_info()` method returning a DictRémi Verschelde2022-09-141-29/+64
| | | | | | | | This makes it possible to retrieve all relevant versioning info used to generate `core/version_generated.gen.h` in the buildsystem. Notably it makes the custom logic parsing the `GODOT_VERSION_STATUS` environment variable to override status easy to reuse.
* C#: Replace libnethost dependency to find hostfxrIgnacio Roldán Etcheverry2022-09-071-15/+6
| | | | | | | 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.
* Fix build failures for Android on WindowsFredia Huya-Kouadio2022-08-311-10/+11
| | | | The issue is caused by https://github.com/godotengine/godot/pull/64306 which makes use of a 3.7 feature while the current recommended python version is 3.5 for 3.x and 3.6 for master.
* Correct output file names for Visual Studio project generationSaracenOne2022-08-271-1/+1
|
* Unify bits, arch, and android_arch into env["arch"]Aaron Franke2022-08-251-1/+1
| | | | | | Fully removes the `bits` option and adapts the code that relied on it. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* C#: Begin move to .NET CoreIgnacio Roldán Etcheverry2022-08-221-7/+10
| | | | | | | | | | | | 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.
* Fix jumbled error output when using Windows spawn fixPedro J. Estébanez2022-08-121-0/+1
|