mirror of
https://github.com/Droid-Deck/DroidDeck-Proton.git
synced 2026-11-07 10:46:12 -10:00
build: tag dxvk, d7vk and vkd3d-proton versions built from patched trees
Append "-GE-Proton(dirty)" to the version string of DXVK, D7VK and vkd3d-proton whenever their tree has local changes, i.e. carries our patches. It shows up in their logs (DXVK/D7VK info line, HUD) so their developers can tell from a bug report that the build isn't upstream. DXVK and D7VK used describe --dirty=0, which only appended an easily missed '0'. For vkd3d-proton the tag goes before the existing '+', which its dirty-tree check reads; vkd3d_build stays a plain hex value. A small vkd3d-proton patch also prints the version string on its INFO build line for dirty builds, since it otherwise only shows the hash. Detection uses git status --porcelain, so patches that only add files count too. Clean trees keep their plain upstream version. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
58ce172b53
commit
739b9ff609
2 files changed
+28
-3
No files matched your search
+9
-3
@@ -776,13 +776,19 @@ DXVK_x86_64_MESON_ARGS = --bindir=$(DXVK_x86_64_DST)/lib/wine/dxvk/x86_64-window
|
||||
DXVK_arm64ec_MESON_ARGS = --bindir=$(DXVK_arm64ec_DST)/lib/wine/dxvk/aarch64-windows
|
||||
DXVK_HOST_DEPENDS = glslang
|
||||
|
||||
# Tag the version string of a component built from a modified tree (GE
|
||||
# patches, or anything else uncommitted), so its developers can tell from a
|
||||
# bug report that the build is not their upstream code.
|
||||
GE_DIRTY_TAG := -GE-Proton(dirty)
|
||||
ge-dirty-tag = $(if $(shell git -C $(1) status --porcelain 2>/dev/null),$(GE_DIRTY_TAG))
|
||||
|
||||
$(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk))
|
||||
$(eval $(call rules-meson,dxvk,i386,windows))
|
||||
$(eval $(call rules-meson,dxvk,x86_64,windows))
|
||||
$(eval $(call rules-meson,dxvk,arm64ec,windows))
|
||||
|
||||
$(OBJ)/.dxvk-post-source:
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/dxvk describe --always --abbrev=15 --dirty=0 || echo deadbeef)#' \
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/dxvk describe --always --abbrev=15 || echo deadbeef)$(call ge-dirty-tag,$(SRCDIR)/dxvk)#' \
|
||||
$(SRCDIR)/dxvk/version.h.in > $(DXVK_SRC)/version.h.in
|
||||
mkdir -p $(DST_LIBDIR)/wine/dxvk
|
||||
rm -rf $(DST_LIBDIR)/wine/dxvk/version
|
||||
@@ -810,7 +816,7 @@ $(eval $(call rules-source,d7vk,$(SRCDIR)/d7vk))
|
||||
$(eval $(call rules-meson,d7vk,i386,windows))
|
||||
|
||||
$(OBJ)/.d7vk-post-source:
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/d7vk describe --always --abbrev=15 --dirty=0 || echo deadbeef)#' \
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/d7vk describe --always --abbrev=15 || echo deadbeef)$(call ge-dirty-tag,$(SRCDIR)/d7vk)#' \
|
||||
$(SRCDIR)/d7vk/version.h.in > $(D7VK_SRC)/version.h.in
|
||||
mkdir -p $(DST_LIBDIR)/wine/d7vk
|
||||
rm -rf $(DST_LIBDIR)/wine/d7vk/version
|
||||
@@ -957,7 +963,7 @@ $(eval $(call rules-meson,vkd3d-proton,arm64ec,windows))
|
||||
$(OBJ)/.vkd3d-proton-post-source:
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/vkd3d-proton describe --always --exclude=* --abbrev=15 --dirty=0 || echo deadbeef)#' \
|
||||
$(SRCDIR)/vkd3d-proton/vkd3d_build.h.in > $(VKD3D_PROTON_SRC)/vkd3d_build.h.in
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/vkd3d-proton describe --always --tags --dirty=+ || echo deadbeef)#' \
|
||||
sed -re 's#@VCS_TAG@#$(shell git -C $(SRCDIR)/vkd3d-proton describe --always --tags || echo deadbeef)$(if $(call ge-dirty-tag,$(SRCDIR)/vkd3d-proton),$(GE_DIRTY_TAG)+)#' \
|
||||
$(SRCDIR)/vkd3d-proton/vkd3d_version.h.in > $(VKD3D_PROTON_SRC)/vkd3d_version.h.in
|
||||
mkdir -p $(DST_LIBDIR)/wine/vkd3d-proton
|
||||
rm -rf $(DST_LIBDIR)/wine/vkd3d-proton/version
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From: GloriousEggroll <[email protected]>
|
||||
Subject: [PATCH] vkd3d: Print the version string of dirty-tree builds.
|
||||
|
||||
The INFO build line only shows the build hash, so a modified build looks
|
||||
like upstream apart from the '+'. Also print vkd3d_version, which GE-Proton
|
||||
tags with "-GE-Proton(dirty)" when the tree carries patches, so bug reports
|
||||
show that the build is not upstream vkd3d-proton.
|
||||
---
|
||||
--- a/libs/vkd3d/device.c
|
||||
+++ b/libs/vkd3d/device.c
|
||||
@@ -696,7 +696,7 @@
|
||||
/* Builds from dirty trees generate vkd3d_version ending with a '+'. */
|
||||
dirty_tree_build = sizeof(vkd3d_version) >= 2 && vkd3d_version[sizeof(vkd3d_version) - 2] == '+';
|
||||
if (dirty_tree_build)
|
||||
- INFO("vkd3d-proton - build: %015"PRIx64"+.\n", vkd3d_build >> 4);
|
||||
+ INFO("vkd3d-proton - build: %015"PRIx64"+ (%s).\n", vkd3d_build >> 4, vkd3d_version);
|
||||
else
|
||||
INFO("vkd3d-proton - build: %015"PRIx64".\n", vkd3d_build);
|
||||
|
||||
Reference in new issue
Block a user