summaryrefslogtreecommitdiff
path: root/methods.py
AgeCommit message (Collapse)Author
2019-07-26fix getting correct mingw-w64 versionsantouits
When checking mingw-w64 version, at least on debian, the regex being used returned 86 because the name of the binary in debian starts with x86_64-w64 so we use the dumpversion option that gcc has. This fixes not compiling because gcc versions < 7 don't have some checks like shadow-local
2019-07-22SCons: Fix uses of [].append instead of env.add_source_files()Rémi Verschelde
Also added support for SCons project-absolute paths (starting with #) and warning about duplicates in add_source_files(), and fixed default_controller_mappings.gen.cpp being included twice after first build due to *.cpp globbing. Part of #30270.
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-29some variables in methods.py are not usedhbina085
Thus they can be safely ignored
2019-05-28Print engine version to stdout when starting GodotRémi Verschelde
Also include website URL and make it configurable via version.py together with the rest of the engine branding. Add mention to MIT license in --help output.
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-24Also disable C and C++ specific warnings in thirdparty codeRémi Verschelde
Move the `Append` up to make sure that the keys exist and avoid the need to check `if CPPFLAGS in self`, etc.
2019-04-07Android now (optionally) builds the template when exportingJuan Linietsky
Added new way to create add-ons Removed old way to create add-ons
2019-04-06Remove unused importsHendrikto
2019-04-05SCons: add `methods.using_clang` to check used compilerRémi Verschelde
Also rename `use_gcc` to `using_gcc` to make it clear that it returns a config but does not alter it.
2019-03-05Move YEAR definition to version.pyRémi Verschelde
If it needs to be hardcoded (for the sake of reproducible builds), it should be together with the other hardcoded version info. And yeah, two months in, let's move to 2019.
2019-02-23Come up with use_gcc.marxin
Add new method. Fix wrong version condition for -fpie.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-08Get Git commit hash when Godot is a submoduleGeorge Marques
Submodules don't have a .git folder in the same place, but a .git file that points to the actual folder. This change take this into account.
2018-11-26[macOS] Fixed a problem sdk path could not be detectedNaoto Kondo
2018-11-20Merge pull request #21339 from Placinta/masterRémi Verschelde
Fix regular macOS build by passing -isysroot to compiler so correct system headers are found
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-10-27Dont use equality operators with None singleton in python fileslupoDharkael
2018-10-04SCons: Add 'werror' opt-in to treat warning as errorsRémi Verschelde
Also reorder advanced options to a more natural order, and fix MSVC warning when disabling warnings in secondary environment.
2018-09-28SCons: Build thirdparty code in own env, disable warningsRémi Verschelde
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
2018-09-13Fix #17843 inability to generate vs projects without being in a MSVC command ↵K. S. Ernest (iFire) Lee
prompt by guessing variables. The vcxproj extension has been in MSVC 2012. The sln extension has been in MSVC 2012.
2018-08-29BuildSystem: Sort input file listsBernhard M. Wiedemann
so that godot package builds reproducibly in spite of indeterministic filesystem readdir order and http://bugs.python.org/issue30461 See https://reproducible-builds.org/ for why this is good. Sort font input file list, so that builtin_fonts.gen.h is created in a reproducible way Sort list of platforms, so that editor/register_exporters.gen.cpp is created in a reproducible way Sort list of source files, so that .a files and resulting godot binaries are created in a reproducible way
2018-08-29Do not record year of buildBernhard M. Wiedemann
This value becomes part of get_version_info output, but if it is changing every year without any other change, it cannot be a useful indicator of anything. Using a constant value, makes the package build reproducible. See https://reproducible-builds.org/ for why this is good.
2018-08-27Pass -isysroot to compiler / linker when doing a macOS buildAlexandru Croitor
Previously the compiler would use system headers located at /System/Library/Frameworks, which could result in compilation failures due to the headers not always being up-to-date in regards to the latest installed macOS SDK headers that come with Xcode. Fix the issue by passing the SDK path via the -isysroot option to the compiler and linker invocations. If no custom SDK path is given, the build system queries the SDK path via xcrun --show-sdk-path, which returns something similar to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/ /Developer/SDKs/MacOSX.sdk/ Querying via xcrun is now also done for iphone (and simulator) platforms as well. Here is an example of a compilation failure message due to outdated headers: platform/osx/os_osx.mm:1421:41: error: use of undeclared identifier 'NSAppKitVersionNumber10_12'; did you mean 'NSAppKitVersionNumber'? if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_12) { ^~~~~~~~~~~~~~~~~~~~~~~~~~ NSAppKitVersionNumber /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:26:28: note: 'NSAppKitVersionNumber' declared here
2018-07-28fix windows build using python 3.7dragmz
fixes NameError (missing "subprocess_main" and "basestring")
2018-07-27Running builder (content generator) functions in subprocesses on WindowsViktor Ferenczi
- Refactored all builder (make_*) functions into separate Python modules along to the build tree - Introduced utility function to wrap all invocations on Windows, but does not change it elsewhere - Introduced stub to use the builders module as a stand alone script and invoke a selected function There is a problem with file handles related to writing generated content (*.gen.h and *.gen.cpp) on Windows, which randomly causes a SHARING VIOLATION error to the compiler resulting in flaky builds. Running all such content generators in a new subprocess instead of directly inside the build script works around the issue. Yes, I tried the multiprocessing module. It did not work due to conflict with SCons on cPickle. Suggested workaround did not fully work either. Using the run_in_subprocess wrapper on osx and x11 platforms as well for consistency. In case of running a cross-compilation on Windows they would still be used, but likely it will not happen in practice. What counts is that the build itself is running on which platform, not the target platform. Some generated files are written directly in an SConstruct or SCsub file, before the parallel build starts. They don't need to be written in a subprocess, apparently, so I left them as is.
2018-07-27add initial GLES2 3D rendererkarroffel
2018-07-05added 'android_add_asset_dir('...') method to Android module gradle build configPatrick Kaster
(cherry picked from commit 9190ae2be7068c8a84f60766a2f7c1da3e0bcd4b)
2018-06-21add NoCache wrapper to CommandRhody Lugo
2018-05-28fixed building using scons with python3Ibrahn Sahir
I broke python 3 builds by using py2 specific dict functions in commit 98846b39ee039358584884b439b96e799f1d2bd0 Fixed with functions in compat.py
2018-05-19GDScript access to copyright, license, author and donor information.Ibrahn Sahir
Adds following functions to the Engine singleton: get_author_info - names of Godot authors get_copyright_info - detailed source copyright get_license_info get_donor_info - donor names get_license_info - full text of licenses used, indexed by license names get_license_text - the text of the Godot Expat license
2018-05-05Remove commented out code in methods.pyHenry Hirsch
2018-03-26Refactor JavaScript platform build scriptLeon Krause
2018-03-11Properly closing all files in Python codeViktor Ferenczi
2018-03-01add GLES 2 renderer for 2Dkarroffel
This commit adds a new rendering backend, GLES2, and adds a project setting to enable it. Currently this backend can only be used on the X11 platform, but integrating into other platforms is planned.
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-01-24Fix mixed use of tabs and spacesKurtis Harms
2018-01-24removed debug printAriel Manzur
2018-01-24- Improves portability in joystick buttons enumAriel Manzur
- Fixes linking bug in modules split library
2018-01-18Include .hpp files in VS scons builds. Fixed Typo.Will Nations
2018-01-18Fix typos in code and docs with codespellRémi Verschelde
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-13Disable colored output and progress bar when building outside of a TTYHugo Locurcio
This makes the output more readable if it is written to a file, and more compact in continuous integration environments, keeping the log sizes low. This commit also adds myself to .mailmap.
2018-01-07SCons: Fix build error on invalid module foldersRémi Verschelde
2017-12-18sort by the most recently accessed filesRhody Lugo
2017-11-28disable caching for targets using helper functionsRhody Lugo
2017-11-28use the same cache for all branches for appveyorRhody Lugo
2017-11-20Rename the version's "revision" to "build"Rémi Verschelde
That "revision" was inherited from SVN days but had been since then used to give information about the build: "custom_build", "official", "<some distro's build>". It can now be overridden with the BUILD_NAME environment variable.
2017-11-20Pass engine name and version parts as proper stringsRémi Verschelde
Removes the need for _MKSTR all over the place which has the drawback of converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing a compilation error.
2017-11-19Add cpp.hint file to improve IntelliSenseMatthias Hoelzl
2017-11-18Suppress progress messages in Visual Studio output paneMatthias Hoelzl