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
- 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.
We used to fully override the default lib extensions from LIBSUFFIXES,
leading to issues such as #20045 where thirdparty libraries could not
easily be linked unless they adopted Godot's platform/config suffix.
Fixes#20045.
Those make no sense for tools build, as the editor uses advanced GUI
features heavily, and adding checks for 3D/physics features everywhere
in the editor would be cumbersome (and error-prone).
Fixes#1701.
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.
A traceback is printed on invoking scons without the compulsory
platform option. This is confusing, since the problem is not in
the code. Fix is to explicitly exit from the build right after
printing the error message, so the missing env variable cannot
cause the traceback later.
Fixes#17414
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.
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.
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.
Only append the module suffixes to the resulting binary instead of all object files.
That means we can keep most of our build artifacts when toggling modules like mono.
-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)
This makes the interfaces available, without implementation, in other
platforms and the editor, which facilitates documenting platform-exclusive
classes.
Platform-exclusive APIs must be set up in platform/<platform>/api/api.cpp.
Provide noop method-implementations where necessary.
Also setup and document the HTML5 platform's JavaScript singleton.
Visual studio project file creation had some problems. Files with c extension were listed with cpp extension. Some include files that did not exist were added to the project.
This change ensures a file exists before adding it to the project.
* Environment.AddPostAction() and the global AlwaysBuild() were added in
0.93, so requiring 0.14 is broken.
* Environment.Decider and Glob were added in some intermediate 0.97
release.
* The Variables object was added in 0.98.1.
- 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.
The pattern and replacement matching behaviour has been changed purely
due to the nature of switching to a standards-compliant library.
One mistake in the previous behaviour was that named groups didn't have
a number. This has been corrected.
As names are actually just an alias of numbered groups,
RegExMatch::get_name_dict() is now get_names() and is a dict
referring to the group number it represents.
Duplicate names are enabled and the with the first matching instance
used.
Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was
removed.
-Added new 3D stream player node
-Added ability for Area to capture sound from streams
-Added small features in physics to be able to properly guess distance to areas for sound
-Fixed 3D CollisionObject so shapes are added the same as in 2D, directly from children
-Fixed KinematicBody API to make it the same as 2D.
Now you have: extra, all (the default), moderate, no.
The old 'yes' option is still supported, but a warning will be printed and 'all' will be assumed.
The different options will translate to the following:
MSVC:
extra -> /Wall (implies /W4)
all -> /W3 + disable non-essential (*)
moderate -> /W2 + disable non-essential (*)
no -> /w
GCC/Clang:
extra -> -Wall -Wextra
all -> -Wall
moderate -> -Wall -Wno-unused
no -> -w
* = Truncations, narrowing conversions...: /wd4267 /wd4244 /wd4305 /wd4800
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.
(cherry picked from commit 31107daa1a)
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.
- `certs` and `editor_fonts` go to `thirdparty`
- `dist` and `scripts` go to a new `misc` folder
- `collada` and `doc` go to `tools/editor`
The next step will be to rename `tools/editor` to `editor` directly,
but this will be done at the right time to avoid breaking too many PRs.
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).