Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

Add Support for CrossOver Preview 27.0.0.41069/20261006

NotProtonNotcb6403fe4609
diff --git a/app/Package.swift b/app/Package.swift
index ba0b564..1d35684 100644
--- a/app/Package.swift
+++ b/app/Package.swift
@@ -30,6 +30,10 @@ let package = Package(
.copy("Resources/detour32.bin"),
.copy("Resources/detour32-fex.bin"),
.copy("Resources/detour64-fex.bin"),
+ .copy("Resources/detour2-41069.bin"),
+ .copy("Resources/detour32-41069.bin"),
+ .copy("Resources/detour32-fex-41069.bin"),
+ .copy("Resources/detour64-fex-41069.bin"),
],
swiftSettings: [.swiftLanguageMode(.v6)]
),
diff --git a/app/Sources/NotProtonApp/Model/NtdllPatcher.swift b/app/Sources/NotProtonApp/Model/NtdllPatcher.swift
index 5d339e5..f92a824 100644
--- a/app/Sources/NotProtonApp/Model/NtdllPatcher.swift
+++ b/app/Sources/NotProtonApp/Model/NtdllPatcher.swift
@@ -118,6 +118,73 @@ enum NtdllPatcher {
imageBase: 0x1_8000_0000
),
],
+ "27.0.0.41069": [
+ NtdllPatch(
+ arch: .x86_64Windows,
+ payloadResource: "detour2-41069",
+ payloadSHA256: "67b70667387ff5bf89743b2d0a995a94543812678d4558dc884e6cebb46e7750",
+ caveRVA: 0x815e0,
+ payloadRVA: 0x815e0,
+ hooks: [
+ NtdllHook(rva: 0x52055,
+ stolen: [0x48, 0x83, 0xbc, 0x24, 0xf0, 0x00, 0x00, 0x00, 0x00]),
+ ],
+ caveSize: 2592,
+ cavePad: 0x00,
+ machine: 0x8664,
+ magic: 0x20b,
+ imageBase: 0x1_7000_0000
+ ),
+ NtdllPatch(
+ arch: .i386Windows,
+ payloadResource: "detour32-41069",
+ payloadSHA256: "3eaa5021add0c8e30e324d6b1a6392a32720f5f73596418a2086b7f8081eb1bd",
+ caveRVA: 0x7d1f0,
+ payloadRVA: 0x7d1f0,
+ hooks: [
+ NtdllHook(rva: 0x4d848, stolen: [0xf6, 0x45, 0xbc, 0x02, 0x75, 0x26]),
+ ],
+ caveSize: 3600,
+ cavePad: 0x00,
+ machine: 0x14c,
+ magic: 0x10b,
+ imageBase: 0x7bc0_0000
+ ),
+ ],
+ "27.0.0.41069-fex": [
+ NtdllPatch(
+ arch: .i386Windows,
+ payloadResource: "detour32-fex-41069",
+ payloadSHA256: "6ff6c7289e639c4caad85c2670bfa849d9f36baa24152b6979896caede5e249b",
+ caveRVA: 0xa4000,
+ payloadRVA: 0xa4000,
+ hooks: [
+ NtdllHook(rva: 0x2ede2, stolen: [0x8b, 0x45, 0x14, 0xa8, 0x02]),
+ ],
+ caveSize: 0x1000,
+ cavePad: 0x00,
+ machine: 0x14c,
+ magic: 0x10b,
+ imageBase: 0x7bc0_0000,
+ placement: .section
+ ),
+ NtdllPatch(
+ arch: .aarch64Windows,
+ payloadResource: "detour64-fex-41069",
+ payloadSHA256: "c6060b07f2c2f25636fcb1489ddd6729c277666167e9a090f55a1b711f0d5979",
+ caveRVA: 0xf3185,
+ payloadRVA: 0xf3190,
+ hooks: [
+ NtdllHook(rva: 0x48738, stolen: [0x1f, 0x20, 0x03, 0xd5]),
+ NtdllHook(rva: 0xa883c, stolen: [0x1f, 0x20, 0x03, 0xd5]),
+ ],
+ caveSize: 52859,
+ cavePad: 0xcc,
+ machine: 0xaa64,
+ magic: 0x20b,
+ imageBase: 0x1_8000_0000
+ ),
+ ],
]
static func patches(for build: RunnerBuild) -> [NtdllPatch] {
diff --git a/app/Sources/NotProtonApp/Model/PrefixTools.swift b/app/Sources/NotProtonApp/Model/PrefixTools.swift
index 13d4a2f..7869ef5 100644
--- a/app/Sources/NotProtonApp/Model/PrefixTools.swift
+++ b/app/Sources/NotProtonApp/Model/PrefixTools.swift
@@ -56,23 +56,23 @@ enum PrefixTools {
static func layout(runner: URL = SupportPaths.currentRunner) -> WineLayout {
let fm = FileManager.default
- let hosted = runner.appending(path: "CrossOver-Hosted Application")
+ let bin = runner.appending(path: "bin")
func executable(_ url: URL) -> Bool {
fm.isExecutableFile(atPath: url.path(percentEncoded: false))
}
let arm = runner.appending(path: "lib/wine/aarch64-unix")
let armLoader = arm.appending(path: "wine.app/Contents/MacOS/wine")
- let armServer = hosted.appending(path: "wineserver-arm64")
+ let armServer = bin.appending(path: "wineserver-arm64")
if executable(armLoader), executable(armServer) {
return WineLayout(loader: armLoader, server: armServer, unixDir: arm)
}
let unix = runner.appending(path: "lib/wine/x86_64-unix")
- let server = hosted.appending(path: "wineserver")
+ let server = bin.appending(path: "wineserver")
return WineLayout(
loader: unix.appending(path: "wine"),
- server: executable(server) ? server : hosted.appending(path: "wineserver-x86"),
+ server: executable(server) ? server : bin.appending(path: "wineserver-x86"),
unixDir: unix
)
}
diff --git a/app/Sources/NotProtonApp/Model/SupportedRunner.swift b/app/Sources/NotProtonApp/Model/SupportedRunner.swift
index 16e8fb3..af7e201 100644
--- a/app/Sources/NotProtonApp/Model/SupportedRunner.swift
+++ b/app/Sources/NotProtonApp/Model/SupportedRunner.swift
@@ -66,6 +66,34 @@ enum SupportedRunners {
.aarch64Windows: "560939a0f6e58314fc9d79fe6f839dce2b181f829ae58dca195fa142fcf40f39",
]
),
+ RunnerBuild(
+ bundleVersion: "27.0.0.41069",
+ releaseVersion: "20261006",
+ flavor: nil,
+ loaderSHA256: "8286bfd0c6d2ae337e11784926d371a9f7ed7e8da870bd2f435c2bce8eb3c148",
+ cleanNtdll: [
+ .x86_64Windows: "5b388fd48823e905616432fba627eb48f68dc14383963bb213d55db3f691b1b9",
+ .i386Windows: "e7da2a712870222942ef27a80b3bf4fa70fc8545dd1a64bdc7f2fa24a38debc3",
+ ],
+ patchedNtdll: [
+ .x86_64Windows: "e744e9a24e4401acc5038b490ddd146e6e9485fccf74d3b113c56f3e5854a1e2",
+ .i386Windows: "0d8e3ebb57b3173f675eef5e3a0950052c592efa10a7a10193b0beb811b55ea5",
+ ]
+ ),
+ RunnerBuild(
+ bundleVersion: "27.0.0.41069",
+ releaseVersion: "20261006",
+ flavor: "fex",
+ loaderSHA256: "ef2b9a0ad185d8caa2960a97c135a75b8b85ca62425599e35cf672f787fba64c",
+ cleanNtdll: [
+ .i386Windows: "66b1a244a611795c59a93a9491d17f36c98cd8db9be495004a37864e0e5ed4a5",
+ .aarch64Windows: "77ca83b2e1a3a1242f9d2d8868328262b2bcfc3f59bacf8b9389ea7e797ea852",
+ ],
+ patchedNtdll: [
+ .i386Windows: "e16b0199db721a08201b1512476b9eff255624d2faf3696fa57ff74b1a54be5c",
+ .aarch64Windows: "89e4c9e7f0a0a60462c0231ec393168f8bdb04bc8ea1dc22211f25bf3ff2c6b3",
+ ]
+ ),
]
static func build(loaderSHA256 hash: String) -> RunnerBuild? {
diff --git a/app/Sources/NotProtonApp/Resources/detour2-41069.bin b/app/Sources/NotProtonApp/Resources/detour2-41069.bin
new file mode 100755
index 0000000..aa912cb
Binary files /dev/null and b/app/Sources/NotProtonApp/Resources/detour2-41069.bin differ
diff --git a/app/Sources/NotProtonApp/Resources/detour32-41069.bin b/app/Sources/NotProtonApp/Resources/detour32-41069.bin
new file mode 100755
index 0000000..7f4b541
Binary files /dev/null and b/app/Sources/NotProtonApp/Resources/detour32-41069.bin differ
diff --git a/app/Sources/NotProtonApp/Resources/detour32-fex-41069.bin b/app/Sources/NotProtonApp/Resources/detour32-fex-41069.bin
new file mode 100755
index 0000000..c64a262
Binary files /dev/null and b/app/Sources/NotProtonApp/Resources/detour32-fex-41069.bin differ
diff --git a/app/Sources/NotProtonApp/Resources/detour64-fex-41069.bin b/app/Sources/NotProtonApp/Resources/detour64-fex-41069.bin
new file mode 100755
index 0000000..6e3c31a
Binary files /dev/null and b/app/Sources/NotProtonApp/Resources/detour64-fex-41069.bin differ
diff --git a/app/Tests/NotProtonAppTests/PrefixToolsTests.swift b/app/Tests/NotProtonAppTests/PrefixToolsTests.swift
index 1cc8ac5..9f522b3 100644
--- a/app/Tests/NotProtonAppTests/PrefixToolsTests.swift
+++ b/app/Tests/NotProtonAppTests/PrefixToolsTests.swift
@@ -56,7 +56,7 @@ struct PrefixToolsTests {
.appending(path: "notproton-layout-\(UUID().uuidString)")
defer { try? fm.removeItem(at: runner) }
- for path in ["lib/wine/\(arch)/\(loaderTail)", "CrossOver-Hosted Application/\(serverName)"] {
+ for path in ["lib/wine/\(arch)/\(loaderTail)", "bin/\(serverName)"] {
let file = runner.appending(path: path)
try fm.createDirectory(
at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
@@ -67,7 +67,7 @@ struct PrefixToolsTests {
let layout = PrefixTools.layout(runner: runner)
#expect(layout.loader == runner.appending(path: "lib/wine/\(arch)/\(loaderTail)"))
- #expect(layout.server == runner.appending(path: "CrossOver-Hosted Application/\(serverName)"))
+ #expect(layout.server == runner.appending(path: "bin/\(serverName)"))
// The shapes the script reaches for, which is what would drift independently.
#expect(source.contains("$wine_unix/\(loaderTail)"))
@@ -293,7 +293,7 @@ struct PrefixToolsTests {
let runner = FileManager.default.temporaryDirectory
.appending(path: "np-arch-\(UUID().uuidString)")
defer { try? fm.removeItem(at: runner) }
- for path in ["lib/wine/\(arch)/\(loaderTail)", "CrossOver-Hosted Application/\(serverName)"] {
+ for path in ["lib/wine/\(arch)/\(loaderTail)", "bin/\(serverName)"] {
let file = runner.appending(path: path)
try fm.createDirectory(
at: file.deletingLastPathComponent(), withIntermediateDirectories: true)
diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.sh
index 6ef0a35..4274884 100755
--- a/dylib/feats/compat_run.sh
+++ b/dylib/feats/compat_run.sh
@@ -38,12 +38,12 @@ export CX_ROOT
export CX_HOME="$HOME/Library/Application Support/CrossOver"
wine_unix="$CX_ROOT/lib/wine/aarch64-unix"
WINELOADER="$wine_unix/wine.app/Contents/MacOS/wine"
-WINESERVER="$CX_ROOT/CrossOver-Hosted Application/wineserver-arm64"
+WINESERVER="$CX_ROOT/bin/wineserver-arm64"
if [ ! -x "$WINELOADER" ] || [ ! -x "$WINESERVER" ]; then
wine_unix="$CX_ROOT/lib/wine/x86_64-unix"
WINELOADER="$wine_unix/wine"
- WINESERVER="$CX_ROOT/CrossOver-Hosted Application/wineserver"
- [ -x "$WINESERVER" ] || WINESERVER="$CX_ROOT/CrossOver-Hosted Application/wineserver-x86"
+ WINESERVER="$CX_ROOT/bin/wineserver"
+ [ -x "$WINESERVER" ] || WINESERVER="$CX_ROOT/bin/wineserver-x86"
fi
export WINELOADER WINESERVER
export WINEDLLPATH="$CX_ROOT/lib/wine/x86_64-windows:$wine_unix"
diff --git a/ntdll-patch/build-ntdll.sh b/ntdll-patch/build-ntdll.sh
index 4e3b90b..ebde30a 100755
--- a/ntdll-patch/build-ntdll.sh
+++ b/ntdll-patch/build-ntdll.sh
@@ -23,6 +23,16 @@ FEX_CLEAN_AARCH64=7823d71fbce6c9947163bf8b96beb299eabb02878245bcaf6759f2a22e81f0
FEX_PATCHED_I386=e799ea02418294588ee353a90b967358be316a3044ff9515b28aa1ce07e63981
FEX_PATCHED_AARCH64=560939a0f6e58314fc9d79fe6f839dce2b181f829ae58dca195fa142fcf40f39
+ROSETTA41069_CLEAN_X86_64=5b388fd48823e905616432fba627eb48f68dc14383963bb213d55db3f691b1b9
+ROSETTA41069_CLEAN_I386=e7da2a712870222942ef27a80b3bf4fa70fc8545dd1a64bdc7f2fa24a38debc3
+ROSETTA41069_PATCHED_X86_64=e744e9a24e4401acc5038b490ddd146e6e9485fccf74d3b113c56f3e5854a1e2
+ROSETTA41069_PATCHED_I386=0d8e3ebb57b3173f675eef5e3a0950052c592efa10a7a10193b0beb811b55ea5
+
+FEX41069_CLEAN_I386=66b1a244a611795c59a93a9491d17f36c98cd8db9be495004a37864e0e5ed4a5
+FEX41069_CLEAN_AARCH64=77ca83b2e1a3a1242f9d2d8868328262b2bcfc3f59bacf8b9389ea7e797ea852
+FEX41069_PATCHED_I386=e16b0199db721a08201b1512476b9eff255624d2faf3696fa57ff74b1a54be5c
+FEX41069_PATCHED_AARCH64=89e4c9e7f0a0a60462c0231ec393168f8bdb04bc8ea1dc22211f25bf3ff2c6b3
+
install=0
[ "${1:-}" = "--install" ] && install=1
@@ -37,15 +47,21 @@ flavor_of() {
for cand in "$CX_ROOT/lib/wine/aarch64-windows/ntdll.dll.notproton-orig" \
"$CX_ROOT/lib/wine/aarch64-windows/ntdll.dll"; do
[ -f "$cand" ] || continue
- if [ "$(sha "$cand")" = "$FEX_CLEAN_AARCH64" ]; then echo fex; return 0; fi
+ case "$(sha "$cand")" in
+ "$FEX_CLEAN_AARCH64") echo fex; return 0 ;;
+ "$FEX41069_CLEAN_AARCH64") echo fex-41069; return 0 ;;
+ esac
done
for cand in "$CX_ROOT/lib/wine/x86_64-windows/ntdll.dll.notproton-orig" \
"$CX_ROOT/lib/wine/x86_64-windows/ntdll.dll"; do
[ -f "$cand" ] || continue
- if [ "$(sha "$cand")" = "$ROSETTA_CLEAN_X86_64" ]; then echo rosetta; return 0; fi
+ case "$(sha "$cand")" in
+ "$ROSETTA_CLEAN_X86_64") echo rosetta; return 0 ;;
+ "$ROSETTA41069_CLEAN_X86_64") echo rosetta-41069; return 0 ;;
+ esac
done
die "no ntdll under $CX_ROOT/lib/wine matches a pinned build
- pass FLAVOR=rosetta or FLAVOR=fex to choose the pins anyway"
+ pass FLAVOR=rosetta, rosetta-41069, fex or fex-41069 to choose the pins anyway"
}
if [ -z "${FLAVOR:-}" ]; then
@@ -53,16 +69,16 @@ if [ -z "${FLAVOR:-}" ]; then
fi
case "$FLAVOR" in
- rosetta) tools="x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc" ;;
- fex) tools="i686-w64-mingw32-gcc clang ld.lld" ;;
- *) die "unknown flavor $FLAVOR, expected rosetta or fex" ;;
+ rosetta|rosetta-41069) tools="x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc" ;;
+ fex|fex-41069) tools="i686-w64-mingw32-gcc clang ld.lld" ;;
+ *) die "unknown flavor $FLAVOR, expected rosetta, rosetta-41069, fex or fex-41069" ;;
esac
for t in $tools; do
command -v "$t" >/dev/null || die "$t not found (brew install mingw-w64 llvm)"
done
-if [ "$FLAVOR" = fex ] && [ ! -x "$OBJCOPY" ]; then
+if [ "${FLAVOR%-41069}" = fex ] && [ ! -x "$OBJCOPY" ]; then
die "$OBJCOPY not found (brew install llvm)"
fi
@@ -115,6 +131,20 @@ case "$FLAVOR" in
patch_one aarch64-windows build64.sh fex detour64-fex.bin \
"$FEX_CLEAN_AARCH64" "$FEX_PATCHED_AARCH64"
;;
+ rosetta-41069)
+ ARCHES="x86_64-windows i386-windows"
+ patch_one x86_64-windows build.sh 41069 detour2-41069.bin \
+ "$ROSETTA41069_CLEAN_X86_64" "$ROSETTA41069_PATCHED_X86_64"
+ patch_one i386-windows build32.sh 41069 detour32-41069.bin \
+ "$ROSETTA41069_CLEAN_I386" "$ROSETTA41069_PATCHED_I386"
+ ;;
+ fex-41069)
+ ARCHES="i386-windows aarch64-windows"
+ patch_one i386-windows build32.sh fex-41069 detour32-fex-41069.bin \
+ "$FEX41069_CLEAN_I386" "$FEX41069_PATCHED_I386"
+ patch_one aarch64-windows build64.sh fex-41069 detour64-fex-41069.bin \
+ "$FEX41069_CLEAN_AARCH64" "$FEX41069_PATCHED_AARCH64"
+ ;;
esac
if [ "$install" -eq 0 ]; then
diff --git a/ntdll-patch/resolve.py b/ntdll-patch/resolve.py
index 58baf2d..26b7abf 100755
--- a/ntdll-patch/resolve.py
+++ b/ntdll-patch/resolve.py
@@ -47,6 +47,39 @@ PINNED = {
'payload': 'bee4ee13c235bd5de3cb6ce840b9695effd5623132f6dc0d137496d6a5330f5e',
'exports': {'LdrGetDllHandle': 0x180043328, 'LdrLoadDll': 0x180040e94,
'NtProtectVirtualMemory': 0x180065db0}},
+ '5b388fd48823e905616432fba627eb48f68dc14383963bb213d55db3f691b1b9':
+ {'hookRVA': 0x52055, 'stolen': '4883bc24f000000000', 'caveRVA': 0x815e0, 'caveSize': 2592,
+ 'resume': 0x5205e, 'wm': 'rsi', 'load_path': 0xd0,
+ 'payload': '67b70667387ff5bf89743b2d0a995a94543812678d4558dc884e6cebb46e7750',
+ 'exports': {'LdrGetDllHandle': 0x170017710, 'LdrLoadDll': 0x170018230,
+ 'NtProtectVirtualMemory': 0x17000f690, 'NtOpenFile': 0x17000f2f0,
+ 'NtReadFile': 0x17000ed50, 'NtClose': 0x17000ee70}},
+ 'e7da2a712870222942ef27a80b3bf4fa70fc8545dd1a64bdc7f2fa24a38debc3':
+ {'hookRVA': 0x4d848, 'stolen': 'f645bc027526', 'caveRVA': 0x7d1f0, 'caveSize': 3600,
+ 'resume': 0x4d84e, 'wm': 'edi', 'load_path': -0x54,
+ 'payload': '3eaa5021add0c8e30e324d6b1a6392a32720f5f73596418a2086b7f8081eb1bd',
+ 'exports': {'LdrGetDllHandle': 0x7bc125f0, 'LdrLoadDll': 0x7bc130e0,
+ 'NtProtectVirtualMemory': 0x7bc0d7a4, 'NtOpenFile': 0x7bc0d5d4,
+ 'NtReadFile': 0x7bc0d304, 'NtClose': 0x7bc0d394}},
+ '66b1a244a611795c59a93a9491d17f36c98cd8db9be495004a37864e0e5ed4a5':
+ {'hookRVA': 0x2ede2, 'stolen': '8b4514a802', 'caveRVA': 0xa4000, 'caveSize': 4096,
+ 'resume': 0x2ede7, 'wm': 'esi', 'load_path': -0x3c,
+ 'payload': '6ff6c7289e639c4caad85c2670bfa849d9f36baa24152b6979896caede5e249b',
+ 'exports': {'LdrGetDllHandle': 0x7bc2a670, 'LdrLoadDll': 0x7bc28660,
+ 'NtProtectVirtualMemory': 0x7bc4d800, 'NtOpenFile': 0x7bc4d630,
+ 'NtReadFile': 0x7bc4d360, 'NtClose': 0x7bc4d3f0}},
+ '77ca83b2e1a3a1242f9d2d8868328262b2bcfc3f59bacf8b9389ea7e797ea852':
+ {'caveRVA': 0xf3185, 'caveSize': 52859,
+ 'sites': [{'hookRVA': 0x48738, 'stolen': '1f2003d5', 'resume': 0x4873c,
+ 'wm': 'x27', 'load_path': -0x98},
+ {'hookRVA': 0xa883c, 'stolen': '1f2003d5', 'resume': 0xa8840,
+ 'wm': 'x22', 'load_path': -0x88}],
+ 'guest': {'LdrLoadDll': 0xa0aa0, 'LdrGetDllHandle': 0xa0aa0,
+ 'NtProtectVirtualMemory': 0xecf9c},
+ 'payload': 'c6060b07f2c2f25636fcb1489ddd6729c277666167e9a090f55a1b711f0d5979',
+ 'exports': {'LdrGetDllHandle': 0x18004390c, 'LdrLoadDll': 0x180041344,
+ 'NtProtectVirtualMemory': 0x180067050, 'NtOpenFile': 0x180066cb0,
+ 'NtReadFile': 0x180066710, 'NtClose': 0x180066830}},
}
EXPORTS = ['LdrGetDllHandle', 'LdrLoadDll', 'NtProtectVirtualMemory',
'NtOpenFile', 'NtReadFile', 'NtClose']