1
0
forked from 0ad/0ad
Commit Graph

93 Commits

Author SHA1 Message Date
d38fde3682 Do not attempt to rebuild bundled libs every time, and do not run CMAKE for nvtt everytime. Also pass -fpic for NVTT to prevent build failures on FreeBSD (reported by @nephele).
Unify the build scripts between macOS and Linux.

Reviewed by: @Freagarach, @wraitii
Differential Revision: https://code.wildfiregames.com/D3173
This was SVN commit r24310.
2020-12-01 19:29:21 +00:00
6f841d0ccb Update mac WxWidgets to 3.0.5.1
This was SVN commit r24309.
2020-12-01 14:18:24 +00:00
7e91806be3 Use C++17 to compile 0 A.D.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3

Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.

Closes #5862

Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
2020-12-01 14:17:12 +00:00
4b76e33e4d Fix MacOS bundle build
clean-workspaces.sh now cleans SM libs, so it needs to be called before
building libraries.

Differential Revision: https://code.wildfiregames.com/D3153
This was SVN commit r24274.
2020-11-27 11:00:53 +00:00
d7d0f142d8 Update (and debundle) fmt dependancy
We now support the most recent released version of `fmt` available (at
the time
of committing).

As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).


If you are a user of...

Linux/BSD: You will now need to have `fmt` installed from your
distribution's
           package repository. The minimum supported version of `fmt` is
`4.0`.

      OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
           then included and linked automatically.

  Windows: The relevant header files are retained and, along with a
pre-built
           library, are the only things still bundled.


Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)

Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
2020-11-26 21:01:32 +00:00
97e254c295 Fix MacOS GNUTLS linking against the 10.12 SDK
This also speed up compilation in general.

This was SVN commit r24263.
2020-11-26 14:47:36 +00:00
22d1742311 Fix MacOS libpng compilation against the 10.12 SDK
This was SVN commit r24260.
2020-11-26 09:15:36 +00:00
a33b3883e1 Fix forgotten patch file in 9a1c7cb8d2
This was SVN commit r24258.
2020-11-26 08:00:43 +00:00
9a1c7cb8d2 Upgrade Mac OS libraries
All are updated except:
- WxWidgets (not sure about compatibility)
- libogg (doesn't compile)
- zlib/libsodimum which have no update.

This drops supports for 10.11 and earlier, meaning we can now assume
SSE4.1 is present.
Updates the build system to account for this.

Closes #5777 (by virtue of upgrading to SDL 2.12)

Refs #4362

Differential Revision: https://code.wildfiregames.com/D3111
This was SVN commit r24257.
2020-11-26 07:20:10 +00:00
c4c7d3c760 Fix recent macOS builds.
Fix aarch64 build for NVTT.
Fix warning about GLVND when building on Linux (Patch by @Stan)
Native EOLs.

Patch by: @Itms
Differential Revision: https://code.wildfiregames.com/D2563
This was SVN commit r24245.
2020-11-24 19:36:19 +00:00
a226c4804e Fix segfault in FCollada with Visual Studio > 2013. Bump the version of fcollada for macOS; Linux has no check. add native eol to the file.
Reviewed by: @wraitii
Comments by: @smiley
Differential Revision: https://code.wildfiregames.com/D2474
This was SVN commit r24241.
2020-11-24 11:07:05 +00:00
15001ec798 Enable C++14
Spidermonkey 60 can only be compiled with C++14. This conflicts with
building 0 A.D. with C++11, so upgrade to C++14 first.
This in itself should not drop compiler support on any platform.

Tested on Windows by: Stan
Tested on Linux by: Freagarach
Refs #5859
Refs #5862

Differential Revision: https://code.wildfiregames.com/D3124
This was SVN commit r24235.
2020-11-22 14:34:31 +00:00
6bb08fb424 [SM52 1/2] Upgrade Spidermonkey build system and binaries to 52.9.1
Of note is the change to static linking on *nix (MacOS already used it).
The logic is that we can only use one single version of SM, so that
advantage of dynamic linking is lost regardless. We might also see
performance gains in the future with LTO enabled. It is also slightly
easier to distribute the program as a result. Expect a negligible size
increase in the binary size (offset somewhat by no longer needing to
distribute .so files). Finally, it streamlines the build script.

Also noteworthy in this commit:
- The MacOS build script is folded back into the general build script.
- the perl/sed command is replaced by patching the configuration file,
which at least warns if it starts failing in the future.

Binaries for windows provided by @Itms
The bulk of the patching was also done by @Itms.

Tested by: Stan, Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3094
This was SVN commit r24202.
2020-11-18 14:34:17 +00:00
dad2857538 Use Symbols to store JS object references when serialising and delete ObjectIDCache
When serialising JS objects, we keep track of any encountered object,
and serialize it only once. Any further serialisation instead stores an
ID referring to the original object (essentially an opaque pointer).
The trouble of course is to have a unique, persistent identifier for
such an object.
svn uses an ObjectIDCache, essentially a "JS Object -> ID" map (which
internally is essentially a "JS heap pointer -> ID" map).

JS, since ES15, includes a "Symbol" primitive type, which is a unique,
immutable identifier. They are also not iterable by for..in or
GetOwnPropertyName or related.
This means they can be used to store the tag directly on the object
(since it's impossible overwrite a user property).
Thanks to this, we can forgo ObjectIDCache in the serializers, and since
following D2897 it becomes unused, we can delete it, along with the
Finalization code it used.


Part of SM52 migration, stage: SM45-compatible changes.

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3085
This was SVN commit r24167.
2020-11-12 06:40:19 +00:00
b437af833d Stop downloading boost from sourceforge on macOS, as it is not the official source anymore, and it is not very reliable for big files.
Reviewed By: Krinkle, wraitii
Differential Revision: https://code.wildfiregames.com/D2766
This was SVN commit r23786.
2020-06-23 14:42:54 +00:00
e8b3fe81cc build-osx-libs: Update GnuTLS to 3.6.13 (unbreak macOS 10.15)
This includes a workaround that should be removed when it is fixed
upstream (LDFLAGS=).
It disables guile support, since we do not need it and it fails to
compile too.

Patch by: Krinkle
Reviewed By: wraitii
Fixes #5729

Differential Revision: https://code.wildfiregames.com/D2716
This was SVN commit r23772.
2020-06-14 10:30:14 +00:00
6e6c401ee8 Check the library version instead of the mtime of the already-built guard file in build-osx-libs.sh
Use a suffix for bundled libraries in order to rebuild them when we
patch them, refs #2551.

Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2649
This was SVN commit r23686.
2020-05-21 15:28:38 +00:00
c9d9b7be83 macOS build fixes and Jenkins pipelines.
This includes:
- some build fixes
- Jenkins pipelines, in use since January
- a revamped DMG build script, including dmgbuild configuration by Tobbi
and a tweak by norsnor (D2650)

Differential Revision: https://code.wildfiregames.com/D2523
This was SVN commit r23676.
2020-05-17 14:12:53 +00:00
da0f87458b Fix the build script failing to get ICU.
Use the github mirror instead,
Update from 59.1 to 59.2

Accepted by: @Itms
Patch by: @Krinkle
Differential Revision: https://code.wildfiregames.com/D2717
This was SVN commit r23644.
2020-05-09 10:34:34 +00:00
cc7071c691 Upgrade NVTT to version 2.1.1, fixes #4549.
Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi,
containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475
This was SVN commit r23305.
2019-12-29 11:21:33 +00:00
fcac07213f Update libsodium to 1.0.18, built on Windows with toolset v140_xp.
Also fixes the download address in the macOS libraries script.

Tested on Windows and macOS.

This was SVN commit r23302.
2019-12-28 18:12:43 +00:00
64b477625d Upgrade SpiderMonkey to version 45.0.2, refs #4893.
- Various build changes, in particular NSPR is not needed on Unix
anymore
- Add js/Initialization.h to source/scriptinterface/ScriptEngine.h
- Use nullptr instead of JS::NullPtr(), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1164602
- Remove `JS::RuntimeOptionsRef.varObjFix`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1171177
- Remove uses of `AutoIdArray`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1191529
- `JS_InternUCStringN` has been renamed, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1178581
- `JS::Evaluate` now takes scope chains explicitly, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1097987
- Array functions (such as `JS_IsArrayObject`) are fallible and output
to params, see https://bugzilla.mozilla.org/show_bug.cgi?id=f3d35d8
- Remove `JSCLASS_CACHED_PROTO_WIDTH` workaround in our code, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1236373
- Remove compile'n go (`setCompileAndGo`) and replace it by
`setIsRunOnce` which will become the default in the future, see
https://bugzilla.mozilla.org/show_bug.cgi?id=679939
- Mark shared memory in direct access operations
(`JS_GetUint16ArrayData` and `JS_GetUint8ArrayData`), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1176214
- Use new `JS::ObjectOpResult`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1113369

Thanks to wraitii, elexis, Krinkle and historic_bruno for contributions
and comments, and to gentz, madpilot, s0600204 and Stan for testing and
indirect contributions.

Differential Revision: https://code.wildfiregames.com/D1510
This was SVN commit r22627.
2019-08-07 22:37:43 +00:00
7d73af990d Disables GnuTLS Native Language Support in build-osx-libs.sh, refs #5503
This was SVN commit r22494.
2019-07-17 14:51:57 +00:00
7f453a2bd0 Fixes silent download errors in build-osx-libs.sh. Fixes #5490.
This was SVN commit r22493.
2019-07-17 14:32:26 +00:00
01fd8a3654 Cleans up build-osx-libs.sh whitespace. Fixes #5486.
For consistency, long argument lists have been broken into multiple
lines after the first argument, with suitable indentation.

This was SVN commit r22492.
2019-07-17 14:20:40 +00:00
a573460c65 Updates library LICENSE.txt for libsodium and macOS patches
This was SVN commit r22457.
2019-07-12 15:25:12 +00:00
1ecac53a38 Fixes GnuTLS build on macOS.
Fixes macOS linker warning "PIE disabled absolute - addressing not
allowed".

Updates nettle to 3.5.1, GnuTLS to 3.6.8, gloox to 1.0.22.
Disables TCP fast open feature of GnuTLS (requires 10.11, no SDK build
support).
Fixes GnuTLS detection of GMP by adding it to LIBS flag.
Disables getaddrinfo on gloox 1.0.22. Lobby connections failed during
server hostname resolution.
Adds --with-pic to GMP build to force consistent PIC usage.
Adds -N flag to patch commands to avoid reapplying them.
Removes unneeded build flags.
Documents --enable-fat configure flag: GMP and nettle detect
CPU-specific features, fat binaries let us build and run them on
different CPUs (see D1772).

Fixes #5453, 5489. Refs #5481.
Tested by: kali0ad, trompetin17
Reviewed by: elexis, trompetin17
Differential Revision: ​https://code.wildfiregames.com/D2057
This was SVN commit r22455.
2019-07-11 21:48:50 +00:00
1918fd11d4 fixing Build atlasUI inside xcode missing libpng, libjpeg
Refs #5493
Differential Revision: ​https://code.wildfiregames.com/D2062
Reviewed By: historic_bruno
This was SVN commit r22454.
2019-07-11 16:13:57 +00:00
eae5f11c5e Fix TLS Segfault on various mac versions
Accepted by: @wraitii
Tested by: Tobbi, Servo, HMS-Surprise
Thread:
https://wildfiregames.com/forum/index.php?/topic/25120-macos-osx-rc-bundles/page/2/&tab=comments#comment-368603

Fixes #5386

Differential Revision: https://code.wildfiregames.com/D1772
This was SVN commit r22212.
2019-04-22 21:49:55 +00:00
18b470a5ea Correctly choose DarwinSSL TLS backend on macOS for libcurl.
According to https://curl.haxx.se/docs/install.html, explicitly
disabling OpenSSL/BoringSSL/libressl with the confusing `--without-ssl`
flag is necessary.

Also disable a few more unneeded dependencies explicitly.

Patch By: Stan
Accepted By: trompetin17
Differential Revision: https://code.wildfiregames.com/D1687
This was SVN commit r21945.
2018-12-08 21:09:27 +00:00
01cdd24fea Build gloox with GnuTLS on macOS, refs #4705.
This includes GMP and nettle, that are dependencies of GnuTLS.
On versions of OSX/macOS up to 10.11, TLS handshakes can still fail and
crash, so users of those older versions should disable TLS on the lobby
in the options screen, and will still be able to use it.

Differential Revision: https://code.wildfiregames.com/D1654
Tested By: Tobbi, trompetin17, and testers of their bundles.
This was SVN commit r21940.
2018-12-02 20:52:40 +00:00
a896f670f0 Minor change to the libcurl macOS compilation.
nghttp2 can sometimes be detected on the system by configure, whereas we
do not provide nor use it.

Differential Revision: https://code.wildfiregames.com/D1487
Tested By: trompetin17
This was SVN commit r21939.
2018-12-02 20:41:55 +00:00
2b847a520a Small changes to the macOS build scripts.
Patch By: smiley, Tobbi and trompetin17.
Differential Revision: https://code.wildfiregames.com/D1609
This was SVN commit r21931.
2018-11-13 16:09:35 +00:00
ba8b23f28d Use static linking for macOS libsodium build, forgotton in dfa2048dc5.
Patch By: Itms
Refs https://github.com/na-Itms/0ad/tree/osx-fix

This was SVN commit r21914.
2018-10-19 16:29:48 +00:00
c5cb9f6d11 Update macOS libcurl --without-libidn flag to --without-libidn2 following 9c91ec7781
Fixes #5231.
Refs: 8ceb7142fa, 8817050e3a.
Differential Revision: https://code.wildfiregames.com/D1610
Patch By: Tobbi and viky / Victor Adascalitei
Comments By: Itms, andy5995
This was SVN commit r21913.
2018-10-19 16:14:12 +00:00
32686c2840 Build fixes for macOS and premake4.
Fixes issues with wxWidgets and curl reported by foxhack. Fixes premake4
build scripts after an oversight in 833c9f108c.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1468
This was SVN commit r21808.
2018-04-29 15:44:48 +00:00
8817050e3a Update libcurl to 7.59.0 on Windows and enable SSL support on Windows and macOS.
Refs #3004, #4362.

This was SVN commit r21683.
2018-04-09 16:40:36 +00:00
dfa2048dc5 Use libsodium for cryptography.
Tested By: Stan, Imarok
Differential Revision: https://code.wildfiregames.com/D1428
This was SVN commit r21674.
2018-04-08 21:41:31 +00:00
182103c143 Update some OS X libraries with security fixes and hopefully low regression risks. Refs #4362.
This was SVN commit r21583.
2018-03-18 17:21:29 +00:00
8124a6c76b Update libcurl for OSX, in order to fix the build. Use the opportunity to update libxml2 which had vulnerabilities.
Refs #4362

This was SVN commit r21501.
2018-03-11 16:44:15 +00:00
8ceb7142fa Update OSX libraries to the most recently released versions.
Remove wxWidgets patch from 4ca156e2d8 that had been merged with the new
release.

Differential Revision: https://code.wildfiregames.com/D679
Refs #4362
Based On Patch By: fabio
Discussed With: leper
Tested By: Tobbi, Itms
This was SVN commit r19848.
2017-06-30 00:33:11 +00:00
d7c4c20aa8 Update OSX zlib version to the most recent and now only one hosted.
Fixes #4639
Refs #4362
Differential Revision: https://code.wildfiregames.com/D644
Tested By: Tobbi
This was SVN commit r19825.
2017-06-25 14:58:51 +00:00
7e6a960e83 SpiderMonkey 38 upgrade: 02/35
Update files for building SpiderMonkey.
Add a script for starting the tracelogger, as well as some instructions,
to be detailed in the wiki.

This was SVN commit r18656.
2016-09-02 16:14:11 +00:00
c9cecab0be Remove libjpeg. Fixes #2828.
Based on patch by dalerank, tested on Windows, might need to be amended
for OSX.

This was SVN commit r17870.
2016-03-12 18:15:04 +00:00
f8941ac668 boost_signals was removed in 940868398c.
This was SVN commit r17667.
2016-01-18 16:46:32 +00:00
5d00d0ff8b Update libpng to 1.6.21 + comments cleanup.
This was SVN commit r17666.
2016-01-18 16:42:54 +00:00
4a9d6d2e5f Update all OS X libraries to their latest versions (exlcuding currently unused libjpeg, see #2828). Some also include security fixes. Fixes #3721.
Also disable unused wxwidgets features. Patch by trompetin17, refs
#2924.
Tested by wraitii.

This was SVN commit r17621.
2016-01-10 13:23:25 +00:00
08df9e8533 Update built on OS X to 1.6.19.
This was SVN commit r17291.
2015-11-19 23:47:41 +00:00
fd5f9c547b Updates OS X libs build script to use miniupnpc 1.9.20151008
This was SVN commit r17120.
2015-10-10 23:53:54 +00:00
b0a6979242 Source the spidermonkey patch script. Fixes #3462.
This was SVN commit r17089.
2015-09-30 20:28:13 +00:00