mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-07-27 23:51:56 +03:00
build: Add --build-name to configure.sh step
This commit is contained in:
parent
0b192a548a
commit
30ea538cef
@ -27,6 +27,7 @@ else # (Rest of the file is the else)
|
|||||||
|
|
||||||
# We expect the configure script to conditionally set the following:
|
# We expect the configure script to conditionally set the following:
|
||||||
# SRCDIR - Path to source
|
# SRCDIR - Path to source
|
||||||
|
# BUILD_NAME - Name of the build for manifests etc.
|
||||||
# NO_DXVK - 1 if skipping DXVK steps
|
# NO_DXVK - 1 if skipping DXVK steps
|
||||||
# OSX - 1 if OS X build
|
# OSX - 1 if OS X build
|
||||||
# STEAMRT64_MODE - 'docker' or '' for automatic Steam Runtime container
|
# STEAMRT64_MODE - 'docker' or '' for automatic Steam Runtime container
|
||||||
@ -49,10 +50,6 @@ endif
|
|||||||
export CC
|
export CC
|
||||||
export CXX
|
export CXX
|
||||||
|
|
||||||
# Local name of this build, for dist/install steps
|
|
||||||
# TODO Let configure.sh set/propagate this
|
|
||||||
BUILD_NAME ?= proton-localbuild
|
|
||||||
|
|
||||||
# Selected container mode shell
|
# Selected container mode shell
|
||||||
DOCKER_SHELL_BASE = sudo docker run --rm --init -v $(HOME):$(HOME) -w $(CURDIR) \
|
DOCKER_SHELL_BASE = sudo docker run --rm --init -v $(HOME):$(HOME) -w $(CURDIR) \
|
||||||
-v /etc/passwd:/etc/passwd:ro -u $(shell id -u):$(shell id -g) -h $(shell hostname) \
|
-v /etc/passwd:/etc/passwd:ro -u $(shell id -u):$(shell id -g) -h $(shell hostname) \
|
||||||
|
26
configure.sh
26
configure.sh
@ -3,6 +3,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
SRCDIR="$(dirname "$0")"
|
SRCDIR="$(dirname "$0")"
|
||||||
|
DEFAULT_BUILD_NAME="proton-localbuild" # If no --build-name specified
|
||||||
|
|
||||||
# Output helpers
|
# Output helpers
|
||||||
COLOR_ERR=""
|
COLOR_ERR=""
|
||||||
@ -77,13 +78,24 @@ function configure() {
|
|||||||
|
|
||||||
local srcdir="$(dirname "$0")"
|
local srcdir="$(dirname "$0")"
|
||||||
|
|
||||||
|
# Build name
|
||||||
|
local build_name="$arg_build_name"
|
||||||
|
if [[ -n $build_name ]]; then
|
||||||
|
info "Configuring with build name: $build_name"
|
||||||
|
else
|
||||||
|
build_name="$DEFAULT_BUILD_NAME"
|
||||||
|
info "No build name specified, using default: $build_name"
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Write out config
|
||||||
# Don't die after this point or we'll have rather unhelpfully deleted the Makefile
|
# Don't die after this point or we'll have rather unhelpfully deleted the Makefile
|
||||||
[[ ! -e "$MAKEFILE" ]] || rm "$MAKEFILE"
|
[[ ! -e "$MAKEFILE" ]] || rm "$MAKEFILE"
|
||||||
|
|
||||||
# Config
|
# Config
|
||||||
echo >> "$MAKEFILE" "# Generated by: $THIS_COMMAND"
|
echo >> "$MAKEFILE" "# Generated by: $THIS_COMMAND"
|
||||||
echo >> "$MAKEFILE" ""
|
echo >> "$MAKEFILE" ""
|
||||||
echo >> "$MAKEFILE" "SRCDIR := $(escape_for_make "$srcdir")"
|
echo >> "$MAKEFILE" "SRCDIR := $(escape_for_make "$srcdir")"
|
||||||
|
echo >> "$MAKEFILE" "BUILD_NAME := $(escape_for_make "$build_name")"
|
||||||
|
|
||||||
# DXVK?
|
# DXVK?
|
||||||
if [[ -n $OSX && ! -n $arg_force_dxvk ]]; then
|
if [[ -n $OSX && ! -n $arg_force_dxvk ]]; then
|
||||||
@ -117,6 +129,7 @@ arg_steamrt32=""
|
|||||||
arg_steamrt64=""
|
arg_steamrt64=""
|
||||||
arg_no_steamrt=""
|
arg_no_steamrt=""
|
||||||
arg_force_dxvk=""
|
arg_force_dxvk=""
|
||||||
|
arg_build_name=""
|
||||||
invalid_args=""
|
invalid_args=""
|
||||||
function parse_args() {
|
function parse_args() {
|
||||||
local arg;
|
local arg;
|
||||||
@ -147,7 +160,10 @@ function parse_args() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# The args
|
# The args
|
||||||
if [[ $arg = --osx-force-dxvk ]]; then
|
if [[ $arg = --build-name ]]; then
|
||||||
|
arg_build_name="$val"
|
||||||
|
val_used=1
|
||||||
|
elif [[ $arg = --osx-force-dxvk ]]; then
|
||||||
arg_force_dxvk=1
|
arg_force_dxvk=1
|
||||||
elif [[ $arg = --steam-runtime32 ]]; then
|
elif [[ $arg = --steam-runtime32 ]]; then
|
||||||
val_used=1
|
val_used=1
|
||||||
@ -196,8 +212,10 @@ usage() {
|
|||||||
"$1" " out-of-tree build directories (e.g. mkdir mybuild && cd mybuild && ../configure.sh)"
|
"$1" " out-of-tree build directories (e.g. mkdir mybuild && cd mybuild && ../configure.sh)"
|
||||||
"$1" ""
|
"$1" ""
|
||||||
"$1" " Options"
|
"$1" " Options"
|
||||||
"$1" " --osx-force-dxvk Attempt to build DXVK on OS X - not currently functioning,"
|
"$1" " --build-name=<name> Set the name of the build that displays when used in Steam"
|
||||||
"$1" " development use"
|
"$1" ""
|
||||||
|
"$1" " --osx-force-dxvk Attempt to build DXVK on OS X - not currently functioning,"
|
||||||
|
"$1" " development use"
|
||||||
"$1" ""
|
"$1" ""
|
||||||
"$1" " Steam Runtime"
|
"$1" " Steam Runtime"
|
||||||
"$1" " Proton builds that are to be installed & run under the steam client must be built with"
|
"$1" " Proton builds that are to be installed & run under the steam client must be built with"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user