Docs: the Mac version requires macOS 26 or later (the graphics layer is built on Metal 4); setup.sh notes it on older systems
This commit is contained in:
@@ -38,6 +38,9 @@ say "$(m "一、这台电脑" "1. This computer")"
|
||||
OSV=$(/usr/libexec/PlistBuddy -c "Print ProductVersion" /System/Library/CoreServices/SystemVersion.plist 2> /dev/null)
|
||||
if [ "$(uname -s)" = Darwin ] && [ "$(uname -m)" = arm64 ]; then ok "$(m "Apple 芯片的 Mac,macOS $OSV" "Apple silicon Mac, macOS $OSV")"
|
||||
else bad "$(m "需要 Apple 芯片的 Mac(这台是 $(uname -s) $(uname -m))" "An Apple silicon Mac is required (this is $(uname -s) $(uname -m))")" "$(m "换一台 Apple 芯片的 Mac 再来" "Use an Apple silicon Mac")"; fi
|
||||
# 图形层整个建在 macOS 26 / iOS 26 才有的图形接口(Metal 4)上:macOS 低于 26 时,在这台 Mac 上运行的那几样(Mac App、宿主、图形层单测、Mac 冒烟)编不过也跑不了
|
||||
# The graphics layer is built entirely on a graphics interface that exists only from macOS 26 / iOS 26 on (Metal 4): below macOS 26, the things that run on this Mac (the Mac App, the host, the graphics unit tests, the Mac smoke run) neither build nor run
|
||||
case "${OSV%%.*}" in ''|*[!0-9]*) ;; *) [ "${OSV%%.*}" -ge 26 ] || note "$(m "这台 Mac 是 macOS ${OSV}:低于 26。Mac App(dm/tools/mac_app.sh)、宿主与图形层单测、Mac 冒烟需要 macOS 26 及以上(用到了 macOS 26 才有的图形接口)" "This Mac runs macOS ${OSV}, below 26. The Mac App (dm/tools/mac_app.sh), the host and graphics unit tests and the Mac smoke run need macOS 26 or later (they use a graphics interface that exists only from macOS 26 on)")";; esac
|
||||
DK=$DM_ROOT; while [ ! -d "$DK" ] && [ "$DK" != / ]; do DK=$(dirname "$DK"); done; FREE=$(df -g "$DK" 2> /dev/null | awk 'NR==2 {print $4}'); WANT=30; [ -d "$GAME" ] && WANT=15
|
||||
if [ -n "$FREE" ] && [ "$FREE" -ge "$WANT" ]; then ok "$(m "磁盘剩余 $FREE GB(至少要 $WANT GB)" "$FREE GB free disk space (at least $WANT GB needed)")"
|
||||
else bad "$(m "磁盘剩余 ${FREE:-?} GB,不够:工作区要约 12 GB,解游戏包另要约 20 GB" "Only ${FREE:-?} GB free: the workspace needs about 12 GB, extracting the game package about 20 GB more")" "$(m "腾出空间,或用 DM_ROOT=<别的盘上的目录> 换位置" "Free up space, or point DM_ROOT=<a directory on another disk> elsewhere")"; fi
|
||||
|
||||
Reference in New Issue
Block a user