Wine (“Wine Is Not an Emulator” 的首字母缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,macOS 及 BSD 等)上运行 Windows 应用的兼容层。Wine 不是像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是將 Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的内存占用,让你能够干净地集合 Windows 应用到你的桌面。
在m1上安装尝试了比较多的教程,基本都失败了。直到看到这篇文章:https://git.boc-group.eu/adoxxosports/adoxx-15-64bit/-/blob/master/Installation Manual (M1) Wine und Azure SQL(https://git.boc-group.eu/adoxxosports/adoxx-15-64bit/-/blob/master/Installation Manual (M1) Wine und Azure SQL)
下面简单记录一下安装步骤:
1.如果安装过wine通过下面的命令删除旧版本:
代码语言:javascript复制brew uninstall --cask xquartz
brew uninstall --cask wine-stable
rm -rf ${HOME}/.wine_adoxx64
2.安装m1版本wine
代码语言:javascript复制brew tap gcenx/wine
brew install --cask --no-quarantine wine-crossover
代码语言:javascript复制(base) zhongming@ZhongMingdeMacBook-Pro ~ % brew install --cask --no-quarantine wine-crossover
Updating Homebrew...
==> Caveats
wine-crossover supports both 32-bit and 64-bit now. It is compatible with your
existing 32-bit wine prefix, but it will now default to 64-bit when you
create a new wine prefix. The architecture can be selected using the
WINEARCH environment variable which can be set to either win32 or
win64.
To create a new pure 32-bit prefix, you can run:
$ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg
See the Wine FAQ for details: https://wiki.winehq.org/FAQ#Wineprefixes
To enable noflicker set the following registry key in your prefix:
[HKCUSoftwareWineMac Driver]
"ForceOpenGLBackingStore"="y"
y
==> Downloading https://github.com/Gcenx/homebrew-wine/releases/download/20.0.2/wine-crossover-20.0.2-osx64.tar.xz
==> Downloading from https://github-releases.githubusercontent.com/240977125/509ec980-9337-11eb-86db-469e60cf048c?X-Amz-Algorithm=A
######################################################################## 100.0%
All formula dependencies satisfied.
==> Installing Cask wine-crossover
Warning: macOS's Gatekeeper has been disabled for this Cask
==> Moving App 'Wine Crossover.app' to '/Applications/Wine Crossover.app'
==> Linking Binary 'appdb' to '/opt/homebrew/bin/appdb'
==> Linking Binary 'winehelp' to '/opt/homebrew/bin/winehelp'
==> Linking Binary 'msiexec' to '/opt/homebrew/bin/msiexec'
==> Linking Binary 'notepad' to '/opt/homebrew/bin/notepad'
==> Linking Binary 'regedit' to '/opt/homebrew/bin/regedit'
==> Linking Binary 'regsvr32' to '/opt/homebrew/bin/regsvr32'
==> Linking Binary 'wine64' to '/opt/homebrew/bin/wine64'
==> Linking Binary 'wineboot' to '/opt/homebrew/bin/wineboot'
==> Linking Binary 'winecfg' to '/opt/homebrew/bin/winecfg'
==> Linking Binary 'wineconsole' to '/opt/homebrew/bin/wineconsole'
==> Linking Binary 'winedbg' to '/opt/homebrew/bin/winedbg'
==> Linking Binary 'winefile' to '/opt/homebrew/bin/winefile'
==> Linking Binary 'winemine' to '/opt/homebrew/bin/winemine'
==> Linking Binary 'winepath' to '/opt/homebrew/bin/winepath'
==> Linking Binary 'wineserver' to '/opt/homebrew/bin/wineserver'
==> Linking Binary 'wine' to '/opt/homebrew/bin/wine'
==> Linking Binary 'wine32on64' to '/opt/homebrew/bin/wine32on64'