Skip to content

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

Flag Steam.dll as hidden, to avoid visually crapping up the folder

NotProtonNot4f16e9edef82
diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.sh
index 7d5c6f4..c72dd4e 100755
--- a/dylib/feats/compat_run.sh
+++ b/dylib/feats/compat_run.sh
@@ -1021,6 +1021,7 @@ link_legacy_steam_dll() {
[ -L "$dst" ] || [ ! -e "$dst" ] || return 0
[ "$(readlink "$dst" 2>/dev/null)" = "$src" ] && return 0
if ln -sfn "$src" "$dst" 2>> "$log"; then
+ chflags -h hidden "$dst" 2>/dev/null || true
echo "=== linked legacy Steam.dll at $dst ===" >> "$log" 2>&1 || true
else
echo "=== could not link legacy Steam.dll at $dst ===" >> "$log" 2>&1 || true
diff --git a/dylib/tests/bridgecheck.sh b/dylib/tests/bridgecheck.sh
index 5101225..47a2c84 100644
--- a/dylib/tests/bridgecheck.sh
+++ b/dylib/tests/bridgecheck.sh
@@ -216,16 +216,22 @@ run_link
is "the launch goes on" reached "$(cat "$work/out")"
is "a missing link is created" "$work/client/legacycompat/Steam.dll" "$(readlink "$work/lib/common/Steam.dll")"
logged "the link is logged" "=== linked legacy Steam.dll at $work/lib/common/Steam.dll ==="
+is "a new link is hidden" hidden "$(stat -f %Sf "$work/lib/common/Steam.dll")"
+is "the linked file is not hidden" - "$(stat -f %Sf "$work/client/legacycompat/Steam.dll")"
+chflags -h nohidden "$work/lib/common/Steam.dll"
: > "$work/log"
run_link
is "a current link is left alone" "" "$(cat "$work/log")"
+is "a current link is not touched" - "$(stat -f %Sf "$work/lib/common/Steam.dll")"
ln -sfn "$work/old/Steam.dll" "$work/lib/common/Steam.dll"
run_link
is "a stale link is replaced" "$work/client/legacycompat/Steam.dll" "$(readlink "$work/lib/common/Steam.dll")"
+is "a replaced link is hidden" hidden "$(stat -f %Sf "$work/lib/common/Steam.dll")"
rm -f "$work/lib/common/Steam.dll"
printf 'real\n' > "$work/lib/common/Steam.dll"
run_link
is "a real file is kept" real "$(cat "$work/lib/common/Steam.dll")"
+is "a real file is not hidden" - "$(stat -f %Sf "$work/lib/common/Steam.dll")"
rm -f "$work/lib/common/Steam.dll"
chmod 500 "$work/lib/common"
: > "$work/log"