diff --git a/patches/proton/0003-partially-revert-partially-revert.patch b/patches/proton/0003-partially-revert-partially-revert.patch new file mode 100644 index 0000000..54a049b --- /dev/null +++ b/patches/proton/0003-partially-revert-partially-revert.patch @@ -0,0 +1,116 @@ +diff --git a/Makefile.in b/Makefile.in +index 44d0447e..c215d823 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -85,7 +85,7 @@ all: all-dist | $(DST_DIR) + all-dist: | $(DST_DIR) + dist: all + +-J = $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))) ++J = $(patsubst -j%,%,$(SUBJOBS)) + + include $(SRC)/make/utility.mk + include $(SRC)/make/rules-source.mk +diff --git a/make/rules-autoconf.mk b/make/rules-autoconf.mk +index 878640d2..614b579f 100644 +--- a/make/rules-autoconf.mk ++++ b/make/rules-autoconf.mk +@@ -29,9 +29,9 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/configure + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + +cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(BEAR) $$(MAKE) ++ $$(BEAR) $$(MAKE) -j$$(SUBJOBS) + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) install ++ $$(MAKE) -j$$(SUBJOBS) install + touch $$@ + endef + +diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk +index d80ff9ed..e9434078 100644 +--- a/make/rules-cargo.mk ++++ b/make/rules-cargo.mk +@@ -14,7 +14,7 @@ $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \ + cargo build \ +- $$(filter -j%,$$(MAKEFLAGS)) \ ++ -j$$(SUBJOBS) \ + --target "$$(CARGO_TARGET_$(3))" \ + --target-dir $$($(2)_OBJ$(3)) \ + $$(CARGO_BUILD_ARGS) \ +diff --git a/make/rules-cmake.mk b/make/rules-cmake.mk +index 520d88ac..ab898810 100644 +--- a/make/rules-cmake.mk ++++ b/make/rules-cmake.mk +@@ -28,9 +28,9 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/CMakeLists.txt + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) ++ $$(MAKE) -j$$(SUBJOBS) + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) install ++ $$(MAKE) -j$$(SUBJOBS) install + touch $$@ + endef + +diff --git a/make/rules-configure.mk b/make/rules-configure.mk +index a2205c1..be2abd1 100644 +--- a/make/rules-configure.mk ++++ b/make/rules-configure.mk +@@ -25,9 +25,9 @@ $$(OBJ)/.$(1)-configure$(3): + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + +cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(BEAR) $$(MAKE) ++ $$(BEAR) $$(MAKE) -j$$(SUBJOBS) + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) install ++ $$(MAKE) -j$$(SUBJOBS) install + touch $$@ + endef + +diff --git a/make/rules-makedep.mk b/make/rules-makedep.mk +index 140cb8ea..686c8c1c 100644 +--- a/make/rules-makedep.mk ++++ b/make/rules-makedep.mk +@@ -45,9 +45,9 @@ $$(OBJ)/.$(1)-configure$(3): + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + +cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(BEAR) $$(MAKE) ++ $$(BEAR) $$(MAKE) -j$$(SUBJOBS) + cd "$$($(2)_OBJ$(3))" && env $$($(2)_ENV$(3)) \ +- $$(MAKE) install ++ $$(MAKE) -j$$(SUBJOBS) install + touch $$@ + endef + +diff --git a/make/rules-meson.mk b/make/rules-meson.mk +index 985f2085..f4f32d94 100644 +--- a/make/rules-meson.mk ++++ b/make/rules-meson.mk +@@ -61,7 +61,7 @@ $$(OBJ)/.$(1)-configure$(3): $$($(2)_SRC)/meson.build + $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + +env $$($(2)_ENV$(3)) \ +- ninja -C "$$($(2)_OBJ$(3))" install ++ ninja -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" install + touch $$@ + endef + +diff --git a/make/rules-winemaker.mk b/make/rules-winemaker.mk +index 5c3b59a3..ed6589e0 100644 +--- a/make/rules-winemaker.mk ++++ b/make/rules-winemaker.mk +@@ -28,7 +28,7 @@ $$(OBJ)/.$(1)-build$(3): + @echo ":: building $(3)bit $(1)..." >&2 + rsync -arx "$$($(2)_SRC)/" "$$($(2)_OBJ$(3))/" + env $$($(2)_ENV$(3)) \ +- $$(MAKE) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" ++ $$(MAKE) -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" + cd "$$($(2)_OBJ$(3))" && touch "$(basename $(4)).spec" && env $$($(2)_ENV$(3)) \ + winebuild --$(lastword $(subst ., ,$(4))) --fake-module -E "$(basename $(4)).spec" -o "$(4).fake" + mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3)) diff --git a/patches/proton/0004-yesruntime.patch b/patches/proton/0004-yesruntime.patch deleted file mode 100644 index 25fbaef..0000000 --- a/patches/proton/0004-yesruntime.patch +++ /dev/null @@ -1,427 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index 0adb029f..367b7203 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -54,12 +54,11 @@ else - endif - - CROSSLDFLAGS += -Wl,--file-alignment,4096 --CFLAGS ?= -O2 -march=nocona -mtune=core-avx2 --OPTIMIZE_FLAGS := $(CFLAGS) -mfpmath=sse -+OPTIMIZE_FLAGS := -O2 -march=nocona -mtune=core-avx2 -mfpmath=sse - SANITY_FLAGS := -fwrapv -fno-strict-aliasing - DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-pointer - COMMON_FLAGS = -s $(OPTIMIZE_FLAGS) $(SANITY_FLAGS) -ffile-prefix-map=$(CCACHE_BASEDIR)=. --COMMON_FLAGS32 := -mstackrealign -mno-avx -+COMMON_FLAGS32 := -mstackrealign - COMMON_FLAGS64 := -mcmodel=small - CARGO_BUILD_ARGS += --release - -@@ -73,14 +72,6 @@ else - BEAR := - endif - --ifneq ($(USE_LTO), 1) -- GST_LTO := -- FFMPEG_LTO := --else -- GST_LTO := -Db_lto=true -- FFMPEG_LTO := --enable-lto --endif -- - $(DST_DIR): - mkdir -p $@ - -@@ -94,7 +85,7 @@ all: all-dist | $(DST_DIR) - all-dist: | $(DST_DIR) - dist: all - --J = $(patsubst -j%,%,$(SUBJOBS)) -+J = $(SUBJOBS) - - include $(SRC)/make/utility.mk - include $(SRC)/make/rules-source.mk -@@ -127,7 +118,6 @@ $(eval $(call rules-meson,dav1d,64)) - ## - - GST_ORC_MESON_ARGS := \ -- $(GST_LTO) \ - -Dexamples=disabled \ - -Dtests=disabled \ - -Dbenchmarks=disabled \ -@@ -143,10 +133,7 @@ $(eval $(call rules-meson,gst_orc,64)) - ## - - GSTREAMER_MESON_ARGS := \ -- $(GST_LTO) \ - -Dgst_parse=false \ -- -Dptp-helper-permissions=capabilities \ -- -Ddbghelp=disabled \ - -Dintrospection=disabled \ - -Dgobject-cast-checks=disabled \ - -Dglib-asserts=disabled \ -@@ -170,11 +157,6 @@ $(eval $(call rules-meson,gstreamer,64)) - ## graphene - ## - --GRAPHENE_MESON_ARGS := \ -- -Dtests=false \ -- -Dintrospection=disabled \ -- -Dinstalled_tests=false -- - $(eval $(call rules-source,graphene,$(SRCDIR)/graphene)) - $(eval $(call rules-meson,graphene,32)) - $(eval $(call rules-meson,graphene,64)) -@@ -185,7 +167,6 @@ $(eval $(call rules-meson,graphene,64)) - ## - - GST_BASE_MESON_ARGS := \ -- $(GST_LTO) \ - -Dauto_features=disabled \ - -Dintrospection=disabled \ - -Dgobject-cast-checks=disabled \ -@@ -195,7 +176,6 @@ GST_BASE_MESON_ARGS := \ - -Dexamples=disabled \ - -Dtests=disabled \ - -Ddoc=disabled \ -- -Dtools=disabled \ - -Dadder=enabled \ - -Dapp=enabled \ - -Daudioconvert=enabled \ -@@ -229,7 +209,6 @@ $(eval $(call rules-meson,gst_base,64)) - - GST_GOOD_MESON_ARGS := \ - -Dapetag=enabled \ -- $(GST_LTO) \ - -Dauto_features=disabled \ - -Dgobject-cast-checks=disabled \ - -Dglib-asserts=disabled \ -@@ -269,13 +248,28 @@ $(eval $(call rules-source,gst_good,$(SRCDIR)/gstreamer/subprojects/gst-plugins- - $(eval $(call rules-meson,gst_good,32)) - $(eval $(call rules-meson,gst_good,64)) - -+## -+## gst-plugins-bad -+## -+ -+GST_BAD_MESON_ARGS := \ -+ -Dauto_features=disabled \ -+ -Dvideoparsers=enabled \ -+ -Dhls=enabled \ -+ -Dmpegtsdemux=enabled -+ -+GST_BAD_DEPENDS = gst_orc gstreamer gst_base -+ -+$(eval $(call rules-source,gst_bad,$(SRCDIR)/gstreamer/subprojects/gst-plugins-bad/)) -+$(eval $(call rules-meson,gst_bad,32)) -+$(eval $(call rules-meson,gst_bad,64)) -+ - ## - ## FFmpeg - ## - - FFMPEG_CONFIGURE_ARGS := \ - --enable-shared \ -- $(FFMPEG_LTO) \ - --disable-static \ - --disable-everything \ - --disable-programs \ -@@ -306,9 +300,6 @@ FFMPEG_CONFIGURE_ARGS := \ - --enable-decoder=aac \ - --enable-demuxer=xwma \ - --FFMPEG_CONFIGURE_ARGS64 = --optflags="$(COMMON_FLAGS) $(COMMON_FLAGS64)" --FFMPEG_CONFIGURE_ARGS32 = --optflags="$(COMMON_FLAGS) $(COMMON_FLAGS32)" -- - $(eval $(call rules-source,ffmpeg,$(SRCDIR)/ffmpeg)) - $(eval $(call rules-configure,ffmpeg,32)) - $(eval $(call rules-configure,ffmpeg,64)) -@@ -353,7 +344,6 @@ $(OBJ)/.gst_plugins_rs-post-build32: - ## - - GST_BAD_MESON_ARGS := \ -- $(GST_LTO) \ - -Dauto_features=disabled \ - -Dintrospection=disabled \ - -Dgobject-cast-checks=disabled \ -@@ -457,7 +447,7 @@ GST_BAD_MESON_ARGS := \ - - GST_BAD_DEPENDS = gst_orc gstreamer gst_base - --$(eval $(call rules-source,gst_bad,$(SRCDIR)/gstreamer/subprojects/gst-plugins-bad/)) -+$(eval $(call rules-source,gst_bad,$(SRCDIR)/gstreamer/subprojects/gst-plugins-bad)) - $(eval $(call rules-meson,gst_bad,32)) - $(eval $(call rules-meson,gst_bad,64)) - -@@ -466,7 +456,6 @@ $(eval $(call rules-meson,gst_bad,64)) - ## - - GST_UGLY_MESON_ARGS := \ -- $(GST_LTO) \ - -Dauto_features=disabled \ - -Dgobject-cast-checks=disabled \ - -Dglib-asserts=disabled \ -@@ -542,7 +531,7 @@ $(eval $(call rules-cmake,openxr,64)) - ## Note 32-bit is not supported by SteamVR, so we don't build it. - ## - --WINEOPENXR_LDFLAGS = -lopenxr_loader -lvulkan -+WINEOPENXR_LDFLAGS = -lopenxr_loader - WINEOPENXR_DEPENDS = wine openxr - - $(eval $(call rules-source,wineopenxr,$(SRCDIR)/wineopenxr)) -@@ -610,11 +599,7 @@ WINE_SOURCE_ARGS = \ - --exclude server/trace.c \ - - WINE_CONFIGURE_ARGS = \ -- --with-x \ -- --with-wayland \ -- --with-gstreamer \ - --with-mingw \ -- --without-oss \ - --disable-tests - - WINE_CONFIGURE_ARGS32 = \ -@@ -679,14 +664,10 @@ DXVK_SOURCE_DATE_EPOCH64 := $(shell expr $(BASE_SOURCE_DATE_EPOCH64) - 1) - DXVK_SOURCE_ARGS = \ - --exclude version.h.in \ - --DXVK_MESON_ARGS = --force-fallback-for=libdisplay-info - DXVK_MESON_ARGS32 = --bindir=$(DXVK_DST32)/lib/wine/dxvk - DXVK_MESON_ARGS64 = --bindir=$(DXVK_DST64)/lib64/wine/dxvk - DXVK_DEPENDS = glslang - --DXVK_CPPFLAGS = -msse -msse2 --DXVK_LDFLAGS = -static -static-libgcc -static-libstdc++ -- - $(eval $(call rules-source,dxvk,$(SRCDIR)/dxvk)) - $(eval $(call rules-meson,dxvk,32,CROSS)) - $(eval $(call rules-meson,dxvk,64,CROSS)) -@@ -714,9 +695,6 @@ $(OBJ)/.dxvk-post-build32: - DXVK_NVAPI_MESON_ARGS32 = --bindir=$(DXVK_NVAPI_DST32)/lib/wine/nvapi - DXVK_NVAPI_MESON_ARGS64 = --bindir=$(DXVK_NVAPI_DST64)/lib64/wine/nvapi - --DXVK_NVAPI_CPPFLAGS = -msse -msse2 --DXVK_NVAPI_LDFLAGS = -static -static-libgcc -static-libstdc++ -- - $(eval $(call rules-source,dxvk-nvapi,$(SRCDIR)/dxvk-nvapi)) - $(eval $(call rules-meson,dxvk-nvapi,32,CROSS)) - $(eval $(call rules-meson,dxvk-nvapi,64,CROSS)) -@@ -799,9 +777,6 @@ ifneq ($(UNSTRIPPED_BUILD),) - VKD3D_PROTON_MESON_ARGS = -Denable_trace=true - endif - --VKD3D_PROTON_CPPFLAGS = -msse -msse2 --VKD3D_PROTON_LDFLAGS = -static -static-libgcc -static-libstdc++ -- - $(eval $(call rules-source,vkd3d-proton,$(SRCDIR)/vkd3d-proton)) - $(eval $(call rules-meson,vkd3d-proton,32,CROSS)) - $(eval $(call rules-meson,vkd3d-proton,64,CROSS)) -@@ -1072,14 +1047,14 @@ $(FONTS_OBJ)/source-han/%.ttf: $$(%.ttf_CIDFONT) $$(%.ttf_FEATURES) $$(%.ttf_SEQ - mkdir -p $(FONTS_OBJ)/source-han - # Do not immediately create the target file, so that make is interrupted - # it will restart again -- makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \ -+ afdko makeotfexe -f $($(notdir $@)_CIDFONT) -omitMacNames -ff $($(notdir $@)_FEATURES) \ - -lic ADOBE -mf $($(notdir $@)_MENUNAMEDB) -r -nS -cs 25 -ch $($(notdir $@)_UNISOURCE) \ - -ci $($(notdir $@)_SEQUENCES) -o $@.tmp -- tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff -+ afdko tx -cff +S -no_futile $($(notdir $@)_CIDFONT) $@.cff - # sftnedit uses a hardcoded temporary file in the local directory, so we have - # to run it in a dedicated temporary directory to prevent concurrent instances - # to step onto each other's feet -- (TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR) -+ (TEMP_DIR=`mktemp -d` && cd $$TEMP_DIR && afdko sfntedit -a CFF=$(abspath $($(notdir $@)).cff) $(abspath $@.tmp) && rm -fr $$TEMP_DIR) - mv $@.tmp $@ - - $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH) -@@ -1089,12 +1064,12 @@ $(FONTS_OBJ)/ume-gothic/%.ttf: $$(%.ttf_FONT) $$(%.ttf_NAMETABLE_PATCH) - ttx -o $@ -m $($(notdir $@)_FONT) $(FONTS_OBJ)/ume-gothic/$(notdir $(basename $($(notdir $@)_NAMETABLE_PATCH))).ttx - - $(simsun.ttc): $(simsun.ttf) $(nsimsun.ttf) -- otf2otc -o $@.tmp $^ -- otf2ttf -o $@ $@.tmp -+ afdko otf2otc -o $@.tmp $^ -+ afdko otf2ttf -o $@ $@.tmp - rm $@.tmp - - $(msgothic.ttc): $(msgothic.ttf) $(mspgothic.ttf) $(msuigothic.ttf) -- otf2otc -o $@ $^ -+ afdko otf2otc -o $@ $^ - - $(micross.ttf): $(FONTS)/scripts/merge.py $(noto_sans.ttf) $(noto_sans_arabic.ttf) $(noto_sans_armenian.ttf) $(noto_sans_bengali.ttf) $(noto_sans_coptic.ttf) \ - $(noto_sans_georgian.ttf) $(noto_sans_gujarati.ttf) $(noto_sans_hebrew.ttf) $(noto_sans_khmer.ttf) $(noto_sans_tamil.ttf) \ -@@ -1243,8 +1218,8 @@ all-dist: $(DIST_OVR32) $(DIST_OVR64) - ## - - default_pfx: wine gst_good gst_bad gst_libav gst_plugins_rs lsteamclient steamexe vrclient wineopenxr dxvk dxvk-nvapi vkd3d-proton -- find $(DST_LIBDIR32)/wine -type f -execdir chmod go-w '{}' '+' -- find $(DST_LIBDIR64)/wine -type f -execdir chmod go-w '{}' '+' -+ find $(DST_LIBDIR32)/wine -type f -execdir chmod a-w '{}' '+' -+ find $(DST_LIBDIR64)/wine -type f -execdir chmod a-w '{}' '+' - rm -rf $(abspath $(DIST_PREFIX)) - python3 $(SRCDIR)/default_pfx.py $(abspath $(DIST_PREFIX)) $(abspath $(DST_DIR)) - -@@ -1376,6 +1351,7 @@ ifeq ($(ENABLE_CCACHE),1) - export CCACHE_DIR := $(if $(CCACHE_DIR),$(CCACHE_DIR),$(HOME)/.ccache) - override DOCKER_OPTS := -v $(CCACHE_DIR):$(CCACHE_DIR)$(CONTAINER_MOUNT_OPTS) $(CCACHE_ENV) -e CCACHE_DIR=$(CCACHE_DIR) $(DOCKER_OPTS) - else -+ export CCACHE_DISABLE := 1 - override DOCKER_OPTS := $(CCACHE_ENV) -e CCACHE_DISABLE=1 $(DOCKER_OPTS) - endif - -@@ -1390,6 +1366,9 @@ ifeq ($(CONTAINER_ENGINE),) - CONTAINER_ENGINE := docker - endif - -+DOCKER_BASE = $(CONTAINER_ENGINE) run --rm -v $(SRC):$(SRC)$(CONTAINER_MOUNT_OPTS) -v $(OBJ):$(OBJ)$(CONTAINER_MOUNT_OPTS) \ -+ -w $(OBJ) -e MAKEFLAGS \ -+ $(DOCKER_OPTS) $(STEAMRT_IMAGE) - - .PHONY: dist deploy redist symstore-tarball - .DEFAULT dist deploy redist symstore-tarball: ---- b/compatibilitytool.vdf.template -+++ a/compatibilitytool.vdf.template -@@ -14,7 +14,7 @@ - "install_path" "." - - // For this template, we're going to substitute the display_name key in here, e.g.: -+ "display_name" "##BUILD_NAME##" -- "display_name" "##BUILD_NAME## (native package)" - - "from_oslist" "windows" - "to_oslist" "linux" ---- b/configure.sh -+++ a/configure.sh -@@ -128,7 +128,6 @@ - CONTAINER_MOUNT_OPTS=:Z - fi - -- if [ "$arg_container_engine" != "none" ]; then - if [[ -n "$arg_container_engine" ]]; then - check_container_engine "$arg_container_engine" "$steamrt_image" || die "Specified container engine \"$arg_container_engine\" doesn't work" - else -@@ -141,7 +140,6 @@ - die "${arg_container_engine:-Container engine discovery} has failed. Please fix your setup." - fi - fi -- fi - - stat "Using $arg_container_engine." - ---- b/make/rules-cargo.mk -+++ a/make/rules-cargo.mk -@@ -13,10 +13,8 @@ - $$(OBJ)/.$(1)-build$(3): - @echo ":: building $(3)bit $(1)..." >&2 - cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \ -- cargo update --locked --offline --verbose --workspace -- cd $$($(2)_SRC) && env $$($(2)_ENV$(3)) \ - cargo build \ -+ -j$$(SUBJOBS) \ -- -j$$(SUBJOBS) --locked --offline --verbose \ - --target "$$(CARGO_TARGET_$(3))" \ - --target-dir $$($(2)_OBJ$(3)) \ - $$(CARGO_BUILD_ARGS) \ ---- b/make/rules-common.mk -+++ a/make/rules-common.mk -@@ -115,11 +115,7 @@ - - - $(2)_ENV$(3) = \ -- WINEDEBUG="-all" \ -- WINEPREFIX="$$(OBJ)/pfx-wine$(3)" \ -- WINEDLLOVERRIDES="winemenubuilder=d;" \ - CARGO_TARGET_$$(call toupper,$$(CARGO_TARGET_$(3)))_LINKER="$$(TARGET_$(4)$(3))-gcc" \ -- CARGO_TARGET_$$(call toupper,$$(CARGO_TARGET_$(3)))_RUSTFLAGS="$$(RUSTFLAGS)" \ - CCACHE_BASEDIR="$$(CCACHE_BASEDIR)" \ - STRIP="$$(STRIP)" \ - AR="$$(TARGET_$(4)$(3))-ar" \ -@@ -133,7 +129,7 @@ - PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_BINDIR$(3))),,:):$$$$PATH" \ - LD_LIBRARY_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))),,:)$$$$LD_LIBRARY_PATH" \ - PKG_CONFIG_PATH="$$(call list-join,:,$$(foreach d,$$($(2)_DEPS$(3)),$$($$(d)_LIBDIR$(3))/pkgconfig))" \ -+ PKG_CONFIG_LIBDIR="/usr/lib/$$(PKG_CONFIG_TARGET_$(4)$(3))/pkgconfig:/usr/share/pkgconfig" \ -- PKG_CONFIG_LIBDIR="/usr/lib$(3)/pkgconfig:/usr/share/pkgconfig" \ - CFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ - CPPFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CPPFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ - CXXFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CXXFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3)) -std=c++17" \ -@@ -158,7 +154,7 @@ - CROSSCPPFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CPPFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3))" \ - CROSSCXXFLAGS="$$($(2)_INCFLAGS$(3)) $$($(2)_CXXFLAGS) $$(COMMON_FLAGS) $$(COMMON_FLAGS$(3)) -std=c++17" \ - CROSSLDFLAGS="$$($(2)_LIBFLAGS$(3)) $$($(2)_LDFLAGS$(3)) $$($(2)_LDFLAGS) $$(CROSSLDFLAGS)" \ -+ CROSSPKG_CONFIG_LIBDIR="/usr/lib/$$(PKG_CONFIG_TARGET_CROSS$(3))/pkgconfig:/usr/share/pkgconfig" \ -- CROSSPKG_CONFIG_LIBDIR="/usr/lib$(3)/pkgconfig:/usr/share/pkgconfig" \ - - endif - -@@ -171,14 +167,14 @@ - install-strip = objcopy -p --file-alignment=4096 --strip-debug $(1) $(2)/$(notdir $(1)) && rm -f $(2)/$(notdir $(1)).debug - endif - -+TARGET_32 := i686-linux-gnu -+TARGET_64 := x86_64-linux-gnu --TARGET_32 := i686-pc-linux-gnu --TARGET_64 := x86_64-pc-linux-gnu - TARGET_CROSS32 := i686-w64-mingw32 - TARGET_CROSS64 := x86_64-w64-mingw32 - -+PKG_CONFIG_TARGET_32 := i386-linux-gnu -+PKG_CONFIG_TARGET_64 := x86_64-linux-gnu -+PKG_CONFIG_TARGET_CROSS32 := i386-w64-mingw32 --PKG_CONFIG_TARGET_32 := i686-pc-linux-gnu --PKG_CONFIG_TARGET_64 := x86_64-pc-linux-gnu --PKG_CONFIG_TARGET_CROSS32 := i686-w64-mingw32 - PKG_CONFIG_TARGET_CROSS64 := x86_64-w64-mingw32 - - LIBDIR_WINE_32 := wine/i386-unix ---- b/make/rules-meson.mk -+++ a/make/rules-meson.mk -@@ -48,7 +48,6 @@ - - env $$($(2)_ENV$(3)) \ - meson "$$($(2)_OBJ$(3))" "$$($(2)_SRC)" \ -- --wrap-mode=nodownload \ - --prefix="$$($(2)_DST$(3))" \ - --libdir="lib$(subst 32,,$(3))" \ - --buildtype=plain \ -@@ -62,7 +61,7 @@ - $$(OBJ)/.$(1)-build$(3): - @echo ":: building $(3)bit $(1)..." >&2 - +env $$($(2)_ENV$(3)) \ -+ ninja -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" install -- ninja -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" install $(-v?) - touch $$@ - endef - ---- b/make/rules-winemaker.mk -+++ a/make/rules-winemaker.mk -@@ -28,7 +28,7 @@ - @echo ":: building $(3)bit $(1)..." >&2 - rsync -arx "$$($(2)_SRC)/" "$$($(2)_OBJ$(3))/" - env $$($(2)_ENV$(3)) \ -+ $$(MAKE) -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" -- $$(MAKE) -j$$(SUBJOBS) -C "$$($(2)_OBJ$(3))" LIBRARIES="$$($(2)_LDFLAGS)" - cd "$$($(2)_OBJ$(3))" && touch "$(basename $(4)).spec" && env $$($(2)_ENV$(3)) \ - winebuild --$(lastword $(subst ., ,$(4))) --fake-module -E "$(basename $(4)).spec" -o "$(4).fake" - mkdir -p $$($(2)_LIBDIR$(3))/$(LIBDIR_WINE_$(3)) ---- b/proton -+++ a/proton -@@ -422,6 +422,7 @@ - self.wine_bin = self.bin_dir + "wine" - self.wine64_bin = self.bin_dir + "wine64" - self.wineserver_bin = self.bin_dir + "wineserver" -+ self.dist_lock = FileLock(self.path("dist.lock"), timeout=-1) - - def path(self, d): - return self.base_dir + d -#--- b/toolmanifest_runtime.vdf -#+++ a/toolmanifest_runtime.vdf -#@@ -2,4 +2,7 @@ -# { -# "version" "2" -# "commandline" "/proton %verb%" -#+ "require_tool_appid" "1628350" -#+ "use_sessions" "1" -#+ "compatmanager_layer_name" "proton" -# } diff --git a/patches/proton/0007-proton-nomingwcopy-vkd3d.patch b/patches/proton/0007-proton-nomingwcopy-vkd3d.patch deleted file mode 100644 index f0e5de3..0000000 --- a/patches/proton/0007-proton-nomingwcopy-vkd3d.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/proton b/proton -index 67e4808..e6e4a08 ---- a/proton -+++ b/proton -@@ -933,15 +933,15 @@ class CompatData: - prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) - try_copy(g_proton.lib_dir + "vkd3d/libvkd3d-shader-1.dll", "drive_c/windows/syswow64", - prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -- #copy mingw DLL dependencies for libvkd3d -- try_copy(g_proton.lib64_dir + "vkd3d/libgcc_s_seh-1.dll", "drive_c/windows/system32", -- prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -- try_copy(g_proton.lib_dir + "vkd3d/libgcc_s_dw2-1.dll", "drive_c/windows/syswow64", -- prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -- try_copy(g_proton.lib64_dir + "vkd3d/libwinpthread-1.dll", "drive_c/windows/system32", -- prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -- try_copy(g_proton.lib_dir + "vkd3d/libwinpthread-1.dll", "drive_c/windows/syswow64", -- prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -+ # #copy mingw DLL dependencies for libvkd3d -+ # try_copy(g_proton.lib64_dir + "vkd3d/libgcc_s_seh-1.dll", "drive_c/windows/system32", -+ # prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -+ # try_copy(g_proton.lib_dir + "vkd3d/libgcc_s_dw2-1.dll", "drive_c/windows/syswow64", -+ # prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -+ # try_copy(g_proton.lib64_dir + "vkd3d/libwinpthread-1.dll", "drive_c/windows/system32", -+ # prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) -+ # try_copy(g_proton.lib_dir + "vkd3d/libwinpthread-1.dll", "drive_c/windows/syswow64", -+ # prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) - - if use_wined3d: - dxvkfiles = [] diff --git a/patches/wine/0005-osu/0001-win32u-Check-for-driver-events-more-often.patch b/patches/wine/0005-osu/0001-win32u-Check-for-driver-events-more-often.patch deleted file mode 100644 index de3307d..0000000 --- a/patches/wine/0005-osu/0001-win32u-Check-for-driver-events-more-often.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 074d1def1d497d071f2e4bfdd0837b0cde494357 Mon Sep 17 00:00:00 2001 -From: William Horvath -Date: Thu, 12 Dec 2024 03:37:59 -0800 -Subject: [PATCH] win32u: Check for driver events more often. - -Use a QPC wrapper to avoid NtGetTickCount, which is coupled to -the 16 millisecond user_shared_data_timeout in server/fd.c. This -lowers the throttling period to 0.25ms (8khz), which is quick -enough to consume driver events from high polling rate devices. - -Fixes: 54ca1ab607d3ff22a1f57a9561430f64c75f0916 -Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57442 - -(cherry picked from commit b5a4c2f64ad07b0aaeddc2d8245bc79ddb33b1f5) ---- - dlls/win32u/message.c | 16 ++++++++++++---- - dlls/win32u/ntuser_private.h | 2 +- - 2 files changed, 13 insertions(+), 5 deletions(-) - -diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c -index aec44a03e65..dbfbe157a97 100644 ---- a/dlls/win32u/message.c -+++ b/dlls/win32u/message.c -@@ -3159,6 +3159,14 @@ static HANDLE get_server_queue_handle(void) - return ret; - } - -+/* monotonic timer tick for throttling driver event checks */ -+static inline LONGLONG get_driver_check_time(void) -+{ -+ LARGE_INTEGER counter, freq; -+ NtQueryPerformanceCounter( &counter, &freq ); -+ return counter.QuadPart * 8000 / freq.QuadPart; /* 8kHz */ -+} -+ - /* check for driver events if we detect that the app is not properly consuming messages */ - static inline void check_for_driver_events( UINT msg ) - { -@@ -3358,7 +3366,7 @@ BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, U - int ret; - - user_check_not_lock(); -- if (thread_info->last_driver_time != NtGetTickCount()) -+ if (thread_info->last_driver_time != get_driver_check_time()) - check_for_driver_events( 0 ); - - ret = peek_message( &msg, hwnd, first, last, flags, 0, FALSE ); -@@ -3366,8 +3374,8 @@ BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, U - - if (!ret) - { -- if (thread_info->last_driver_time == NtGetTickCount()) return FALSE; -- thread_info->last_driver_time = NtGetTickCount(); -+ if (thread_info->last_driver_time == get_driver_check_time()) return FALSE; -+ thread_info->last_driver_time = get_driver_check_time(); - flush_window_surfaces( TRUE ); - ret = wait_message( 0, NULL, 0, QS_ALLINPUT, 0 ); - /* if we received driver events, check again for a pending message */ -@@ -3375,7 +3383,7 @@ BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, U - } - - check_for_driver_events( msg.message ); -- thread_info->last_driver_time = NtGetTickCount() - 1; -+ thread_info->last_driver_time = get_driver_check_time() - 1; - - /* copy back our internal safe copy of message data to msg_out. - * msg_out is a variable from the *program*, so it can't be used -diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h -index 4221c25d65f..4d24c7dd9ef 100644 ---- a/dlls/win32u/ntuser_private.h -+++ b/dlls/win32u/ntuser_private.h -@@ -131,7 +131,7 @@ struct user_thread_info - HANDLE server_queue; /* Handle to server-side queue */ - DWORD wake_mask; /* Current queue wake mask */ - DWORD changed_mask; /* Current queue changed mask */ -- DWORD last_driver_time; /* Get/PeekMessage driver event time */ -+ LONGLONG last_driver_time; /* Get/PeekMessage driver event time */ - DWORD last_getmsg_time; /* Get/PeekMessage last request time */ - WORD message_count; /* Get/PeekMessage loop counter */ - WORD hook_call_depth; /* Number of recursively called hook procs */ --- -2.47.1 - diff --git a/patches/wine/0005-osu/HACK-ntdll-Unconditionally-save-restore-x87-FPU-cont.patch b/patches/wine/0005-osu/HACK-ntdll-Unconditionally-save-restore-x87-FPU-cont.patch new file mode 100644 index 0000000..228518e --- /dev/null +++ b/patches/wine/0005-osu/HACK-ntdll-Unconditionally-save-restore-x87-FPU-cont.patch @@ -0,0 +1,56 @@ +From 7bcc5f898f2cbb0bd83c0c3d87569eeb36e49419 Mon Sep 17 00:00:00 2001 +From: William Horvath +Date: Tue, 7 Jan 2025 04:12:20 -0800 +Subject: [PATCH] HACK: ntdll: Unconditionally save/restore x87 FPU control + word in the unix call dispatchers. + +Workaround for thread suspension issue in osu! causing rounding mode to +remain stuck in a bad state after returning from Unix code. +--- + dlls/ntdll/unix/signal_i386.c | 2 ++ + dlls/ntdll/unix/signal_x86_64.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c +index 9f43085cd7d..fa38e5fde9e 100644 +--- a/dlls/ntdll/unix/signal_i386.c ++++ b/dlls/ntdll/unix/signal_i386.c +@@ -2798,6 +2798,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + "leal 0x10(%esp),%edx\n\t" + "movl %edx,0x0c(%ecx)\n\t" /* frame->esp */ + __ASM_CFI_CFA_IS_AT1(ecx, 0x0c) ++ "fnstcw 0x40(%ecx)\n\t" /* save x87 FPU CW */ + "movw %cs,0x10(%ecx)\n\t" + "movw %ss,0x12(%ecx)\n\t" + "movw %ds,0x14(%ecx)\n\t" +@@ -2827,6 +2828,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + __ASM_CFI(".cfi_offset %edi,-20\n\t") + "call *(%eax,%edx,4)\n\t" + "leal 16(%esp),%esp\n\t" ++ "fldcw 0x40(%esp)\n\t" /* restore x87 FPU CW */ + "testw $0xffff,2(%esp)\n\t" /* frame->restore_flags */ + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" + "movl 0x08(%esp),%ecx\n\t" /* frame->eip */ +diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c +index 40a351cc42b..093d1c7c82d 100644 +--- a/dlls/ntdll/unix/signal_x86_64.c ++++ b/dlls/ntdll/unix/signal_x86_64.c +@@ -3207,6 +3207,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + __ASM_CFI_REG_IS_AT2(rip, rcx, 0xf0,0x00) + "movl $0,0xb4(%rcx)\n\t" /* frame->restore_flags */ + __ASM_LOCAL_LABEL("__wine_unix_call_dispatcher_prolog_end") ":\n\t" ++ "fnstcw 0xc0(%rcx)\n\t" /* save x87 FPU CW to FXSAVE */ + "movq %rbx,0x08(%rcx)\n\t" + __ASM_CFI_REG_IS_AT1(rbx, rcx, 0x08) + "movq %rsi,0x20(%rcx)\n\t" +@@ -3266,6 +3267,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, + "movq %r8,%rdi\n\t" /* args */ + "callq *(%r10,%rdx,8)\n\t" + "movq %rsp,%rcx\n\t" ++ "fldcw 0xc0(%rcx)\n\t" /* restore x87 FPU CW from FXSAVE */ + "movdqa 0x1c0(%rcx),%xmm6\n\t" + "movdqa 0x1d0(%rcx),%xmm7\n\t" + "movdqa 0x1e0(%rcx),%xmm8\n\t" +-- +2.47.1 + diff --git a/patches/wine/0007-priority/0001-Revert-server-Check-wineserver-privileges-on-init-wi.patch b/patches/wine/0007-priority/0001-Revert-server-Check-wineserver-privileges-on-init-wi.patch index 17bcc1c..aedb71f 100644 --- a/patches/wine/0007-priority/0001-Revert-server-Check-wineserver-privileges-on-init-wi.patch +++ b/patches/wine/0007-priority/0001-Revert-server-Check-wineserver-privileges-on-init-wi.patch @@ -10,23 +10,24 @@ This reverts commit 10993e6923e6941468ca3c8bfe9307e7a5ef5a50. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/thread.c b/server/thread.c -index 731012d755e..de78603698e 100644 +index 71c00fb..be7301f 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -236,12 +236,7 @@ static int nice_limit; - void init_threading(void) - { +@@ -239,13 +239,8 @@ void init_threading(void) + #ifdef RLIMIT_NICE struct rlimit rlimit; -- + #endif +-#ifdef HAVE_SETPRIORITY - /* if wineserver has cap_sys_nice we are unlimited, but leave -20 to the user */ - if (!setpriority( PRIO_PROCESS, getpid(), -20 )) nice_limit = -19; - setpriority( PRIO_PROCESS, getpid(), 0 ); -- +-#endif + #ifdef RLIMIT_NICE - if (!nice_limit && !getrlimit( RLIMIT_NICE, &rlimit )) + if (!getrlimit( RLIMIT_NICE, &rlimit )) { rlimit.rlim_cur = rlimit.rlim_max; setrlimit( RLIMIT_NICE, &rlimit ); -- -2.47.0 +2.47.1 diff --git a/patches/wine/0007-priority/0002-Revert-server-Use-setpriority-to-update-thread-nicen.patch b/patches/wine/0007-priority/0002-Revert-server-Use-setpriority-to-update-thread-nicen.patch index ff860ef..f973464 100644 --- a/patches/wine/0007-priority/0002-Revert-server-Use-setpriority-to-update-thread-nicen.patch +++ b/patches/wine/0007-priority/0002-Revert-server-Use-setpriority-to-update-thread-nicen.patch @@ -24,7 +24,7 @@ index d0a0a4879b5..d1ab6f10254 100644 main_loop(); return 0; diff --git a/server/object.h b/server/object.h -index 3b405e36db0..ec299dda21e 100644 +index 3b405e3..ec299dd 100644 --- a/server/object.h +++ b/server/object.h @@ -284,10 +284,6 @@ extern struct object *get_directory_obj( struct process *process, obj_handle_t h @@ -39,29 +39,20 @@ index 3b405e36db0..ec299dda21e 100644 extern struct object *create_root_symlink( struct object *root, const struct unicode_str *name, diff --git a/server/thread.c b/server/thread.c -index de78603698e..18dd3d6c7ca 100644 +index be7301f..723e70c 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -37,9 +37,6 @@ - #define _WITH_CPU_SET_T - #include +@@ -233,26 +233,6 @@ static struct list thread_list = LIST_INIT(thread_list); + static int nice_limit; #endif --#ifdef HAVE_SYS_RESOURCE_H --#include --#endif - - #include "ntstatus.h" - #define WIN32_NO_STATUS -@@ -230,45 +227,6 @@ static const struct fd_ops thread_fd_ops = - - static struct list thread_list = LIST_INIT(thread_list); --#if defined(__linux__) && defined(RLIMIT_NICE) --static int nice_limit; -- -void init_threading(void) -{ +-#ifdef __linux__ +-#ifdef RLIMIT_NICE - struct rlimit rlimit; +-#endif +-#ifdef RLIMIT_NICE - if (!getrlimit( RLIMIT_NICE, &rlimit )) - { - rlimit.rlim_cur = rlimit.rlim_max; @@ -70,35 +61,15 @@ index de78603698e..18dd3d6c7ca 100644 - else if (rlimit.rlim_max == -1) nice_limit = -20; - if (nice_limit >= 0 && debug_level) fprintf(stderr, "wine: RLIMIT_NICE is <= 20, unable to use setpriority safely\n"); - } +-#endif - if (nice_limit < 0 && debug_level) fprintf(stderr, "wine: Using setpriority to control niceness in the [%d,%d] range\n", nice_limit, -nice_limit ); --} -- --static void apply_thread_priority( struct thread *thread, int base_priority ) --{ -- int min = -nice_limit, max = nice_limit, range = max - min, niceness; -- /* FIXME: handle realtime priorities using SCHED_RR if possible */ -- if (base_priority > THREAD_BASE_PRIORITY_LOWRT) base_priority = THREAD_BASE_PRIORITY_LOWRT; -- /* map an NT application band [1,15] base priority to [-nice_limit, nice_limit] */ -- niceness = (min + (base_priority - 1) * range / 14); -- setpriority( PRIO_PROCESS, thread->unix_tid, niceness ); --} -- --#else -- --void init_threading(void) --{ --} -- --static void apply_thread_priority( struct thread *thread, int base_priority ) --{ --} -- -#endif +-} - /* initialize the structure for a newly allocated thread */ static inline void init_thread_structure( struct thread *thread ) { -@@ -792,23 +750,13 @@ affinity_t get_thread_affinity( struct thread *thread ) +@@ -776,16 +756,6 @@ affinity_t get_thread_affinity( struct thread *thread ) return mask; } @@ -112,32 +83,44 @@ index de78603698e..18dd3d6c7ca 100644 - return class_offsets[priority_class - 1] + priority; -} - + #ifdef __linux__ + /* maps an NT application band [1,15] base priority to [-nice_limit, nice_limit] */ + static int get_unix_niceness( int base_priority ) +@@ -798,26 +768,6 @@ static int get_unix_niceness( int base_priority ) #define THREAD_PRIORITY_REALTIME_HIGHEST 6 #define THREAD_PRIORITY_REALTIME_LOWEST -7 +-static void apply_thread_priority( struct thread *thread, int priority_class, int priority ) +-{ +- int base_priority = get_base_priority( priority_class, priority ); +-#ifdef __linux__ +- int niceness; +- +- /* FIXME: handle REALTIME class using SCHED_RR if possible, for now map it to highest non-realtime band */ +- if (priority_class == PROCESS_PRIOCLASS_REALTIME) base_priority = 15; +-#ifdef HAVE_SETPRIORITY +- if (nice_limit < 0) +- { +- niceness = get_unix_niceness( base_priority ); +- if (setpriority( PRIO_PROCESS, thread->unix_tid, niceness ) != 0) +- fprintf( stderr, "wine: setpriority %d for pid %d failed: %d\n", niceness, thread->unix_tid, errno ); +- return; +- } +-#endif +-#endif +-} +- int set_thread_priority( struct thread *thread, int priority_class, int priority ) { -- int min = THREAD_PRIORITY_LOWEST, max = THREAD_PRIORITY_HIGHEST, base_priority; -- -+ int max = THREAD_PRIORITY_HIGHEST; -+ int min = THREAD_PRIORITY_LOWEST; - if (priority_class == PROCESS_PRIOCLASS_REALTIME) - { - max = THREAD_PRIORITY_REALTIME_HIGHEST; -@@ -823,13 +771,6 @@ int set_thread_priority( struct thread *thread, int priority_class, int priority - return STATUS_THREAD_IS_TERMINATING; - + int max = THREAD_PRIORITY_HIGHEST; +@@ -840,7 +790,6 @@ int set_thread_priority( struct thread *thread, int priority_class, int priority + return 0; thread->priority = priority; -- -- /* if unix_tid == -1, thread is gone or hasn't started yet, this will be called again from init_thread with a unix_tid */ -- if (thread->unix_tid == -1) -- return STATUS_SUCCESS; -- -- base_priority = get_base_priority( priority_class, priority ); -- apply_thread_priority( thread, base_priority ); - return STATUS_SUCCESS; + +- apply_thread_priority( thread, priority_class, priority ); + return 0; } -- -2.47.0 +2.47.1 diff --git a/patches/wine/0007-priority/0003-Revert-ntdll-Set-RLIMIT_NICE-to-its-hard-limit.patch b/patches/wine/0007-priority/0003-Revert-ntdll-Set-RLIMIT_NICE-to-its-hard-limit.patch deleted file mode 100644 index ec52171..0000000 --- a/patches/wine/0007-priority/0003-Revert-ntdll-Set-RLIMIT_NICE-to-its-hard-limit.patch +++ /dev/null @@ -1,27 +0,0 @@ -From dfca8910ead60fe2e5df677d59b93017b83ab1c3 Mon Sep 17 00:00:00 2001 -From: William Horvath -Date: Fri, 1 Nov 2024 02:36:48 -0700 -Subject: [PATCH 3/8] Revert "ntdll: Set RLIMIT_NICE to its hard limit." - -This reverts commit 78affb7ce23da8069c4e9b6913d1f3e0661d3f71. ---- - dlls/ntdll/unix/loader.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 1e75eff1595..500fd4ed6e6 100644 ---- a/dlls/ntdll/unix/loader.c -+++ b/dlls/ntdll/unix/loader.c -@@ -2525,9 +2525,6 @@ DECLSPEC_EXPORT void __wine_main( int argc, char *argv[], char *envp[] ) - #ifdef RLIMIT_AS - set_max_limit( RLIMIT_AS ); - #endif --#ifdef RLIMIT_NICE -- set_max_limit( RLIMIT_NICE ); --#endif - - virtual_init(); - init_environment(); --- -2.47.0 - diff --git a/patches/wine/0007-priority/0004-Revert-server-Introduce-new-set_thread_priority-help.patch b/patches/wine/0007-priority/0004-Revert-server-Introduce-new-set_thread_priority-help.patch index 7510ff1..96d2ef6 100644 --- a/patches/wine/0007-priority/0004-Revert-server-Introduce-new-set_thread_priority-help.patch +++ b/patches/wine/0007-priority/0004-Revert-server-Introduce-new-set_thread_priority-help.patch @@ -11,10 +11,10 @@ This reverts commit 06c82190c4199dbf8abec00b6d845aa110d2c400. 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/server/thread.c b/server/thread.c -index 18dd3d6c7ca..2231fcf3541 100644 +index 723e70c..9a5c5b9 100644 --- a/server/thread.c +++ b/server/thread.c -@@ -753,35 +753,25 @@ affinity_t get_thread_affinity( struct thread *thread ) +@@ -768,39 +768,25 @@ static int get_unix_niceness( int base_priority ) #define THREAD_PRIORITY_REALTIME_HIGHEST 6 #define THREAD_PRIORITY_REALTIME_LOWEST -7 @@ -30,13 +30,17 @@ index 18dd3d6c7ca..2231fcf3541 100644 - if ((priority < min || priority > max) && - priority != THREAD_PRIORITY_IDLE && - priority != THREAD_PRIORITY_TIME_CRITICAL) -- return STATUS_INVALID_PARAMETER; -- -- if (thread->state == TERMINATED) -- return STATUS_THREAD_IS_TERMINATING; +- { +- errno = EINVAL; +- return -1; +- } - +- if (thread->process->priority == priority_class && +- thread->priority == priority) +- return 0; - thread->priority = priority; -- return STATUS_SUCCESS; +- +- return 0; -} - /* set all information about a thread */ @@ -45,8 +49,8 @@ index 18dd3d6c7ca..2231fcf3541 100644 { if (req->mask & SET_THREAD_INFO_PRIORITY) { -- int status = set_thread_priority( thread, thread->process->priority, req->priority ); -- if (status) set_error( status ); +- if (set_thread_priority( thread, thread->process->priority, req->priority )) +- file_set_error(); + int max = THREAD_PRIORITY_HIGHEST; + int min = THREAD_PRIORITY_LOWEST; + if (thread->process->priority == PROCESS_PRIOCLASS_REALTIME) @@ -63,16 +67,15 @@ index 18dd3d6c7ca..2231fcf3541 100644 } if (req->mask & SET_THREAD_INFO_AFFINITY) { -@@ -1602,8 +1592,6 @@ DECL_HANDLER(init_first_thread) +@@ -1620,7 +1606,6 @@ DECL_HANDLER(init_first_thread) + process->affinity = current->affinity = get_thread_affinity( current ); else + { +- set_thread_priority( current, current->process->priority, current->priority ); set_thread_affinity( current, current->affinity ); + } -- set_thread_priority( current, process->priority, current->priority ); -- - debug_level = max( debug_level, req->debug_level ); - - reply->pid = get_process_id( process ); -@@ -1633,7 +1621,6 @@ DECL_HANDLER(init_thread) +@@ -1653,7 +1638,6 @@ DECL_HANDLER(init_thread) init_thread_context( current ); generate_debug_event( current, DbgCreateThreadStateChange, &req->entry ); @@ -81,7 +84,7 @@ index 18dd3d6c7ca..2231fcf3541 100644 reply->suspend = (current->suspend || current->process->suspend || current->context != NULL); diff --git a/server/thread.h b/server/thread.h -index 416b01db318..baaf332a6d6 100644 +index 416b01d..baaf332 100644 --- a/server/thread.h +++ b/server/thread.h @@ -129,7 +129,6 @@ extern void thread_cancel_apc( struct thread *thread, struct object *owner, enum @@ -93,5 +96,5 @@ index 416b01db318..baaf332a6d6 100644 extern int suspend_thread( struct thread *thread ); extern int resume_thread( struct thread *thread ); -- -2.47.0 +2.47.1 diff --git a/setup.sh b/setup.sh index 04dbb81..2904c0f 100755 --- a/setup.sh +++ b/setup.sh @@ -1,11 +1,11 @@ #!/bin/bash -pkgver=9-12 +pkgver=9-13 buildname="proton-osu" pkgname="${buildname}-${pkgver}" protonurl=https://github.com/CachyOS/proton-cachyos.git -protontag=cachyos-9.0-20241206 +protontag=cachyos-9.0-20250106-slr protonsdk="registry.gitlab.steamos.cloud/proton/sniper/sdk:latest" umu_protonfixesurl=https://github.com/Open-Wine-Components/umu-protonfixes.git diff --git a/umu-static-bundler/build.sh b/umu-static-bundler/build.sh index 0693aa5..d58ed3c 100755 --- a/umu-static-bundler/build.sh +++ b/umu-static-bundler/build.sh @@ -31,7 +31,7 @@ readonly LIBARCHIVE_URL="https://github.com/libarchive/libarchive/releases/downl readonly ZSTD_VERSION="1.5.6" readonly ZSTD_URL="https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.zst" readonly UMU_LAUNCHER_URL="https://github.com/Open-Wine-Components/umu-launcher.git" -readonly UMU_LAUNCHER_VERSION="59a82ea8cd284c7535bc06b8f6156abb7da96f6a" +readonly UMU_LAUNCHER_VERSION="e9cb4d764013d4c8c3d1166f59581da8f56a3d83" parse_args() { local clean_build=false diff --git a/umu-static-bundler/patches/umu/0001-umu_run-Rely-on-an-external-wrapper-to-set-PR_SET_CH.patch b/umu-static-bundler/patches/umu/0001-umu_run-Rely-on-an-external-wrapper-to-set-PR_SET_CH.patch index 99271fd..b7b88c5 100644 --- a/umu-static-bundler/patches/umu/0001-umu_run-Rely-on-an-external-wrapper-to-set-PR_SET_CH.patch +++ b/umu-static-bundler/patches/umu/0001-umu_run-Rely-on-an-external-wrapper-to-set-PR_SET_CH.patch @@ -1,5 +1,5 @@ From eb37b4201f8874a74951f0147c967d38196ffd75 Mon Sep 17 00:00:00 2001 -From: umubuilder +From: William Horvath Date: Thu, 24 Oct 2024 17:40:24 -0700 Subject: [PATCH] umu_run: Rely on an external wrapper to set PR_SET_CHILD_SUBREAPER instead of relying on CDLL. @@ -12,7 +12,7 @@ This allows a fully statically linked umu-launcher to still have this prctl call 3 files changed, 2 insertions(+), 70 deletions(-) diff --git a/umu/umu_run.py b/umu/umu_run.py -index d90c6a8..a74ab8a 100755 +index 6c1eb9f..21d1516 100755 --- a/umu/umu_run.py +++ b/umu/umu_run.py @@ -2,13 +2,11 @@ import os @@ -29,7 +29,7 @@ index d90c6a8..a74ab8a 100755 from errno import ENETUNREACH from zipfile import Path as ZipPath -@@ -50,7 +48,6 @@ from umu.umu_plugins import set_env_toml +@@ -49,7 +47,6 @@ from umu.umu_plugins import set_env_toml from umu.umu_proton import get_umu_proton from umu.umu_runtime import setup_umu from umu.umu_util import ( @@ -37,7 +37,7 @@ index d90c6a8..a74ab8a 100755 get_library_paths, has_umu_setup, is_installed_verb, -@@ -678,12 +675,9 @@ def run_in_steammode(proc: Popen) -> int: +@@ -656,12 +653,9 @@ def run_in_steammode(proc: Popen) -> int: def run_command(command: tuple[Path | str, ...]) -> int: """Run the executable using Proton within the Steam Runtime.""" @@ -50,7 +50,7 @@ index d90c6a8..a74ab8a 100755 is_gamescope_session: bool = ( os.environ.get("XDG_CURRENT_DESKTOP") == "gamescope" or os.environ.get("XDG_SESSION_DESKTOP") == "gamescope" -@@ -705,18 +699,6 @@ def run_command(command: tuple[Path | str, ...]) -> int: +@@ -682,18 +676,6 @@ def run_command(command: tuple[Path | str, ...]) -> int: else: cwd = Path.cwd() @@ -66,9 +66,9 @@ index d90c6a8..a74ab8a 100755 - prctl_ret = prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0, 0) - log.debug("prctl exited with status: %s", prctl_ret) - - with Popen( - command, - start_new_session=True, + with Popen(command, start_new_session=True, cwd=cwd) as proc: + ret = run_in_steammode(proc) if is_steammode else proc.wait() + log.debug("Child %s exited with wait status: %s", proc.pid, ret) diff --git a/umu/umu_test.py b/umu/umu_test.py index e1a5aa5..84e99a7 100644 --- a/umu/umu_test.py