1
0
forked from 0ad/0ad
Commit Graph

511 Commits

Author SHA1 Message Date
33134af6c3 Stop using the source-libs repository on Windows
All prebuilt files for Windows libraries are now stored in the
windows-libs SVN repository for the foreseeable future.
2024-09-08 17:51:15 +02:00
0f87124b98
Some glad improvements
- Silence a MSVC warning in vulkan.cpp, refs #6987
- Document the patching of gl.h for macOS, from r26094
- Fix shellcheck warnings in the generation script
2024-09-08 09:26:46 +02:00
35d998694f
Move glad from source-libs to source/third_party
Improve definition of the gladwrapper project in premake.
2024-09-08 09:18:45 +02:00
028ec40165
Add a RC file to add metadata to the pyrogenesis executable 2024-08-28 23:37:36 +02:00
13da3457bc
Delete wrongly committed file from abdda50892 2024-08-27 12:46:33 +02:00
abdda50892 Format shell scripts using shfmt
This updates shell scripts to use a consistent style that can be enforced
via pre-commit hook.

As for choosing tabs over spaces, some arguments are:

- tabs can help people with visual impairment
- tabs allow for indenting heredocs in bash
- tabs are the default for the tool shfmt

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-08-26 09:03:00 +02:00
0aeaa8f70a Adapt macOS libraries to the new build flow. 2024-08-20 19:10:25 +02:00
5da05ae15c Add a custom script to build premake, like NVTT, FCollada, and Spidermonkey.
Fix an issue on newer GNU/Linux and macOS where the build would fail due
to missing unistd includes.
Fixes: #6847
Accepted by: @vv221
Comments by: @sera
Differential Revision: https://code.wildfiregames.com/D4894
This was SVN commit r28187.
2024-08-10 11:46:03 +00:00
82bf9bb902 Removes WInit module completely. Refs #2611
Comments By: phosit
Differential Revision: https://code.wildfiregames.com/D5085
This was SVN commit r27810.
2023-08-22 17:59:01 +00:00
70d89254c8 Fixes linking failure solution introduced in 48ba4d9cb4 for SDL dependency.
Refs #3138

Accepted By: Itms
Differential Revision: https://code.wildfiregames.com/D5065
This was SVN commit r27764.
2023-07-18 20:21:59 +00:00
624df119ef Fixes Windows build for some configurations after 70e7acfb26.
The divergence for /DELAY* options was started in 137487c521.
Refs 2405a98b58 and 09df66f871, ec3452679c, 82dc962a56, 137487c521.

Differential Revision: https://code.wildfiregames.com/D5070
This was SVN commit r27752.
2023-07-05 20:31:56 +00:00
70e7acfb26 Removes manual unload of delay-loaded DLLs on Windows.
Differential Revision: https://code.wildfiregames.com/D5056
This was SVN commit r27733.
2023-06-23 11:55:33 +00:00
beef529cc6 Adds more libraries to feedback reports. Refs #6711
Comments By: phosit, Stan
Differential Revision: https://code.wildfiregames.com/D4949
This was SVN commit r27607.
2023-04-16 22:28:55 +00:00
c025776703 Use premake5 beta2's externalincludedirs when available
As of the `beta2` version of `premake5`, `sysincludedirs` has been
deprecated
and replaced with/renamed to `externalincludedirs`, and continuing to
use it
causes warnings to be emitted.

With this change, we now use `externalincludedirs` when available so as
to
prevent the warnings, falling back to `sysincludedirs` when it's not to
prevent
breakage with pre-`beta2` versions of `premake5`.


Accepted By: sera
Fixes: #6785
Differential Revision: https://code.wildfiregames.com/D4980
This was SVN commit r27606.
2023-04-16 17:05:30 +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
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
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
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
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
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
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
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
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
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
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
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