Run Wine in the steam runtime

This commit is contained in:
Andrew Eikum 2019-02-05 09:41:03 -06:00
parent 821a09cacd
commit 0ecb100046
5 changed files with 27 additions and 10 deletions

View file

@ -71,6 +71,7 @@ function configure() {
local steamrt64_name="${1#*:}"
local steamrt32_type="${2%:*}"
local steamrt32_name="${2#*:}"
local steamrt_path="${3}"
check_steamrt_image "$steamrt64_type" "$steamrt64_name"
check_steamrt_image "$steamrt32_type" "$steamrt32_name"
@ -108,6 +109,7 @@ function configure() {
echo "STEAMRT64_IMAGE := $(escape_for_make "$steamrt64_name")"
echo "STEAMRT32_MODE := $(escape_for_make "$steamrt32_type")"
echo "STEAMRT32_IMAGE := $(escape_for_make "$steamrt32_name")"
echo "STEAMRT_PATH := $(escape_for_make "$steamrt_path")"
# Include base
echo ""
@ -171,6 +173,9 @@ function parse_args() {
elif [[ $arg = --steam-runtime64 ]]; then
val_used=1
arg_steamrt64="$val"
elif [[ $arg = --steam-runtime ]]; then
val_used=1
arg_steamrt="$val"
elif [[ $arg = --no-steam-runtime ]]; then
arg_no_steamrt=1
else
@ -207,7 +212,7 @@ function parse_args() {
}
usage() {
"$1" "Usage: $0 { --no-steam-runtime | --steam-runtime32=<image> --steam-runtime64=<image> }"
"$1" "Usage: $0 { --no-steam-runtime | --steam-runtime32=<image> --steam-runtime64=<image> --steam-runtime=<path> }"
"$1" " Generate a Makefile for building Proton. May be run from another directory to create"
"$1" " out-of-tree build directories (e.g. mkdir mybuild && cd mybuild && ../configure.sh)"
"$1" ""
@ -230,6 +235,10 @@ usage() {
"$1" " --steam-runtime32=docker:<image> The 32-bit docker image to use for steps that require"
"$1" " a 32-bit environment. See --steam-runtime64."
"$1" ""
"$1" " --steam-runtime=<path> Path to the runtime built for the host (i.e. the output"
"$1" " directory given to steam-runtime/build-runtime.py). Should"
"$1" " contain run.sh."
"$1" ""
"$1" " --no-steam-runtime Do not automatically invoke any runtime SDK as part of the build."
"$1" " Build steps may still be manually run in a runtime environment."
exit 1;
@ -240,10 +249,10 @@ parse_args "$@" || usage err
[[ -z $arg_help ]] || usage info
# Sanity check arguments
if [[ -n $arg_no_steamrt && (-n $arg_steamrt32 || -n $arg_steamrt64) ]]; then
if [[ -n $arg_no_steamrt && (-n $arg_steamrt32 || -n $arg_steamrt64 || -n $arg_steamrt) ]]; then
die "Cannot specify a Steam Runtime SDK as well as --no-steam-runtime"
elif [[ -z $arg_no_steamrt && ( -z $arg_steamrt32 || -z $arg_steamrt64 ) ]]; then
die "Must specify either --no-steam-runtime or both --steam-runtime32 and --steam-runtime64"
elif [[ -z $arg_no_steamrt && ( -z $arg_steamrt32 || -z $arg_steamrt64 || -z $arg_steamrt ) ]]; then
die "Must specify either --no-steam-runtime or all of --steam-runtime32, --steam-runtime64, and --steam-runtime"
fi
configure "$arg_steamrt64" "$arg_steamrt32"
configure "$arg_steamrt64" "$arg_steamrt32" "$arg_steamrt"