summaryrefslogtreecommitdiff
path: root/SConstruct
AgeCommit message (Collapse)Author
2022-09-02SCons: Enforce version 4.0+ when `compiledb=yes` is usedRémi Verschelde
Fixes #65233.
2022-08-29[Web] Rename JavaScript platform to Web.Fabio Alessandrelli
Also rename export name from "HTML5" to "Web".
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-07Merge pull request #63919 from Faless/scons/4.x_easy_depsRémi Verschelde
2022-08-04[Scons] Implement module dependency sorting.Fabio Alessandrelli
Modules can now call: env.module_add_dependencies(name: str, deps: list, optional: bool) To add required or optional dependencies during the "can_build" step. Required dependencies will be checked and the module will be not be enabled when they are missing, printing a warning to notify the user.
2022-08-03Add Text Server related options to the build profiles editor.bruvzg
Adds SCons options to disable Brotli and Graphite. Adds option categories to the build profiles editor. Adds options default state to the build profiles editor. Adds Text Server related options to the build profiles editor. Fix misplaced OpenGL/Vulkan SCons options.
2022-07-22Merge pull request #63310 from akien-mga/scons-vsproj-windowsRémi Verschelde
SCons: Prevent using `vsproj` option outside Windows
2022-07-22SCons: Prevent using `vsproj` option outside WindowsRémi Verschelde
Fixes #63305.
2022-07-22Merge pull request #62996 from reduz/feature-build-profilesRémi Verschelde
2022-07-22Implement Feature Build Profilesreduz
This PR is a continuation of #50381 (which was implemented exactly a year ago!) * Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out). * Add a detection system to scan the project and figure out the actual classes used. * Added the ability for SCons to load build profiles. Obligatory Screen: A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size TODO: * Script languages need to implement used class detection (left for another PR). * Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size. * Options to disable some modules would be desired. * More options to disable drivers (OpenGL, Vulkan, etc) would be desired. In general this PR is a starting point for more contributors to improve and enhance this functionality.
2022-07-21Rename OSX to macOS and iPhoneOS to iOS.bruvzg
2022-07-17SCons: Default `num_jobs` to max CPUs minus 1 if not specifiedRémi Verschelde
This doesn't change the behavior when `--jobs`/`-j` is specified as a command-line argument or in `SCONSFLAGS`. The SCons hack used to know if `num_jobs` was set by the user is derived from the MongoDB setup. We use `os.cpu_count()` for portability (available since Python 3.4). With 4 CPUs or less, we use the max. With more than 4 we use max - 1 to preserve some bandwidth for the user's other programs.
2022-07-07Only include editor/SCsub when building the editor: tools=yesMarcel Admiraal
2022-06-25Upgrade Android NDK to r23 LTSMarcel Admiraal
2022-05-03SCons: Don't enable any `-Werror=return-type` outside `werror=yes`Rémi Verschelde
We shouldn't presume that future compilers will not have false positives or find new occurrences of this warning, which would break compiling old versions of the engine without passing custom `CXXFLAGS`. Follow-up to #60652.
2022-04-30SCons: Disable `-Werror=return-type` for GCC 12+ due to regressionRémi Verschelde
Works around and thus closes #58747. Supersedes #60613.
2022-03-28Remove last editor code dependencies in template buildRémi Verschelde
SConstruct change also makes it possible to outright delete the `editor` folder in a `tools=no` build, which we use in CI to ensure no invalid cross-dependencies are added.
2022-03-17Unify TextServer built-in module and GDExtension code.bruvzg
2022-03-09Remove unused Bullet module and thirdparty codeRémi Verschelde
It has been disabled in `master` since one year (#45852) and our plan is for Bullet, and possibly other thirdparty physics engines, to be implemented via GDExtension so that they can be selected by the users who need them.
2022-02-23Implementing OpenXR driverBastiaan Olij
2022-02-09SCons: Make compilation database generation optionalRémi Verschelde
Saves around 3 s on incremental rebuilds to have it disabled by default. Can be enabled with `compiledb=yes`.
2022-02-08SCons: Add `fast_unsafe` option for faster rebuildsRémi Verschelde
This reverts #53828 which had caused a significant drop in incremental rebuild time for debug builds (from 10s to 23s on my laptop). The "faster but unsafe" options are re-added, as well as adding `max_drift=60` which we didn't use previously. These options speed up SCons' own processing of the codebase to decide what to build/rebuild (i.e. the first step before actually calling the compiler). This will therefore not make much difference for scratch builds, and is mostly useful for incremental rebuilds (including "null" rebuilds with no change). These options are enabled automatically for `debug` builds, unless `fast_unsafe=no` is passed. They are disabled by default for `release` and `release_debug` builds, unless `fast_unsafe=yes` is passed.
2022-01-13Improve python helper modules declaration in SConstruct for compatibility ↵Emmanuel Leblond
with Python 3.6 and import against helper modules's parent path
2022-01-12Explicitly declare python helper modules in SConstruct to avoid unexpected ↵Emmanuel Leblond
shadowing
2022-01-12Merge pull request #56308 from Calinou/scons-tweak-target-release-error-messageRémi Verschelde
2022-01-06Revert "Print a warning with unknown SCons variables to ease troubleshooting"Rémi Verschelde
2021-12-29Improve error when attempting to build with `tools=yes target=release`Hugo Locurcio
2021-12-06Rename `VideoPlayer` to `VideoStreamPlayer` for consistencyRémi Verschelde
It's a player for `VideoStream` resources, just like `AudioStreamPlayer` is a player for `AudioStream` resources. Closes https://github.com/godotengine/godot-proposals/issues/3624.
2021-11-30Remove editor splash screen with sponsors logoRémi Verschelde
The Godot Project Leadership Committe has decided to update the sponsoring tiers so that the Platinum Sponsorship no longer includes a logo on the editor splash screen. This lets us reclaim the editor splash screen space for community-related content instead of sponsors (e.g. a different community-designed splash screen for each stable branch?). Also removes two Platinum Sponsors whose sponsorship has expired earlier this year.
2021-11-21Print a warning with unknown SCons variables to ease troubleshootingHugo Locurcio
When disabling specific modules, misspellings can occur. Additionally, when switching between the `3.x` and `master` branches frequently, it's possible to forget about renamed modules such as `lightmapper_cpu` versus `lightmapper_rd`.
2021-11-19[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.Fabio Alessandrelli
Note, the editor build requires the mbedtls module to be manually enabled, as it is currently needed as a ResourceUID dependency. This will need to be addressed in a separate PR.
2021-11-02[macOS] Add support for OpenGLES3 video driver.bruvzg
2021-10-31Use OpenGL 3.3 core profile instead of compatibility profileClay John
- Rename OpenGL to GLES3 in the source code per community feedback. - The renderer is still exposed as "OpenGL 3" to the user. - Hide renderer selection dropdown until OpenGL support is more mature. - The renderer can still be changed in the Project Settings or using the `--rendering-driver opengl` command line argument. - Remove commented out exporter code. - Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-30Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio
- Use lowercase driver names for the `--rendering-driver` command line argument.
2021-10-30Add GLES2 2D renderer + Linux display managerlawnjelly
First implementation with Linux display manager. - Add single-threaded mode for EditorResourcePreview (needed for OpenGL). Co-authored-by: clayjohn <claynjohn@gmail.com> Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-15Merge pull request #53833 from akien-mga/remove-webm-supportRémi Verschelde
2021-10-15Remove WebM support (and deps libvpx and opus)Rémi Verschelde
We've had many issues with WebM support and specifically the libvpx library over the years, mostly due to its poor integration in Godot's buildsystem, but without anyone really interested in improving this state. With the new GDExtensions in Godot 4.0, we intend to move video decoding to first-party extensions, and this would likely be done using something like libvlc to expose more codecs. Removing the `webm` module means we can remove libsimplewebm, libvpx and opus, which we were only used for that purpose. Both libvpx and opus were fairly complex pieces of the buildsystem, so this is a nice cleanup. This also removes the compile-time dependency on `yasm`. Fixes lots of compilation or non-working WebM issues which will be linked in the PR.
2021-10-15SCons: Set `DEBUG_ENABLED` and `DEV_ENABLED` in SConstructRémi Verschelde
They're the same for all platforms so they don't need to be repeated in all platform definitions.
2021-10-15Merge pull request #53829 from akien-mga/scons-py3.6Rémi Verschelde
2021-10-15SCons: Increase min Python version to 3.6Rémi Verschelde
Current SCons 4.2.0 still supports Python 3.5 but deprecated it, and support will be removed in the next release. It's also become needlessly restrictive to prevent ourselves from using Python 3.6 f-Strings, so it's time to up the requirement.
2021-10-15SCons: Remove MD5-timestamp and implicit cache optimizationsRémi Verschelde
They haven't really helped save much time on incremental rebuilds, and they do cause potential issues with build correctness (and possibly even one of the cause for overly eager incremental rebuilds).
2021-09-28Force optimized builds for thirdparty Embree filesjfons
2021-09-15Allow disabling the RegEx module in the editorAaron Franke
2021-08-27Makes FontData importable resource.bruvzg
Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2021-08-22Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke
2021-08-12Use "volk" instead of statically linked Vulkan loader.bruvzg
2021-08-09Some work on double supportAaron Franke
2021-08-09Merge pull request #51427 from omar-polo/platform-detect-openbsdRémi Verschelde
automatically detect openbsd as platform=linuxbsd
2021-08-09automatically detect BSDs as platform=linuxbsdOmar Polo
2021-08-06SCons: Add method to detect Emscripten and use it for warnings configRémi Verschelde
Emscripten is LLVM-based so we want to follow the same logic. But we can't just put it as a match in `methods.using_clang()` as that would mess with the compiler version detection logic used to restrict old GCC and Clang releases.