Skip to content

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

fix(run): 32-bit games get tier0_s.dll and vstdlib_s.dll in the Steam bridge

raymondchins4bb6ab421483
diff --git a/app/Sources/BridgeplayApp/Resources/payload.manifest b/app/Sources/BridgeplayApp/Resources/payload.manifest
index 1c0f806..adaa8fb 100644
--- a/app/Sources/BridgeplayApp/Resources/payload.manifest
+++ b/app/Sources/BridgeplayApp/Resources/payload.manifest
@@ -12,6 +12,8 @@ valve steamclient.dll
valve steamclient64.dll
valve tier0_s64.dll
valve vstdlib_s64.dll
+valve tier0_s.dll
+valve vstdlib_s.dll
valve legacycompat/GameOverlayRenderer64.dll
valve legacycompat/Steam.dll
valve legacycompat/SteamService.exe
diff --git a/app/Sources/BridgeplayApp/Resources/valve-packages.manifest b/app/Sources/BridgeplayApp/Resources/valve-packages.manifest
index 07c1335..9d060ce 100644
--- a/app/Sources/BridgeplayApp/Resources/valve-packages.manifest
+++ b/app/Sources/BridgeplayApp/Resources/valve-packages.manifest
@@ -17,3 +17,5 @@ file steamclient.dll linux legacycompat/steamclient
file steamclient64.dll linux steamclient64.dll caba4826aa3501039d095aee1843a6bfb270fb43a3ab4455b2d6733223579fee
file tier0_s64.dll win64 tier0_s64.dll 30f7bb8d9b86006852493c26124ba253bd9e7ffd40a8b3c7254f86a9032c3be3
file vstdlib_s64.dll win64 vstdlib_s64.dll 99efb4c2ad47f90c803b5ee0bd6424916b28facb9fa2568845b1b1f58a36062a
+file tier0_s.dll win64 tier0_s.dll 562b2b47b7a724daa846c2a265b1129b590b28812b84e939068d0730a7815133
+file vstdlib_s.dll win64 vstdlib_s.dll 1d8872989be4bfa482ffe6c1c0221221c37957ac9e1a099000e92810c808a510
diff --git a/app/Tests/BridgeplayAppTests/PayloadManifestTests.swift b/app/Tests/BridgeplayAppTests/PayloadManifestTests.swift
index 96b1b17..7d91192 100644
--- a/app/Tests/BridgeplayAppTests/PayloadManifestTests.swift
+++ b/app/Tests/BridgeplayAppTests/PayloadManifestTests.swift
@@ -10,10 +10,10 @@ struct PayloadManifestTests {
func shippedManifestIsComplete() throws {
let manifest = try PayloadManifest.bundled()
- #expect(manifest.entries.count == 20)
+ #expect(manifest.entries.count == 22)
#expect(manifest.paths(origin: .built).count == 7)
#expect(manifest.paths(origin: .patched).count == 3)
- #expect(manifest.paths(origin: .valve).count == 10)
+ #expect(manifest.paths(origin: .valve).count == 12)
// Every payload file is fetchable from Valve or produced here, which is what dropping
// the steam_api pair bought. A fourth origin would mean a file with no way to get it.
@@ -91,8 +91,8 @@ struct PayloadInspectionTests {
let fex = try #require(SupportedRunners.all.first { $0.flavor == "fex" })
let state = PayloadInspector.inspect(bridge: bridge, builds: [fex])
#expect(state.manifestProblem == nil)
- #expect(state.expected == 20)
- #expect(state.present == 10)
+ #expect(state.expected == 22)
+ #expect(state.present == 12)
#expect(state.missing(origin: .valve).isEmpty)
#expect(state.missing(origin: .built).count == 7)
#expect(state.missing(origin: .patched).count == 3)
diff --git a/app/Tests/BridgeplayAppTests/ValveFetcherTests.swift b/app/Tests/BridgeplayAppTests/ValveFetcherTests.swift
index e9eedeb..38d717c 100644
--- a/app/Tests/BridgeplayAppTests/ValveFetcherTests.swift
+++ b/app/Tests/BridgeplayAppTests/ValveFetcherTests.swift
@@ -15,7 +15,7 @@ private final class PhaseLog: @unchecked Sendable {
@Suite("Valve fetcher", .serialized)
struct ValveFetcherTests {
- @Test("An empty bridge gets all ten files, each matching its pin")
+ @Test("An empty bridge gets all twelve files, each matching its pin")
func fillsAnEmptyBridge() async throws {
let bridge = try scratchDirectory("valve")
defer { try? FileManager.default.removeItem(at: bridge) }
@@ -27,7 +27,7 @@ struct ValveFetcherTests {
}
let phases = log.labels
- #expect(outcome.installed.count == 10)
+ #expect(outcome.installed.count == 12)
#expect(outcome.unchanged.isEmpty)
#expect(!outcome.wroteNothing)
@@ -66,7 +66,7 @@ struct ValveFetcherTests {
let again = try await ValveFetcher.run(manifest: manifest, bridge: bridge)
#expect(again.installed.isEmpty)
- #expect(again.unchanged.count == 10)
+ #expect(again.unchanged.count == 12)
#expect(again.wroteNothing)
}
@@ -88,7 +88,7 @@ struct ValveFetcherTests {
let repair = try await ValveFetcher.run(manifest: manifest, bridge: bridge)
#expect(Set(repair.installed) == [deleted, corrupted])
- #expect(repair.unchanged.count == 8)
+ #expect(repair.unchanged.count == 10)
for path in [deleted, corrupted] {
let want = manifest.files.first { $0.bridgePath == path }?.sha256
#expect(Digest.sha256IfPresent(bridge.appending(path: path)) == want)
diff --git a/app/Tests/BridgeplayAppTests/ValvePackageManifestTests.swift b/app/Tests/BridgeplayAppTests/ValvePackageManifestTests.swift
index d78641f..e0dffd3 100644
--- a/app/Tests/BridgeplayAppTests/ValvePackageManifestTests.swift
+++ b/app/Tests/BridgeplayAppTests/ValvePackageManifestTests.swift
@@ -11,7 +11,7 @@ struct ValvePackageManifestTests {
let manifest = try ValvePackageManifest.bundled()
// Ten files out of two packages, over three hosts that serve identical bytes.
- #expect(manifest.files.count == 10)
+ #expect(manifest.files.count == 12)
#expect(manifest.packages.count == 2)
#expect(manifest.bases.count == 3)
@@ -72,12 +72,12 @@ struct ValvePackageManifestTests {
func innerPathsAreDeduplicated() throws {
let manifest = try ValvePackageManifest.bundled()
- // Six of the ten come from the Linux package under legacycompat, and two are also staged
+ // Six of the twelve come from the Linux package under legacycompat, and two are also staged
// at the bridge root, so eight bridge paths resolve to six entries in that archive.
let linux = manifest.files.filter { $0.package == "linux" }
#expect(linux.count == 8)
#expect(manifest.innerPaths(package: "linux").count == 6)
- #expect(manifest.innerPaths(package: "win64").count == 2)
+ #expect(manifest.innerPaths(package: "win64").count == 4)
}
@Test("Row kinds parse into their own collections")
diff --git a/bridge/verify.sh b/bridge/verify.sh
index a0f47bb..c995df2 100755
--- a/bridge/verify.sh
+++ b/bridge/verify.sh
@@ -159,6 +159,7 @@ $(find "$pfx" -type f \
\( -name lsteamclient.dll -o -name lsteamclient.so \
-o -name steamclient.dll -o -name steamclient64.dll \
-o -name tier0_s64.dll -o -name vstdlib_s64.dll \
+ -o -name tier0_s.dll -o -name vstdlib_s.dll \
-o -name steam.exe \) 2>/dev/null)
STRAYS
done
diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.sh
index cb83d0f..1038b6b 100755
--- a/dylib/feats/compat_run.sh
+++ b/dylib/feats/compat_run.sh
@@ -2101,7 +2101,7 @@ link_legacy_steam_dll() {
fi
}
-bridge_files="steamclient64.dll steamclient.dll tier0_s64.dll vstdlib_s64.dll"
+bridge_files="steamclient64.dll steamclient.dll tier0_s64.dll vstdlib_s64.dll tier0_s.dll vstdlib_s.dll"
bridge_files="$bridge_files lsteamclient.dll lsteamclient.so steam.exe"
# A clone cannot cross drives, so a prefix on another drive clones from a copy of the
# bridge kept beside that drive's templates.
diff --git a/dylib/tests/bridgecheck.sh b/dylib/tests/bridgecheck.sh
index 47a2c84..e20bde9 100644
--- a/dylib/tests/bridgecheck.sh
+++ b/dylib/tests/bridgecheck.sh
@@ -22,7 +22,7 @@ fi"
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
-files="steamclient64.dll steamclient.dll tier0_s64.dll vstdlib_s64.dll lsteamclient.dll steam.exe"
+files="steamclient64.dll steamclient.dll tier0_s64.dll vstdlib_s64.dll tier0_s.dll vstdlib_s.dll lsteamclient.dll steam.exe"
mkdir -p "$work/bridge"
for f in $files; do printf 'bridge %s\n' "$f" > "$work/bridge/$f"; done
for arch in aarch64-unix x86_64-unix; do
@@ -59,7 +59,7 @@ staged() {
echo "== a fresh prefix gets the whole bridge"
stage
is "the launch goes on past staging" reached "$(cat "$work/out")"
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
is "the ARM64 unix library is staged beside the DLL" "aarch64-unix bridge" "$(cat "$steam/lsteamclient.so" 2>/dev/null)"
unlogged "nothing claims to be staged already" "=== bridge already staged ==="
@@ -90,7 +90,7 @@ touch -r "$work/stamp" "$work/bridge/steam.exe"
is "the metadata still matches" "$(stat -f '%z %m' "$steam/steam.exe")" "$(stat -f '%z %m' "$work/bridge/steam.exe")"
stage
unlogged "matching metadata does not hide changed contents" "=== bridge already staged ==="
-is "the prefix receives the changed bytes" 6 "$(staged)"
+is "the prefix receives the changed bytes" 8 "$(staged)"
echo "== a DLL the bridge no longer ships is pruned"
printf 'old\n' > "$steam/old.dll"
@@ -104,7 +104,7 @@ printf 'bridge steamclient64.dll, newer build\n' > "$work/bridge/steamclient64.d
stage
is "the launch goes on" reached "$(cat "$work/out")"
unlogged "the old copy is not taken as current" "=== bridge already staged ==="
-is "every file matches the bridge" 6 "$(staged)"
+is "every file matches the bridge" 8 "$(staged)"
echo "== a bridge missing a file still stages the rest"
rm -rf "$prefix"
@@ -112,7 +112,7 @@ rm "$work/bridge/steam.exe"
stage
is "the launch goes on" reached "$(cat "$work/out")"
logged "the missing file is logged" "=== bridge missing steam.exe ==="
-is "the other files are copied" 5 "$(staged)"
+is "the other files are copied" 7 "$(staged)"
printf 'bridge steam.exe\n' > "$work/bridge/steam.exe"
echo "== a prefix on the same drive clones from the bridge itself"
@@ -120,7 +120,7 @@ rm -rf "$prefix"
compat="$work/library/compatdata/1"
cache="$work/library/compatdata/notproton-template/bridge"
stage
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
is "no copy of the bridge is made" no "$([ -e "$cache" ] && echo yes || echo no)"
echo "== a prefix on another drive clones from that drive's copy"
@@ -128,7 +128,7 @@ rm -rf "$prefix"
cross=1
stage
is "the launch goes on" reached "$(cat "$work/out")"
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
is "the drive keeps a copy of steam.exe" "bridge steam.exe" "$(cat "$cache/steam.exe" 2>/dev/null)"
is "the drive keeps the unix library under its architecture" "updated x86_64 bridge" \
"$(cat "$cache/x86_64-unix/lsteamclient.so" 2>/dev/null)"
@@ -145,7 +145,7 @@ rm -rf "$prefix" "$cache"
mkdir -p "$work/elsewhere"
ln -s "$work/elsewhere" "$cache"
stage
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
is "nothing is written through the link" "" "$(ls "$work/elsewhere")"
rm "$cache"
@@ -156,7 +156,7 @@ chmod 500 "${cache%/*}"
stage
chmod 700 "${cache%/*}"
is "the launch goes on" reached "$(cat "$work/out")"
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
echo "== a file that cannot be staged stops the launch"
cross=""
@@ -170,7 +170,7 @@ is "the reason is logged" yes "$(grep -q 'Permission denied' "$work/log" && echo
logged "the player is told" "alert: Steam files could not be copied"
stage
is "the next launch stages it" reached "$(cat "$work/out")"
-is "every file is copied" 6 "$(staged)"
+is "every file is copied" 8 "$(staged)"
echo "== a syswow64 trigger that cannot be installed stops the launch"
trigger=$(sed -n '/^install_lsteamclient_trigger() {/,/^}/p;/^bridge_origin() {/,/^}/p;/^place_bridge_file() {/,/^}/p' "$SRC")