Skip to content

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

Adds support for macOS Sequoia

NotProtonNotcc599ec0238b
diff --git a/Makefile b/Makefile
index 6cff7b7..ccb5d00 100644
--- a/Makefile
+++ b/Makefile
@@ -569,7 +569,7 @@ $(ICON_CAR): $(ICONGEN)
$(ICONGEN) "$(ICON_DOC)"
@mkdir -p "$(ICON_DIR)"
xcrun actool "$(ICON_DOC)" --compile "$(ICON_DIR)" --platform macosx \
- --minimum-deployment-target 26.0 --app-icon NotProton \
+ --minimum-deployment-target 15.0 --app-icon NotProton \
--output-partial-info-plist "$(ICON_DIR)/partial.plist" >/dev/null
@echo "==> Built $@"
diff --git a/app/Info.plist b/app/Info.plist
index 8929c98..87ebd53 100644
--- a/app/Info.plist
+++ b/app/Info.plist
@@ -25,7 +25,7 @@
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
- <string>26.0</string>
+ <string>15.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSPrincipalClass</key>
diff --git a/app/Package.swift b/app/Package.swift
index bdbadb5..6d4b9e7 100644
--- a/app/Package.swift
+++ b/app/Package.swift
@@ -14,7 +14,7 @@ let hasPayload = FileManager.default.fileExists(
atPath: packageRoot.appendingPathComponent(payloadPath).path)
let package = Package(
name: "NotProtonApp",
- platforms: [.macOS("26.0")],
+ platforms: [.macOS("15.0")],
dependencies: [
.package(url: "https://github.com/sparkle-project/Sparkle", exact: "2.10.0"),
],
diff --git a/app/Sources/NotProtonApp/Model/RunnerStore.swift b/app/Sources/NotProtonApp/Model/RunnerStore.swift
index b75cfa1..46e365a 100644
--- a/app/Sources/NotProtonApp/Model/RunnerStore.swift
+++ b/app/Sources/NotProtonApp/Model/RunnerStore.swift
@@ -108,12 +108,18 @@ enum CompatToolList {
// legacyHolder reads runners/current, so this has to run before prune deletes that symlink.
private static func resolved(
- runners: URL, file: URL
+ runners: URL, file: URL, fexAvailable: Bool = CompatTool.Flavor.fexAvailable
) -> (builds: [RunnerBuild], listed: String?, tools: [InstalledTool]) {
let builds = RunnerStore.installedBuilds(in: runners)
let listed = try? String(contentsOf: file, encoding: .utf8)
let holder = legacyHolder(builds: builds, listed: listed, runners: runners)
- return (builds, listed, SupportedRunners.tools(for: builds, legacy: holder))
+ // On Sequoia a FEX tool stays only if an earlier install listed it.
+ var kept = Set((listed ?? "").split(separator: "\n").compactMap {
+ $0.split(separator: "\t").first.map(String.init)
+ })
+ if case .build = holder { kept.insert(SupportedRunners.legacyToolName) }
+ return (builds, listed, SupportedRunners.tools(
+ for: builds, legacy: holder, fexAvailable: fexAvailable, keeping: kept))
}
// 1.0.x used the single 'notproton' tool name and wrote no tool list, so the
@@ -144,9 +150,10 @@ enum CompatToolList {
runners: URL = SupportPaths.runners,
bridge: URL = SupportPaths.bridge,
file: URL = SupportPaths.toolList,
- compatTools: URL = SupportPaths.Steam.compatTools
+ compatTools: URL = SupportPaths.Steam.compatTools,
+ fexAvailable: Bool = CompatTool.Flavor.fexAvailable
) throws -> Bool {
- let (builds, listed, tools) = resolved(runners: runners, file: file)
+ let (builds, listed, tools) = resolved(runners: runners, file: file, fexAvailable: fexAvailable)
let text = contents(tools)
let changed = !(listed == text || (listed == nil && text.isEmpty))
if changed {
diff --git a/app/Sources/NotProtonApp/Model/SupportedRunner.swift b/app/Sources/NotProtonApp/Model/SupportedRunner.swift
index 2baa450..27c685c 100644
--- a/app/Sources/NotProtonApp/Model/SupportedRunner.swift
+++ b/app/Sources/NotProtonApp/Model/SupportedRunner.swift
@@ -63,6 +63,11 @@ struct CompatTool: Sendable, Hashable, Identifiable {
var name: String { self == .fex ? "FEX" : "Rosetta" }
var unixDir: String { self == .fex ? "aarch64-unix" : "x86_64-unix" }
+
+ // CrossOver's FEX build needs Tahoe. Its Rosetta tool runs on Sequoia.
+ static let fexAvailable = ProcessInfo.processInfo.isOperatingSystemAtLeast(
+ OperatingSystemVersion(majorVersion: 26, minorVersion: 0, patchVersion: 0)
+ )
}
let name: String
@@ -101,7 +106,10 @@ enum SupportedRunners {
case nobody
}
- static func tools(for builds: [RunnerBuild], legacy: LegacyHolder = .nobody) -> [InstalledTool] {
+ static func tools(
+ for builds: [RunnerBuild], legacy: LegacyHolder = .nobody,
+ fexAvailable: Bool = CompatTool.Flavor.fexAvailable, keeping kept: Set<String> = []
+ ) -> [InstalledTool] {
let installed = Set(builds.map(\.id))
let holder: String? = switch legacy {
case .build(let id): id
@@ -114,7 +122,7 @@ enum SupportedRunners {
tool: CompatTool(name: name, flavor: tool.flavor, display: tool.display), build: build.id
)
}
- }
+ }.filter { $0.tool.flavor != .fex || fexAvailable || kept.contains($0.name) }
func rank(_ tool: InstalledTool) -> Int {
toolPreference.firstIndex(of: tool.name) ?? toolPreference.count
}
diff --git a/app/Tests/NotProtonAppTests/DetectionTests.swift b/app/Tests/NotProtonAppTests/DetectionTests.swift
index b54a488..969b77a 100644
--- a/app/Tests/NotProtonAppTests/DetectionTests.swift
+++ b/app/Tests/NotProtonAppTests/DetectionTests.swift
@@ -128,6 +128,15 @@ struct CompatToolOrderTests {
#expect(tools.map(\.build) == ["27.0.0.40921-fex", "27.0.0.40921-fex", "26.3.0.39832"])
}
+ @Test("Without FEX support the ARM64 build offers only its Rosetta tool, unless FEX was already listed")
+ func noFEX() throws {
+ let builds = [try build("27.0.0.41069-fex"), try build("26.3.0.39832")]
+ let fresh = SupportedRunners.tools(for: builds, fexAvailable: false)
+ #expect(fresh.map(\.name) == ["notproton-fex-rosetta-41069", "notproton-26.3"])
+ let kept = SupportedRunners.tools(for: builds, fexAvailable: false, keeping: ["notproton-fex-41069"])
+ #expect(kept.map(\.name) == ["notproton-fex-41069", "notproton-fex-rosetta-41069", "notproton-26.3"])
+ }
+
@Test("Each Preview keeps its own tools when both are set up")
func bothPreviews() throws {
let tools = SupportedRunners.tools(for: [
diff --git a/app/Tests/NotProtonAppTests/RunnerSwitchTests.swift b/app/Tests/NotProtonAppTests/RunnerSwitchTests.swift
index 9ffb1f4..d4d1e72 100644
--- a/app/Tests/NotProtonAppTests/RunnerSwitchTests.swift
+++ b/app/Tests/NotProtonAppTests/RunnerSwitchTests.swift
@@ -240,6 +240,27 @@ struct RunnerPrepareTests {
#expect(toolList(runners)?.contains("notproton-fex\t\(Self.fex.id)\tfex\t") == true)
}
+ @Test("Without FEX support a 1.0 FEX install keeps its legacy name")
+ func legacyFEXNameSurvivesWithoutFEX() throws {
+ let runners = try makeRunners(cloning: [Self.fex])
+ defer { try? FileManager.default.removeItem(at: runners) }
+ try FileManager.default.createSymbolicLink(
+ atPath: runners.appending(path: "current").path(percentEncoded: false),
+ withDestinationPath: "crossover-\(Self.fex.id)/CrossOver"
+ )
+ let sync = {
+ try CompatToolList.sync(
+ runners: runners, bridge: runners.appending(path: "bridge"), file: runners.appending(path: "tools"),
+ compatTools: runners.appending(path: "compatibilitytools.d"), fexAvailable: false
+ )
+ }
+
+ try sync()
+ #expect(holder(runners) == Self.fex.id)
+ try sync()
+ #expect(holder(runners) == Self.fex.id)
+ }
+
@Test("Setting up a second Preview leaves the legacy name where it is")
func secondPreviewRenamesNothing() throws {
let runners = try makeRunners(cloning: [Self.fex])
diff --git a/lsteamclient/build.sh b/lsteamclient/build.sh
index 6df1768..b770dd0 100755
--- a/lsteamclient/build.sh
+++ b/lsteamclient/build.sh
@@ -40,7 +40,7 @@
# ./build.sh --unix unix half only
# ./build.sh --install also install to the CrossOver tree and bridge
#
-# Overridable: WINE_BUILD, WINE_SRC_REL, CX_ROOT, BRIDGE_DIR, UNIX_ARCH
+# Overridable: WINE_BUILD, WINE_SRC_REL, CX_ROOT, BRIDGE_DIR, UNIX_ARCH, MIN_VER
set -eu
@@ -51,6 +51,7 @@ WINE_BUILD=${WINE_BUILD:-$repo/scratch/wine-build-dual}
# Mach-O spells the arm64 arch arm64 and wine spells its directory aarch64-unix, so
# both names are kept rather than derived from each other at every use.
UNIX_ARCH=${UNIX_ARCH:-x86_64}
+MIN_VER=${MIN_VER:-15.0}
case "$UNIX_ARCH" in
x86_64) unix_dir=x86_64-unix ;;
arm64) unix_dir=aarch64-unix ;;
@@ -154,7 +155,7 @@ if [ "$do_unix" -eq 1 ]; then
count=$(echo "$objs" | wc -l | tr -d ' ')
echo "==> unix half: $count sources from Makefile.in SOURCES"
- CXXFLAGS="-arch $UNIX_ARCH -I$dll -I$src -Iinclude -I$WINE_SRC_REL/include \
+ CXXFLAGS="-arch $UNIX_ARCH -mmacosx-version-min=$MIN_VER -I$dll -I$src -Iinclude -I$WINE_SRC_REL/include \
-D__WINESRC__ -DSTEAM_API_EXPORTS -Dprivate=public -Dprotected=public -DWINE_UNIX_LIB \
-fPIC -fasynchronous-unwind-tables -g -O2"
@@ -179,7 +180,7 @@ if [ "$do_unix" -eq 1 ]; then
echo "==> linking $out"
# shellcheck disable=SC2086
- gcc -std=gnu23 -arch "$UNIX_ARCH" -o "$out" -dynamiclib \
+ gcc -std=gnu23 -arch "$UNIX_ARCH" -mmacosx-version-min="$MIN_VER" -o "$out" -dynamiclib \
-install_name @rpath/lsteamclient.so -Wl,-rpath,@loader_path/ \
$link_objs dlls/ntdll/ntdll.so -lc++ -Wl,-undefined,dynamic_lookup