diff --git a/build/makefile_base.mak b/build/makefile_base.mak index b678ab75..560ed664 100644 --- a/build/makefile_base.mak +++ b/build/makefile_base.mak @@ -39,6 +39,8 @@ WITHOUT_X := # FIXME Configure stuff needs to set these maybe INSTALL_PROGRAM_FLAGS := +# Local name of this build, for dist/install steps +BUILD_NAME := proton-localbuild SRCDIR := .. # Many of the configure steps below depend on the makefile itself, such that they are dirtied by changing the recipes @@ -49,6 +51,8 @@ ifeq ($(NO_MAKEFILE_DEPENDENCY),1) MAKEFILE_DEP := endif +COMPAT_MANIFEST_TEMPLATE := $(SRCDIR)/compatibilitytool.vdf.template + TOOLS_DIR32 := ./obj-tools32 TOOLS_DIR64 := ./obj-tools64 DST_DIR := ./dist @@ -140,8 +144,9 @@ all64_configure: $(addsuffix 64_configure,$(GOAL_TARGETS)) DIST_COPY_FILES := toolmanifest.vdf filelock.py proton user_settings.sample.py DIST_COPY_TARGETS := $(addprefix $(DST_DIR)/,$(DIST_SRC_FILES)) DIST_VERSION := $(DST_DIR)/version +DIST_COMPAT_MANIFEST := $(DST_DIR)/compatibilitytool.vdf -DIST_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) +DIST_TARGETS := $(DIST_COPY_TARGETS) $(DIST_VERSION) $(DIST_COMPAT_MANIFEST) $(DIST_COPY_TARGETS): cp -a $(SRCDIR)/$(notdir $@) $@ @@ -149,6 +154,9 @@ $(DIST_COPY_TARGETS): $(DIST_VERSION): date '+%s' > $@ +$(DIST_COMPAT_MANIFEST): $(COMPAT_MANIFEST_TEMPLATE) $(MAKEFILE_DEP) + sed -r 's|//##DISPLAY_NAME##|"display_name" "'$(BUILD_NAME)'"|' $< > $@ + dist: $(DIST_TARGETS) ## diff --git a/compatibilitytool.vdf.template b/compatibilitytool.vdf.template new file mode 100644 index 00000000..3117360b --- /dev/null +++ b/compatibilitytool.vdf.template @@ -0,0 +1,25 @@ +"compatibilitytools" +{ + "compat_tools" + { + "proton-localbuild" // Internal name of this tool + { + // Can register this tool with Steam in two ways: + // + // - The tool can be placed as a subdirectory in compatibilitytools.d, in which case this + // should be '.' + // + // - This manifest can be placed directly in compatibilitytools.d, in which case this should + // be the relative or absolute path to the tool's dist directory. + "install_path" "." + + // For this template, we're going to substitute the display_name key in here, e.g.: + // "display_name" "Proton - local build 3/2" + + //##DISPLAY_NAME## + + "from_oslist" "windows" + "to_oslist" "linux" + } + } +}