build: Download and cache contrib into the build folder only.
Wine Mono / Gecko packages are already cached in a contrib folder, and downloading them outside of proton source directory is brittle. This also makes the source sync run twice when using the toplevel Makefile.
This commit is contained in:
parent
331c90a874
commit
559e652a45
2 changed files with 34 additions and 73 deletions
15
Makefile
15
Makefile
|
@ -124,26 +124,23 @@ ifeq ($(protonsdk_version),local)
|
||||||
configure: protonsdk
|
configure: protonsdk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
downloads: configure
|
proton: configure
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR) downloads
|
|
||||||
|
|
||||||
proton: downloads
|
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) dist && \
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) dist && \
|
||||||
echo "Proton built locally. Use 'install', 'deploy' or 'redist' targets."
|
echo "Proton built locally. Use 'install', 'deploy' or 'redist' targets."
|
||||||
|
|
||||||
install: downloads
|
install: configure
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) install
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) install
|
||||||
echo "Proton installed to your local Steam installation"
|
echo "Proton installed to your local Steam installation"
|
||||||
|
|
||||||
redist: | $(BUILD_ROOT)/$(DEPLOY_DIR)
|
redist: | $(BUILD_ROOT)/$(DEPLOY_DIR)
|
||||||
redist: downloads
|
redist: configure
|
||||||
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)/* && \
|
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)/* && \
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) redist && \
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) redist && \
|
||||||
cp -Rf $(BUILD_DIR)/redist/* $(BUILD_ROOT)/$(DEPLOY_DIR) && \
|
cp -Rf $(BUILD_DIR)/redist/* $(BUILD_ROOT)/$(DEPLOY_DIR) && \
|
||||||
echo "Proton build available at $(BUILD_ROOT)/$(DEPLOY_DIR)"
|
echo "Proton build available at $(BUILD_ROOT)/$(DEPLOY_DIR)"
|
||||||
|
|
||||||
deploy: | $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy
|
deploy: | $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy
|
||||||
deploy: downloads
|
deploy: configure
|
||||||
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy/* && \
|
rm -rf $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy/* && \
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) deploy && \
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) deploy && \
|
||||||
cp -Rf $(BUILD_DIR)/deploy/* $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy && \
|
cp -Rf $(BUILD_DIR)/deploy/* $(BUILD_ROOT)/$(DEPLOY_DIR)-deploy && \
|
||||||
|
@ -153,7 +150,7 @@ module: | $(BUILD_ROOT)/$(module)/lib/wine/i386-windows
|
||||||
module: | $(BUILD_ROOT)/$(module)/lib/wine/i386-unix
|
module: | $(BUILD_ROOT)/$(module)/lib/wine/i386-unix
|
||||||
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows
|
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows
|
||||||
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix
|
module: | $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix
|
||||||
module: downloads
|
module: configure
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) module=$(module) module && \
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) module=$(module) module && \
|
||||||
cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib/wine/i386-windows/ && \
|
cp -f $(BUILD_DIR)/obj-wine32/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib/wine/i386-windows/ && \
|
||||||
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows/ && \
|
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_PEFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-windows/ && \
|
||||||
|
@ -166,7 +163,7 @@ module: downloads
|
||||||
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_SOFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix/; \
|
cp -f $(BUILD_DIR)/obj-wine64/dlls/$(module)/$(MODULE_SOFILE) $(BUILD_ROOT)/$(module)/lib64/wine/x86_64-unix/; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
any $(CONTAINERGOALS): downloads
|
any $(CONTAINERGOALS): configure
|
||||||
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CONTAINERGOALS)
|
$(MAKE) $(MFLAGS) $(MAKEOVERRIDES) -C $(BUILD_DIR)/ $(UNSTRIPPED) $(CONTAINERGOALS)
|
||||||
|
|
||||||
dxvk: | $(BUILD_ROOT)/dxvk/lib/wine/dxvk
|
dxvk: | $(BUILD_ROOT)/dxvk/lib/wine/dxvk
|
||||||
|
|
92
Makefile.in
92
Makefile.in
|
@ -204,34 +204,10 @@ FONTS_OBJ := ./obj-fonts
|
||||||
|
|
||||||
ifeq ($(CONTAINER),)
|
ifeq ($(CONTAINER),)
|
||||||
|
|
||||||
## downloads -- Convenience target to download packages used during the build
|
|
||||||
## process. Places them in subdirs one up from the Proton source dir, so
|
|
||||||
## they won't be wiped during git-clean, vagrant rsync, etc.
|
|
||||||
|
|
||||||
.PHONY: downloads
|
|
||||||
|
|
||||||
GECKO64_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$(GECKO_VER)/$(GECKO64_TARBALL)
|
GECKO64_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$(GECKO_VER)/$(GECKO64_TARBALL)
|
||||||
GECKO32_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$(GECKO_VER)/$(GECKO32_TARBALL)
|
GECKO32_TARBALL_URL := https://dl.winehq.org/wine/wine-gecko/$(GECKO_VER)/$(GECKO32_TARBALL)
|
||||||
MONO_TARBALL_URL := https://github.com/madewokherd/wine-mono/releases/download/wine-mono-$(WINEMONO_VER)/$(WINEMONO_TARBALL)
|
MONO_TARBALL_URL := https://github.com/madewokherd/wine-mono/releases/download/wine-mono-$(WINEMONO_VER)/$(WINEMONO_TARBALL)
|
||||||
|
|
||||||
SHARED_GECKO64_TARBALL := $(SRCDIR)/../gecko/$(GECKO64_TARBALL)
|
|
||||||
SHARED_GECKO32_TARBALL := $(SRCDIR)/../gecko/$(GECKO32_TARBALL)
|
|
||||||
SHARED_MONO_TARBALL := $(SRCDIR)/../mono/$(WINEMONO_TARBALL)
|
|
||||||
|
|
||||||
$(SHARED_GECKO64_TARBALL):
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
wget -O "$@" "$(GECKO64_TARBALL_URL)"
|
|
||||||
|
|
||||||
$(SHARED_GECKO32_TARBALL):
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
wget -O "$@" "$(GECKO32_TARBALL_URL)"
|
|
||||||
|
|
||||||
$(SHARED_MONO_TARBALL):
|
|
||||||
mkdir -p $(dir $@)
|
|
||||||
wget -O "$@" "$(MONO_TARBALL_URL)"
|
|
||||||
|
|
||||||
downloads: $(SHARED_GECKO64_TARBALL) $(SHARED_GECKO32_TARBALL) $(SHARED_MONO_TARBALL)
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## dist/install -- steps to finalize the install
|
## dist/install -- steps to finalize the install
|
||||||
##
|
##
|
||||||
|
@ -266,10 +242,10 @@ DIST_TOOLMANIFEST := $(addprefix $(DST_BASE)/,toolmanifest.vdf)
|
||||||
DIST_OFL_LICENSE := $(DST_BASE)/LICENSE.OFL
|
DIST_OFL_LICENSE := $(DST_BASE)/LICENSE.OFL
|
||||||
DIST_AV1_PATENTS := $(DST_BASE)/PATENTS.AV1
|
DIST_AV1_PATENTS := $(DST_BASE)/PATENTS.AV1
|
||||||
DIST_GECKO_DIR := $(DST_DIR)/share/wine/gecko
|
DIST_GECKO_DIR := $(DST_DIR)/share/wine/gecko
|
||||||
DIST_GECKO32 := $(DIST_GECKO_DIR)/wine-gecko-$(GECKO_VER)-x86
|
DIST_GECKO32 := $(OBJ)/.gecko-dist32
|
||||||
DIST_GECKO64 := $(DIST_GECKO_DIR)/wine-gecko-$(GECKO_VER)-x86_64
|
DIST_GECKO64 := $(OBJ)/.gecko-dist64
|
||||||
DIST_WINEMONO_DIR := $(DST_DIR)/share/wine/mono
|
DIST_WINEMONO_DIR := $(DST_DIR)/share/wine/mono
|
||||||
DIST_WINEMONO := $(DIST_WINEMONO_DIR)/wine-mono-$(WINEMONO_VER)
|
DIST_WINEMONO := $(OBJ)/.wine-mono-dist
|
||||||
DIST_FONTS := $(DST_DIR)/share/fonts
|
DIST_FONTS := $(DST_DIR)/share/fonts
|
||||||
DIST_WINEOPENXR_JSON64 := $(DIST_PREFIX)/drive_c/openxr/wineopenxr64.json
|
DIST_WINEOPENXR_JSON64 := $(DIST_PREFIX)/drive_c/openxr/wineopenxr64.json
|
||||||
DIST_WINEOPENXR64 := $(DIST_PREFIX)/drive_c/windows/system32/wineopenxr.dll
|
DIST_WINEOPENXR64 := $(DIST_PREFIX)/drive_c/windows/system32/wineopenxr.dll
|
||||||
|
@ -309,47 +285,35 @@ $(DIST_COPY_TARGETS): | $(DST_DIR)
|
||||||
$(DIST_COMPAT_MANIFEST): $(COMPAT_MANIFEST_TEMPLATE) $(MAKEFILE_DEP) | $(DST_DIR)
|
$(DIST_COMPAT_MANIFEST): $(COMPAT_MANIFEST_TEMPLATE) $(MAKEFILE_DEP) | $(DST_DIR)
|
||||||
sed -r 's|##BUILD_NAME##|$(BUILD_NAME)|' $< > $@
|
sed -r 's|##BUILD_NAME##|$(BUILD_NAME)|' $< > $@
|
||||||
|
|
||||||
$(DIST_GECKO_DIR):
|
$(SRC)/contrib/$(GECKO64_TARBALL):
|
||||||
mkdir -p $@
|
mkdir -p $(dir $@)
|
||||||
|
wget -O $@ $(GECKO64_TARBALL_URL)
|
||||||
|
|
||||||
$(DIST_GECKO64): | $(DIST_GECKO_DIR)
|
$(SRC)/contrib/$(GECKO32_TARBALL):
|
||||||
if [ -e "$(SHARED_GECKO64_TARBALL)" ]; then \
|
mkdir -p $(dir $@)
|
||||||
tar -xf "$(SHARED_GECKO64_TARBALL)" -C "$(dir $@)"; \
|
wget -O $@ $(GECKO32_TARBALL_URL)
|
||||||
else \
|
|
||||||
mkdir -p $(SRCDIR)/contrib/; \
|
|
||||||
if [ ! -e "$(SRCDIR)/contrib/$(GECKO64_TARBALL)" ]; then \
|
|
||||||
echo ">>>> Downloading wine-gecko. To avoid this in future, put it here: $(SRCDIR)/../gecko/$(GECKO64_TARBALL)"; \
|
|
||||||
wget -O "$(SRCDIR)/contrib/$(GECKO64_TARBALL)" "$(GECKO64_TARBALL_URL)"; \
|
|
||||||
fi; \
|
|
||||||
tar -xf "$(SRCDIR)/contrib/$(GECKO64_TARBALL)" -C "$(dir $@)"; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
$(DIST_GECKO32): | $(DIST_GECKO_DIR)
|
$(SRC)/contrib/$(WINEMONO_TARBALL):
|
||||||
if [ -e "$(SHARED_GECKO32_TARBALL)" ]; then \
|
mkdir -p $(dir $@)
|
||||||
tar -xf "$(SHARED_GECKO32_TARBALL)" -C "$(dir $@)"; \
|
wget -O $@ $(MONO_TARBALL_URL)
|
||||||
else \
|
|
||||||
mkdir -p $(SRCDIR)/contrib/; \
|
|
||||||
if [ ! -e "$(SRCDIR)/contrib/$(GECKO32_TARBALL)" ]; then \
|
|
||||||
echo ">>>> Downloading wine-gecko. To avoid this in future, put it here: $(SRCDIR)/../gecko/$(GECKO32_TARBALL)"; \
|
|
||||||
wget -O "$(SRCDIR)/contrib/$(GECKO32_TARBALL)" "$(GECKO32_TARBALL_URL)"; \
|
|
||||||
fi; \
|
|
||||||
tar -xf "$(SRCDIR)/contrib/$(GECKO32_TARBALL)" -C "$(dir $@)"; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
$(DIST_WINEMONO_DIR):
|
$(OBJ)/.gecko-dist32: $(SRC)/contrib/$(GECKO32_TARBALL)
|
||||||
mkdir -p $@
|
mkdir -p $(DIST_GECKO_DIR)
|
||||||
|
rm -rf $(DIST_GECKO_DIR)/wine-gecko-$(GECKO_VER)-x86
|
||||||
|
tar -xf $< -C $(DIST_GECKO_DIR)
|
||||||
|
touch $@
|
||||||
|
|
||||||
$(DIST_WINEMONO): | $(DIST_WINEMONO_DIR)
|
$(OBJ)/.gecko-dist64: $(SRC)/contrib/$(GECKO64_TARBALL)
|
||||||
if [ -e "$(SHARED_MONO_TARBALL)" ]; then \
|
mkdir -p $(DIST_GECKO_DIR)
|
||||||
tar -xf "$(SHARED_MONO_TARBALL)" -C "$(dir $@)"; \
|
rm -rf $(DIST_GECKO_DIR)/wine-gecko-$(GECKO_VER)-x86_64
|
||||||
else \
|
tar -xf $< -C $(DIST_GECKO_DIR)
|
||||||
mkdir -p $(SRCDIR)/contrib/; \
|
touch $@
|
||||||
if [ ! -e "$(SRCDIR)/contrib/$(WINEMONO_TARBALL)" ]; then \
|
|
||||||
echo ">>>> Downloading wine-mono. To avoid this in future, put it here: $(SRCDIR)/../mono/$(WINEMONO_TARBALL)"; \
|
$(OBJ)/.wine-mono-dist: $(SRC)/contrib/$(WINEMONO_TARBALL)
|
||||||
wget -O "$(SRCDIR)/contrib/$(WINEMONO_TARBALL)" "$(MONO_TARBALL_URL)"; \
|
mkdir -p $(DIST_WINEMONO_DIR)
|
||||||
fi; \
|
rm -rf $(DIST_WINEMONO_DIR)/wine-mono-$(WINEMONO_VER)
|
||||||
tar -xf "$(SRCDIR)/contrib/$(WINEMONO_TARBALL)" -C "$(dir $@)"; \
|
tar -xf $< -C $(DIST_WINEMONO_DIR)
|
||||||
fi
|
touch $@
|
||||||
|
|
||||||
$(DIST_FONTS): fonts
|
$(DIST_FONTS): fonts
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
Loading…
Reference in a new issue