Skip to content

Commit

Permalink
Switch default Proton branch to 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kron4ek committed May 2, 2024
1 parent 7ba23f5 commit f2b63e1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build_wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export WINE_BRANCH="${WINE_BRANCH:-staging}"
# proton_7.0, experimental_7.0, proton_8.0, experimental_8.0, experimental_9.0
# bleeding-edge
# Leave empty to use the default branch.
export PROTON_BRANCH="${PROTON_BRANCH:-proton_8.0}"
export PROTON_BRANCH="${PROTON_BRANCH:-proton_9.0}"

# Sometimes Wine and Staging versions don't match (for example, 5.15.2).
# Leave this empty to use Staging version that matches the Wine version.
Expand Down Expand Up @@ -240,6 +240,10 @@ elif [ "$WINE_BRANCH" = "proton" ]; then
patch -d wine -Np1 < "${scriptdir}"/proton-exp-9.0.patch
fi

if [ "${PROTON_BRANCH}" = "proton_9.0" ]; then
patch -d wine -Np1 < "${scriptdir}"/proton-9.0.patch
fi

WINE_VERSION="$(cat wine/VERSION | tail -c +14)-$(git -C wine rev-parse --short HEAD)"
if [[ "${PROTON_BRANCH}" == "experimental_"* ]] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
BUILD_NAME=proton-exp-"${WINE_VERSION}"
Expand Down
46 changes: 46 additions & 0 deletions proton-9.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
diff -ruN proton/dlls/ntdll/unix/virtual.c proton-new/dlls/ntdll/unix/virtual.c
--- proton/dlls/ntdll/unix/virtual.c 2024-05-02 19:10:23.862327789 +0000
+++ proton-new/dlls/ntdll/unix/virtual.c 2024-05-02 19:12:10.895492903 +0000
@@ -335,41 +335,7 @@

static void kernel_writewatch_register_range( struct file_view *view, void *base, size_t size )
{
- struct uffdio_register uffdio_register;
- struct uffdio_writeprotect wp;
-
- if (!(view->protect & VPROT_WRITEWATCH) || !use_kernel_writewatch) return;
-
- madvise( base, size, MADV_NOHUGEPAGE );
- if (use_kernel_writewatch == 2)
- {
- kernel_writewatch_reset( base, size );
- return;
- }
-
- uffdio_register.range.start = (UINT_PTR)base;
- uffdio_register.range.len = size;
- uffdio_register.mode = UFFDIO_REGISTER_MODE_WP;
- if (ioctl( uffd_fd, UFFDIO_REGISTER, &uffdio_register ) == -1)
- {
- ERR( "ioctl( UFFDIO_REGISTER ) failed, %s.\n", strerror(errno) );
- return;
- }
-
- if (!(uffdio_register.ioctls & UFFDIO_WRITEPROTECT))
- {
- ERR( "uffdio_register.ioctls %s.\n", wine_dbgstr_longlong(uffdio_register.ioctls) );
- return;
- }
- wp.range.start = (UINT_PTR)base;
- wp.range.len = size;
- wp.mode = UFFDIO_WRITEPROTECT_MODE_WP;
-
- if (ioctl(uffd_fd, UFFDIO_WRITEPROTECT, &wp) == -1)
- {
- perror("ioctl(UFFDIO_WRITEPROTECT)");
- exit(-1);
- }
+ return;
}

static NTSTATUS kernel_soft_dirty_get_write_watches( void *base, SIZE_T size, void **addresses, ULONG_PTR *count, BOOL reset )

0 comments on commit f2b63e1

Please sign in to comment.