1
0
forked from 0ad/0ad
Commit Graph

24041 Commits

Author SHA1 Message Date
459ffa18cf Get rid of the Phabricator workflow. 2024-08-20 19:10:39 +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
195c858f33 Add .gitignore file, fixes #1816.
Includes contribution by Stan.
2024-08-20 18:52:41 +02:00
fcbef32f67 [Maps] Revert c839bf2ae5 's accidental deletion and rebalance deer.
This was SVN commit r28199.
2024-08-14 00:04:48 +00:00
49af9a9dc1 Fix clean-workspaces.sh no longer causing the rebuild of FCollada.
Noticed by: @Dunedan
This was SVN commit r28198.
2024-08-13 13:56:19 +00:00
ef623af2f8 Check for source of XMPP stanzas
Up to now Pyrogenesis didn't check if lobby related XMPP stanzas were
sent by the lobby bots. This meant that every user could send forged
data, like the list of games, to be displayed by another user. This
change fixes that by checking such stanzas come from the expected lobby
bots.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5216
This was SVN commit r28197.
2024-08-13 04:59:38 +00:00
d6bfa7dedc Fix deferred sending of game updates via XMPP
72f0fdb41b broke the deferred sending of XMPP stanzas for changes to the
game settings during game setup. This change fixes it and decreases the
interval to send game setting updates from 2000ms to 500ms to have
updates faster visible in the multiplayer lobby.

One reason why this bug might have been gone unnoticed so far is that
the traffic shaping employed by ejabberd results in a similar behavior
when just looking at the multiplayer lobby through Pyrogenesis:
After exhausting a certain amount of traffic, clients are only allowed
to send a defined amount of bytes per second. This results in game
setting changes taking a moment before they show up in the multiplayer
lobby. Contrary to the desired behavior, this however leads to all
updates being received and processed by XpartaMuPP resulting in
unnecessary load on the server. With this fix Pyrogenesis doesn't
trigger the traffic shaping on ejabberd side anymore, as there is now
much less traffic being sent by Pyrogenesis.


Patch by: @Dunedan
Accepted by: @Stan
Fixes: #6740

Differential Revision: https://code.wildfiregames.com/D5217
This was SVN commit r28196.
2024-08-12 17:48:56 +00:00
2e67c7f63d [Art] Tweaking this murder of crows actor.
This was SVN commit r28194.
2024-08-12 00:39:03 +00:00
c839bf2ae5 [Maps] Fix an imbalance of Deer on this skirmish map
This was SVN commit r28193.
2024-08-11 22:40:09 +00:00
6729acae89 [Art] Make the minor pyramid a little nicer
This was SVN commit r28192.
2024-08-11 22:39:06 +00:00
d655455304 Make messageBox return a promise
Ofthen the `messageBox` is only used for confirmation like: "Do you
really want to overwrite the savegame?"
With this patch the code paths of "overwrite savegame" and "make new
savegame" can be combined.

In some cases there is nothing done when one button is pressed. That is
changed to an early return.

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5274
This was SVN commit r28191.
2024-08-11 13:41:32 +00:00
a1bf7d5d23 Move files which were badly moved in 7cd980f2e1
Also take into account changed made by @wowgetoffyourcellphone
Noticed by: @vladislavbelov @sera
This was SVN commit r28189.
2024-08-10 15:05:08 +00:00
27757404f0 Set missing executable properties on some scripts.
Reported by: @sera
Fixes: #6944

This was SVN commit r28188.
2024-08-10 11:48:16 +00: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
a9ea169301 Improve formatting of XMPP announcements
Previously private messages and announcements got handled the same way.
This adds a distinct handling for server announcements, which allows
formatting them in a different way. They are now not prefixed with
"Private" anymore and show the announcement subject as well, if one was
set.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5268
This was SVN commit r28186.
2024-08-10 05:08:31 +00:00
1a7107e33d Fix FCollada build on recent macOS
Refs: #6797
Patch by: @jpshack
Differential Revision: https://code.wildfiregames.com/D5092
This was SVN commit r28182.
2024-08-06 17:20:15 +00:00
56f6d76b78 Remove internationalization of log messages
As log messages aren't supposed to be translatable, this removes the
internationalization of all log messages, which had it enabled.

Patch by: @Dunedan
Accepted by: @Itms
Differential Revision: https://code.wildfiregames.com/D5314
This was SVN commit r28179.
2024-08-05 15:27:12 +00:00
0831f5d3ce Fix build with Boost 1.85
Patch by: @Cayleb-Ordo
Accepted by: @Stan
Comments by: @sera
Differential Revision: https://code.wildfiregames.com/D5267
This was SVN commit r28176.
2024-08-02 16:17:22 +00:00
1ca3e6d3bc Fix two Clang warnings in Profiler2.cpp
Introduced in 3cbe96d24c

Differential Revision: https://code.wildfiregames.com/D5316
This was SVN commit r28173.
2024-08-02 09:40:57 +00:00
dddb9d6d51 [Art] Make metal mine sparkles even more sparkly.
This was SVN commit r28171.
2024-08-01 23:26:20 +00:00
98802ab459 [Audio] Add new "lion" attack sound to the proper fauna templates.
This was SVN commit r28170.
2024-08-01 23:22:28 +00:00
513396b3af [Audio] Separate the "lion" attack sound effect into shorter soundbites.
This was SVN commit r28169.
2024-08-01 23:10:33 +00:00
38e3f5cec0 Fix build with miniupnpc 2.2.8
See
https://github.com/miniupnp/miniupnp/blob/miniupnpc_2_2_8/miniupnpc/Changelog.txt.
And https://github.com/0ad/0ad/pull/45

Patch by: @emily
Accepted: by @Stan
Comments by: @phosit, @sera
Differential Revision: https://code.wildfiregames.com/D5307
This was SVN commit r28167.
2024-07-30 18:44:38 +00:00
4256666fb1 Add an 80 meter revealer.
This was SVN commit r28165.
2024-07-27 22:55:43 +00:00
b44717b829 [Art] Make metal mine sparkles more noticeable.
This was SVN commit r28164.
2024-07-26 23:41:22 +00:00
2c2099fea6 Revert "Custom context for specific names"
dd65a4e32e had some unintended consequences. Some specific names
apparently
are indeed supposed to be translated. Also using the message context
the translator hint isn't the right place and changes the primary key
used for these strings on Transifex. Instead comments should be used.
To avoid more interruption to translators, we revert the changes for
now and come up with a better patch.

This was SVN commit r28162.
2024-07-26 09:18:43 +00:00
dd65a4e32e Custom context for specific names
Make it clear that strings for specific names usually don't have to be
translated.

Patch by: @Dunedan
Accepted by: @Stan
Fixes #5563

Differential Revision: https://code.wildfiregames.com/D5310
This was SVN commit r28160.
2024-07-26 03:43:47 +00:00
32b9a27e9b Fix references in portable object templates
Up to now the references (lines starting with `#:`) in the portable
object templates generated by `updateTemplates.py` didn't comply with
the PO file format specification. They violated the specification in two
ways:

- White spaces in file names got replaced by non-breaking spaces
  (U+00A0), instead of the file names being enclosed by First Strong
  Isolate (U+2068) and Pop Directional Isolate (U+2069)
- the references didn't just include the filename and optionally the
  line number of the string, as defined in the specification, but also a
  non-standard "breadcrumb" component, which made them unnecessary
  hard to read in certain cases and difficult to use with tools
  expecting properly formatted references

This commit fixes both of these issues by properly encoding white
spaces and removing the breadcrumb component.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5309
This was SVN commit r28159.
2024-07-25 08:53:04 +00:00
1fa6184d17 Make language names in credits translatable
Up to now the languages and their names shown in the credits came from a
static mapping in `creditTranslators.py`. The language names noted in
there weren't consistent: some where present just in English, some in
their native language and some in both. This also required adjusting the
mapping manually, whenever a new language got added on Transifex,
otherwise its translators wouldn't be credited properly.

This commit resolves both issues, by making the language names
translatable and removing the need for the static mapping in
`creditTranslators.py`.

There is one minor nuisance with this implementation: As the languages
get listed in the credits in the same order as in `translators.json` and
they are ordered by there English name in there, the order might not be
alphabetical in other languages.

Running `creditTranslators.py` for the first time with these changes
will produce a rather large diff for `translators.json`, as not just the
language names will be changed to the English name of the language in
many cases, but the order of languages in the file as well. The first
run of `updateTemplates.py` after that will then add the languages as
new translatable strings.

Patch by: @Dunedan
Accepted by: @Itms
Differential Revision: https://code.wildfiregames.com/D5300
This was SVN commit r28158.
2024-07-24 15:37:05 +00:00
44f48427c5 Avoid empty translatable strings
Extracting translatable strings source files did also extract strings
which only consisted of spaces and line breaks. As that doesn't make
much sense, added noise in the portable object templates, for
translators and when linting the translations, this commit omits such
strings when generating the portable object templates.

Patch by: @Dunedan
Accepted by: @Stan, @Itms
Differential Revision: https://code.wildfiregames.com/D5308
This was SVN commit r28157.
2024-07-24 15:18:36 +00:00
6ea44f6fb4 Log rejected promises
Forgoten in f9114a87f2

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5305
This was SVN commit r28155.
2024-07-22 08:40:33 +00:00
0881583535 Remove more translator duplicates
While `creditTranslators.py` did already contain logic to remove
duplicate translator names, that logic didn't remove translator names
which only differed in their casing. As the removal was implemented
using an (unordered) `set`, the order of such duplicate names wasn't
deterministic and oscilated between the possible orders with different
invocations of `creditTranslators.py`, creating unnecessary changes to
`translators.json`.

This commit fixes that so that duplicate names are also removed when
they just differ in their casing and prefers the variant with has the
names starting with a capitalized letter.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5304
This was SVN commit r28152.
2024-07-16 09:32:04 +00:00
4a68486812 Preserve comments in debug translations
Up to now the "debug" and "long" translations got generated without the
comments present in the portable object files. This lead to the problem
that "dennis-ignore" directives in the comments weren't present in these
translations anymore, causing dennis to report false-positives for the
debug translations. This commit fixes that by keeping the comments in
the debug translations.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5303
This was SVN commit r28150.
2024-07-14 05:51:41 +00:00
b68a22ecdb Instantiate controller only for the host
This moves the check whether a player is the host out of
`LobbyGameRegistrationController` and only creates an instance of it in
`SetupWindow` if the player is the host.

This solves a problem with
`LobbyGameRegistrationController.onGameStart()` getting triggered by
players not being the host and sending unnecessary and invalid
changestate stanzas to XpartaMuPP.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5270
This was SVN commit r28148.
2024-07-10 06:20:51 +00:00
62692ca270 Add files forgotten in f9114a87f2
This was SVN commit r28146.
2024-07-08 19:46:42 +00:00
f9114a87f2 Get a promise when starting a GUIpage
When calling `Engine.PushGuiPage` a promise is returned. The promise is
settled when the "child" page is closed. That allows to `await` it
inside `async` functions.
Previously the callback was run right inside the call to
`Engine.PopGuiPage`. Now the continuation of the promise is called at
the end of the "tick".

This won't help performance. It will more likely make things worse.
Since gui pages aren't opened or closed that frequently, it doesn't
matter that much.

Refs: 86c151ebaa

For the engine side:
The promise is stored in the `CGUIManager::SGUIPage` (like previously
the callback). When the promise is fulfilled it enqueues a callback in
the `JobQueue` of the `JSContext`.

Original patch by: @wraitii
Comments by: @wraitii, @Stan, @Polakrity, @lyv, @elexis, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3807
This was SVN commit r28145.
2024-07-08 19:07:04 +00:00
ae67a77bd9 Update translator credits automatically
This adds updating the translator credits automatically when updating
translations. This has two benefits:

1. Translator credits are up-to-date in SVN-builds, so potential
   problems will already show up there.
2. One manual step less during a release.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5299
This was SVN commit r28143.
2024-07-07 16:29:40 +00:00
70dea92859 Fix translator credit script
The changes from D5290 broke the script to credit translators, as the
lines with the translators might now include additional information,
like the years of contribution, after the usernames, that would've
been included by `creditTranslators.py` as well.

This commit also slighly hardens the removal of deleted users to from
the credited translators to reduce the likelihood to remove still
existing users.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5298
This was SVN commit r28142.
2024-07-07 16:26:54 +00:00
cd814d00ef Converge FileLogger with the other logger replacements
Use the same `CLogger` constructor.
Never take ownership of the streams.

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5203
This was SVN commit r28140.
2024-07-06 14:48:44 +00:00
9e328ec617 Make the CSimContext constructor take a CTerrain and a CUnitManager
`CSimulationImpl` doesn't has to be a friend anymore.

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5296
This was SVN commit r28138.
2024-07-05 16:55:33 +00:00
a4d9993e86 Finish implementing property "textcolor_selected" for list GUI objects
Fixes #6920
Patch by: @Vantha
Differential Revision: https://code.wildfiregames.com/D5269
This was SVN commit r28135.
2024-07-03 08:32:52 +00:00
4bcbc72274 Don't use std::shared_ptr to store m_ScriptContext and m_ScriptInterface in the CGUIManager
`std::shared_ptr` is intrusive. When a function expects a
`std::shared_ptr` the caller has to use it too and can't store the
element on the stack for example.

Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5221
This was SVN commit r28131.
2024-06-27 19:09:30 +00:00
75753abd2e Fix removal of email addresses from PO-files
The regex for removing the email address of the last translator from
PO-files contained two bugs causing it not to match:

1. It didn't account for text after the email address and PO-files
   from Transifex contain the year of the last translation there.
2. It expected a second `\\n"` at the end of the line, instead of `\n"`.

This commit fixes both of these issues and simplifies the regexes. It
also ensures that the text after the email address is kept as well.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5290
This was SVN commit r28130.
2024-06-26 04:19:43 +00:00
f5b416c63b Don't execute the task when no Future awaits it anymore
Summary:
Most of the times the callback stores a reference to a variable in scope
where the `Future` is in. When the scope is left the reference get's
dangling. `CancelOrWait` is called in multiple places (mostly
destructors) to ensure the callback isn't executed anymore.
This patch deduplicates thous calls to `CancelOrWait`.

Refs: #5874

Comments by: @Stan, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5208
This was SVN commit r28128.
2024-06-25 19:03:01 +00:00
5a43f514dc Remove file missed by previous commit
This was SVN commit r28125.
2024-06-23 19:05:16 +00:00
53e00e1953 Remove contrib JS-lexer and use upstream one
As we depend on Babel for i18n tooling nowadays, we can also use its
maintained JavaScript-lexer, instead of the one forked from an old
version of Babel.

Doing so reduces the amount of code we have to maintain, adds new
functionality (like properly handling hexadecimal unicode notations) and
fixes some regex related incompatibilities which makes generating
portable object templates possible with recent Python versions.

The use of `tokenize(…, dotted=False)` is necessary, as we use this
lexer for C++ code as well and detection of most strings in C++ code
fails otherwise. As dotted names weren't supported by version of the
lexer we used until now, this isn't a regression.

Patch by: @Dunedan
Accepted by: @Stan
Differential Revision: https://code.wildfiregames.com/D5293
This was SVN commit r28124.
2024-06-23 19:04:07 +00:00
fa1dc98103 Shutdown mongoose in rl-interface gracefully
When the `RL::Interface` is destroied but the engine isn't completely
shoutdown there was a dangling pointer. The time the dangling pointer is
accessable got expanded with 968e55704a.
Whith this patch there no dangling pointer (in that regard).

Accepted by: @vladislavbelov
Comments by: @Stan, @sera
Trac Tickets: #5989

Differential Revision: https://code.wildfiregames.com/D5254
This was SVN commit r28123.
2024-06-23 17:26:03 +00:00
e8908dfee8 Fix getArea
The code didn't call `this.isCircularMap` but checks if it's defined.
The function returned the wrong values for square maps.

Broken in 480228f964

Comments by: @Stan
Differential Revision: https://code.wildfiregames.com/D5288
This was SVN commit r28122.
2024-06-23 17:17:46 +00:00