makefile_base.mak: Generate compatibilitytool.vdf from dist step

This commit is contained in:
John Schoenick 2018-08-20 17:05:33 -07:00
parent 8666551881
commit 9a75ea7791
2 changed files with 34 additions and 1 deletions

View file

@ -39,6 +39,8 @@ WITHOUT_X :=
# FIXME Configure stuff needs to set these maybe # FIXME Configure stuff needs to set these maybe
INSTALL_PROGRAM_FLAGS := INSTALL_PROGRAM_FLAGS :=
# Local name of this build, for dist/install steps
BUILD_NAME := proton-localbuild
SRCDIR := .. SRCDIR := ..
# Many of the configure steps below depend on the makefile itself, such that they are dirtied by changing the recipes # 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 := MAKEFILE_DEP :=
endif endif
COMPAT_MANIFEST_TEMPLATE := $(SRCDIR)/compatibilitytool.vdf.template
TOOLS_DIR32 := ./obj-tools32 TOOLS_DIR32 := ./obj-tools32
TOOLS_DIR64 := ./obj-tools64 TOOLS_DIR64 := ./obj-tools64
DST_DIR := ./dist 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_FILES := toolmanifest.vdf filelock.py proton user_settings.sample.py
DIST_COPY_TARGETS := $(addprefix $(DST_DIR)/,$(DIST_SRC_FILES)) DIST_COPY_TARGETS := $(addprefix $(DST_DIR)/,$(DIST_SRC_FILES))
DIST_VERSION := $(DST_DIR)/version 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): $(DIST_COPY_TARGETS):
cp -a $(SRCDIR)/$(notdir $@) $@ cp -a $(SRCDIR)/$(notdir $@) $@
@ -149,6 +154,9 @@ $(DIST_COPY_TARGETS):
$(DIST_VERSION): $(DIST_VERSION):
date '+%s' > $@ date '+%s' > $@
$(DIST_COMPAT_MANIFEST): $(COMPAT_MANIFEST_TEMPLATE) $(MAKEFILE_DEP)
sed -r 's|//##DISPLAY_NAME##|"display_name" "'$(BUILD_NAME)'"|' $< > $@
dist: $(DIST_TARGETS) dist: $(DIST_TARGETS)
## ##

View file

@ -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"
}
}
}