Commit Graph

749 Commits

Author SHA1 Message Date
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
Charles Dang
5c570841d3 Bump required Pango version from 1.21.3 to 1.22.0
Just enough to get rid of that conditional use of pango_cairo_font_map_create_context.
2018-02-17 12:18:17 +11:00
Jyrki Vesterinen
1d47c23efe Revert "Enable LTO by default."
This reverts commit 44f567c6a3.

Enabling LTO by default causes too many problems, inclusing build
failures for @doofus-01 and link failures with Clang for me.

Players and packagers can still amanually enable LTO in case it
works fine for them.
2018-02-12 08:11:50 +02:00
Jyrki Vesterinen
a5a9f6ab19 Revert "Fix release builds with Clang and SCons"
This reverts commit a1e821fb95.

This won't be necessary with the next commit.
2018-02-12 08:08:01 +02:00
pentarctagon
bdd5089dd7 CC should be checked for gcc, not CXX. 2018-02-11 10:46:11 +02:00
Jyrki Vesterinen
a1e821fb95 Fix release builds with Clang and SCons
The detection for when Clang is used was incorrect, resulting in GCC-only
parameter being passed to Clang.

In addition, at least on my system LTO+Clang caused linking errors even
with that fixed. As an emergency fix, I completely disabled LTO for Clang.
2018-02-11 01:27:22 +02:00
pentarctagon
c8200093b2 Fixes LTO/PGO options not being used when ccache is enabled.
When ccache is enabled, env["CC"] becomes - 'CC': '$CCACHE gcc'
2018-02-09 19:33:47 +02:00
Severin Glöckner
3777a5b307 add an appdata file for appstream software centers
(closes #1831 & #2160)
2018-02-02 23:46:59 +01:00
pentarctagon
44f567c6a3 Enable LTO by default.
LTO for Windows is disabled for now, as TDM-GCC does not work well with it.
LTO for Travis is also disabled, due to the extra time linking with LTO takes.
2018-02-02 17:56:07 +11:00
pentarctagon
73a3e3cc63 Adds cmake's pedantic option to scons. 2017-12-04 09:23:33 -06:00
pentarctagon
817e9dbb33 Remove the scons workaround for Travis only having SDL 2.0.2 2017-12-04 09:35:58 +11:00
pentarctagon
49b6ede463 Move most strict warning flags to the default build flags.
This moves all the warnings flags from the strict build to the regular build, except for -Werror. This means that the only difference between strict builds and non-strict builds will be if warnings are turned into errors.
2017-12-03 15:30:52 -06:00
Severin Glöckner
e0cebdd402 desktop_entry: include high resolution icons
wesnoth-optipng has been applied to the new images
2017-11-27 01:52:36 +01:00
pentarctagon
7ff30491fe Make strict builds consistent between scons and cmake 2017-11-24 15:00:01 -06:00
pentarctagon
e45e824499 Have scons and cmake link against same static libraries. 2017-11-20 07:38:18 +02:00
pentarctagon
ad3b3d8d9f Add ability to not create the .scons-option-cache file. 2017-11-08 19:52:04 +02:00
Gregory A Lundberg
d091391899 Renamed the target and binary for the Boost unit tests from test to boost_unit_tests
This quells warnings from CMake about reserved target names, and reduces confusion about which `test` is intended: the wesnoth executable or the standard shell command.
2017-11-06 20:32:27 +02:00
pentarctagon
699407d7f0 Replace base build with use_srcdir option. 2017-10-29 14:50:27 +02:00
Jyrki Vesterinen
0c137c79cf Globally suppress -Wmaybe-uninitialized
We have needed to suppress it in a bunch of places because GCC has kept
giving false positives depending on optimization settings. When I noticed
yet another false positive when I attempted to build the game with PGO
profiling data using CMake, it was the last straw.

Let's just suppress the warning globally and move on with our lives.
2017-10-27 21:28:06 +03:00
pentarctagon
757762b1e6 Add support for PGO builds. 2017-10-27 20:43:36 +03:00
Jyrki Vesterinen
86163094ee Merge branch 'profile-build'
Manual merge of pull request #2096.

Closes #2096.
2017-10-21 20:14:05 +03:00
pentarctagon
e58c709dbb Added perf support. 2017-10-11 10:39:14 -05:00
loonycyborg
a180e09bb6 Made build with scons 3.0.0 work fixing issue #2093 2017-10-11 16:36:20 +03:00
pentarctagon
b0f91e4a4d Add gcov and gperftools support to scons 2017-10-11 03:11:31 -05:00
pentarctagon
152c40d206 Address feedback. 2017-10-09 19:58:24 +03:00
pentarctagon
401f33d565 Re-add profile build description. 2017-10-09 19:58:24 +03:00
pentarctagon
2f3502b607 Re-added things based on replies, and added glibcxx_debug ability to cmake. 2017-10-09 19:58:24 +03:00
pentarctagon
3bfc202f56 Remove support for old tools and builds 2017-10-09 19:58:24 +03:00
pentarctagon
449bd3f632 Fixup as requested. 2017-10-07 09:53:30 +03:00
pentarctagon
76d0cc45af Removed Optimized build, improved gcc LTO support, add clang LTO support. 2017-10-07 09:53:30 +03:00
galegosimpatico
8b0d7e6799 On Boost: update build scripts and documentation.
At branch 'doc-from-discord-boost-discussion-20170926'.

The build documentation and scripts were slightly out of date about
Boost. This commit makes a (probably interim) update to them.

(CMakeLists.txt|SConstruct): `wesnoth` won't build using Boost earlier
than '1.50.0'. Boost 1.50.0 changed the location of version 3 of Boost
filesystem, from 'boost/filesystem/v3/' (e.g. for
'using boost::filesystem::v3::path;') to 'boost/filesystem/' (e.g. for
'using boost::filesystem::path;', enforced since the very introduction
of 'src/filesystem_boost.cpp'), making it incompatible unless using
precompiler directives for supporting backwards versions of Boost
filesystem prior than '1.50.0'. Using Boost 1.50.0 (and 51, 52 etc.)
`wesnoth` is able build and run. I checked using `ldd` that I am right
about the run time environment.

INSTALL.md: Requirement of Boost libraries version up to date.

projectfiles/VC12/README.md: Requirement of Boost libraries up to
date, only the statement of which one is the minimum version, not the
rest of the build guide for Boost as requirement.

.gitignore: Add KDevelop backup documents.
2017-10-06 20:38:50 +03:00
Alexander van Gessel
071b3635b7 Rename gettext scons module to avoid naming conflict 2017-09-21 15:33:48 +02:00
Alexander van Gessel
8d516df25b Don't use comma-separated arguments to print function 2017-09-21 11:45:00 +02:00
Alexander van Gessel
72fdcd78d4 Further python3 compatibility updates.
This has been tested with scons2, but not with scons3.
2to3 runs perform no further useful transformations.
2017-09-20 16:51:33 +02:00
Alexander van Gessel
1d667d97fc Get rid of commands module
This module is deprecated and not available in python3
2017-09-20 15:22:25 +02:00
Alexander van Gessel
6c3f774390 Basic 2to3 fixes 2017-09-20 15:04:50 +02:00
Jyrki Vesterinen
a3d884ef74 Fix SCons build on Windows
Found by @sigurdfdragon.
2017-07-23 21:35:24 +03:00
Celtic Minstrel
c9191c9812 Add OpenSSL's libcrypto as a dependency
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.

Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)
2017-05-12 15:57:13 -04:00
Jyrki Vesterinen
6b8273e003 Require Cairo 1.10 or above
This is needed because the CAIRO_STATUS_INVALID_SIZE constant was added in
that version.

1.10 is old enough that this change shouldn't cause problems for anyone.
For example, Debian Wheezy (2013) has Cairo 1.12.2.
2017-05-02 19:49:13 +03:00
Celtic Minstrel
2eed69822b Travis: Consider non-virtual destructors an error in base classes
This also fixes another case where one was missing.
2017-04-08 16:40:37 -04:00
loonycyborg
05f9f00289 Update autorevision script with upstream changes
this fixes autorevision errors if running from under su
2017-03-11 04:20:12 +03:00
Jyrki Vesterinen
eac2c0791d SCons: don't try to pass GCC specific switches to other compilers
9ad78036 follow-up. Requested by @CelticMinstrel .
2016-12-24 06:22:51 +02:00
Jyrki Vesterinen
9ad78036b5 Attempted fix for builds failing with compilers older than GCC 6 2016-12-23 00:26:01 +02:00
Jyrki Vesterinen
5fc50bf9ae SCons version of commit 7968f7ba 2016-12-22 22:27:30 +02:00
pentarctagon
9f79398ecf Deletes unused, unbuildable tools
Deletes create_images, cuter, exploder, schema_generator, schema_validator, and wesmage
2016-12-18 23:07:11 -05:00
loonycyborg
60329a87a1 Rename Optimize build variant to Optimized for clarity 2016-11-26 14:59:42 +03:00
Sergey Popov
dd1351dc14 Merge pull request #847 from Pentarctagon/Pentarctagon-optimize-build
Add build which uses higher level of optimization
2016-11-26 01:18:22 +03:00
pentarctagon
e4b95ae2fe Use BoolVariable instead of EnumVariable for enable_lto 2016-11-25 10:45:10 -06:00
Celtic Minstrel
dc24fa16f7 Remove option to link libintl instead of Boost.Locale 2016-11-18 12:09:56 -05:00
pentarctagon
9de1f61924 Add -s flag, fix $OPT_FLAGS evaluating as an empty string, and correctly pass the arch needed by Windows with -O3 to the optimize build 2016-11-18 01:27:40 -06:00
Pentarctagon
8ea76ce432 Fix compiling with TDM-GCC-64 and -O3
By default, TDM-GCC-64 was using -march=x86-64, which for whatever reason caused issues when compiling with -O3.  This makes scons force it to use -march=pentiumpro, the same as TDM-GCC-32.  This also changes the release build to use -O3 instead of -O2, which matches the release build default used by cmake and code::blocks.

Added -march=pentiumpro on Windows for -O3 build

m5
2016-11-18 01:27:40 -06:00
Pentarctagon
0d419cdc36 Check if LTO is enabled
Check if LTO is enabled

Add LTO flag

Added a flag to enable/disable LTO.  Also pass optimization options to the linker, since older versions of gcc may not automatically use the same options for linking and compiling, and it seems likely clang doesn't do this either.

m3
2016-11-18 01:27:40 -06:00
Pentarctagon
84ab6fabf1 Get clang as close to working as possible
additional fixup

m2
2016-11-18 01:27:40 -06:00
Pentarctagon
458b9ce62d Update SConstruct
Update SConscript

Update SConscript

m
2016-11-18 01:27:40 -06:00
Pentarctagon
8b0fe5109a Remove leftover nacl stuff
Delete some leftover nacl stuff apparently missed by pull #868
2016-11-14 15:07:48 -05:00
Celtic Minstrel
70326f371c scons: Finish incomplete wesnoth-bundle target
Note: The target still omits creating the Frameworks directory
required for a distributable bundle.
2016-11-13 00:43:12 -05:00
Celtic Minstrel
cdb164052a fixup! Travis hack: Don't require vorbis on OSX 2016-11-12 18:41:03 -05:00
Celtic Minstrel
5bc16e2544 Travis hack: Don't require vorbis on OSX 2016-11-12 15:20:04 -05:00
Gregory A Lundberg
f23127e65a Remove LOW_MEM compile-time option
Per @Vultraz
2016-11-11 09:20:56 -06:00
Gregory A Lundberg
75c7f9ec39 Delete support for Google Native Client (Nacl).
This is Chrome-only and W3C is said to be working on a portable alternative.

There is an x86-64/i686 version 1.10 of BfW on the Chrome web store. There appears to be no interest in upgrading to curret versions of NaCL and supporting the Chrome-only plugin.
2016-11-09 11:34:32 -06:00
Ignacio R. Morelle
bd9fea0fd3 scons: Drop C-isms 2016-11-03 18:12:13 -03:00
Ignacio R. Morelle
4bc38856ce scons: Refactor and reword Info()/Warning() message presentation 2016-11-03 18:12:13 -03:00
Ignacio R. Morelle
3c5332fd05 scons: Make compiler and Boost version requirements match INSTALL 2016-11-03 18:12:13 -03:00
Celtic Minstrel
ffe9182fb3 scons: Mac builds should link Cocoa, not Carbon 2016-11-03 14:46:50 -04:00
Gregory A Lundberg
fb715ec518 SCons Fix bug: Git Hash
SCons failed to rebuild game_config when the Git hash changes. The newer version was not copied into the source tree.
2016-10-29 18:50:36 -05:00
Gregory A Lundberg
34dcd0657f Test for Travis and only require SDL 2.0.2 2016-10-16 03:36:57 -05:00
Gregory A Lundberg
907eb5bf7e Require SDL2 2.0.4 on all target platforms. 2016-10-16 00:55:24 -05:00
Ignacio R. Morelle
ea9d077b89 fs: Add utility functions for the new file dialog
These include an alternate mode of normalize_path() that enforces the
platform's preferred path delimiter (i.e. backslash on Windows) on the
output, and a function to detect whether a path refers to a root
directory.

Unfortunately, the last bit requires introducing a new link-time
dependency on Windows, against a system library. It's guaranteed to be
always there but it seems kind of a waste. The alternative would be to
hand-parse the string but that seems even more of a waste. And no,
Boost.Filesystem can't do this in a straightforward fashion right now.
2016-10-05 03:06:43 -03:00
loonycyborg
fd1c94b2f8 scons: clean up unused sdl_net helper 2016-10-03 13:41:45 +03:00
loonycyborg
5a75a242c5 scons: remove obsolete raw_sockets option 2016-10-03 13:34:30 +03:00
loonycyborg
c16adcd8c9 Merge branch 'campaignd_asio' 2016-09-15 16:34:09 +03:00
Ignacio R. Morelle
3a925c85e3 scons: Fix compiler switch typo
Accidentally introduced in 2483fc80e4,
oops. Didn't become evident unless hitting other compiler errors,
though.
2016-09-13 19:42:08 -03:00
loonycyborg
1c90221527 Merge branch 'master' into campaignd_asio 2016-09-13 16:37:36 +03:00
Ignacio R. Morelle
2483fc80e4 scons: Don't pass a C++ compiler flag to C compilers
Needed since 0180a72573 introduces the
requirement of a C compiler in the building process. Otherwise we get
this from GCC 6.1.1:

  cc1: error: command line option ‘-Wold-style-cast’ is valid for C++/ObjC++ but not for C [-Werror]
2016-09-11 02:11:22 -03:00
loonycyborg
31bbedd94e Merge branch 'master' into campaignd_asio 2016-06-17 21:59:37 +03:00
loonycyborg
44fa6651c8 scons: help text clarification for extra_flags_* variables 2016-06-17 13:22:54 +03:00
loonycyborg
fccf4f067f scons: add an option to enable clang/GCC sanitizer functionality 2016-06-17 12:51:46 +03:00
loonycyborg
358bf3f9f8 Switch campaignd to use asio by reusing wesnothd code via server_base class 2016-06-15 22:14:29 +03:00
loonycyborg
550fa9086b Revert "scons: remove SDL_net dependency from unit tests"
This reverts commit 101e5d36ef.
2016-06-09 12:29:08 +03:00
loonycyborg
101e5d36ef scons: remove SDL_net dependency from unit tests 2016-06-09 12:04:27 +03:00
loonycyborg
3ee7fe2e59 scons: no longer link client against SDL_net 2016-06-08 17:20:59 +03:00
loonycyborg
0f9e04501f Remove obsolete and unused HAVE_CXX0X macro from buildsystems 2016-06-01 22:14:09 +03:00
loonycyborg
67479e4074 scons: properly move asio check to serverside checks 2016-06-01 17:30:43 +03:00
Andreas Löf
d350d91c40 Make strict compilation under scons behave like cmake
This adds -Wold-style-cast to the CCFLAGS when compiling everything
but lua. Lua requires an exception from the flags and there's thus a
workaround added.
2016-06-01 20:57:43 +12:00
loonycyborg
37688d57d6 Remove redundant SDL check 2016-05-07 11:27:36 +03:00
loonycyborg
94c8533e1f Merge branch 'master' into asio_wesnothd 2016-04-07 17:17:21 +03:00
gfgtdf
479f1b3d52 also allow c++1y in SConstruct 2016-04-03 02:38:54 +02:00
loonycyborg
bb02ce7c72 scons: add option to enable using c++14 features 2016-04-01 19:46:02 +03:00
loonycyborg
af7286c421 scons: add check for boost.thread since it's a dependency now 2016-03-31 00:46:06 +03:00
loonycyborg
0795ad879b scons: due to switch to std c++11 always pass -std=c++11 2016-03-31 00:10:32 +03:00
Andreas Löf
5c6e7c7d20 Remove SDL1 from SCons and CMake
This makes SDL2 the only build alternative for Wesnoth. Any
conditionals are removed, leaving only the settings that rely on SDL2.
2016-03-13 11:34:29 +13:00
anatoly techtonik
015cb9b3d9 SConstruct: Mention how to build Windows installer 2016-03-01 17:16:36 +03:00
loonycyborg
7666030367 Merge branch 'master' into asio_wesnothd 2016-01-19 15:21:06 +03:00
Andreas Löf
9b5870e14b Correct SDL2 versions for linux/win32/osx in build scripts
Codify the requirements set forth in the INSTALL file in scons and
cmake as they are used on other platforms that Linux and * BSD.
2016-01-17 10:41:36 +13:00
Andreas Löf
9ed01599ee Drop requiered SDL2 version to 2.0.2 on Linux and *BSD
This drops the required version to 2.0.2 on Linux and *BSD, as there are no known bugs that require us to have a later version on these platforms. Windows and Os X remains as 2.0.4.
2016-01-17 09:28:18 +13:00
Andreas Löf
4650202390 Update build requirements to SDL 2.0.4 2016-01-17 08:26:14 +13:00
loonycyborg
a48be105f7 scons: pass -isystem instead of -I for third party library includes 2016-01-04 20:25:49 +03:00
loonycyborg
f709b8ee8f scons: Added an option to support using multilib gcc in 32-bit mode
multilib_arch=32 will pass -m32 to both compiler and linker causing multilib gcc to produce 32bit binaries.
2015-12-02 16:58:43 +03:00
loonycyborg
4456dcbfaf scons: added ctool option to specify c compiler command
if cxxtool option is unspecified it will be derived from ctool
2015-12-02 16:58:40 +03:00
loonycyborg
879ab58e39 Remove dependency on SDL from wesnothd 2015-11-15 17:14:11 +03:00
loonycyborg
5c42f3d13b Merge branch 'master' into asio_wesnothd 2015-10-29 14:54:16 +03:00
loonycyborg
e961b087e7 Remove dependency of wesnothd on SDL_net updating scons accordingly 2015-10-28 12:08:26 +03:00
Andreas Löf
e8c3e99dad Make SDL2 the default in cmake and scons
This changes the default settings in the cmake and scons to make all
targets be compiled with SDL2 as opposed to SDL1.
2015-09-15 20:45:27 +12:00
anatoly techtonik
63c355b635 SConstruct: Check all SDL libs together
This speeds up troubleshooting of OGG dependencies
2015-09-03 22:19:45 +03:00
aquileia
4a272b301d Windows installer: Use FILE /oname to avoid copying files 2015-08-08 03:53:04 +02:00
Ignacio R. Morelle
b756c19dd3 scons: Require SDK defs for Windows XP and later instead of 2000 and later
1.13.1 does away with Windows 2000 compatibility by requiring the
AttachConsole function from kernel32.dll, introduced in Windows XP.
2015-07-23 21:07:40 -03:00
Ignacio R. Morelle
88811d9bf1 scons: Clean up warning message 2015-07-22 02:04:47 -03:00
loonycyborg
980434ce96 Windows installer: added a start menu shortcut to run wesnoth with console 2015-07-14 19:03:40 +03:00
Ignacio R. Morelle
3a4c11a2e7 scons: Propagate HAVE_FRIBIDI to all files
How does doing otherwise even help reduce compile times unless you are
changing your build environment every time? It's just a liability that
makes it harder to do feature detection from other files. It's also
asymmetrical with regards to the CMake recipe.
2015-07-13 05:12:26 -03:00
loonycyborg
dc7fb0b951 Update SConstruct to reflect rename of README 2015-06-20 16:18:01 +03:00
Ignacio R. Morelle
4c7b7b5a15 scons: 'test' is also built by the 'all' target 2015-04-05 21:56:32 -03:00
Chris Beck
66f69529b0 Merge pull request #351 from cbeck88/remove_bfs_option_ii
scons: remove boostfilesystem build option, replace with "libintl"
2015-01-02 14:34:40 -05:00
Chris Beck
bcc5be9f50 Merge pull request #348 from techtonik/sdl1215
Require SDL 1.2.15, which has important bug fix for Wesnoth
2014-12-30 20:18:53 -05:00
anatoly techtonik
951b0b7f1f Bump hard SDL requirement to SDL 1.2.10 and soft to 1.2.15
SDL 1.2.15 contains important bug fix for Wesnoth:
  https://bugzilla.libsdl.org/show_bug.cgi?id=894
  http://forums.wesnoth.org/viewtopic.php?f=5&t=41237

Further discussion:
 https://github.com/wesnoth/wesnoth/pull/348
2014-12-30 11:57:27 +03:00
Chris Beck
f9a593fcb4 scons: refactor, introduce fcn have_i18n_prereqs()
This makes the script a bit more readable
2014-12-29 22:12:02 -05:00
Chris Beck
c62d53239c scons: remove boostfilesystem build option, replace with "libintl"
This option cleans up some of the compatability path code from the
1.12 release. After this commit:

- boost::filesystem becomes a hard dependency, for scons
- boost::locale is a soft dependency, a build flag "libintl"
allows to swap boost::locale out for libintl.
- the libintl flag cannot be used when compiling for windows
2014-12-27 16:11:47 -05:00
anatoly techtonik
2a7b1f912c SConstruct: Link with iconv on Windows to fix GetACP error on MinGW:
i686-w64-mingw32/lib/../lib/libiconv.a(localcharset.o):localcharset.c:(.text+0x7): undefined reference to `_imp__GetACP@0'

https://stackoverflow.com/questions/16558813/link-error-with-getacp-under-mingw64-mingw-builds
2014-12-26 17:06:19 +03:00
anatoly techtonik
005f11b759 SConstruct: Do not link with libintl - Wesnoth now uses boost::locale
http://forums.wesnoth.org/viewtopic.php?f=10&p=577648

This fixes compilation error on MinGW:
...
g++ -o wesnothd.exe -mwindows -mthreads build\release\sd... -lboost_locale-mgw49-mt-1_57 -lwsock32 -lintl -lz
../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lintl
collect2.exe: error: ld returned 1 exit status
scons: *** [wesnothd.exe] Error 1
scons: building terminated because of errors.
2014-12-26 17:00:11 +03:00
Chris Beck
ea3da43e66 add documentation, scons check for jpg support in sdl_image
It was reported on Dec 22 2014 in irc that the game is broken if
this is missing, and a search shows that bigmaps and many campaign
story screens use jpg images.

It makes more sense imo to document this as an official dependency
now, and if we decide to change everything to png's then we can go
back and disable the jpg check then.
2014-12-22 22:07:14 -05:00
Chris Beck
aedb0dce33 lua console history feature uses "history" instead of "readline"
This is the correct and more minimal interpretation of the optional
dependency.
2014-11-22 21:56:27 -05:00
Chris Beck
4281c602f2 add cruft to SConstruct to help cross-compiling with readline 2014-11-22 19:46:49 -05:00
Chris Beck
2152b48a14 scons, cmake: by default, search for GNU readline support 2014-11-22 00:03:30 -05:00
Chris Beck
ba46cc80b1 add command history and history expansion to lua console
Adds an optional dependency on the readline library.
2014-11-21 21:08:47 -05:00
Chris Beck
da4074e882 use boost mersenne twister rng, add boost::random dependency
This is a squash of work done in april, see closed github pull
request. #160
2014-11-03 11:24:24 -05:00
Chris Beck
20dbcff99c fixup SConstruct in case there is no terminal in the environment 2014-11-02 01:08:06 -04:00
Chris Beck
8f93e0ebb0 scons: add OS_ENV option, to forward all of OS environment to scons 2014-11-01 23:13:23 -04:00
Chris Beck
d9ecc0a9f7 scons: don't depend on libintl if boost filesystem enabled
since we use boost locale instead then.
2014-11-01 13:30:02 -04:00
Chris Beck
22b7a3932e Merge branch 'save_png'
Conflicts:
	CMakeLists.txt
2014-10-31 09:00:26 -04:00
Chris Beck
19548b4e5d add CheckPNG again to the SConstruct 2014-10-29 22:03:03 -04:00
Chris Beck
bdd109ebcb Fixup boost filesystem options for cmake, scons
The option should control the compilation, in wesnoth-core, of
filesystem_boost.cpp, and gettext_boost.cpp, vs. the old versions.

Using the new code is now the default option, you must explicitly
deactivate with both cmake and scons to get the old stuff back.
2014-10-25 18:53:43 -04:00
Chris Beck
8dfdc6b185 add SDL_SavePNG, write files as png if possible, unless ending .bmp
This commit adds a "minimal interface to lib png to support writing
png files from SDL surfaces", to the codebase. It adds a save_image
function to namespace image, and this checks compiler flags to see
if lib png is available. The function will save as a png if png
support is included and save file name doesn't have bmp extension,
and otherwise it will save as a BMP as usual.

We already had lib png as a dependency to build the tools, just not
the main game. This commit changes cmake and scons but makes the
dependency only optional, changing nothing if lib png is not
available.

See here: https://github.com/driedfruit/SDL_SavePNG
2014-10-22 21:34:38 -04:00
gfgtdf
782c36d800 add scons check for boost_locale for windows
TODO: maybe the file scons/boost.py should also be changed?
2014-10-18 20:23:05 +02:00
Alexander van Gessel
ab9baacf6e Change SDL resource loading to use our filesystem functions
SDL 1.2's own filesystem functions have very limited unicode support,
so provide an SDL_RWops struct to let them use ours.
This also bumps the minimum required SDL_mixer version to 1.2.12

Conflicts:
	SConstruct
	src/filesystem.hpp
2014-10-17 16:15:09 -04:00
gfgtdf
e038938a73 Merge branch 'boost_filesystem' of https://github.com/AI0867/wesnoth into AI-boost_filesystem_3
Conflicts:
	.travis.yml
	SConstruct
	src/campaign_server/campaign_server.cpp
	src/create_engine.cpp
	src/editor/map/map_context.cpp
	src/game_config_manager.cpp
	src/gui/dialogs/screenshot_notification.cpp
	src/gui/dialogs/wml_error.cpp
	src/savegame.cpp
2014-10-17 16:40:45 +02:00
anatoly techtonik
4bb97904e1 scons: show OK status when base prerequisites are met 2014-08-10 16:56:08 +03:00
anatoly techtonik
78b1481af7 scons: make SDL availability flags functions that evaluate lazily on demand
This moves messages about optional SDL libs checks below
potential warning about missing base dependencies and
makes SCons check GCC compiler before SDL.
2014-08-10 16:54:56 +03:00
anatoly techtonik
339513900c scons: use full condition evaluation when checking dependencies 2014-08-10 16:54:24 +03:00