summaryrefslogtreecommitdiffstats
path: root/methods.py
Commit message (Collapse)AuthorAgeFilesLines
* Moved the shader source compilation code outside RenderingDevice and VulkanJuan Linietsky2020-02-111-1/+11
|
* SCons: Split libmodules.a in folder-based libsRémi Verschelde2020-02-071-61/+0
| | | | | This removes the need for the hacky split_libmodules logic on Windows, since all libs are now of manageable size.
* SCons: Generate header with info on which modules are enabledRémi Verschelde2020-02-071-34/+9
| | | | | | | | | We already had `MODULE_*_ENABLED` defines but only in the modules environment, and a few custom `*_ENABLED` defines in the main env when we needed the information in core. Now this is defined in a single header which can be included in the files that need this information.
* PCK: Set VERSION_PATCH in header, factor out header magicJoost Heitbrink2020-01-061-2/+1
| | | | | | | | | | | | Unify pack file version and magic to avoid hardcoded literals. `version.py` now always includes `patch` even for the first release in a new stable branch (e.g. 3.2). The public name stays without the patch number, but `Engine.get_version_info()` already included `patch == 0`, and we can remove some extra handling of undefined `VERSION_PATCH` this way. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Remove unused importsunknown2020-01-031-2/+0
|
* SCons: Add 'split_libmodules' option to workaround linker issueRémi Verschelde2019-12-111-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* fix getting correct mingw-w64 versionsantouits2019-07-261-1/+5
| | | | 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
* SCons: Fix uses of [].append instead of env.add_source_files()Rémi Verschelde2019-07-221-8/+22
| | | | | | | | | 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.
* SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde2019-07-031-1/+1
| | | | | | | | 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.
* some variables in methods.py are not usedhbina0852019-06-291-4/+4
| | | | Thus they can be safely ignored
* Print engine version to stdout when starting GodotRémi Verschelde2019-05-281-0/+1
| | | | | | | 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.
* SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde2019-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Also disable C and C++ specific warnings in thirdparty codeRémi Verschelde2019-04-241-1/+7
| | | | | Move the `Append` up to make sure that the keys exist and avoid the need to check `if CPPFLAGS in self`, etc.
* Android now (optionally) builds the template when exportingJuan Linietsky2019-04-071-64/+0
| | | | | Added new way to create add-ons Removed old way to create add-ons
* Remove unused importsHendrikto2019-04-061-1/+0
|
* SCons: add `methods.using_clang` to check used compilerRémi Verschelde2019-04-051-1/+4
| | | | | Also rename `use_gcc` to `using_gcc` to make it clear that it returns a config but does not alter it.
* Move YEAR definition to version.pyRémi Verschelde2019-03-051-1/+1
| | | | | | | 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.
* Come up with use_gcc.marxin2019-02-231-0/+3
| | | | Add new method. Fix wrong version condition for -fpie.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-0/+7
| | | | Fixes #25316.
* Get Git commit hash when Godot is a submoduleGeorge Marques2019-02-081-3/+11
| | | | | 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.
* [macOS] Fixed a problem sdk path could not be detectedNaoto Kondo2018-11-261-2/+2
|
* Merge pull request #21339 from Placinta/masterRémi Verschelde2018-11-201-0/+24
|\ | | | | Fix regular macOS build by passing -isysroot to compiler so correct system headers are found
| * Pass -isysroot to compiler / linker when doing a macOS buildAlexandru Croitor2018-08-271-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove trailing whitespaceRémi Verschelde2018-11-201-1/+1
| | | | | | | | | | With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'` (+ manual revert of some thirdparty code under `platform/android`).
* | Dont use equality operators with None singleton in python fileslupoDharkael2018-10-271-1/+1
| |
* | SCons: Add 'werror' opt-in to treat warning as errorsRémi Verschelde2018-10-041-0/+4
| | | | | | | | | | Also reorder advanced options to a more natural order, and fix MSVC warning when disabling warnings in secondary environment.
* | SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-0/+8
| | | | | | | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* | Fix #17843 inability to generate vs projects without being in a MSVC command ↵K. S. Ernest (iFire) Lee2018-09-131-0/+3
| | | | | | | | | | | | | | prompt by guessing variables. The vcxproj extension has been in MSVC 2012. The sln extension has been in MSVC 2012.
* | BuildSystem: Sort input file listsBernhard M. Wiedemann2018-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Do not record year of buildBernhard M. Wiedemann2018-08-291-1/+1
|/ | | | | | | | | 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.
* fix windows build using python 3.7dragmz2018-07-281-2/+2
| | | | fixes NameError (missing "subprocess_main" and "basestring")
* Running builder (content generator) functions in subprocesses on WindowsViktor Ferenczi2018-07-271-760/+33
| | | | | | | | | | | | | | | | | | | | | - 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.
* add initial GLES2 3D rendererkarroffel2018-07-271-0/+1
|
* added 'android_add_asset_dir('...') method to Android module gradle build configPatrick Kaster2018-07-051-0/+5
| | | | (cherry picked from commit 9190ae2be7068c8a84f60766a2f7c1da3e0bcd4b)
* add NoCache wrapper to CommandRhody Lugo2018-06-211-0/+5
|
* fixed building using scons with python3Ibrahn Sahir2018-05-281-4/+4
| | | | | | I broke python 3 builds by using py2 specific dict functions in commit 98846b39ee039358584884b439b96e799f1d2bd0 Fixed with functions in compat.py
* GDScript access to copyright, license, author and donor information.Ibrahn Sahir2018-05-191-1/+227
| | | | | | | | | 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
* Remove commented out code in methods.pyHenry Hirsch2018-05-051-21/+0
|
* Refactor JavaScript platform build scriptLeon Krause2018-03-261-4/+1
|
* Properly closing all files in Python codeViktor Ferenczi2018-03-111-12/+17
|
* add GLES 2 renderer for 2Dkarroffel2018-03-011-691/+29
| | | | | | | | 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.
* Fix typos with codespellluz.paz2018-02-211-3/+3
| | | | | | | | | | | | | | Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
* Fix mixed use of tabs and spacesKurtis Harms2018-01-241-3/+3
|
* removed debug printAriel Manzur2018-01-241-1/+0
|
* - Improves portability in joystick buttons enumAriel Manzur2018-01-241-7/+14
| | | | - Fixes linking bug in modules split library
* Include .hpp files in VS scons builds. Fixed Typo.Will Nations2018-01-181-1/+1
|
* Fix typos in code and docs with codespellRémi Verschelde2018-01-181-1/+1
| | | | Using v1.11.0 from https://github.com/lucasdemarchi/codespell
* Disable colored output and progress bar when building outside of a TTYHugo Locurcio2018-01-131-11/+19
| | | | | | | | 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.
* SCons: Fix build error on invalid module foldersRémi Verschelde2018-01-071-0/+2
|
* sort by the most recently accessed filesRhody Lugo2017-12-181-9/+9
|