From 0abb95b7e711bf3ff1257c34dc6115de32fe3e76 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 a82cd9d582..d1dcdb9cad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1171,8 +1171,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 5ac60e8b2e..090eff5caa 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 3b5f7a4a91..41d29a628d 100755 --- a/configure.sh +++ b/configure.sh @@ -114,8 +114,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" @@ -153,6 +158,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