Commit graph

685 commits

Author SHA1 Message Date
Severin Glöckner
6bee4e751c Linux: Add Mimetype support for maps
This allows to open map files from the filemanager by clicking at them.

2nd, hidden *.desktop file needed to associate the mimetype with the wesnoth command
icons in mimetype/ are used as file icon
icons in apps/ are shown when the user want to change the default program for the mimetype
(In Dolphin this place can be reached after opening the file properties)
2019-10-09 02:32:49 +02:00
loonycyborg
4c74977227 Remove check for boost.thread from buildsystems since it's not used anymore 2019-09-28 14:21:04 +03:00
loonycyborg
c7271646b7 Remove config check for gobject
It's not supposed to be required and was mandatory only for particular
pango version(s) due to bug
2019-09-24 12:07:48 +03:00
loonycyborg
7437b3992e Fix issue #4306
prevent a KeyError from missing "have_fortify" env variable
2019-09-02 13:01:26 +03:00
josteph
d76a7ba5d0 Disable -Wunused-lambda-capture on clang.
In a nutshell, capturing a local "const constexpr int foo;" variable
with [foo](){} warns on clang that the program would be valid even if
the square brackets had been left empty, but making them so warns on
VC15.  See
https://stackoverflow.com/questions/52416362/unused-lambda-capture-warning-when-capture-is-actually-used

Disable the warning since explicitly capturing foo is good practice.
2019-06-05 10:31:09 +00:00
loonycyborg
83da28b4aa No longer install .mo files for manual and manpages textdomains
But still build them just to check those po files for errors.
This fixes #3522
2019-03-30 15:40:03 +03:00
loonycyborg
798e809512 Rename appdata and desktop files to contain D-Bus well-known name
as per freedesktop spec
2019-03-27 22:18:01 +03:00
pentarctagon
23375f07df Scons/Macos: Fix for vorbisfile.h not being found. 2019-01-22 18:34:21 -06:00
loonycyborg
d1ed0dccd1 scons: improved error handling for sql client lib and added support for mariadb_config 2019-01-15 14:23:47 +03:00
Jyrki Vesterinen
4147df7efc Explicitly link to GObject (should fix #3840) 2019-01-05 17:31:00 +02:00
pentarctagon
e273684f66 Disable requirements for OpenGL/GLEW. 2018-12-31 13:26:48 -06:00
loonycyborg
5164cd030f Fix #3809 : add option to control use of autorevision to scons 2018-12-27 14:39:31 +03:00
Martin Hrubý (hrubymar10)
ca7f7a2e93 Fix C-Make and Scons builds 2018-10-30 07:16:42 +02:00
Victor Sergienko
8716b8f9d0 #3634, #3557: Port from iOS: Compile with Apple crypto framework instead of OpenSSL. 2018-10-25 23:20:04 -07:00
Pentarctagon
6714ef32e0 Fixes #3518
Certain distro/compiler combinations will apparently warn about not optimizing when _FORTIFY_SOURCE is set.

(cherry-picked from commit 09fcc6b051)
2018-10-07 03:24:57 +00:00
loonycyborg
790d13e937 scons: fix strict hardened builds on Gentoo
(cherry-picked from commit 0c3ba36d68)
2018-10-07 03:23:46 +00:00
josteph
2b2b08431e Revert "Excluded data/test/ from tarball"
This reverts commit c934825607.

Keep data/test/ in 'scons dist' tarballs to match official tarballs.

(cherry-picked from commit bad6897cbc)
2018-10-07 03:22:54 +00:00
josteph
0b633badc5 Fix 'scons dist'
This makes 'scons dist' work, although the resulting tarballs are not
yet identical to cmake tarballs.

Remove awk usage made obsolete by the git transition
(7f85fa000c).

Update src/revision.hpp reference to use src/revision.h.  The former
name is unused since at least 7625b1e079.

(cherry-picked from commit 0ee4854157)
2018-10-07 03:22:53 +00:00
Pentarctagon
e405dc2bff Disabling hardening on Windows due to tdm-gcc's poor support.
As per sigurd's trial and error: RELRO's options are unknown entirely and -fstack-protector-strong results in compile errors.  Building with just PIE and _FORTIFY_SOURCE enabled does then compile, but results in a broken executable.

(cherry-picked from commit c954117677)
2018-10-07 03:22:51 +00:00
Pentarctagon
9e78232e0e Fixup hardening options for Windows.
(cherry-picked from commit 2771582222)
2018-10-07 03:22:43 +00:00
Pentarctagon
bc3ad71f03 Fixup for osx hardening options.
(cherry-picked from commit da6ebc7423)
2018-10-07 03:22:37 +00:00
Pentarctagon
6be6646a4e Enabled hardened executables by default.
The result of running "hardening-check wesnoth" now shows:
* Position Independent Executable: yes
* Stack protected: yes
* Fortify Source functions: yes (some protected functions found)
* Read-only relocations: yes
* Immediate binding: yes

(cherry-picked from commit 3290961db2)
2018-10-07 03:22:36 +00:00
Pentarctagon
39785177e2 Fix stack protection with LTO.
(cherry-picked from commit 5a2d1bc992)
2018-10-07 03:22:33 +00:00
loonycyborg
b3bd32a936 scons: add missing winapi lib dependencies to mingw build
(cherry-picked from commit d96d5c506c)
2018-10-07 03:22:10 +00:00
loonycyborg
ffb078c119 scons: don't let pkg-config to add prefix on msys2
This is workaround for windows style path confusing scons if they appear
in CPPATH etc. Paths without prefix still happen to be valid and they
start with "/", not "c:".

(cherry-picked from commit b347bc70b1)
2018-10-07 03:22:09 +00:00
loonycyborg
f7ad6de3fd Enable ASLR and NX bit security features for mingw builds
(cherry-picked from commit 8b1a5c0dde)
2018-10-07 03:22:06 +00:00
Charles Dang
848062fde6 Remove the CMake/Scons compile-time check for IEEE 754 compliance
Now handled by a static assertion.

(cherry-picked from commit d9315199ee)
2018-10-07 03:21:31 +00:00
Charles Dang
ee2b9d242e Bump min required Windows version to 7
Technically, all this code should work on Vista, (including the recent switch to using
SHGetKnownFolderPath), but since we're also considering requiring Visual Studio 2017
for building, we need Windows 7.

(cherry-picked from commit 2a585118d8)
2018-10-07 03:20:45 +00:00
Pentarctagon
e2501940a0 Warn about use of trampolines for nested functions.
Use of this feature with GCC in particular causes the stack to become marked as executable.

(cherry-picked from commit 96b43a9af4)
2018-10-07 03:20:41 +00:00
pentarctagon
36eae8c771 Add option to build wesnoth with hardening options.
(cherry-picked from commit 6c5fc82b1b)
2018-10-07 03:20:23 +00:00
pentarctagon
a040d521a4 Updates cmake and scons to be able to compile with OGL.
Scons OpenGL/GLEW test taken mostly verbatim from 3e2eba22a9

(cherry-picked from commit 5e36a90039)
2018-10-07 03:20:04 +00:00
Matthias Krüger
4c5e74b2da cmake/scons: if sanitizers are enabled, also add -fno-omit-frame-pointer and -fno-optimize-sibling-calls.
Otherwise, if we build with sanitizers and optimizations, the sanitizer stacktraces can become quite hard to read.

(cherry-picked from commit 29089a4736)
2018-10-07 03:19:54 +00:00
Martin Hrubý (hrubymar10)
75d6df374d Remove rest of Growl things which I forgot before
(cherry-picked from commit 783738b2f5)
2018-10-07 03:19:36 +00:00
pentarctagon
754b8a6221 Print the value of STRICT and build_timeout.
(cherry-picked from commit 96c41271d8)
2018-10-07 03:19:35 +00:00
pentarctagon
1ef1704fd9 Adds the opt/OPT option to scons/cmake.
Travis now also makes use of this to set the optimization level for the -O0 builds, rather than extra_flags_*.  This additionally fixes an issue where using -O0 in the release build with LTO resulted in the individual *.o files being compiled with -O0, but LTO then still linked with release's default -O3.

(cherry-picked from commit 63ff641662)
2018-10-07 03:19:35 +00:00
Charles Dang
31e6c40653 Removed OpenMP-related code
After some discussion, we concluded that this code was unmaintained, not even used in
some places (display.cpp, units/frame.cpp), leaving the only area that really used it
at all the image surface cache. Considering there was never really a conclusive benchmark
of its benefits and because said surface cache will be used a lot less going forward,
we're just removing it and simplifying everything for everyone.

Closes #1260 since it's now irrelevant.

(cherry-picked from commit 3792612fb7)
2018-10-07 03:19:30 +00:00
loonycyborg
a0c91ac41e Fix build against static libboost
(cherry-picked from commit c51065e39c)
2018-10-07 03:19:28 +00:00
pentarctagon
b32ce37de5 Allow setting c++17 in scons.
(cherry-picked from commit 7aeca70cb0)
2018-10-07 03:19:14 +00:00
Charles Dang
32da54b059 Removed Boost Thread as a built-time dependency
We use std::thread now.

(cherry-picked from commit 9de7aff904)
2018-10-07 03:19:10 +00:00
Iris Morelle
6f5f1482d2 cmake, scons: Drop option to enable or disable the removed SDL_SavePNG code
Commit dfc42e8a8d removed said code since
Wesnoth can use IMG_SavePNG() from SDL_image 2.0 instead. However, the
author left the build-time configuration options intact, and also part
of the necessary code for CMake to link Wesnoth against libpng.

Note that this change also eliminates an unnecessary direct link-time
dependency on libpng when using both CMake and SCons.

(cherry-picked from commit 4799ca05fe)
2018-10-07 03:18:33 +00:00
Iris Morelle
cdae5011bf scons: Sort help text with a custom function that will run on Python 3
(cherry-picked from commit 6b67c18d89)
2018-10-07 03:18:30 +00:00
Iris Morelle
2584a21716 Sort scons --help output
(cherry-picked from commit a31b5ebcba)
2018-10-07 03:18:30 +00:00
Iris Morelle
d0c9a02189 Revert "Revert "Bump min Boost version to 1.56.0""
This reverts commit cdf9b465c6.

May this noise be my vengeance.

(cherry-picked from commit f6a128579a)
2018-10-07 03:18:08 +00:00
Iris Morelle
777eb9ef2d Revert "Bump min Boost version to 1.56.0"
This reverts commit c82c1ff905.

(cherry-picked from commit cdf9b465c6)
2018-10-07 03:18:08 +00:00
Gregory A Lundberg
cc5fe2adc1 Change SCons and CMake to C++14
(cherry-picked from commit 2a17ecccfc)
2018-10-07 03:17:57 +00:00
Celtic Minstrel
c82c1ff905 Bump min Boost version to 1.56.0 2018-03-18 01:59:36 -04:00
loonycyborg
0eb314c4b5 scons: reorder boost checks to avoid linker errors with static libboost 2018-03-13 21:51:47 +03:00
loonycyborg
e637c55d50 scons: added a check for icu support in boost locale 2018-03-13 18:23:32 +03:00
Charles Dang
471c9e876a Addressed a large chunk of the whitespace issues from #2613
[ci skip]
2018-03-09 11:37:00 +11:00
pentarctagon
6f02d1bebb Make scons' mysql handling more normal. 2018-03-02 13:55:22 -06:00