summaryrefslogtreecommitdiff
path: root/platform/windows/detect.py
AgeCommit message (Collapse)Author
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
2019-04-06Remove unused importsHendrikto
2019-02-20Drop RtAudio driver on WindowsRémi Verschelde
We've been defaulting to WASAPI since 3.0 and it's superior to RtAudio in all aspects. Obsoletes and closes #25503. Also enable WINMIDI on MinGW, this had been missed initially. Fix os_windows.cpp and crash_handler_windows.cpp which had weird dependencies on RtAudio.h's includes (ugh).
2019-02-19Fix compiling with use_mingw flag on WindowsMarcelo Fernandez
2019-01-22Set WINVER and _WIN32_WINNT values in VS projectMarcin Zawiejski
While looking into a different issue, I've noticed that Visual Studio Intellisense does not work well for Godot project when using Windows Vista+ APIs (e.g. CreateThreadpool), i.e. it does not recognise the APIs because they are defined in Windows header files for Vista+ only. This is because the WINVER and _WIN32_WINNT symbols don't have their values set in the generated Godot project file. This fixes the problem by setting the values when generating the project file.
2019-01-22Raised executable priority on windows to avoid stuter, helps #25162Juan Linietsky
2018-12-04SCons: Properly set bits variable as string for MSVC detectionRémi Verschelde
2018-11-20Remove trailing whitespaceRémi Verschelde
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'` (+ manual revert of some thirdparty code under `platform/android`).
2018-09-13Fix libwebsockets 32-bits UWP builds.Fabio Alessandrelli
Also fix bogus windows detect.py
2018-08-24SCons: Disable min/max WinDef.h macros on MSVCRémi Verschelde
Fixes #21370.
2018-08-21CI: Disable debug_symbols on Travis/AppVeyorRémi Verschelde
Also increase AppVeyor cache size to 1024, should match what is available for us in the free plan: https://www.appveyor.com/docs/build-cache/#cache-size-beta And drop obsolete debug_release option for Windows, superseded by target=release and debug_symbols=yes.
2018-08-19Support debug_symbols in VS optimized buildselasota
2018-07-25Merge pull request #20154 from marcelofg55/midi_driverRémi Verschelde
Added a new MIDIDriver class
2018-07-21-Fix disable_3d flagJuan Linietsky
-Add extra flag optimize=[size,speed] to be able to prioritize size
2018-07-21Added a new MIDIDriver classMarcelo Fernandez
2018-06-13Style fixes for commit d5bb6faaRémi Verschelde
2018-06-11-Make sure that ProjectSettings are properly dumped when dumping docs.Juan Linietsky
-Documented all properties of project settings Update documentation for ProjectSettings
2018-06-07Tweak some help texts in the build systemHugo Locurcio
This also removes `unix_global_settings_path` from SConstruct since it is no longer used.
2018-05-07Windows detect.py: Detect missing WindowsSdkDirMax Hilbrunner
2018-03-15Fix MinGW cross-buildbruvzg
2018-03-15Added missing import BoolVariableBastiaan Olij
Didn't like the missing BoolVariable :)
2018-03-13Enable SCons to autodetect Windows MSVC compilerGary Oberbrunner
SCons has good compiler detection logic for MSVC compilers. Up to now, Godot hasn't used it; it depends on passed-in OS environment vars from a specific Visual Studio cmd.exe windows. This makes it harder to build from a msys or cygwin shell. This change allows SCons to autodetect Visual Studio unless it sees VCINSTALLDIR in the os.environ. It also adds a 'msvc_version' arg for manual specification of compiler version, and uses the existing 'bits' arg to specify the target architecture. More detail could be added as desired. It also adds 'use_mingw' to always use mingw, even if Visual Studio is installed. That uses the existing mingw setup logic. If people are used to building Godot in a Visual Studio cmd window, this should not change the behavior in that case, since VCINSTALLDIR will be set in those windows. (However, note that you could now unset that var and build with any other MSVC version or target arch, even in that window.) I refactored much of platform/windows/detect.py during this, to simplify and clarify the logic. I also cleaned up a bunch of env var settings in windows/detect.py and SConstruct to use modern SCons idioms and simplify things. I suspect this will also enable using the Intel compiler on Windows, though that hasn't been tested.
2018-02-21Fix typos with codespellluz.paz
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
2018-02-20Link bcrypt lib in window and UWPFabio Alessandrelli
2018-02-15Windows: Fix case of imm32 for case-sensitive MinGW buildRémi Verschelde
Fixes #16713.
2018-01-31Windows: implement OS.get_unique_id and OS.set_ime_positiongeequlim
2018-01-26Make separate debug symbols opt-inHein-Pieter van Braam
This adds a separate_debug_symbols option to the x11, windows, and osx targets. This will default to adding normal debugging symbols to the artifacts and only splits them when separate_debug_symbols=yes on the Scons command line.
2018-01-05SCons: Fix usage of LD when we meant LINKRémi Verschelde
Also made LINK and CXXFLAGS configurable as command line options. Note that LINK currently expects the *compiler* that will be used for linking and will call its configured linker behind the scenes (so g++, clang++, etc., not ld.gold). See #15364 for details.
2017-12-31Improve LTO build with MSVCGeorge Marques
2017-12-24-Removed OpenMP support, replaced by a custom class.Juan Linietsky
-Disabled Opus, implementation is wrong.
2017-12-22Do not require OpenMP for non-tools builds (export templates)Rémi Verschelde
2017-12-16Add support for whole program optimization on MSVCGeorge Marques
Since it's similar to LTO, it can be enabled by setting use_lto=yes.
2017-12-15Fix 32bit MingW build for thekla_altasHein-Pieter van Braam
2017-12-14Added indent_style to editorconfig, fixed inconsistent use of tabs and ↵Colin Kinloch
spaces in indentation.
2017-12-14-Add lightmapperJuan Linietsky
-Fixes to unwrapper (remove degenerates), makes Thekla not crash -Added optional cancel button in EditorProgress -Added function to force processing of events (needed for cancel button)
2017-12-07Fix windows compilation when using MinGWMrCdK
2017-12-06Add build param for targeted Windows versionPedro J. Estébanez
2017-11-02SCons: make use_lto a global option and opt-in for iphoneRémi Verschelde
Supersedes #12553, see discussion in #12552.
2017-10-27detect.py: Fix KeyError if using MinGW and LTOmhilbrunner
2017-10-21Cleanup unnecessary debug printsRémi Verschelde
2017-09-26Reduce gcc lto build time by telling the linker toFelix M. Cobos
use the number of jobs indicated by -j
2017-09-25Use BoolVariable in platform-specific options.Elliott Sales de Andrade
2017-09-25Use EnumVariable for choice-based build options.Elliott Sales de Andrade
2017-09-23Fix gcc ltoHein-Pieter van Braam
This repairs LTO on X11 and adds it to MingW targets. The difference in linktime is substantial, but runtime performance is quite a bit better.
2017-09-16Create separate debug info files by defaultHein-Pieter van Braam
Now that we have a built-in stacktrace on a segfault it would be useful to have debug information on debug_release builds so that bugreports can include this information. Without this debug info we will still get function names in the backtrace but not file location. This commit will by default build all targets with minimal debug info and then strip the information into separate files. On MacOS this is a .dSYM file, on Linux/MingW this is a .debug file. MacOSX will automatically load a dSYM file if it exists in its debugger. On Linux/MingW we create a 'gnu debuglink' meaning that gdb and friends will automatically find the debug symbols if they exist. Existing workflow for developers does not change at all, except that we now create two instead of one build artifact by default. This commit also adds a 'debug_symbols' option to X11, MacOS, and MingW targets. The default is 'yes' which corresponds to -g1. The alternatives are 'no' (don't generate debug infos at all) or 'full' which runs with -g2. A target=debug build will now build with -g3.