Commit graph

1593 commits

Author SHA1 Message Date
Rémi Bernon
a8eeb1c9ac build: Move the MONO_TARBALL_URL variable down. 2023-02-14 16:07:44 +02:00
Giovanni Mascellani
85ed53c1d8 fonts: Provide an alternative fake Arial font.
The fake Arial already distributed with Python is based on Liberation fonts.
It is metrically compatible with the original Arial, but it doesn't support
all its glyphs (specifically, it misses Arabic).

The new one is based on Noto fonts. It support all the Arial glyphs
(I think), but it is not metrically compatible. It is enabled based
on SteamGameId when glyph coverage is considered more important than
metric compatibility.

So far it is enabled for FIFA 21 and FIFA 22.

CW-Bug-Id: #20302
2023-02-14 16:07:44 +02:00
Giovanni Mascellani
77fd6c3b2d proton: Install all available fonts to the prefix.
This requires commit "loader: Install all fonts provided by Proton in the
registry." in Wine, otherwise font support will be broken.
2023-02-14 16:07:44 +02:00
Giovanni Mascellani
4378ee718a fonts: Install Liberation fonts using their fake name.
For homogeneity with the other fake fonts. That's mostly cosmetic.
2023-02-14 16:07:44 +02:00
Giovanni Mascellani
7e10a41649 fonts/noto: Update all Noto fonts.
New fonts are from https://github.com/notofonts/noto-fonts.git at
2725c70baa8b0176c7577093ba1fc6179aa79478, in the hinted/ttf folder.
2023-02-14 16:07:44 +02:00
Giovanni Mascellani
5b52756384 LICENSE: Fix a typo. 2023-02-14 16:07:44 +02:00
Giovanni Mascellani
8e9e6da034 fonts: Rewrite font merging script based on fonttools.
The current script based on fontforge seems to have a few problems.
The generated fonts show glitches, for example in Cyberpunk 2077 for
Thai and in FIFA 22 for Arabic.

I don't precisely know what is the problem, and it might be that
the real bug is in the rendering code rather than in the merging
script. But since this seems to work better overall, I'm sticking
with it.

CW-Bug-Id: #20302
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
62174c7c1e default_pfx.py: Don't accept the shell argument any more.
We now only invoke it inside of the container instead of passing the
`docker run ...` as a parameter.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
692ef0aa1f build: Do as much as possible inside of the SDK container.
Parts of the rules, including the magical ones created via
make/rules-*.mk, are executed inside of the container via SHELL
override, and parts are executed on the host side.

This makes reasoning about and debugging the rules much harder than it
should be. It also requirs the users to have certain programs installed
on the host in addition to docker/podman.

With this change `make` will act as a simple pass through to inside of
the container for the most part.

One notable exception is installation which still happens the host side.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
9f8a37c0c1 Makefile.in: Get rid of nested make.
We are going to invoke a single in-contiainer make anyway.
2023-02-14 16:07:44 +02:00
Rémi Bernon
08a5f1cd56 proton: Trace language related environment variables.
CW-Bug-Id: #21346
2023-02-14 16:07:44 +02:00
Rémi Bernon
2b95bc1771 steam: Match LC_TYPE / LC_MESSAGES default with selected language.
CW-Bug-Id: #21346
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
e60f8c6aac build: Build all fonts in the container.
With the upgrade to sniper the fontforge is up to date enought to build
all our fonts.

Patch is used only to patch the fonts.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
b4bba7eec4 configure.sh: Move the default SDK build container image URI to Makefile.in.
Up until now ./configure.sh was baking in the default value into the
generated Makefile. Because of it if there was a change that requires a
newer version of the SDK the compilation would fail until the next
./configure.sh invocation does the update.

This is proved to be confusing - mysterious build errors without clear
explanation.

With this change the default value is a part of Makefile.in and if user
doesn't specify --proton-sdk-image it will be always used and always up
to date.

--proton-sdk-image overrides the default and stores it in the Makefile
just like it used to.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
28aeb63901 build: Switch over to sniper-based SDK container. 2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
b2b17774e4 make/rules-source.mk: Suppress grep warnings.
The second grep in sequence can exit early (-q, as soon as we have one
match it exits with a success) which makes the first grep unhappy as its
write pipe is closed early, resulting in:

        syncing vulkan-loader... grep: write error: Broken pipe

Let's silence those errors.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
bc63dbbf2a build: Get rid of runtime selection options.
Those were first added when we were working on using the new
pressure-vessel based runtime but have basically no use during current
development.
2023-02-14 16:07:44 +02:00
Arkadiusz Hiler
10a240c341 docker: Use sniper as a base. 2023-02-14 16:07:44 +02:00
Giovanni Mascellani
cbf52aaafa default_pfx: Filter out fully qualified paths from the registry.
The default registry contains some fully qualified paths to fonts
that are available on the build machine, but make no sense on any
other system. This is useless, and also known to cause bug, because
it confuses the Wine font caching code. An affected game is
Lumberjack's Dynasty.
2023-02-14 16:07:44 +02:00
Giovanni Mascellani
84012c12aa Do not use the vkd3d version emebededd in Wine, but rebuild from its submodule. 2023-02-14 16:07:44 +02:00
Giovanni Mascellani
929733036f Revert "Build vkd3d as ELF."
This reverts commit 69d6b82e94.
2023-02-14 16:07:44 +02:00
Rémi Bernon
5e90e8283c build: Use gdb debug infos instead of dwarf-2 strict-dwarf. 2023-02-14 16:07:44 +02:00
Rémi Bernon
559e652a45 build: Download and cache contrib into the build folder only.
Wine Mono / Gecko packages are already cached in a contrib folder,
and downloading them outside of proton source directory is brittle.

This also makes the source sync run twice when using the toplevel
Makefile.
2023-02-14 16:07:44 +02:00
Rémi Bernon
331c90a874 build: Copy files to dist / deploy / install with rsync. 2023-02-14 16:07:44 +02:00
Rémi Bernon
8decbe981a build: Add a catch-all rule for anything the container can build. 2023-02-14 16:07:44 +02:00
Rémi Bernon
bd1178a5b3 build: Use silent rules for vkd3d. 2023-02-14 16:07:44 +02:00
Rémi Bernon
db3274b1c7 build: Build PE modules with -mcmodel=small.
This breaks MinGW autoimport mechanism but nothing in Proton should be
using it. Instead, any PE module should be using standard dllimport and
ntdll will do the relocations as expected. We also don't and hopefully
never have modules larger than 2GB, so 32-bit %rip relative offsets
should be enough for everything.

This will OTOH save a lot of .refptr indirections, that are otherwise
generated for any extern symbols, even though they are later linked in
the same module, making all code smaller and maybe a little faster.
2023-02-14 16:07:44 +02:00
Rémi Bernon
470f3084eb docker: Build MinGW with -mcmodel=small.
(cherry picked from commit c90d4c34d8)
2023-02-14 16:07:43 +02:00
Paul Gofman
e1d797fd97 wineopenxr: Use custom Vk structures instead of custom functions for creating Vk device through OpenXR. 2023-02-14 16:07:43 +02:00
Paul Gofman
09bbd8c0bf wineopenxr: Load unwrappers from winevulkan.so. 2023-02-14 16:07:43 +02:00
Paul Gofman
e2ab395020 steam_helper: Load unwrappers from winevulkan.so. 2023-02-14 16:07:43 +02:00
Paul Gofman
74ae018197 vrclient: Load unwrappers from winevulkan.so. 2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
1489a6a8d5 proton: Bump prefix version. 2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
19f18b660e Makefile.in: Ignore autogenerated winevulkan files. 2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
f7a03d620e steam_helper: Use PROCESSINFOCLASS.
We no longer have PROCESS_INFORMATION_CLASS as of ce91ef6426bf ("kernelbase: Add SetProcessInformation().")
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
dc3a951754 Makefile.in: Build wineopenxr with -ldl.
Required as of bef09697227c ("ntdll: Move the .so module initialization to winecrt0.")
2023-02-14 16:07:43 +02:00
Esme Povirk
f2223c0ba7 Update Wine Mono to 7.4.0. 2023-02-14 16:07:43 +02:00
Paul Gofman
89a2dac0b2 proton: Enable gamedrive compat option for Creativerse.
CW-Bug-Id: #21729
2023-02-14 16:07:43 +02:00
Paul Gofman
f693c48a4c proton: Enable gamedrive compat option for As Dusk Fails.
CW-Bug-Id: #21485
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
8e67412fcc media-converter: Use the test pattern video even without dump/transcoded files.
So the game won't trip over lack of media when shader pre-cacheing is
disabled in Steam.

CW-Bug-Id: #21524
2023-02-14 16:07:43 +02:00
Shaun Ren
e2493e2dfd media-converter: Set stream ID as the video hash.
If a stream ID is not set, gstreamer will generate random stream IDs for
the streams in downstream elements. This can cause decodebin to generate
its source pads in a non-deterministic order, as decodebin takes into
account the stream IDs when sorting the source pads.

This patch includes some changes from Arek Hiler.

CW-Bug-Id: #21192
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
6d138f5e96 media-converter: Create a tag file when placeholder media are used.
CW-Bug-Id: #21473
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
eca48bb93f media-converter: Apply cargo clippy suggestions. 2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
e36a9ba96a media-converter: Update to the newest gst bindings.
1. ElementImpl trait requires GstObjectImpl

2. gst logging macros are no longer globals prefixed with gst_, they
   live inside gst:: instead

3. element is not longer passed around in many places, it can be
   accessed as self.obj() or self.instance()

4. query_default is now a part of gst::Pad and takes the pad as an argument

5. some constructors were changed to use from_$type()

6. query.view_mut() returns QueryViewMut

7. ElementFactory::make now returns a builder that we have to .build()

There are some extra cleanups as well:

1. spurious 'mut' and '&' are removed, a lot of that can be infered or
   were turned into a dereference by the compiler anyway

2. !bla.is_ok() are now bla.is_err()

3. some unneeded imports were removed
2023-02-14 16:07:43 +02:00
Rémi Bernon
9eb5a1753c docker: Add autoconf-archive dependency.
For OpenFST.
2023-02-14 16:07:43 +02:00
Simon McVittie
4db08dc766 proton: Don't crash if sys.stderr is not usable
If a Steam user runs Steam from a terminal, puts it in the background
and then exits from that terminal, or if they restart their desktop
session from a terminal (as in ValveSoftware/Proton#6277) and then exit
from that terminal, then we can inherit a stdout and/or stderr file
descriptor pointing to an invalid file descriptor. Writing to such a
file descriptor fails with EIO. Similarly, we could get write errors
as a result of OS state, such as ENOSPC if we are writing to a disk
that is full, or EPIPE if a stream to a logging framework such as the
systemd journal has been shut down.

In sufficiently pathological situations, the file descriptor could even
become invalid while the `proton` script is running, so even checking
for validity on startup would not be enough to prevent this.

The ability to log to stderr is important but not functionally critical,
and it's not like there is anything we can usefully do about a write
failure here (or even anywhere we can usefully put a warning message),
so just ignore write errors. This is similar to the behaviour of the
`logging` framework in the Python standard library (which writes to
`stderr` if a user-defined handler fails, but takes no other action)
and also similar to the approach taken to solve
ValveSoftware/steam-for-linux#8069.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Link: https://github.com/ValveSoftware/Proton/pull/6341
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
b5d58d27ad docker: Bump Rust to 1.65.
For let-else statements and generic associated types.
2023-02-14 16:07:43 +02:00
Arkadiusz Hiler
c04ca71f7a docker: Don't specify the image tag in --cache-from
The option is badly documented. Apparently the image name is enough.
Specifying the tag breaks podman/buildah build.
2023-02-14 16:07:43 +02:00
Rémi Bernon
4514ff3eff docker: Add python3-mako to the SDK images. 2023-02-14 16:07:43 +02:00
Rémi Bernon
d8fbadbd2a docker: Add OpenBLAS dependency.
For Kaldi / Vosk.
2023-02-14 16:07:43 +02:00