Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
refactor(run): end the launch where the broken-prefix alert is shown
raymondchinsce7074ae7f8d
diff --git a/dylib/feats/compat_run.sh b/dylib/feats/compat_run.shindex d203c41..f91b08c 100755--- a/dylib/feats/compat_run.sh+++ b/dylib/feats/compat_run.sh@@ -1332,19 +1332,19 @@ note_prefix_volume() {# Without C:\windows\system32 Wine stops at "could not load kernel32.dll" and the game quits# with no window. exFAT and FAT have no symbolic links, so dosdevices/c: cannot exist there.+# Ends the launch when the prefix is broken.refuse_broken_prefix() {[ ! -f "$WINEPREFIX/dosdevices/c:/windows/system32/kernel32.dll" ] || return 0vol=$(volume_type "$STEAM_COMPAT_DATA_PATH") || vol=""fs=${vol%% *}echo "=== the prefix has no C:\\windows\\system32\\kernel32.dll, Wine did not finish building it ===" \>> "$log" 2>&1 || true- case "$fs" in- exfat|msdos|ntfs)- show_alert "This Steam library cannot hold the game's prefix" "It is formatted $fs, which has no symbolic links, so Wine cannot set up the game here. Move the game to a library on an APFS drive." ;;- *)- show_alert "The game's prefix could not be set up" "Wine did not finish building it. Rebuild the prefix in Bridgeplay, then launch again. bridgeplay-run.log has the details." ;;+ case "$fs" in exfat|msdos|ntfs)+ show_alert "This Steam library cannot hold the game's prefix" "It is formatted $fs, which has no symbolic links, so Wine cannot set up the game here. Move the game to a library on an APFS drive."+ exit 1esac- return 1+ show_alert "The game's prefix could not be set up" "Wine did not finish building it. Rebuild the prefix in Bridgeplay, then launch again. bridgeplay-run.log has the details."+ exit 1}# Steam keeps a game's prefix in the library that holds the game, so a game moved to another@@ -2210,7 +2210,7 @@ if [ -n "$STEAM_COMPAT_DATA_PATH" ]; thenstage_step="game drive"map_game_drivestage_step="prefix check"- refuse_broken_prefix || exit 1+ refuse_broken_prefixfistage_step="graphics backend"diff --git a/dylib/tests/prefixnotecheck.sh b/dylib/tests/prefixnotecheck.shindex 3ba6c28..9ffb443 100755--- a/dylib/tests/prefixnotecheck.sh+++ b/dylib/tests/prefixnotecheck.sh@@ -98,7 +98,7 @@ check_prefix() { # check_prefix FS: prints the exit statusenv log="$work/log" notes="$work/notes" body="$body" fs="$1" WINEPREFIX="$pfx" \STEAM_COMPAT_DATA_PATH="$two/steamapps/compatdata/42" \sh -c 'eval "$body"; volume_type() { [ -z "$fs" ] || echo "$fs /Volumes/Drive"; }- refuse_broken_prefix; echo $?'+ refuse_broken_prefix' && echo 0 || echo $?}is "no dosdevices stops the launch" 1 "$(check_prefix apfs)"has "it is logged" "Wine did not finish building it" "$work/log"