Skip to content

Commit

Permalink
compatibilitytool.vdf: Make sure internal tool name includes 'proton'.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ivyl committed Jan 7, 2025
1 parent b0df23c commit 0abb95b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion compatibilitytool.vdf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
Expand Down
10 changes: 8 additions & 2 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0abb95b

Please sign in to comment.