Engine.GetTextWidth has been deprecated since e845da025a
Idea:
If you look at a dropdown as just a text field (its header) that can
change caption like any other, then getPreferredHeaderTextSize is the
equivalent to getPreferredTextSize (present on buttons and text fields).
Fixes#8493
(cherry picked from commit 670f1e5d42)
Signed-off-by: phosit <phosit@autistici.org>
The JavaScript error wasn't propagated leading to an infinite loop.
Fixes: #7967
(cherry picked from commit 14a5ccee52)
Signed-off-by: phosit <phosit@autistici.org>
As 0 A.D. supports full unicode now and Vietnamese language coverage is
at a good level, let's include Vietnamese as supported language.
(cherry picked from commit 0086f005d4)
Signed-off-by: phosit <phosit@autistici.org>
While Catalan got removed for Alpha 27 because of low coverage, its
coverage is now good enough again to get re-added as supported language.
(cherry picked from commit ed1bd1d75b)
Signed-off-by: phosit <phosit@autistici.org>
When a script in "simulation/helpers/" contained an error. Files in
"simulation/components" aren't loaded. The return value of
`LoadDefaultScripts` indicated an error but was ignored. The simulation
still tried to start.
Now instead of returning a ignoreable error code the error is thrown. In
the common path the error is implicitly rethrown to the JS-function
which tried to start the game.
fixes: #8133
(cherry picked from commit 9a526bcae1)
Signed-off-by: phosit <phosit@autistici.org>
It's not permitted to pass a nullptr to the `app_hooks_update`. So a
reference should be used.
CppCheck says one shouldn't take pointer to a temporary.
(cherry picked from commit 977bf5c0d1)
Signed-off-by: phosit <phosit@autistici.org>
CppCheck wasn't able to handle `{0}`. C++20 allows to use designated
initializers.
(cherry picked from commit b17c2fb80f)
Signed-off-by: phosit <phosit@autistici.org>
Include the shared library libAtlasUI.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit 5609492731)
Signed-off-by: phosit <phosit@autistici.org>
Currently we always choose the best device. But it's not always
desirable. A more safe approach is to use the default device (with
index 0). The only downside of that is if a user didn't adjust
settings then the game might run on an integrated GPU instead of a
discrete one. In the future it'll be solved by selecting GPU in
options: #8529Fixes#8455
(cherry picked from commit 485200342d)
Signed-off-by: phosit <phosit@autistici.org>
Now it's possible to destroy the old swapchain before creating a new
one. It might make the swapchain creation a bit slower but with a
lower memory peak.
(cherry picked from commit c4bc6c9627)
Signed-off-by: phosit <phosit@autistici.org>
Fixes the case when a swapchain was recreated on resize rather than
by VK_ERROR_OUT_OF_DATE_KHR.
(cherry picked from commit 8a64182ca2)
Signed-off-by: phosit <phosit@autistici.org>
The change tries to minimize a memory peak during a window resizing.
Refs #6864
(cherry picked from commit de36c75023)
Signed-off-by: phosit <phosit@autistici.org>
Bumping the minimum version of macOS to 10.15 for spidermonky [1] also
allows us to use std::filesystem instead of boosts implementation.
[1] f14a98e26f
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit eba8439295)
Signed-off-by: phosit <phosit@autistici.org>
The user language and start menu folder name were saved, which goes
against recommendations in the NSIS documentation.
The installation directory was also saved, which might make sense,
but prevents us from dropping the "alpha" label.
Reviewed-At: https://gitea.wildfiregames.com/0ad/0ad/pulls/8476Fixes: #7594
(cherry picked from commit 18df61517c)
Signed-off-by: phosit <phosit@autistici.org>
When a patch version is released, it must declare compatibility with the
previous patch versions of the same main release. This allows players to
keep replaying their games and to keep playing online with users of
other patches of the same main release.
This should have anticipated for dae7a8c394
(cherry picked from commit 866d6f0527)
Signed-off-by: phosit <phosit@autistici.org>
It was broken in ef69c37f66, before that we were using _lseeki64.
Fixes#8459
(cherry picked from commit cb58116270)
Signed-off-by: phosit <phosit@autistici.org>
Add back some functionality that got dropped with the move to a custom
runner in 39ea3b6ea5
Add option --list to print all available test grouped by suite.
Add option --suite to limit the run to a specific testsuite.
Add option --test to limit the run to a specific test.
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit a7d65d4a34)
Patch by @elexis.
The package sent in fa85527baf / #2420 plus this missing return causes the NetServerTurnManager
to be stalled forever if a client succeeds to send this package on disconnect.
In NotifyFinishedClientCommands, Disconnect calls OnDisconnect calls UninitialiseClient calls m_ClientsData.erase,
but then m_ClientsData[client].readyTurn = turn; reinserts the disconnected client, making the turnmanager wait forever for the disconnected client.
refs https://wildfiregames.com/forum/topic/134742-bug-game-incredibly-slowfreeze-at-start-because-because-of-1-player/
The --libdir switch got lost at some point, which is useful for running
tests with a system build.
Further allow to switch the type of output at runtime avoiding an
unnecessary rebuild.
Finally allow to specify an output file, this means there is no need to
redirect stdout which might break the CI in case the tests write
something to stdout like in case of LOGERROR resulting the test result
not being valid xml.
Ref: #7534
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Add a Dockerfile having all needed tooling. Using a container also means
those are the libs that will end up being used in the AppImage.
Then add a script for building pyrogenesis either form git or from
extracted source tarballs and for assembling the AppImage and finally
creating the AppImage.
Add building the AppImage to the "bundles" pipeline.
Also add a wrapper script to use podman to drive the whole process
for convenience for local builds.
Ref: #7577
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Commit fe192fe58f added one extra level,
so we have to layout the parent of the parent now to actually layout the
sidebar.
Fixes: #8388
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>