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
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.
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.
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.
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.
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.
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
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.
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
- 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.
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
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.
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
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.
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.
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.
There was a problem with MSBuild in that windows file paths
end with a backslash, which was escaping the last of the double quotes which
surround the $(ProjectDir) directive. This was fixed by removing the
last backslash through changing it to $(ProjectDir.TrimEnd('\')).
- The Windows, UWP, Android (on Windows) and Linux builds are
tested with Scons 3.0 alpha using Python 3.
- OSX and iOS should hopefully work but are not tested since
I don't have a Mac.
- Builds using SCons 2.5 and Python 2 should not be impacted.
Fixes a bug where the VERSION_PATCH define is not yet in scope if
typedefs.h is included before version.h at compilation time.
(cherry picked from commit 3b687c5474)
Done with `autopep8 --select=E7`, fixes:
- E701 - Put colon-separated compound statement on separate lines.
- E702 - Put semicolon-separated compound statement on separate lines.
- E703 - Put semicolon-separated compound statement on separate lines.
- E711 - Fix comparison with None.
- E712 - Fix (trivial case of) comparison with boolean.
- E713 - Fix (trivial case of) non-membership check.
- E721 - Fix various deprecated code (via lib2to3).
( @Akien : this PR is for current HEAD only, not to be cherry-picked for 2.1.1 )
this is manual revertion of #6501 which introduced a bug that prevented
scons from detecting Mingw under Windows when MSVC was installed.
(thanks to @vnen for finding this)
AND
it fixes the actual bug that prevented scons from detecting MSVC standalone
compiler ( a confusions between ``VSINSTALLDIR`` and ``VCINSTALLDIR`` )
The freeware Standalone MSVC C++ Build Tools are available here :
http://landinghub.visualstudio.com/visual-cpp-build-tools
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
Under Windows, Scons is now capable of detecting and compiling with
standalone MSVC compilers (aka "Visual C++ Build Tools").
http://landinghub.visualstudio.com/visual-cpp-build-tools
Tried with version 2015, and native x86 and x64 compilers under
Windows 10 pro 64 and Windows 8.1 64, with the default Win8 SDK
provided by the "Visual C++ Build Tools" web-installer.
Follow the same compiling instructions than for compiling with Visual
Studio, except that Visual Studio is no more required.
KNOWN ISSUES :
- ``methods.detect_visual_c_compiler_version()`` will emit a warning message
on computers where the ``VSINSTALLDIR`` environement variable is not present.
But it should compile just fine and still automatically detects the 32 or
64 bits according to the compiler you picked.
TODO :
- eventually, update ``platform/winrt/dectet.py`` with function
``methods.msvc_is_detected()`` and try to compile winrt/UWP with
these standalone compilers (if you did not select Win10 SDK when
installing the standalone tools, you can run it again).
- update doc to make users aware of "Visual C++ Build Tools" aka
"stadalone MSVC".
- eventually, update ``methods.detect_visual_c_compiler_version()``
- Fix buildsystem for WinRT/UWP platform.
- Add audio driver and joystick mapping for WinRT.
- Enable thread class for WinRT.
- Refactor MSVC compiler architecture detection to methods.py, so it can
be used by Windows and WinRT.
add version_info and icon sections in "export to windows platform".
add version_info and icon to godot exe file (editor & template exe).
fix an problem in image class.
change all default icons to android export icon (a little more rounded).
create an python script for convert file to cpp byte array for use in
'splash.h'.