Commit Graph

114 Commits

Author SHA1 Message Date
0b7da91992 Adapt libraries scripts to the new SVN repo. 2024-08-20 20:58:09 +02:00
0aeaa8f70a Adapt macOS libraries to the new build flow. 2024-08-20 19:10:25 +02:00
5c1195f66a New Linux/BSD build flow.
Getting and building libraries is now clearly separated from preparing
workspaces.
Some disk space is automatically reclaimed and cleanup is streamlined.
2024-08-20 19:09:23 +02:00
17ae3b224d Retrieve Windows binaries for the build, fixes #1814. 2024-08-20 18:54:00 +02:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
0d5cc1b994 Fix game crash when communicating with the lobby on macOS 13
Summary:
On macOS Ventura (at least version 13.2.1 and above), the game crashes
instantly when clicking on buttons communicating with the lobby.

This issue is solved by upgrading nettle to 3.9 and GNUTLS to 3.8.

Patch by: froissant
Accepted By: wraitii
Trac Tickets: #6807

Differential Revision: https://code.wildfiregames.com/D5018
This was SVN commit r27667.
2023-06-06 07:07:50 +00:00
a4d4df9dd8 Check for the existence of libMoltenVK
Patch by: @Langbart
Fixes #6729

This was SVN commit r27541.
2023-02-13 12:07:35 +00:00
d6121a43ea Add MoltenVK support to fix Vulkan on macOS.
Tested by: @Langbart, @real_tabasco_sauce, @wraitii
Refs #6636
Differential Revision: https://code.wildfiregames.com/D4905
This was SVN commit r27488.
2023-01-26 15:24:12 +00:00
2943747add Fix FMT and NVTT not linking with the correct SDK.
Tested by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4898
This was SVN commit r27469.
2023-01-19 21:10:18 +00:00
408c93744c Adds dependent libraries for Vulkan. Refs #6636
Tested By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4869
This was SVN commit r27387.
2023-01-08 23:12:54 +00:00
f82fc6431b Fix SM compilation on M1, fix cross-compilation.
Fixes 08e7efc76a.
The SM build script worked on its own, but the mac OS libraries script
passes it an unexpected value.
This also fixes cross-compilation arm -> x86.
Harfbuzz is explicitly not used when compiling freetype to avoid
pkgconfig using it.

Reorganize the logic a little bit around architecture handling.

Differential Revision: https://code.wildfiregames.com/D4647
This was SVN commit r26882.
2022-05-15 21:22:49 +00:00
08e7efc76a Allo native builds on Mac OS M1 / Apple Silicon
- Update GMP to a version that supports arm64 darwin
- Patch spidermonkey 78 to build and run on arm64 darwin
- Choose the correct architecture dynamically in build scripts
- Include python workaround that fixes python related errors on
spidermonkey build

Based on a patch by: kumikumi
Based on a patch by: Langbart
Fixes #6474

Differential Revision: https://code.wildfiregames.com/D4607
This was SVN commit r26881.
2022-05-15 06:45:53 +00:00
663fb3f527 Update the LIB_URL for zlib.
Fixes: #6496
Refs: #4362
Patch by: @Langbart
Differential Revision: https://code.wildfiregames.com/D4603
This was SVN commit r26788.
2022-04-14 22:35:17 +00:00
c1f779dff5 Fix compilation on Apple Silicon
This allows cross-compiling for x86_64 on mac ARM machines, and sets
things up for a switch later.
SDL upgrade is necessary for compilation with the GLES headers in
different SDKs.

Tested by: langbart, minohaka
Differential Revision: https://code.wildfiregames.com/D4424
This was SVN commit r26208.
2022-01-13 14:42:42 +00:00
c9bea80e0d Use GLAD2 a multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator.
Comments by: @nwtour, @Langbart, @bb
Based on patch by: @echotangoecho
Tested on Windows 7 & 10, Ubuntu and macos.

Differential Revision: https://code.wildfiregames.com/D721
This was SVN commit r26093.
2021-12-21 22:03:31 +00:00
fe511e88d9 Adds FreeType support to the engine.
Tested By: Langbart, Imarok, Stan, s0600204, wraitii
Differential Revision: https://code.wildfiregames.com/D4108
This was SVN commit r26040.
2021-12-08 22:14:43 +00:00
7382a4885b Use pkg-config more extensively in build
We now make use of `pkg-config` on Linux, BSD, and macOS systems to find
the headers and libs for the following dependencies, where we weren't
previously:

* `enet`
* `fmt` (on macOS only)
* `gloox`'s dependencies on macOS:
    * `gnutls`
    * `gmp`
    * `nettle`
* `libcurl`
* `libogg`
* `libsodium`
* `miniupnpc` (on macOS only)
* `openAL`
* `openGL`
* `vorbis`
* `zlib`

Please see revision (https://code.wildfiregames.com/D3611) for details.

NOTE: All those building on macOS will need to rebuild their libraries
(`build-osx-libs.sh --force-rebuild`)


Tested by: Langbart (macOS), Freagarach (Ubuntu 18.04), Jenkins CI
(Debian Buster)
Comments by: Stan, wraitii, Freagarach
Differential Revision: https://code.wildfiregames.com/D3611
This was SVN commit r25938.
2021-09-23 16:10:25 +00:00
8724b86915 Fix macOS boost compilation
Bintray has moved. Also upgrade to 1_76 while at it.

Differential Revision: https://code.wildfiregames.com/D3925
This was SVN commit r25383.
2021-05-05 08:25:01 +00:00
de02f9870c Make WxWidgets High-DPI aware / Upgrade WXWidgets to 3.1.4 on MacOS
Fixes issues on Big Sur with the development 0 A.D. (bundles were
working correctly because they are Low-DPI).

Thanks to @wik for investigations on High-DPI in WxWidgets.

Differential Revision: https://code.wildfiregames.com/D3326
This was SVN commit r25111.
2021-03-23 15:47:29 +00:00
2d9db5ade6 Bump miniupnpc version built on MacOS
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3630
This was SVN commit r24997.
2021-03-03 16:06:43 +00:00
0de47dd1ec Pass an install location to the fmt build on MacOS
Similar to what all the other sections do.


Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24987.
2021-03-02 23:40:48 +00:00
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