diff --git a/build/makefile_base.mak b/build/makefile_base.mak index 96965ff8..c2f78878 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -27,6 +27,7 @@ else # (Rest of the file is the else) # We expect the configure script to conditionally set the following: # SRCDIR - Path to source +# BUILD_NAME - Name of the build for manifests etc. # NO_DXVK - 1 if skipping DXVK steps # OSX - 1 if OS X build # STEAMRT64_MODE - 'docker' or '' for automatic Steam Runtime container @@ -49,10 +50,6 @@ endif export CC 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 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) \ diff --git a/configure.sh b/configure.sh index bc1c5218..b4b499eb 100755 --- a/configure.sh +++ b/configure.sh @@ -3,6 +3,7 @@ set -eu SRCDIR="$(dirname "$0")" +DEFAULT_BUILD_NAME="proton-localbuild" # If no --build-name specified # Output helpers COLOR_ERR="" @@ -77,13 +78,24 @@ function configure() { 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 [[ ! -e "$MAKEFILE" ]] || rm "$MAKEFILE" # Config echo >> "$MAKEFILE" "# Generated by: $THIS_COMMAND" 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? if [[ -n $OSX && ! -n $arg_force_dxvk ]]; then @@ -117,6 +129,7 @@ arg_steamrt32="" arg_steamrt64="" arg_no_steamrt="" arg_force_dxvk="" +arg_build_name="" invalid_args="" function parse_args() { local arg; @@ -147,7 +160,10 @@ function parse_args() { fi # 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 elif [[ $arg = --steam-runtime32 ]]; then val_used=1 @@ -196,8 +212,10 @@ usage() { "$1" " out-of-tree build directories (e.g. mkdir mybuild && cd mybuild && ../configure.sh)" "$1" "" "$1" " Options" - "$1" " --osx-force-dxvk Attempt to build DXVK on OS X - not currently functioning," - "$1" " development use" + "$1" " --build-name= Set the name of the build that displays when used in Steam" + "$1" "" + "$1" " --osx-force-dxvk Attempt to build DXVK on OS X - not currently functioning," + "$1" " development use" "$1" "" "$1" " Steam Runtime" "$1" " Proton builds that are to be installed & run under the steam client must be built with"