From 82eb00515f5441f3fe93dfd9fa3727d5822de64a Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Tue, 7 Jan 2025 12:35:40 +0200 Subject: [PATCH] compatibilitytool.vdf: Make sure internal tool name includes 'proton'. This matters for builds dropped into compatibilitytools.d/. Steam uses the internal tool name to detect it's Proton and alters some behavior regarding how cloud saves work. Not including Proton in the name may lead to confusing behavior regarding saves where they are present on some builds but vanish on the other, only to reappear when switching back. --- Makefile.in | 3 ++- compatibilitytool.vdf.template | 2 +- configure.sh | 10 ++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index ca044455..44cca554 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1080,8 +1080,9 @@ all-dist: $(DIST_TOOLMANIFEST) COMPAT_MANIFEST_TEMPLATE := $(SRCDIR)/compatibilitytool.vdf.template DIST_COMPAT_MANIFEST := $(DST_BASE)/compatibilitytool.vdf +INTERNAL_TOOL_NAME ?= $(BUILD_NAME)-proton $(DIST_COMPAT_MANIFEST): $(COMPAT_MANIFEST_TEMPLATE) | $(DST_DIR) - sed -r 's|##BUILD_NAME##|$(BUILD_NAME)|' $< > $@ + sed -r -e 's|##BUILD_NAME##|$(BUILD_NAME)|' -e 's|##INTERNAL_TOOL_NAME##|$(INTERNAL_TOOL_NAME)|' $< > $@ all-dist: $(DIST_COMPAT_MANIFEST) diff --git a/compatibilitytool.vdf.template b/compatibilitytool.vdf.template index 5ac60e8b..090eff5c 100644 --- a/compatibilitytool.vdf.template +++ b/compatibilitytool.vdf.template @@ -2,7 +2,7 @@ { "compat_tools" { - "##BUILD_NAME##" // Internal name of this tool + "##INTERNAL_TOOL_NAME##" // Internal name of this tool { // Can register this tool with Steam in two ways: // diff --git a/configure.sh b/configure.sh index 2fa63534..15ee9d24 100755 --- a/configure.sh +++ b/configure.sh @@ -117,8 +117,13 @@ function configure() { 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" + build_name="$DEFAULT_BUILD_NAME" info "No build name specified, using default: $build_name" + fi + + if [[ ${build_name,,} == *proton* ]]; then + internal_tool_name=${build_name} + else + internal_tool_name=${build_name}-proton fi dependency_command make "GNU Make" @@ -156,6 +161,7 @@ function configure() { echo "" echo "SRCDIR := $(escape_for_make "$srcdir")" echo "BUILD_NAME := $(escape_for_make "$build_name")" + echo "INTERNAL_TOOL_NAME := $(escape_for_make "$internal_tool_name")" # SteamRT was specified, baking it into the Makefile if [[ -n $arg_protonsdk_image ]]; then