Skip to content

Commit

Permalink
ntsync5: Implement ntsync7 support and revert ntsync5 to v6 version (#…
Browse files Browse the repository at this point in the history
…1345)

* customization.cfg: Add new settings for ntsync5

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

* ntsync5: Revert patches to ntsync5 v6 version

Also add missing patch for ntsync5-staging from ntsync5-staging-protonify

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

* ntsync5: Add new patches for ntsync5 v7 and update script

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

* small fix

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

* wine-tkg-scripts: Support for ntsync7

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

* ntsync5: Some fixes for ntsync5 v6 patches

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>

---------

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>
  • Loading branch information
Artewar67 authored Dec 21, 2024
1 parent 0638ad0 commit 41f7e24
Show file tree
Hide file tree
Showing 11 changed files with 29,489 additions and 3,789 deletions.
1 change: 1 addition & 0 deletions wine-tkg-git/customization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ _use_fastsync="false"
# !! (Arch: see the three packages https://aur.archlinux.org/pkgbase/ntsync for both module and header) !!
# !! Not compatible with _use_esync, _use_fsync or _use_fastsync options !!
# !! Not compatible with Valve trees !!
# Set to ntsync7 when using ntsync5 v7 kernel driver (Available in linux-cachyos 6.12.6)
_use_ntsync="false"

# esync - Enable with WINEESYNC=1 envvar - Set to true to enable esync support on plain wine or wine-staging <4.6 (it got merged in wine-staging 4.6). The option is ignored on wine-staging 4.6+
Expand Down
18 changes: 13 additions & 5 deletions wine-tkg-git/wine-tkg-patches/misc/fastsync/fastsync
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
_patchname='fastsync-clock_monotonic-fixup.patch' && _patchmsg="Applied fastsync fix due clock_monotonic" && nonuser_patcher
fi

elif [ "$_use_ntsync" = "true" ]; then
elif [ "$_use_ntsync" = "true" ] || [ "$_use_ntsync" = "ntsync7" ]; then

# check Linux headers
ntsync_header_check=$(echo '#include <linux/ntsync.h>' | gcc -H -E -fsyntax-only - 2>&1 | head -n1 | cut -d' ' -f2-)
Expand Down Expand Up @@ -101,7 +101,9 @@
_patchname='ntsync-config.h.in-alt.patch' && _patchmsg="Using alternative config.h.in patchset for ntsync5" && nonuser_patcher
fi
if [ "$_protonify" = "true" ]; then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ) && [ "$_use_ntsync" = "ntsync7" ]; then
_patchname='ntsync7-staging-protonify.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
_patchname='ntsync5-staging-protonify.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor ac1ff67cfda77618ac05c2c8c38dedc991809316 HEAD ); then
_patchname='ntsync5-staging-protonify-e24ba584.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
Expand All @@ -125,7 +127,9 @@
_patchname='ntsync5-staging-protonify-7eb72b7b.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
fi
else
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ) && [ "$_use_ntsync" = "ntsync7" ]; then
_patchname='ntsync7-staging.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
_patchname='ntsync5-staging.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor ac1ff67cfda77618ac05c2c8c38dedc991809316 HEAD ); then
_patchname='ntsync5-staging-e24ba584.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
Expand All @@ -151,7 +155,9 @@
fi
else
if [ "$_protonify" = "true" ]; then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ) && [ "$_use_ntsync" = "ntsync7" ]; then
_patchname='ntsync7-protonify.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
_patchname='ntsync5-protonify.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor ac1ff67cfda77618ac05c2c8c38dedc991809316 HEAD ); then
_patchname='ntsync5-protonify-e24ba584.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
Expand All @@ -171,7 +177,9 @@
_patchname='ntsync5-protonify-7eb72b7b.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
fi
else
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
if ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ) && [ "$_use_ntsync" = "ntsync7" ]; then
_patchname='ntsync7-mainline.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor e24ba5849843bbef2ca038c12b5bb1b5ff0af8be HEAD ); then
_patchname='ntsync5-mainline.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
elif ( cd "${srcdir}"/"${_winesrcdir}" && git merge-base --is-ancestor ac1ff67cfda77618ac05c2c8c38dedc991809316 HEAD ); then
_patchname='ntsync5-mainline-e24ba584.patch' && _patchmsg="Using ntsync patchset" && nonuser_patcher
Expand Down
Loading

0 comments on commit 41f7e24

Please sign in to comment.