Commit graph

178 commits

Author SHA1 Message Date
Fabio Alessandrelli
6fcc8b7e1f Deleting OpenSSL module and library 2018-02-14 01:26:34 +01:00
Hein-Pieter van Braam
c6d9a7665a Make separate debug symbols opt-in
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-26 20:46:56 +01:00
Rémi Verschelde
9ba5fb87f0 Bullet: allow unbundling only if > 2.87
Looks like we are using cutting edge methods which are not even
if the current stable 2.87.
2018-01-26 19:17:24 +01:00
Rémi Verschelde
e141845bfb SCons: Allow unbundling bullet on Linux (only 2.87+) 2018-01-13 15:16:22 +01:00
Rémi Verschelde
db49f35ab8 SCons: Fix usage of LD when we meant LINK
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.
2018-01-05 20:37:45 +01:00
Juan Linietsky
021f3c924b -Removed OpenMP support, replaced by a custom class.
-Disabled Opus, implementation is wrong.
2017-12-24 09:32:12 -03:00
Rémi Verschelde
bf4d398d4e Do not require OpenMP for non-tools builds (export templates) 2017-12-22 12:24:40 +01:00
Rémi Verschelde
60d41e9caf openmp: Simplify linking on X11, fixing clang build 2017-12-14 21:50:10 +01:00
Rémi Verschelde
ab9cda1497 openmp: Don't try to link GCC's implementation on Clang
Also disable openmp build on Travis, breaks on Trusty's Clang.
Group deps more naturally.
2017-12-14 18:27:56 +01:00
Colin Kinloch
edb1df15ea Added indent_style to editorconfig, fixed inconsistent use of tabs and spaces in indentation. 2017-12-14 13:52:23 +00:00
Juan Linietsky
f3ad14224e -Add lightmapper
-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-14 09:01:27 -03:00
Pedro J. Estébanez
6decbec461 Implement multitouch on X11 2017-12-06 23:47:09 +01:00
Rémi Verschelde
9f134aa5d1 Cleanup old references to GLES2 renderer
There are still some left in the Android Java code, even stuff to swap between
GLES1 and GLES2 support from early Godot days... would be good to see some cleanup
there too one day.

The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported.
It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-19 17:52:18 +01:00
Rémi Verschelde
cefdb34f6c SCons: make use_lto a global option and opt-in for iphone
Supersedes #12553, see discussion in #12552.
2017-11-02 09:11:50 +01:00
Rémi Verschelde
37f1bb3298 Travis: Simplify matrix, disable iphone and add X11 tools=no/clang
Travis always has massive backlog of macOS builds, so we can't rely on them
too much.
The iphone build was mostly useful to spot tools=no or target=release_debug
issues, so replacing it by an appropriate X11 build.
2017-10-27 19:56:37 +02:00
Marcelo Fernandez
2baf54526b Fix BSD compile issues 2017-10-17 16:50:41 +00:00
Felix M. Cobos
ec644ccb69 Reduce gcc lto build time by telling the linker to
use the number of jobs indicated by -j
2017-09-26 17:04:04 +02:00
Elliott Sales de Andrade
3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
45a9a680a3 Use BoolVariable for third-party options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade
ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade
f9e463bce2 Use EnumVariable for choice-based build options. 2017-09-25 14:36:01 -04:00
Rémi Verschelde
4ac7f5acf9 Merge pull request #11519 from hpvb/fix-gcc-lto
Fix gcc lto

[ci skip]
2017-09-24 13:32:00 +02:00
Rémi Verschelde
df5dab738a Merge pull request #11527 from QuLogic/system-zstd
Enable building against system zstd.
2017-09-24 08:58:38 +02:00
Elliott Sales de Andrade
00c03bdd2b Add support for OpenSSL 1.1.0.
This release hides many struct members which provides easier forward
compatibility but is a break from previous releases. A few small macros
provide compatibility between both 1.1.0 and 1.0.x.

Fixes #8624.
2017-09-24 02:11:02 -04:00
Elliott Sales de Andrade
a408388623 Enable building against system zstd. 2017-09-23 23:46:47 -04:00
Hein-Pieter van Braam
43757fcc85 Fix gcc lto
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-23 22:55:26 +02:00
Hein-Pieter van Braam
88be952fc9 Create separate debug info files by default
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.
2017-09-16 12:00:46 +02:00
Marcelo Fernandez
83fe937362 Added a crash handler to dump the backtrace on Windows, Linux and OS X 2017-09-13 10:07:23 -03:00
Rémi Verschelde
0cee288c11 Merge pull request #10148 from leezh/pcre2
Replacement of internal RegEx with PCRE2
2017-08-31 11:56:19 +02:00
Hein-Pieter van Braam
d44414c711 Disable -ffast-math for etc2comp
Apparently -ffast-math generates incorrect code with recent versions of
GCC and Clang. The manual page for GCC warns about this possibility.

In my tests it doesn't actually appear to be measurably slower in this
case, and this is used in a batch process so it seems safe to disable
this.

This fixes #10758 and fixes #10070
2017-08-30 11:51:24 +02:00
Zher Huei Lee
e3e2f06324 Replacement of internal RegEx with PCRE2
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.
2017-08-19 19:29:14 +08:00
Rémi Verschelde
e91a267a7c Buildsystem: Improve detect.py readability and fix issues
Tried to organize the configure(env) calls in sections, using the same order
for all platforms whenever possible.

Apart from cosmetic changes, the following issues were fixed:
- Android: cleanup linkage, remove GLESv1_CM and GLESv2
- iPhone: Remove obsolete "ios_gles22_override" option
- OSX:
  * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option
    (closes #9449)
  * Make "fat" bits argument explicit
- Server: sync with X11
- Windows: clean up old DirectX 9 stuff
- X11:
  * Do not require system OpenSSL for building (closes #9443)
  * Fix typo'ed use_leak_sanitizer option
  * Fix .llvm suffix overriding custom extra_suffix
2017-07-01 08:20:51 +02:00
Rémi Verschelde
2976801012 X11: Abort build if using OpenSSL 1.1.0+
Workaround until #8624 is fixed.
2017-05-06 19:01:10 +02:00
Rémi Verschelde
d8f32637be SCons: Add option to toggle warnings (on by default)
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)
2017-03-26 21:58:37 +02:00
Ferenc Arn
7a85d25218 Use -Ofast on x11. Also introduced use_lto option.
debug_release doesn't turn off optimizations for release target now. Ensure that sanitizer options apply to both C and C++ files.

Built-in optimization/debug flags are prepended such that user-specified flags can override them.

Based on and around the discussion in PR #5194.
2017-01-26 19:32:27 -06:00
Rémi Verschelde
d945c4e58e x11: Improve logic for cross-dependencies between freetype, zlib and libpng
Fixes #7373.
2017-01-08 17:17:05 +01:00
Rémi Verschelde
2a38a5eaa8 Remove bundled glew, obsoleted by glad
Also make Haiku load the glad header for GLES3 too,
though I haven't test it.
2017-01-06 22:56:51 +01:00
Rémi Verschelde
3f3f5a5359 Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes
might have been made - time will tell :)
2017-01-02 21:52:26 +01:00
Rémi Verschelde
4965ddfaa1 png: Allow building shared freetype with bundled libpng
This was the behaviour when building Godot 2.1, which allows to build against
Ubuntu 12.04 and its freetype that links old libpng12, while still bundling
libpng16.
2016-11-19 14:09:01 +01:00
Rémi Verschelde
c32766a482 Revert "libpng: Fix erroneously linking against libpng12 on old distros"
This reverts commits 5fa1bb331a
and ec4be71fad.

Looks like Debian/Ubuntu are not even shipping libpng16 nowadays in their
stable releases, we'll have to go back to statically linking our own
libpng16 to wait for them to stop being 5 years behind everybody.
2016-11-19 13:39:03 +01:00
Rémi Verschelde
5fa1bb331a libpng: Fix erroneously linking against libpng12 on old distros
This bit us for 2.1.1 binaries built on Ubuntu 12.04 LTS where
libpng.pc apparently prioritizes libpng12.
2016-11-19 12:59:48 +01:00
Rémi Verschelde
cc95d4448c scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.
2016-11-03 07:45:08 +01:00
Rémi Verschelde
817dd7ccbb style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
d4c17700aa style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-01 00:35:16 +01:00
Rémi Verschelde
97c8508f5e style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-01 00:33:51 +01:00
Rémi Verschelde
c6c13eb8fc Merge pull request #6490 from zaps166/webm-pr
Add WebM support
2016-10-30 18:12:00 +01:00
Błażej Szczygieł
d710b265f8 Add WebM module
Use already existing libraries: libvorbis and libopus. Also use newly
added libraries: libvpx, libwebm, libsimplewebm.
2016-10-23 02:46:06 +02:00
Błażej Szczygieł
2bf4553fe0 SCons: Use colored output if available, change "colored"->"verbose" 2016-10-17 22:40:14 +02:00
Błażej Szczygieł
4ffa8f224d Theora: Don't compile unnecessary files, rename "x86_opt_*" 2016-10-16 22:31:27 +02:00
Rémi Verschelde
edbc0c0d0b freetype: Make it a module and split thirdparty library
Comment out the weird workaround for building on Windows at it might
not be needed anymore. Testing needed to confirm.
2016-10-15 18:10:17 +02:00
Rémi Verschelde
cbf52606f4 zlib: Split thirdparty files, simplify scons option 2016-10-15 12:20:47 +02:00
Rémi Verschelde
36738ddda4 glew: Split thirdparty files and isolate env
Not fully happy about the way this one interacts with the various
platforms. Maybe the platform_config.h should be generated by the
SCsub instead of passing a define just to know where is the header.
2016-10-15 12:01:28 +02:00
Rémi Verschelde
8311a78df5 squish: Move to a module and split thirdparty lib 2016-10-15 12:01:28 +02:00
Rémi Verschelde
cfcc8a20e8 theora: Move to a module and split thirdparty lib
Same rationale as the previous commits.
2016-10-15 11:50:41 +02:00
Rémi Verschelde
422196759f openssl: Move to a module and split thirdparty lib
Same rationale as the previous commits.
2016-10-15 11:50:41 +02:00
Rémi Verschelde
d9a291f641 ogg/vorbis/opus: Make them modules and unbundle thirdparty libs
Took the opportunity to undo the Godot changed made to the
opus source. The opus module should eventually be built in its
own environment to avoid polluting others with too many include
dirs and defines.

TODO: Fix the platform/ stuff for opus.
2016-10-15 11:50:40 +02:00
Rémi Verschelde
ee3cf211c6 webp: Make it a module and unbundle libwebp thirdparty files
Note that there are two Godot-specific changes made to libwebp
for the javascript/HTML5 platform. They are documented in the
README.md.
2016-10-15 11:50:39 +02:00
Rémi Verschelde
c31ad71f10 enet: Split enet thirdparty files and allow unbundling
Building against shared libraries only implemented for Linux X11 so far.
TODO: Document Godot's modifications of upstream enet.
2016-10-15 11:50:39 +02:00
Rémi Verschelde
5fef84a135 png: Split library to thirdparty dir and allow unbundling
Uses the new structure agreed upon in #6157, but the thirdparty/ folder
does not behave following a logic similar to that of modules/ yet.

The png driver can't be moved to a module as discussed in #6157, as it's
required by core together with a few other ImageLoader implementations
(see drivers/register_driver_types.cpp:register_core_driver_types())

Dropped the possibility to disable PNG support, it's a core component
of Godot.
2016-10-15 11:50:39 +02:00
Juan Linietsky
22d83bc9f6 Begining of GLES3 renderer:
-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
2016-10-03 21:35:16 +02:00
romeojulietthotel
94d6757a0d Use pkgconfig to locate ALSA libs (#6119)
* This allows building when ALSA libs are in a non-standard location. PKG_CONFIG_PATH alone is not enough as the final link fails. Adding this makes the final link succeed.

* The extra LIBS flag for alsa is not needed so removing.
2016-09-23 07:38:57 +02:00
Mario Schlack
503f9ab9d9 Code cleanup in platform/x11 2016-07-21 21:11:34 +02:00
Juan Linietsky
587826f879 remove GLU dependency, closes #3787 2016-07-18 17:25:03 -03:00
eska
a2386bd2b2 Link libdl only on Linux, fix BSD build 2016-07-04 18:39:27 +02:00
Ferdinand Thiessen
9e751178eb Fix compiling for X11 on non-86, this fixes #5444 2016-06-27 03:03:42 +02:00
Juan Linietsky
3b2c96139b Merge pull request #4905 from Hinsbart/x11_dpi
x11: Implemented dpi detection
2016-06-11 17:52:10 -03:00
Juan Linietsky
94a6ff3d7a -make freetype build for all platforms the same, default as builtin except on x11.
closes #5119
2016-06-09 21:28:07 -03:00
Andreas Haas
18c941bbec x11: Implemented dpi detection
depends on XRandR.
Had to dynamically load `XRRGetMonitors` as Ubuntu 12.04 doesn't have it.
Also removed libudev from travis install list.
2016-06-09 18:54:06 +02:00
Rémi Verschelde
768e925271 GLEW: Define static + enabled and includes via SCons
This allows us not to have to hack our definitions in the upstream files,
making it easier to upgrade to newer versions in the future.

For the include paths to work, the headers are moved to a GL subfolder to
match their upstream location.
2016-06-08 00:16:27 +02:00
Juan Linietsky
3e8eb396d7 Finalized DynamicFont implementation
-DynamicFont uses Freetype by default
-Editor fonts are now scalable thanks to this
-Cleaned up documentation browser and added fonts for this
2016-05-29 11:37:52 -03:00
Rémi Verschelde
0a5472e697 Remove trailing spaces 2016-04-02 20:26:12 +02:00
hondres
b350ece864 x11: make dependancy on libudev optional 2016-02-14 15:13:11 +01:00
Juan Linietsky
9010a25c01 added option to link libstdc++ statically 2016-02-04 20:47:19 -03:00
hondres
29353808f0 remove dependancy on libevdev 2016-01-26 23:04:57 +01:00
eska
56e65f9e29 Enable ALSA driver in non-linux X11 when available 2016-01-10 17:52:15 +01:00
Rémi Verschelde
a98aa0bbbe Make joydev build using udev and evdev opt-out but blocking (linux)
It is enabled by default, users have to specifically ask for it if they don't want gamepad support. If libudev or libevdev are missing, the build aborts and tells the user the reason and that they can disable gamepad support with the "gamepad=no" option.
2016-01-06 19:21:37 +01:00
hondres
541c9039c5 Check pkg-config for libudev and enable gamepad code only if found. Linux only for now 2015-12-21 22:39:03 +01:00
Juan Linietsky
46dee92c8e -fixed build system to use pkg-config for evdev 2015-12-21 10:37:26 -03:00
hondres
af633c7941 Better gamepad support 2015-12-18 06:12:53 +01:00
Juan Linietsky
708ff381d6 changed a bit to use system() 2015-12-08 20:36:48 -03:00
Juan Linietsky
78b5404434 improve detection of linux, fixes #3201 2015-12-08 20:35:40 -03:00
Juan Linietsky
ac414c5581 Merge pull request #2849 from a12n/compobsd2
Compile on OpenBSD
2015-12-08 17:16:45 -03:00
koalefant
bd396c5cfa Enabled debug symbols for x11 when using platform=release_debug and debug_release=yes together 2015-11-29 20:56:27 +01:00
Juan Linietsky
b987d2113b 0theora compilation fixes 2015-11-25 00:28:03 -03:00
Anton Yabchinskiy
0931eed7be Enable ALSA only for Linux 2015-11-20 23:35:19 +03:00
Juan Linietsky
dd09215c90 Revert "libao audio driver" 2015-11-19 20:05:26 -03:00
Anton Yabchinskiy
3b9868d2e4 Merge branch 'master' of github.com:okamstudio/godot 2015-11-02 20:25:01 +03:00
Juan Linietsky
c858515785 Fixed theora playback. Removed theoraplayer.
Still need to get proper audio output latency in some platforms.
2015-09-26 14:50:42 -03:00
Juan Linietsky
56c907ad04 fix to builtin freetype defines on linux 2015-09-10 22:15:00 -03:00
Juan Linietsky
751202768c fix to freetype detection 2015-09-10 21:40:34 -03:00
Juan Linietsky
700fdf5c0c fix build issue with ssl, closes #2384 2015-08-23 20:54:13 -03:00
Juan Linietsky
e1e54d39e4 damn github built-in editor 2015-08-21 22:33:49 -03:00
Juan Linietsky
2de5e12116 fix for built-in ssl (easier to build 32 bits export) 2015-08-21 22:31:06 -03:00
Anton Yabchinskiy
dc8df8a91a Merge branch 'master' of github.com:okamstudio/godot 2015-07-29 23:01:36 +03:00
Juan Linietsky
4e46143499 some optimizations in godot memory handling 2015-06-12 18:27:48 -03:00
Rémi Verschelde
5f0bb18d55 Fix building release target with debug symbols
This forced the -g2 CCFLAG in release builds, making them relatively heavy.
Fixes #1781.
2015-05-22 22:19:16 +02:00
Juan Linietsky
21939ce08b -some cleanups
-added tesselation function to curve and curve2d
2015-04-30 10:06:18 -03:00
Juan Linietsky
59154cccf9 -Changed Godot exit to be clean.
-Added more debug information on memory cleanliness on exit (if run with -v)
-Fixed several memory leaks, fixes #1731, fixes #755
2015-04-20 19:38:02 -03:00
Anton Yabchinskiy
16746f157f Merge branch 'master' of github.com:okamstudio/godot 2015-04-04 09:31:21 +03:00
rollenrolm
ca0b3ce1f6 New API: build fixes for x11 2015-03-23 01:31:38 +01:00