需要安装wine,找了半天要么安装不起,要么安装了崩溃,索性自己编译安装一份
源码下载,找到一个速度较快的镜像站点,官方下载也ok
http://mirrors.ibiblio.org/wine/source/5.x/wine-5.10.tar.xz
编译,默认编译为32,目前基本都是64位系统,需要指定64编译
./configure --enable-win64
编译出错,需要升级bison版本,查看原有版本,bison位2.3版本,通过brew安装
➜ wine-5.10 bison --version
bison (GNU Bison) 2.3
configure: error: Your bison version is too old. Please install bison version 3.0 or newer.
brew install bison
安装完成后,还是提示同样的错误,没有生效,需要手动替换bison
➜ wine-5.10 brew list bison
/usr/local/Cellar/bison/3.5.3/bin/bison
/usr/local/Cellar/bison/3.5.3/bin/yacc
/usr/local/Cellar/bison/3.5.3/lib/liby.a
安装到/usr/local/Cellar/bison/目录,系统实际运行在/Library/Developer/CommandLineTools/usr/bin目前,备份旧文件,复制新文件
➜ wine-5.10 cd /Library/Developer/CommandLineTools/usr/bin
➜ bin ls -l bison
-rwxr-xr-x 1 root wheel 221200 12 19 15:44 bison
➜ bin mv bison bison_bak
mv: rename bison to bison_bak: Permission denied
➜ bin sudo mv bison bison_bak
➜ bin sudo cp /usr/local/Cellar/bison/3.5.3/bin/bison ./bison
版本更新成功
➜ bin bison --version
bison (GNU Bison) 3.5.3
Written by Robert Corbett and Richard Stallman.
重新configure,直到出现finished
./configure --enable-win64
configure: Finished. Do 'make' to compile Wine.
开始编译安装
make install
安装完成,失败,没有权限,需要通过sudo安装
mkdir: /usr/local/lib64/wine: Permission denied
mkdir: /usr/local/lib64/wine: Permission denied
make: *** [install] Error 1
sudo make install
编译时间有点长,耐心等待
安装完成后,
➜ bin pwd
/usr/local/bin
➜ bin ls -l win*
-rwxr-xr-x 1 root admin 18724 6 17 16:53 wine64
-rwxr-xr-x 1 root admin 14680 6 17 16:53 wine64-preloader
-rwxr-xr-x 1 root admin 1973 6 17 16:54 wineboot
运行exe文件,wine64 /path/****.exe