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.
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.
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.
We can move everything but Liberation fonts build to the container.
Sadly those require newer version of fontforge than the one available in
the Steam RT.
There's some extra logic necessary to assure that font build triggers in
the container with the default/all targets.
This removes the requirement to have afdko and fonttools installed on
the host.
Configure will also test the container engine by trying to run the
selected SDK image.
This may make the first configure a bit slow, as it downloads the image,
but after that the SDK will be cached locally.
Debian-like distributions install AFDKO's executables into libexec and
provide an `afdko` helper to call them.
Python's pip installs the executables in bin.
Let's support both.
* Make it more flexible on the image name,
* Remove the image type support, only Docker is likely to be supported.
* Add target runtime name (scout / soldier), independent of the image.
In steamrt-bootstrap,sh
+ Used quotes to prevent word splitting SC2046
+ Used $() notation rather than legacy backtick SC2006
+ which is non-standard. 'command -v' is builtin SC2230
In configure.sh
+ Assigned to local variable separately to avoid masking return values SC2155
+ Used to quote to prevent glob matching SC2053
+ Used -z command rather than ! -n SC2236
+ Fixed SC2129 which would have a minor performance gain of avoiding constantly opening and closing the makefile.