Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • steamrt/sniper/sdk
1 result
Show changes
Commits on Source (4)
...@@ -68,6 +68,12 @@ or for [Toolbx](https://containertoolbx.org/) ...@@ -68,6 +68,12 @@ or for [Toolbx](https://containertoolbx.org/)
toolbox create -i registry.gitlab.steamos.cloud/steamrt/sniper/sdk sniper toolbox create -i registry.gitlab.steamos.cloud/steamrt/sniper/sdk sniper
toolbox enter sniper toolbox enter sniper
or for [Distrobox](https://distrobox.it/)
([more information](doc/distrobox.md)):
distrobox create -i registry.gitlab.steamos.cloud/steamrt/sniper/sdk sniper
distrobox enter sniper
`registry.gitlab.steamos.cloud/steamrt/sniper/sdk` is the 64-bit SDK. `registry.gitlab.steamos.cloud/steamrt/sniper/sdk` is the 64-bit SDK.
Most libraries also have development files available for 32-bit builds. Most libraries also have development files available for 32-bit builds.
The development files for a few libraries that use legacy `-config` scripts The development files for a few libraries that use legacy `-config` scripts
...@@ -80,10 +86,10 @@ is strongly recommended. ...@@ -80,10 +86,10 @@ is strongly recommended.
Tags available for this repository (can be specified after `:` when using Tags available for this repository (can be specified after `:` when using
`docker pull`): `docker pull`):
* `0.20231107.66301` (etc.): Specific versions of the SDK. Use one of these * `3.0.20250108.112707` (etc.): Specific versions of the SDK. Use one of these
if you need to "pin" to an older version for reproducible builds. if you need to "pin" to an older version for reproducible builds.
These version numbers correspond exactly to These version numbers correspond exactly to
<https://repo.steampowered.com/steamrt3/images/0.20231107.66301/> <https://repo.steampowered.com/steamrt3/images/3.0.20250108.112707/>
and so on. and so on.
* `latest`, `latest-container-runtime-depot`: * `latest`, `latest-container-runtime-depot`:
...@@ -128,12 +134,19 @@ Several sets of compilers are available: ...@@ -128,12 +134,19 @@ Several sets of compilers are available:
* gcc-9 and g++-9 * gcc-9 and g++-9
* gcc-10 and g++-10 (default) * gcc-10 and g++-10 (default)
* gcc-12 and g++-12 (experimental) * gcc-12 and g++-12 (experimental)
* gcc-14 and g++-14 (experimental)
* clang-11 and clang++-11 * clang-11 and clang++-11
The experimental `gcc-12` and `g++-12` can be installed by using The experimental `gcc-12` and `g++-12` can be installed by using
`apt-get install gcc-12-monolithic` but are not currently included in `apt-get install gcc-12-monolithic` but are not currently included in
the SDK itself. the SDK itself.
Similarly,
the experimental `gcc-14` and `g++-14` can be installed by using
`apt-get install gcc-14-monolithic`.
At the time of writing,
this requires adding the [beta apt source](#apt-packages).
To avoid an unexpected upgrade of the Standard C++ library, To avoid an unexpected upgrade of the Standard C++ library,
`gcc-12`, `g++-12` and any newer versions always behave as though the `gcc-12`, `g++-12` and any newer versions always behave as though the
`-static-libgcc` and `static-libstdc++` options had been used. `-static-libgcc` and `static-libstdc++` options had been used.
...@@ -143,7 +156,7 @@ C-based external dependencies such as SDL and GLib are safe to use, but ...@@ -143,7 +156,7 @@ C-based external dependencies such as SDL and GLib are safe to use, but
passing a STL object such as `std::string` to C++-based libraries from passing a STL object such as `std::string` to C++-based libraries from
the Steam Runtime or the operating system (for example `libgnutlsxx` or the Steam Runtime or the operating system (for example `libgnutlsxx` or
`libpcrecpp`) will not necessarily work and is best avoided, especially `libpcrecpp`) will not necessarily work and is best avoided, especially
if you are using `g++-9` or newer. if you are using `g++-12` or newer.
Most build systems have a way to use a non-default compiler by specifying Most build systems have a way to use a non-default compiler by specifying
its name, for example Autotools `./configure CC=clang CXX=clang++ ...` and its name, for example Autotools `./configure CC=clang CXX=clang++ ...` and
...@@ -163,6 +176,9 @@ The sniper SDK can compile 32-bit code in two different ways: ...@@ -163,6 +176,9 @@ The sniper SDK can compile 32-bit code in two different ways:
Both should result in binaries that link to the same libraries. Both should result in binaries that link to the same libraries.
For gcc versions newer than the default, only the multilib style (`-m32`)
is available.
Meson users can use a command like `meson --cross-file=gcc-m32.txt ...` Meson users can use a command like `meson --cross-file=gcc-m32.txt ...`
to select the `-m32` multilib toolchain. to select the `-m32` multilib toolchain.
See `/usr/share/meson/cross` in the container for all the options available. See `/usr/share/meson/cross` in the container for all the options available.
......
# Building in the Steam Runtime environment using Distrobox
[Distrobox](https://distrobox.it/) is a tool to set up convenient
containerized command-line environments.
It wraps either [Podman](podman.md), [Docker](docker.md) or Lilipod,
but provides more convenient sharing between the container and the
host operating system,
similar to [Toolbx](toolbx.md).
It is available in recent versions of most Linux distributions,
usually as a package named `distrobox`.
Like Toolbx, Distrobox can be used to compile games in a predictable,
consistent environment, with a relatively complete set of tools and
libraries included.
To download the container image and set up a Distrobox container,
on a system where Distrobox uses Podman,
use a command like this:
distrobox create -i registry.gitlab.steamos.cloud/steamrt/sniper/sdk sniper
To enter the container environment, use a command like:
distrobox enter sniper
You can download and install new packages using `sudo apt-get`,
the same as you would in an ordinary Debian or Ubuntu system.
Using Distrobox with Docker is not documented here,
and is likely to require root privileges.
We suggest preferring Podman over Docker for interactive use.
## Not a security boundary
Please note that Distrobox is not designed to put a security boundary
between programs in the container and programs on the host.
Anything that you run inside the container has full access to your home
directory and privileges on the host system.
As a result, it is not safe to run potentially-malicious code inside
the Distrobox container.
If isolation between the container and the host is required,
use [Podman](podman.md) or [Docker](docker.md) instead.
## Beta SDK
To use the beta SDK, specify the `beta` tag:
distrobox create -i registry.gitlab.steamos.cloud/steamrt/sniper/sdk:beta sniper
Games compiled in the beta SDK will not necessarily work with the
general-availability version of the container runtime.
See the [README](../README.md) for more information about the beta SDK.
## Mixing Distrobox with lower-level container tools
Distrobox usually acts a wrapper around either [Podman](podman.md) or
[Docker](docker.md),
so it is possible to combine the two tools,
for example using Distrobox for interactive builds and debugging,
then switching to Podman for a final "clean" build that is better-isolated
from the host system.
In particular, if your network connection is slow or unreliable, you
might find it useful to pre-download the container image using Podman,
which has better progress reporting:
podman pull registry.gitlab.steamos.cloud/steamrt/sniper/sdk
...@@ -31,6 +31,17 @@ user is automatically given passwordless `sudo` access inside ...@@ -31,6 +31,17 @@ user is automatically given passwordless `sudo` access inside
the container, even if you do not have `sudo` access *outside* the the container, even if you do not have `sudo` access *outside* the
container. container.
## Not a security boundary
Please note that Toolbx is not designed to put a security boundary
between programs in the container and programs on the host.
Anything that you run inside the container has full access to your home
directory and privileges on the host system.
As a result, it is not safe to run potentially-malicious code inside
the Toolbx container.
If isolation between the container and the host is required,
use [Podman](podman.md) or [Docker](docker.md) instead.
## Beta SDK ## Beta SDK
To use the beta SDK, simply specify the `beta` tag: To use the beta SDK, simply specify the `beta` tag:
......