Commit Graph

710 Commits

Author SHA1 Message Date
f88b1a88f6 Update CI dockerfiles.
This was SVN commit r27489.
2023-01-26 15:34:52 +00:00
a0022fb56b Fix and cleanup the SM91 build, fixes #6676.
Add a new patch written by s0600204, replacing the use of `distutils`
with `sysconfig` in the setup of the bundled virtualenv in SpiderMonkey.
Add a patch which is a portion of
https://phabricator.services.mozilla.com/D130410, fixing upstream's bug
1739486 on Fedora.

This fixes build issues on recent Debian and Fedora. This is consistent
with upstream's upcoming changes in ESR102 following the deprecation of
`distutils`.

This cleans up some old SM patches; renames the [[SVN:27442]] unicode
patch; moves a Python-related environment variable inside `build.sh`;
fixes indentation and EOL properties.

Differential Revision: https://code.wildfiregames.com/D4893
This was SVN commit r27460.
2023-01-17 20:49:00 +00:00
f684615dff Update clean-workspaces.sh after SpiderMonkey's upgrade to 78.6.0 and 91.13.1.
This was SVN commit r27457.
2023-01-17 10:27:25 +00:00
9347192591 Fix bundled spidermonkey code in Premake.
It still won't link if the user has a more recent issue than whatever
was vendored with Spidermonkey. Refs:
https://code.wildfiregames.com/D3127.
Fix option --with-system-spidermonkey info oversight when updating in
d8332a2938 and d92a2118b0 and d5db03c303
Reported by @sera, @linkmauve

This was SVN commit r27440.
2023-01-14 12:14:56 +00:00
d5db03c303 [SM91] Update to Spidermonkey 91.1.3 APIs
Fixes: #5986
Patch by: @wraitii
Comments by: @nwtour, @Stan
Differential Revision: https://code.wildfiregames.com/D4428
This was SVN commit r27409.
2023-01-10 17:06:47 +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
cfa4aff773 Fix translations script pipeline.
This was SVN commit r27100.
2022-09-12 11:35:27 +00:00
33762aa24e Update dockerfiles images to match jenkins
This was SVN commit r27097.
2022-09-12 07:37:47 +00:00
7e481b73cd Update jenkinsfiles to match upstream.
Windows now builds the actor editor for autobuilds, and stores the test
results.
All bundle now has an option to only build the macOS bundle and uses the
number of cores available to build.
docker-translations now builds the long string locale. Fixes #5009.
New script that is run periodically to check if the nopch build still
works.
Docker docs now builds the template analyser data and uploads it to the
server.
Add the design docs script.
Add a new script to build the game using linux with custom flags, such
as gles, clang, special linker etc.

This was SVN commit r27096.
2022-09-11 17:28:32 +00:00
6acc4b4a5b Don't mix locally installed python libs when building
Patch by: @baco
Differential Revision: https://code.wildfiregames.com/D4776
This was SVN commit r27084.
2022-09-01 20:49:16 +00:00
6e8e6e986d Fix glad not building on BSD
Differential Revision: https://code.wildfiregames.com/D4781
This was SVN commit r27083.
2022-09-01 20:44:49 +00:00
f2c80badbf Don't try to build Atlas when wxconfig is missing
Reported by: @andy5995
Comments by: @lyv, @vladislavbelov, @andy5995
Fixes #6615
Differential Revision: https://code.wildfiregames.com/D4777
This was SVN commit r27082.
2022-09-01 20:42:59 +00:00
9845a99f77 Adds EGL support for Wayland.
Tested By: Freagarach, Mentula, phosit
Differential Revision: https://code.wildfiregames.com/D4642
This was SVN commit r26929.
2022-06-09 21:09:32 +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
62e589ab76 Adds renderer backend interface and dummy backend.
Comments By: phosit, Stan
Tested By: Langbart, phosit
Differential Revision: https://code.wildfiregames.com/D4636
This was SVN commit r26858.
2022-05-08 22:02:46 +00:00
3694a12152 Fix x86 Unix versions of 0 A.D. not being able to open the public.zip file.
Patch by: @nwtour
Differential Revision: https://code.wildfiregames.com/D4413
This was SVN commit r26378.
2022-02-14 11:01:02 +00:00
8c068aab07 Removes possibility to link lowlevel library dynamically.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D4470
This was SVN commit r26281.
2022-01-31 06:53:30 +00:00
0b7a717c8a Fix a warning when building pyrogenesis in Debug on Windows.
This was SVN commit r26227.
2022-01-18 11:07:05 +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
dfafdcd792 Bump version of the desktop file to 1.4 the latest stable version according to @nwtour on https://code.wildfiregames.com/D3475.
Noticed by: @asterix and @dynamofox on cf56f36a3b
This was SVN commit r26179.
2022-01-06 20:28:49 +00:00
cf56f36a3b Fix two typos noticed by @Nescio, and use the performance GPU on Linux too.
Patch by: @DynamoFox, @nwtour
Comments by: @bb
Differential Revision: https://code.wildfiregames.com/D3475
This was SVN commit r26178.
2022-01-06 19:40:15 +00:00
de2a368924 Modify 0ad.desktop to accept a file as an argument to allow installing mods by drag & drop on the icon.
Patch by: @nwtour
Accepted by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D4410
This was SVN commit r26177.
2022-01-06 19:34:20 +00:00
478164962f Removes static linking of OpenGL library.
Tested By: Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D4387
This was SVN commit r26104.
2021-12-24 08:02:27 +00:00
e7cc6117ce Fix removal of added files for macOS and Windows.
Don't display Debug: and Release: if no message was printed.

This was SVN commit r26101.
2021-12-23 15:10:16 +00:00
6b7541cec5 Add more options to archive builds.
Patch by: @wraitii, @Stan
Tested for A25.

Differential Revision:
https://code.wildfiregames.com/D4141#change-nbAmEr5oWUW3

This was SVN commit r26100.
2021-12-23 14:59:37 +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
89c181ded1 Encapsulates information about GL inside device.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D4375
This was SVN commit r26072.
2021-12-15 06:43:41 +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
31b70309b3 Debundle Valgrind and make it optional
If a *nix user wishes to build `pyrogenesis` with support for Valgrind
(such as
it is), then can do so by passing `--with-valgrind` to
`update-workspaces.sh`.
(They will need Valgrind installed and locateable via `pkg-config`.)


Reviewed By: sera, Stan
Fixes: #2904
Differential Revision: https://code.wildfiregames.com/D3646
This was SVN commit r25933.
2021-09-20 22:18:28 +00:00
bb
080cae147e Remove generated test files, stub_impl_hack on cleanup
At some point make clean should take care of this.

Proposed By: elexis in D256
Approach suggested by: leper
Reviewed By: Freagarach
Differential Revision: D4219
This was SVN commit r25871.
2021-08-28 10:21:03 +00:00
2111f864d4 Removes dehydra build scripts following 53369d593b. Fixes #4446
Refs d7a057143d.

This was SVN commit r25523.
2021-05-22 14:25:53 +00:00
4f2e730d3c CodingConventions: Prefer using const on immutable values.
Using `const` for values that should not be changed is considered a good
practice (https://eslint.org/docs/rules/prefer-const).

Forum poll:
https://wildfiregames.com/forum/topic/38347-codingconventions-use-const-instead-of-let-for-immutable-values-in-functions/
Differential revision: https://code.wildfiregames.com/D3950
Comments by: @bb, @Stan, @wraitii
This was SVN commit r25454.
2021-05-17 15:50:16 +00:00
cdd75deafb XMB Improvements, parse JS into XMB, make strings more efficient.
XMB format is bumped to 4, invalidating all cached files. The
differences are:
 - element/attribute names are stored after the elements themselves, and
not before. This allows writing XMB data in one pass instead of two.
 - names themselves becomes offsets (instead of arbitrary integers),
making getting the string from the int name much more efficient.

XMBFile is renamed to XMBData to clarify that it does not, in fact,
refer to a file on disk.

XMBData::GetElementString is also changed to return a const char*, thus
not creating an std::string. A string_view version is added where
convenient.

The XML->XMB and JS->XMB conversion functions and the corresponding
storage are moved to `ps/XMB`, since that format doesn't particularly
relate to XML. CXeromyces becomes lighter and more focused as a result.
The XML->XMB conversion also benefits from the above streamlining.

Note that in a few cases, string_view gets printed to CLogger via
data(), which is generally not legal, but we know that the strings are
null-terminated here. Our libfmt (version 4) doesn't support
string_view, that would be v5.

Differential Revision: https://code.wildfiregames.com/D3909
This was SVN commit r25375.
2021-05-04 13:02:34 +00:00
4146428825 Update build/ dockerfiles & jenkinsfiles
This reflects their current state on the VM/Jenkins.

Differential Revision: https://code.wildfiregames.com/D3133
This was SVN commit r25149.
2021-03-28 13:02:06 +00:00
0c419b5bab CI linting: fix issues with char being null for cppcheck.
The CPPCheck linter outputs 'char: null', which trips the
phabricator-jenkins-plugin, and fails to lint on CI.
To avoid this, filter out null values, since e.g. char is optional
anyways. We do want to fail if non-optional values are missing.

Differential Revision: https://code.wildfiregames.com/D3730
This was SVN commit r25112.
2021-03-23 17:43:19 +00:00
d751927b89 Linter fix on CI.
The CI wasn't properly reporting linting, as it turns out the output of
`arc lint --output json` is not what the Jenkins plugin expects.

This adds a custom lint printer that is compatible with the plugin
expectations.

Also delete the coala/ folder forgotten in the original diff.

Differential Revision: https://code.wildfiregames.com/D3709
This was SVN commit r25082.
2021-03-19 09:13:00 +00:00
c9f37fc613 Lint update: use arclint, remove JSHint, remove coala on CI.
This runs linting using the "arc lint" command of arcanist, which
notably gets run automatically as part of the arc diff workflow.

Changes:
- The major change is that arc lint reports, by default, only issues on
changed lines instead of changed files (--lintall changes that).
- JSHint is largely redundant with eslint and does not support some of
the new Javascript functionality that we are able to use in 0 A.D., such
as conditional chaining, thus it is removed (of course, users can still
run it manually).
- Eslint 7 is supported out of the box and updated to ES 2020
- cppcheck and eslint are optional - if the executable is not found
(e.g. in PATH), it will fallback to a 'dummy' PHP script that does
nothing. This has been tested on windows, mac and Debian (CI).
- The licence year linter now suggests replacement, and has been
rewritten as an arcanist linter.
- Add a JSON error linter.

The intention is to have non-intrusive external linting, and largely the
same text linting.

Coala has largely gone unmaintained in the past few years (more so than
arcanist anyways) and installing it on modern Python is convoluted.

Differential Revision: https://code.wildfiregames.com/D3639
This was SVN commit r25056.
2021-03-15 15:14:28 +00:00
56047ac9fa Adds logs to CameraController for speed changes of camera scroll, rotate and zoom.
Patch By: nwtour
Differential Revision: https://code.wildfiregames.com/D3604
This was SVN commit r25045.
2021-03-12 20:57:33 +00:00
c879308ad6 Use pkgconfig to find libpng
Should hopefully resolve an issue raised on IRC by @spcman and @Xavi92

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3610
This was SVN commit r24998.
2021-03-03 16:11:41 +00:00
c16d961cd2 Enable support for powerpc64 systems. New problems with NVTT will be addressed in another diff.
Patch by: @tpearson-raptor
Comments by: @q66
Refs:
https://github.com/void-linux/void-packages/blob/master/srcpkgs/0ad/patches/ppc64.patch

Differential Revision: https://code.wildfiregames.com/D1619
This was SVN commit r24995.
2021-03-03 15:13:47 +00:00
c6f50b253f Fix *nix tarballs to extract in a subfolder.
Also incorporate retry improvements by Stan

Reported by: madPilot
Differential Revision: https://code.wildfiregames.com/D3585
This was SVN commit r24944.
2021-02-27 10:19:31 +00:00
151513f48d Allow the windows CI to post comments on differentials like other pipelines.
Differential Revision: https://code.wildfiregames.com/D2946
This was SVN commit r24817.
2021-02-01 15:05:07 +00:00
3becf25fac Update bundle dist tools
- The MacOs script was not exporting the SVN revision properly.
- Rename the DMG to match the other's conventions.
- Clean up windows installer files ( Fixes #5955 )

Differential Revision: https://code.wildfiregames.com/D3370
This was SVN commit r24763.
2021-01-22 12:53:54 +00:00
Angen
1a8de6d2b8 Hide ip and port from users until they want to join, add optional password
Current issue with the lobby, is that we make ips of hosts public for
anyone to read. This patch consists of 3 parts.
1.) Removing ips and ports from lobby javascript
2.) Removing need of script on the server to attach public ips to game
stanza by asking the host using xmppclient as proxy.
3.) Implementing password protected matches, to deny this information to
not trusted players.

Further description:
Do not send ports and stunip to the bots.

Removed from stanza.
Do not send ip to the lobby.

Removed from mapping gamelist from backend to gui (still on the backend
side, because it is done by script on 0ad server).
Get ip and ports on request when trying to connect.

On the host side, ask stun server what is host's public ip and remember
it.
On the client side, send iq through xmppclient to the hosting player and
ask for ip, port and if Stun is used, then if answer is success,
continue
   with connecting, else fail.
Add optional password for matches.

Add password required identifier to the stanza.
Allow host to setup password for the match. Hash it on the host side and
store inside Netserver. If no password is given, matches will behave
as it is not required.
On the client side, if password for the match is required, show
additional window before trying to connect and ask for password, then
hash it
and send with iq request for ip, port and stun.
Server will answer with ip, port and stun only if passwords matches,
else will asnwer with error string.
Some security:
Passwords are hashed before sending, so it is not easy to guess what
users typed. (per wraitii)
Hashes are using different salt as lobby hashing and not using usernames
as salt (as that is not doable), so they are different even typing the
same password as for the lobby account.
Client remembers which user was asked for connection data and iq's id of
request. If answer doesn't match these things, it is ignored. (thnx
user1)
Every request for connection data is logged with hostname of the
requester to the mainlog file (no ips).
If user gets iq to send connection data and is not hosting the match,
will respond with error string "not_server".
If server gets iq::result with connection data, request is ignored.

Differential revision: D3184
Reviewed by: @wraitii
Comments by: @Stan, @bb, @Imarok, @vladislavbelov
Tested in lobby

This was SVN commit r24728.
2021-01-20 18:31:39 +00:00
078b4100c1 Fixes FreeBSD build on 12.2
- Fix compiler warning with Clang
- Fix usage of libiconv
- Fix an incorrect SSE macro in NVTT for SSE

Patch by: @madpilot and Stan
Fixes: #5255
Differential Revision: https://code.wildfiregames.com/D3421
This was SVN commit r24704.
2021-01-19 16:59:53 +00:00
3747b42f02 Add a pipeline to generate test coverage.
Fixes: #5739

This was SVN commit r24520.
2021-01-07 15:05:24 +00:00
2d40068cd1 Thread the NetClient session.
This threads the netclient session, which avoids timeouts when the
main-thread is not polling (map creation, very long simulation frames).

Unlike the NetServer, which should be as independent as possible from
the main thread, the NetClient is fundamentally tied to the game thread.
Therefore, this only threads the session object.
To ensure good performance and ease-of-use, lock-free queues for
in/out-going messages are used.

This fixes artificial timeouts, while also improving actual ping reports
(since frame-time is no longer a factor).
It effectively reverts D1513/eda236522c and 2e7e1c0b2b, all hacks around
lag-timeouts (and bits of 1a3fb29ff3).

Based on a patch by: Stan
Comments by: Vladislavbelov
Fixes #3700, refs #3373

Differential Revision: https://code.wildfiregames.com/D2848
This was SVN commit r24518.
2021-01-06 15:26:11 +00:00
1bb336829d Add initial support for MCST Elbrus 2000 (e2k) CPU architecture
patch by: @r-a-sattarov
Reviewed by: @Stan
Fixes #5877, Refs #5869

Differential Revision: https://code.wildfiregames.com/D3162
This was SVN commit r24490.
2020-12-31 15:52:12 +00:00
d28d17e96c Remove SSE detection duplication in Colors and ModelRenderer
- Rename macros to be more explicit
 - Move detection code to a separate file
 - Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
 - Make explicit the SSE2 dependency for Windows

Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
2020-12-31 15:37:28 +00:00
a395a0ab66 [BOOST 1.75 2/2] Update binaries for windows (1.65 → 1.75).
Refs #3004

This was SVN commit r24484.
2020-12-31 12:13:25 +00:00
2e27ece0a0 (2/2) Update premake5 to Alpha 15 - shell scripts
Update build shell scripts to use premake5 `gmake2.*` directories.
(The old `gmake.*` directories have been removed from premake5.)


Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24388.
2020-12-14 02:22:58 +00:00
a0d2112195 (1/2) Update premake5 to Alpha 15 - premake5 files
See `CHANGES.txt` below for the upstream-composed list of changes.


`premake5.exe` built by Stan

Accepted By: Stan (for Windows)
Trac Tickets: #5869
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24387.
2020-12-14 02:17:47 +00:00
5190bd4c56 Remove old premake5 vs20XX make files
These files contain instructions to build premake and its bundled
dependancies
on versions of Visual Studio we no longer support.


Refs: D3219

This was SVN commit r24386.
2020-12-14 01:41:50 +00:00
69f31a67a4 More improvements to the release scripts.
- Add a 'dev' option to the mac bundle that's much faster, intended to
quickly test bundle-like behaviour.
- Add an option to only archive the 'mod' folder, intended to speed up
the CI weekly builds and avoid taking too much disk
space.
- Tweak the windows installer, add an option to create a shortcut to the
desktop (Fixes #1637). This uses the readme 'hack'
 which appears to be a relatively standard way of doing that.
- Make the scripts executable.
- Update jenkinsfile.

Follows d95550248b

Differential Revision: https://code.wildfiregames.com/D3191
This was SVN commit r24353.
2020-12-09 15:22:24 +00:00
d4773df0c1 Version the documentation pipeline used on Jenkins
This was SVN commit r24344.
2020-12-07 15:49:47 +00:00
d95550248b Rework bundle creation scripts.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.

Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.

Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
2020-12-07 13:44:42 +00:00
6da64bf354 [SM78 1/2] Upgrade Spidermonkey build system and binaries to 78.6.0
SM78 drops usage of Python 2 in favour of Python 3.

SM78 is the first ESR to actually use rust, which means a new static
library is bundled.
This means LLVM-objdump is now a dependency of Spidermonkey, and also 0
A.D.

SM78 also removes the need for NSPR on Windows (Bug 1556646).

Tested by: Stan, Freagarach, mammadori
Refs #5694
Refs #5861

Differential Revision: https://code.wildfiregames.com/D3167
This was SVN commit r24332.
2020-12-06 14:00:57 +00:00
Angen
1bd3d7ee5b Fix macos-differential typo
This was SVN commit r24329.
2020-12-06 07:56:07 +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
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
dcc73561c2 Remove Xcursor dependency following bbcd9b34cc
Fixes #5842

This was SVN commit r24304.
2020-11-30 18:10:02 +00:00
d8332a2938 [SM68 1/2] Upgrade Spidermonkey build system and binaries to 68.12.1
No noteworthy build system changes, however rust is now necessary for
Spidermonkey compilation.
On windows, clang-cl is now necessary.

Tested by: Freagarach, Stan, Subitaneo
Refs #5860

Differential Revision: https://code.wildfiregames.com/D3143
This was SVN commit r24296.
2020-11-30 08:59:49 +00:00
416cc90c3e Drop support for compiling with Visual Studio 2015
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
2020-11-28 16:54:48 +00:00
2cfd1b9fac Fix MacOs bundle for Python3
Update the lib used to handle plists, as dmgbuild changed things for
Python3.

Refs #5694

Differential Revision: https://code.wildfiregames.com/D3157
This was SVN commit r24282.
2020-11-28 10:23:06 +00:00
d867b829b4 Add missing file in https://code.wildfiregames.com/D3126 / 9ae084519f
This was SVN commit r24273.
2020-11-27 09:40:45 +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
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
f2cf2c97ad [SM60 1/2] Upgrade Spidermonkey build system and binaries to 60.9.1
This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.

Tested by: SubitaNeo, Stan
Refs #5859

Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
2020-11-24 15:41:52 +00:00
5ef6ff054d Prepare for VS2017 upgrade - workspace updates
This:
- Generates a VS solution for VS17
- Explicits the boost toolset chosen, leveraging ABI compatibility to
avoid recompiling the library (for now).
- Likewise, reuses the Spidermonkey libraries. The SM60 upgrades does
away with putting the toolset in the library name entirely.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3130
This was SVN commit r24240.
2020-11-24 08:29:21 +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
e6adfd01bf Deactivate RTTI (except in AtlasUI) on all platforms.
D2768 inherits from a Spidermonkey class, and SM is built without rtti.
This won't compile unless we also compile without RTTI, and that diff is
required for SM60.
Further, windows was already compiling without RTTI and our coding
conventions say to not use it, so this is more of a regularization.

AtlasUI is left unaffected as WXWidgets uses it (and it's a dynamic
library so separate enough to do that).

Differential Revision: https://code.wildfiregames.com/D3104
This was SVN commit r24214.
2020-11-19 08:36:25 +00:00
0cbd07b455 [SM52 3/2] Revert static linking change on linux - other fixes.
This reverts static linking on linux from 6bb08fb424, it appears to fail
to link and/or crash, depending.

- Commit the tarball.
- Update update-workspaces.sh

Refs #4893

Differential Revision: https://code.wildfiregames.com/D3114
This was SVN commit r24205.
2020-11-18 19:08:15 +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
de53e2ac44 Fixes and improvements to the CI pipelines.
- Custom fixes to coala: support python3.8 and recent versions of
cppcheck
- Adapt .coafile to current coala
- Adapt LicenseYearBear to current `svn` python package
- Move the linter configuration to the coala directory
- Remove the now unused lint-patch script
- Update Jenkins pipelines to report build stderr as a comment on Unix
(including warnings when the build succeeds), and to report lint issues
inline

Tested on Jenkins during the past week.

Differential Revision: https://code.wildfiregames.com/D2931
This was SVN commit r23971.
2020-08-18 12:47:09 +00:00
5473393e30 Add an interface for Reinforcement Learning.
Implement a simple HTTP server to start games, receive the gamestate and
pass commands to the simulation.
This is mainly intended for training reinforcement learning agents in 0
AD. As such, a python client and a small example are included.

This option can be enabled using the -rl-interface flag.

Patch by: irishninja
Reviewed By: wraitii, Itms
Fixes #5548

Differential Revision: https://code.wildfiregames.com/D2199
This was SVN commit r23917.
2020-08-01 10:52:59 +00:00
3ed9df0d6c Allow map to recenter during resize in Atlas. Fixes #1109.
Patch By: Clockwork-Muse
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D825
This was SVN commit r23859.
2020-07-21 02:08:50 +00:00
aeaba3c14c Use victory conditions json's in Atlas
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2393
This was SVN commit r23847.
2020-07-18 17:39:59 +00:00
aabab15324 Detect the need for libexecinfo in premake. This is mostly useful for musl Linux.
Patch By: nephele
Differential Revision: https://code.wildfiregames.com/D2671
This was SVN commit r23787.
2020-06-23 15:06:57 +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
782a77f106 Allow using system premake5 (with the flag --with-system-premake5) when running update-workspaces.sh, refs #1518.
Differential Revision: https://code.wildfiregames.com/D2519
This was SVN commit r23675.
2020-05-17 11:41:58 +00:00
32a105d6f8 Update cppformat from v0.11.0 to v1.1.0, fixes #5646, refs #3190.
Use the opportunity to rename the lib from cppformat to fmt, refs #4148.

Patch By: adrian
Rebased By: s0600204
Differential Revision: https://code.wildfiregames.com/D2613
This was SVN commit r23562.
2020-04-01 07:29:33 +00:00
dbb69285a5 Set source and executable character sets to UTF-8 on Windows, removes a platform discrepancy, fixes #5094.
Patch By: Inari
Tested By: Angen
Differential Revision: https://code.wildfiregames.com/D1411
This was SVN commit r23383.
2020-01-12 20:19:56 +00:00
601892a2bb Officially drop support for Visual Studio 2013, which stopped working after 3a839517ce, fixes #5379.
This was SVN commit r23382.
2020-01-12 20:04:22 +00:00
Angen
5ad75fa580 Precompiled logic update [Windows build]
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic

Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
2019-12-31 13:58:48 +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
72fc4105e2 Linting: Remove "no-lone-blocks" rule for ESLint
Lone blocks can help reading the code.

Patch by: Krinkle
Refs #5524
Differential Revision: https://code.wildfiregames.com/D2452
This was SVN commit r23261.
2019-12-19 16:38:30 +00:00
3af575abd0 Update the Jenkins scripts to match the current state, which uses Jenkins pipelines, Docker for reproductible build environments, and ZFS for space efficiency and robust incremental patching. refs #4419, refs #4312.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1910
This was SVN commit r23250.
2019-12-16 21:52:42 +00:00
f5c142fde8 Put the Windows patch testing Jenkins pipeline, written by Angen, under source control.
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1946
This was SVN commit r23249.
2019-12-16 21:35:16 +00:00
aef0c3c13a Move Ogre3D GLSL Preprocessor to a third_party folder and restore its original name. Also restore the Wrapper name to reflect what it's wrapping and move it to renderer.
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2338
This was SVN commit r23215.
2019-12-07 11:48:03 +00:00
57abe7a644 Fix the Atlas build in the Windows autobuilder pipeline, refs #5574.
Use the opportunity to fix some whitespace and to make the file name
consistent with Jenkins.

Patch by: Angen
Differential Revision: https://code.wildfiregames.com/D2021
This was SVN commit r23213.
2019-12-07 08:54:32 +00:00
6db0f91823 Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders.
Differential Revision: https://code.wildfiregames.com/D2345
Tested on: gcc 9.1.0
Comments By: Vladislav
This was SVN commit r23028.
2019-10-02 09:44:00 +00:00
7f943b07b7 Enable no-caller and no-irregular-whitespace in ESLint, refs #5524.
https://eslint.org/docs/rules/no-caller
https://eslint.org/docs/rules/no-irregular-whitespace

Differential Revision: https://code.wildfiregames.com/D2237
Patch By: Krinkle
This was SVN commit r22893.
2019-09-12 21:36:42 +00:00
8dc425be5d Update update-workspaces.sh and premake5.lua with the with-system-mozjs45 flag from SpiderMonkey 45 in 64b477625d, refs #4893.
Differential Revision: https://code.wildfiregames.com/D2170
This was SVN commit r22660.
2019-08-13 11:30:46 +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
b04a8d4793 Disable eslint curly rule, because none of its configurable enforcement reflects the curly brace convention of this repository, refs #5524.
Differential Revision: https://code.wildfiregames.com/D2070
Patch By: Krinkle
Reviewed By: Imarok
This was SVN commit r22529.
2019-07-22 19:55:52 +00:00
d0e6111ea1 Enable eslint rule no-floating-decimal and remove all superfluous floating decimal points.
Differential Revision: https://code.wildfiregames.com/D2003
Patch By: Krinkle
This was SVN commit r22472.
2019-07-14 10:03:10 +00:00
3c2f15ee8b Fix lineendings.
This was SVN commit r22460.
2019-07-12 17:40:40 +00:00
6cde90104a Update precompiled win32 libogg to 1.3.3 and libvorbis to 1.3.6, building them with VS2015, refs #5379.
Use the default naming for both libraries (libvorbis instead of vorbis),
and use our default suffix for debug versions of the libs.

This was SVN commit r22406.
2019-06-27 22:36:04 +00:00