1369 Commits

Author SHA1 Message Date
Dunedan 8c69bb026d Update supported languages for the NSI installer
235ea5cfb4 updated the languages supported by 0 A.D., but missed
updating them for the installer. This commit makes up for that and
updates the languages for the installer as well.

(cherry picked from commit db35a8494c)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 19:30:34 +01:00
Itms 73b2eed323 Fix unix-build tarball inclusion of text files
The .txt were wrongly send to a subdirectory named `.` and the files
converted to Markdown were forgotten.

(cherry picked from commit e1ecc4a743)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-20 22:09:31 +01:00
Ralph Sennhauser f14b29923e Prefetch tarballs in bundle pipline
Fetch third party tarballs for source packages so they will be bundled
in source release tarballs.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit 3aa95b7a28)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-20 22:09:28 +01:00
Dunedan d41356a9cc Update supported languages for Alpha 27
This removes Catalan and Scottish Gaelic as supported languages, as they
now both have a coverage of less than 80% and adds Galician and
Portugese which both have 100% coverage right now.

(cherry picked from commit 235ea5cfb4)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-12 01:20:03 +01:00
wowgetoffyourcellphone 6df8952672 Fix projectile modifier oversight and references
Update trigger script
Update Attack.js component
Update the relevant techs
Update unit_tables.py

(cherry picked from commit c798a12815)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:36:02 +01:00
Itms 6cdf1d5a15 Sign and notarize macOS bundles
(cherry picked from commit 2482ecf9fe)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-03 22:51:17 +01:00
Itms 9f6699d964 Adapt bundles pipeline to the git environment 2024-12-21 23:03:25 +01:00
Vantha d7dda097e1 Extend the tips page for multiple images per tip
Enable the Tips and Tricks page to show multiple images for each tip.
Add a small GUI panel below the image for switching between them.
Only show it when the current tip has more than one images.

Introduce tipfiles.json to assign images to the text files.
(And stop of relying on file naming)

Add a tip about wonders, and make some slight changes to other texts.
Improve existing tip images and add a bunch of new ones.
2024-12-20 19:46:07 +01:00
Dunedan 3a0f6aca32 Don't credit our Transifex account as translator
This account is only used for fixing technical bugs in translations and
not doing translations themselves, so let's exclude it from the credited
translators.
2024-12-18 21:53:31 +01:00
Vladislav Belov e27909e603 Fixes SPIR-V compilation for compute_skinning shader.
Currently we don't mix storage images and storage buffers in the same
shader. Also we don't sample textures when we use storage buffers.
In the future we need to avoid shifting descriptor sets.
2024-12-11 01:18:05 +01:00
Ralph Sennhauser ead62bba78 Update trac links with gitea links
This replaces all links pointing to trac with their corresponding links
to gitea. Also replace http with https while at it.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-10 11:29:48 +01:00
Vladislav Belov e765a2c4ba Moves tests for generate_rules and merge_rules to a separate folder. 2024-12-05 17:25:54 +01:00
Vladislav Belov dbeb11a36b Adds avoiding non-default render debug modes for generating rules of SPIR-V shaders. 2024-12-05 17:25:52 +01:00
Vladislav Belov 7801c40b40 Adds order test to merge_rules. 2024-12-05 17:25:50 +01:00
Vladislav Belov 53de281311 Adds +x to tools. 2024-12-05 17:25:48 +01:00
Vladislav Belov d0d6113fc4 Fixes linter notes. 2024-12-05 17:25:47 +01:00
Vladislav Belov b12cc27bef Adds tools for SPIR-V rules. 2024-12-05 17:21:19 +01:00
phosit f8afd49ae1 Return by value from CCamera::GetScreenCoordinates
Pack the two `float`s in to a `CVector2D`.
Rename some variables to not use underscore.
2024-11-17 20:27:58 +01:00
phosit 998dc30b6d Return by value from CCamera::BuildCameraRay
Some return values can be assigned to a `const auto`, somewhere `dir` is
mutated so the whole result has to be assigned to a non `const` variable
and once only dir is used, so structured binding isn't used there.
2024-11-17 20:27:58 +01:00
Dunedan d9740858f7 Look up location of spirv-reflect only once
Instead of looking up the location of spirv-reflect for every shader,
this is now being done once and cached for all shaders. This results in
shader compilation being slightly faster.
2024-10-25 09:24:43 +02:00
Dunedan cdd2f3636a Use spirv-opt to strip debug info
Instead of compiling SPIR-V shaders twice, once with debug info and once
without, this uses `spirv-opt` to remove the debug info from the SPIR-V
shaders with debug info. This results in notable performance gains, as
stripping the debug info from existing shaders is much faster than
compiling them.

As a result of this change the contents of the non-debug shaders change
once. That's because shaders with debug info contain much more
instructions and therefore more result ids. Stripping the debug
info from shaders results in different result ids being used as when
generating ones without debug info. While that doesn't result in a
difference in the functionality of the shaders, it's a difference in
their binary representation, causing their content hashs and therefore
file names to change. After that one-time change the result ids are
reproducible again.
2024-10-25 08:26:54 +02:00
real_tabasco_sauce 8d78e3165b Rename TeamPlacement -> PlayerPlacement 2024-10-23 18:37:35 +02:00
Dunedan 6eb9a3308a Define VkDescriptorType enum only once
Instead of redefining the VkDescriptorType enum for every shader, only
define it once. This avoids unnecessary computation and slightly
increases performance.
2024-10-21 09:02:38 +02:00
Ralph Sennhauser b1f0ebda41 Fix wxString to std::string conversion in Atlas
At least on Linux this resulted in the help menu in Atlas not being
populated. This fixes the issue.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-18 19:30:26 +02:00
Dunedan 20cef3bce0 Fix compiling SPIR-V shaders on Windows
b2cdb1e6b4 broke compiling of SPIR-V shaders on Windows, as the output
of `spirv-reflect` contains CRLF as line separators there. This commit
fixes that.
2024-10-18 16:50:31 +02:00
Dunedan 0bbd2ad7dd Improve linting of PO files
During the mogration to git e9d1cb6cc7 removed the
`lint-translations.sh` script which was used together with
`check_translations.py` to lint POT- and PO-files. By doing so it
removed a valuable option to find problems in translations.

This commit undos that by merging the functionality of the removed
`lint-translations.sh` and `check_translations.py` into the latter
one. The new logic is easier to maintain, produces less false-positives
and has some unit test coverage.
2024-10-17 19:23:50 +02:00
Dunedan b2cdb1e6b4 Improve YAML loading performance using libyaml
This adds optional support for loading the YAML reflection data using
`libyaml`, which is faster than PyYAML's pure Python implementation.
2024-10-17 17:52:08 +02:00
Dunedan 92df50f36c Improve formatting for SPIR-V tools README 2024-10-17 17:51:56 +02:00
Dunedan 8e6cac8744 Deduplicate SPIR-V shaders across programs
This drops the program name from the SPIR-V shader file name, which
allows deduplicating shaders belonging to different programs. While that
has no significant impact on compilation performance it reduces the
number of required SPIR-V shaders.

One downside this has it that it's not directly visible from the file
name of a shader anymore to which program it belongs.
2024-10-17 17:02:22 +02:00
Ralph Sennhauser b5d08a4833 Use XWayland for Atlas if needed
GlCanvas currently doesn't support runtime selection of GDK backend [1].

Therefore to run Atlas under Wayland wxWidgets needs to be built with
GLCANVAS_EGL which is usually not the case to support X11 at the same
time.

Check if the EGL backend is available and if not and running under
Wayland force use of XWayland with the GLX backend.

[1] https://github.com/wxWidgets/wxWidgets/issues/22325

Closes: #6939
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-09 06:28:56 +02:00
phosit f9ad0c1df4 Allow selecting a TeamPlacement in Atlas 2024-10-06 19:37:39 +02:00
Dunedan c4047b1cf2 Parallelize generation of SPIR-V shaders
For each program this parallelizes the generation of shaders by program
combinations. This leads to significantly faster shader generation on
systems with multiple CPU-cores. The resulting shaders are identical to
the ones prior to this change.
2024-10-05 07:29:43 +02:00
Dunedan c101984445 Make SPIR-V file names reproducible
This ensures the file names of SPIR-V program combinations and shaders
are reproducible. Up to now they only were if the order of program
combinations in the rules.json didn't change, as the file names
contained the position of the program combination in the rules.json.
With this change files names of program combinations will be named based
on the details of the combination used to create them and the file names
of shaders will be based on their content respectively.

Changing the file names avoids wrong shaders when partially rebuilding
them after a new combination for a program got added in between the
other combinations in rules.json and removes the need for keeping track
of identical shaders in the script. It's also a preparation for being
able to build shaders in parallel, while also keeping the result
reproducible.
2024-10-01 16:58:03 +02:00
Vantha 38b71c1bac Add a Tips and Tricks page containing the loading screen tips
- Small popup page accessible from the main menu via Learn to Play.
- Lets the player read through the tips with 'Previous' and 'Next' buttons.
- Tips continue to be shown on the loading screen.
-> but there without the scrolling ability.

- Added two new hotkeys for quicker tip changing (item.prev and item.next)
-> set to the left and right arrows respectively by default.

- Responsible scripts are placed in gui/reference/tips/.
- The tip text files have been moved to gui/reference/tips/texts/.
- Tip image files have been moved to art/textures/ui/tips/.

- Added a series of new sprites (textures in art/textures/ui/tipdisplay/)
-> comprises a title decoration, a bullet point sprite, and a new button
style.
2024-09-30 06:22:47 +02:00
Itms b19dbb9bdb Remove unused variables
This fixes -Wunused-but-set-variable with FreeBSD's clang17.
2024-09-28 21:55:30 +02:00
Itms ad3537c414 Revert 1e504cd64c which used a deprecated API
The fix doesn't seem needed anymore on supported versions of macOS,
refs #1554.
2024-09-28 21:55:30 +02:00
Itms 3dfc7c57e0 Explicitly default copy ctors for some classes
This fixes -Wdeprecated-copy with FreeBSD's clang17.

This commit reverts a change from 8a32b0b3d4, where a private copy
assignment operator was deleted, whereas it was needed to explicitly
declare the copy constructor, refs #5294.
2024-09-28 21:55:30 +02:00
phosit ac54096bb2 Allow selecting a biome in Atlas
Original patch by: lyv
2024-09-26 19:47:36 +02:00
Ralph Sennhauser 288d5002f3 Add support for vendored spirv-reflect
This allows build-archives.sh to fall back to vendored spirv-reflect if
it can't be found in PATH.

Also update error messages to suggest additional alternatives.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-24 18:45:22 +02:00
Ralph Sennhauser cf909a81db Add support for vendored spirv-reflect to compile.py
The script build-archive.sh sets a variable SPIRV_REFLECT, even respects
it if it's set in env but without support from the compile.py script for
it there isn't much point.

This commit adds support SPIRV_REFLECT in compile.py and and adds a
fallback to use vendored spirv-reflect for when the envvar is unset and
the tool can't be found in PATH

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-24 18:45:22 +02:00
Ralph Sennhauser 9770391bc4 Make failure messages visible for build-archives
Due to "set -e" the script terminates when the required tools aren't
found and the arguably helpful messages later on won't be printed.

Make the initial check for tools non fatal and allow for the later check
to take care of missing tools.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-24 18:45:22 +02:00
Ralph Sennhauser eb328fc2df Allow building archives without translations
Currently you have to fetch translations first so they can be filtered
by build-archives.sh without the script failing.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-09-24 18:45:22 +02:00
Dunedan 57308bb847 Avoid unnecessary computations
This refactors the script for cleaning the translations to get the
same result by doing less. This is achieved by the following changes:

- Use glob-patterns for finding the files to clean more efficiently,
  without the need to exclude collected files again.
- Only write files which are supposed to be modified (previously all
  portable object files did get rewritten by this script, no matter if
  it did change something or not).
- Stop searching for sections in files to clean up, once they are
  already passed.
2024-09-22 07:59:07 +02:00
Dunedan 0ea6d32fa5 Enable various ruff rules
This commit enables a bunch of unrelated ruff rules, which only require
minimal changes to the code base to enable them.

The rules enabled by this commit are:

- check the use of datetime objects without timezone (DTZ005)
- check the performance of try-except in loops (PERF203)
- check the number of function arguments (PLR0913)
- check for mutable class defaults (RUF012)
- check for the use of secure hashing algorithms (S324)
- check for raising base exceptions (TRY002)
- check for raising other exceptions where TypeErrors should be raised
  (TRY004)
2024-09-21 20:54:30 +02:00
Dunedan c0232c6b5f Specify the Python target version in ruff.toml
This ensures the same Python target version used for `ruff format`
is used for `ruff check` as well. It also allows ruff, even if it's not
run through pre-commit, to use the correct target Python version.
2024-09-21 20:54:24 +02:00
Dunedan 265ed76131 Simplify check for identical shaders
Previously when checking if two SPIR-V shaders are identical the
hashs of their file content would be compared and afterwards their
(unhashed) file contents as well. Comparing the file contents isn't
necessary, as the hash function used is a cryptographic one, which
guarantees the hash can be used as a representative of the hashed data.
2024-09-21 20:39:59 +02:00
Dunedan 230c7ca27d Add EditorConfig options for Python
While the desired options for indent size and style are Python's
defaults, let's make it explicit by specifying it in the EditorConfig.

As part of this, this also removes unnecessary inline formatting options
for Python files.
2024-09-17 11:03:15 +02:00
Dunedan cd8b4266a4 Fix class name in xmlvalidator 2024-09-13 11:04:06 +02:00
Dunedan 8c7cc7373d Fix variable names in SPIRV compile.py 2024-09-13 11:04:06 +02:00
Dunedan 0d3e3fbc29 Rename simple-example.py 2024-09-13 11:04:05 +02:00