应用兼容列表 - daliansky/minisforum-HX90G-Hackintosh GitHub Wiki
amdfriend
脚本
一键下载安装 一键修复脚本:
- wget
sudo mkdir /usr/local/bin && sudo chown -R $(whoami) /usr/local/bin && cd /tmp/ && wget https://ghproxy.com/https://github.com/NyaomiDEV/AMDFriend/releases/download/v1.0.2/amdfriend && xattr -c amdfriend && chmod +x amdfriend && cp amdfriend /usr/local/bin && hash >> /dev/null && rehash >> /dev/null && sudo amdfriend -i -b -s -D /Applications/
- curl
sudo mkdir /usr/local/bin && sudo chown -R $(whoami) /usr/local/bin && cd /tmp/ && curl -o amdfriend https://ghproxy.com/https://github.com/NyaomiDEV/AMDFriend/releases/download/v1.0.2/amdfriend && xattr -c amdfriend && chmod +x amdfriend && cp amdfriend /usr/local/bin && hash >> /dev/null && rehash >> /dev/null && sudo amdfriend -i -b -s -D /Applications/
平时使用只需要执行:
打开终端,输入命令:
sudo amdfriend -i -b -s -D /Applications/
即可
后面是原理,可不用看了
打开终端,输入命令:
- wget:
sudo mkdir /usr/local/bin && chown -R $(whoami) /usr/local/bin && cd /tmp/ && wget https://ghproxy.com/https://github.com/NyaomiDEV/AMDFriend/releases/download/v1.0.2/amdfriend && xattr -c amdfriend && chmod +x amdfriend && cp amdfriend /usr/local/bin && hash >> /dev/null && rehash >> /dev/null && amdfriend -i -b -s -D /Applications/
- curl:
sudo mkdir /usr/local/bin && chown -R $(whoami) /usr/local/bin && cd /tmp/ && curl -o amdfriend https://ghproxy.com/https://github.com/NyaomiDEV/AMDFriend/releases/download/v1.0.2/amdfriend && xattr -c amdfriend && chmod +x amdfriend && cp amdfriend /usr/local/bin && hash >> /dev/null && rehash >> /dev/null && amdfriend -i -b -s -D /Applications/
下载安装后,它会自动搜索所有的 dylib
,并自动修复了
amdfriend
的帮助信息:
打开终端,输入命令:amdfriend --help
amdfriend [args] <path/to/library> [.../path/to/other/libraries]
Options:
--version Show version number [boolean]
-i, --in-place Directly patch the library, as opposed to creating a
patched library with `.patched` appended to the file name.
[boolean] [default: false]
-d, --dry-run Do all checking and patching, but DO NOT write anything to
disk. [boolean] [default: false]
-b, --backup Only works in conjunction with `--in-place`; it backs up
the original library by copying it and appending `.bak` on
its extension. [boolean] [default: false]
-s, --sign Automatically invoke `codesign` on patched libraries.
[boolean] [default: false]
-c, --clear-xa Automatically clear extended attributes on patched
libraries. [boolean] [default: true]
-D, --directories Scan directories alongside files. It will search for any
file with no extension and with extension `.dylib`, as they
are the common ones to patch. [array] [default: []]
-j, --jobs The number of jobs that will be spawned to process the
libraries. [number] [default: 16]
--help Show help [boolean]
使用:
-
检查
dylib
,其中的/path/to/dir
要替换成应用所在的目录,amdfriend -d -D /path/to/dir /path/to/another/dir | grep "Routines found"
例如:
amdfriend -d -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks | grep "Routines found" Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libiomp5.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libippiy8.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libippik0.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libippil9.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libmkl_avx2.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libmkl_mc3.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libmkl_avx512.dylib: Routines found for /Applications/Adobe Photoshop 2021/Adobe Photoshop 2021.app/Contents/Frameworks/libmkl_core.dylib:
-
替换
dylib
例如:
sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libiomp5.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libippiy8.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libippik0.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libippil9.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libmkl_avx2.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libmkl_mc3.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libmkl_avx512.dylib: sudo amdfriend -i -b -s -D /Applications/Adobe\ Photoshop\ 2021/Adobe\ Photoshop\ 2021.app/Contents/Frameworks/libmkl_core.dylib:
-
原则是:找到几个
dylib
,就要替换几个 -
其实最简单的方法是:
- 直接运行一条语句就可以了:
sudo amdfriend -i -b -s -D /Applications/
- 直接运行一条语句就可以了: