summaryrefslogtreecommitdiff
path: root/platform/windows/detect.py
AgeCommit message (Collapse)Author
2021-12-18[Windows] Improve console handling and execute/create_process.bruvzg
Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
2021-12-10Misc build system fixesAaron Franke
2021-11-18Windows: Use `/bigobj` only for debug builds, breaks GCC LTORémi Verschelde
Building `target=release` and `target=release_debug` builds with MinGW-GCC errors when linking with LTO. Since it's only needed for `target=debug` builds anyway (bigger objects), which we don't build with LTO, this works around the issue.
2021-11-10Windows: Enable `/bigobj` to increase max size for obj filesRémi Verschelde
Equivalent `-Wa,-mbig-obj` for GCC/Clang. This started being needed to compile harfbuzz in `target=debug` with MinGW/GCC, but there doesn't seem to be any drawback to enabling `/bigobj` (aside from losing support for pre-VS 2005 linkers, which we don't support).
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-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-14SCons: Add `DEV_ENABLED` defines for `target=debug` buildsRémi Verschelde
This will allow adding developer checks which will be fully compiled out in user builds, unlike `DEBUG_ENABLED` which is included in debug tempates and the editor builds. This define is not used yet, but we'll soon add code that uses it, and change some existing `DEBUG_ENABLED` checks to be performed only in dev builds. Related to godotengine/godot-proposals#3371.
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-01Windows: Fix build with SCons 4.2.0Rémi Verschelde
2021-07-25Remove unnecessary 'pass' statementluz paz
ref: https://lgtm.com/projects/g/godotengine/godot/?mode=tree&ruleFocus=910088
2021-03-20Merge pull request #46966 from qarmin/faster_releaseRémi Verschelde
Allow to not optimize release build
2021-03-14Allow to not optimize release buildRafał Mikrut
2021-03-12Add `use_asan` option for MSVC to enable AddressSanitizerAndrii Doroshenko (Xrayez)
Exposes AddressSanitizer support in MSVC compiler. Can be installed via individual components in the Visual Studio 2019 Installer. Disabled by default. Compile the engine with `scons use_asan=yes`.
2021-02-09Use /Zi and /FS for including debugger symbols on Windows with MSVCBastiaan Olij
2021-02-08SCons: Fix debug_symbols tests after switch to BoolVariableRémi Verschelde
Bug introduced in #45679. Fixes part of #45816.
2021-02-03SCons: Add `production=yes` option to use production defaultsRémi Verschelde
This is meant for users making custom builds to match the options used on optimized, official builds. This enables, on the platforms which support them: - `use_static_cpp=yes` (portable binaries for Linux and Windows) - `use_lto=yes` (link time optimizations - note: requires a lot of RAM!) - `debug_symbols=no` (no debug symbols, smaller binaries) Also abort when using MSVC with `production=yes`, as: - It cannot optimize the GDScript VM like GCC or Clang do, leading to significant performance drops. - Its LTO support is unreliable, at least used to trigger crashes last we tried it extensively. All options can still be overridden if specified, and the `dev=yes` option was changed to also support overrides.
2020-12-16SCons: Add only selected platform's opts to envRémi Verschelde
Otherwise we can get situations where platform-specific opts with the same name can override each other depending on the order at which platforms are parsed, as was the case with `use_static_cpp` in Linux/Windows. Fixes #44304. This also has the added benefit that the `scons --help` output will now only include the options which are relevant for the selected (or detected) platform.
2020-12-12Don't handle BaseException in build scriptsMarcel Admiraal
2020-12-03Add 'use_static_cpp' option for MinGW and MSVC buildsLyubomir Vasilev
2020-11-19SCons: Remove unnecessary $LINK overridesRémi Verschelde
As of SCons 4.0.1, the default value for $LINK is $SMARTLINK, which itself is a function that will use $CXX as linker for C++: https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L327-L328 https://github.com/SCons/scons/blob/4.0.1/SCons/Tool/link.py#L54-L76 So we don't need to manually specify the same value as $CXX for $LINK.
2020-11-09Remove `debug_symbols=full` in favor of `debug_symbols=yes`Hugo Locurcio
`debug_symbols=yes` will now behave like `debug_symbols=full` did before. The difference in compressed file sizes is not that large, which means there isn't much point in having two different values. This helps make the buildsystem easier to understand.
2020-10-09[Windows, MSVC] Correctly set source file encoding.bruvzg
2020-10-08SCons: Refactor and cleanup warnings definitionRémi Verschelde
2020-10-06SCons: Add windows_subsystem=default, restores original behaviorRémi Verschelde
We want debug builds to have a console and easy stdout redirection by default. Windows makes reading the stdout/stderr stream from gui applications too cumbersome (and most users don't know about it, and just wonder why they don't see a thing).
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-14Only display the Windows toggle console option if it can actually be usedHugo Locurcio
2020-08-17Add Windows Subsystem build option.bruvzg
2020-08-17Revert "[Windows] Attach to parent console instead of creating new one."bruvzg
This reverts commit 4f7a49db53c6aaabeca70fe8901144af708fb6b2.
2020-08-11[Windows] Attach to parent console instead of creating new one.bruvzg
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-07-23SCons: Remove unused DEBUG_MEMORY_ENABLED defineRémi Verschelde
Its last use was removed in Godot 3.0, so it no longer makes sense to define. Also removed `D3D_DEBUG_INFO` for Windows as it's likely a left over from a long time ago pre-opensourcing when Godot had some form of Direct3D 9 support?
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-17Make stack size on Windows match Linux and MacOSPedro J. Estébanez
2020-02-11SCons: Streamline Vulkan buildsystem + fixupsRémi Verschelde
- Renamed option to `builtin_vulkan`, since that's the name of the library and if we were to add new components, we'd likely use that same option. - Merge `vulkan_loader/SCsub` in `vulkan/SCsub`. - Accordingly, don't use built-in Vulkan headers when not building against the built-in loader library. - Drop Vulkan registry which we don't appear to need currently. - Style and permission fixes.
2020-02-11Add runtime GLES2 / Vulkan context selection.bruvzg
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-07SCons: Split libmodules.a in folder-based libsRémi Verschelde
This removes the need for the hacky split_libmodules logic on Windows, since all libs are now of manageable size.
2019-12-11SCons: Add 'split_libmodules' option to workaround linker issueRémi Verschelde
The new 'split_libmodules=yes' option is useful to work around linker command line size limitations when linking a huge number of objects. We're currently over 64k chars when linking libmodules.a on Windows with MinGW, which triggers issues as seen in #30892. Even on Linux, we can also reach linker command line size limitations by adding more custom modules. We force this option to True for MinGW on Windows, which fixes #30892. Additional changes to lib splitting: - Fix linking of the split module libs with interdependent symbols, hacking our way into LINKCOM and SHLINKCOM to set the `--start-group` and `--end-group` flags. - Fix Python 3 compatibility in `methods.split_lib()`. - Drop seemingly obsolete condition for 'msys' on 'posix'. - Drop the unnecessary 'split_drivers' as the drivers lib is no longer too big since we moved all thirdparty builds to modules. Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2019-12-04Added support for vertical syncing via the Windows OS compositor (DWM.)TerminalJack
2019-10-25Specify MINGW_HAS_SECURE_API=1Yeongho Kim
2019-10-22Add "llvm/thinlto" options to MinGW build.bruvzg
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-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-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-23Fixes build for Windows cross-compilationKenneth Lee
Fixes #28299
2019-04-15Ignore '/utf-8' flag on vs2013Windy Darian
2019-04-10Force utf-8 source file encoding in MSVCWindy Darian
On Windows, when "Language for non-Unicode programs" were set to "Japanese (Japan)", MSVC would by default use Shift JIS (code page 932) to interpret source files, which would result in test_string failing to compile because of characters in `test_34()`. Forcing utf-8 for MSVC fixes the issue