diff --git a/README.md b/README.md index 8fde3a3cb4fc3d20f10e1803c920bc52ad84235d..40da0413f7565d662042d8ed53e2fb7bdcf70371 100644 --- a/README.md +++ b/README.md @@ -310,16 +310,38 @@ Instructions for testing * For a more production-ready version without the test UI, set the launch options to: + "LaunchOptions" "~/.steam/steam/steamapps/common/SteamLinuxRuntime/pressure-vessel/bin/pressure-vessel-unruntime-scout -- %command%" + + This mode does not require Python 3, PyGI, GTK or a normal + window manager, and is probably more suitable for Big Picture mode. + It assumes this directory layout: + + ``` + SteamLinuxRuntime + \- pressure-vessel + \- bin + \- pressure-vessel-unruntime-scout (etc.) + \- scout + \- files + \- metadata + ``` + + Or for more flexibility, use + "LaunchOptions" "~/.steam/steam/steamapps/common/SteamLinuxRuntime/pressure-vessel/bin/pressure-vessel-unruntime -- %command%" and then add more options just before the `--` as desired. This mode does not require Python 3, PyGI, GTK or a normal window manager, and is probably more suitable for Big Picture mode. -* When not using the test UI, the default runtime is the host system, +* The default runtime for `pressure-vessel-unruntime` is the host system, with the `LD_LIBRARY_PATH` Steam Runtime overlaid onto it. - You can specify a runtime with the `--runtime` option. It can be - any of these: + You can specify a runtime with the `--runtime` option: + `pressure-vessel-unruntime-scout` is just a shortcut for using + `pressure-vessel-unruntime --runtime DIR/../../scout/files` where *DIR* + is the directory containing `pressure-vessel-unruntime-scout` itself. + + The runtime can be any of these: - The `files` subdirectory of a Flatpak-style runtime such as `~/.steam/steam/steamapps/common/SteamLinuxRuntime/scout` or diff --git a/build-relocatable-install.py b/build-relocatable-install.py index c2da1e140d88b4405f0fdf411238ab01d584ea72..507bed2163e6dfdcfcc4fe8ce092cc32e46eb139 100755 --- a/build-relocatable-install.py +++ b/build-relocatable-install.py @@ -98,6 +98,7 @@ PRIMARY_ARCH_DEPENDENCIES = { SCRIPTS = [ 'pressure-vessel-test-ui', 'pressure-vessel-unruntime', + 'pressure-vessel-unruntime-scout', 'pressure-vessel-unruntime-test-ui', ] EXECUTABLES = [ diff --git a/meson.build b/meson.build index 510eef096ecad7f3dd719315e88a299877927174..d9dd40928f99a6f96f93a3b70b80c150ed76bfe6 100644 --- a/meson.build +++ b/meson.build @@ -109,6 +109,7 @@ add_project_arguments(supported_warning_cflags, language : 'c') scripts = [ 'pressure-vessel-test-ui', 'pressure-vessel-unruntime', + 'pressure-vessel-unruntime-scout', 'pressure-vessel-unruntime-test-ui', ] diff --git a/pressure-vessel-unruntime-scout b/pressure-vessel-unruntime-scout new file mode 100755 index 0000000000000000000000000000000000000000..4ffe0079292da3319b8f62a580d5140b2a9cd0d8 --- /dev/null +++ b/pressure-vessel-unruntime-scout @@ -0,0 +1,40 @@ +#!/bin/bash + +# pressure-vessel-scout — undo the Steam Runtime's environment and use +# scout, assuming the layout of the SteamLinuxRuntime depot. +# +# Copyright © 2019 Collabora Ltd. +# +# SPDX-License-Identifier: MIT +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +set -e +set -o pipefail +set -u +shopt -s nullglob + +me="$(readlink -f "$0")" +here="${me%/*}" +me="${me##*/}" + +exec "$here/pressure-vessel-unruntime" --runtime "${here}/../../scout/files" "$@" + +# vim:set sw=4 sts=4 et: diff --git a/tests/shellcheck.sh b/tests/shellcheck.sh index f79fea79d9da3b0bd7f0be3e5a0b83e24f15fbae..b8336ec4462c039e4620f1406d89d66fe3c319c5 100755 --- a/tests/shellcheck.sh +++ b/tests/shellcheck.sh @@ -38,6 +38,7 @@ n=0 for shell_script in \ *.sh \ pressure-vessel-unruntime \ + pressure-vessel-unruntime-scout \ pressure-vessel-unruntime-test-ui \ tests/*.sh \ ; do