Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

另许多Linuxer期待的Wine 3.0 RC1 已经发布了,这是即将发布的Wine 3的候选版本。它标志着代码冻结期的开始。请大家给这个版本一个很好的测试,以使Wine 3.0尽可能做的更好。

Wine (“Wine Is Not an Emulator” 的递归缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,Mac OSX 及 BSD 等)上运行 Windows 应用的兼容层。另外英语单词wine是葡萄酒的意思。

这个版本有什么新的变化?:

  • Direct3D 11在AMD和Intel GPU上默认启用。
  • 支持macOS的AES加密。
  • 任务调度器的实现。
  • reg.exe工具中的注册表导出支持。
  • Progman DDE支持。
  • OLE数据缓存改进。
  • MSHTML中的更多事件支持。
  • 中继调试改进。
  • 各种错误修复。

该源现在可用。 二进制软件包正在构建过程中,应该很快会好。

首先安装依赖的库:

sudo apt-get install flex bison qt4-qmake

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libfreetype6-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libjpeg-dev libpng-dev libxslt-dev libxml2-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libxrender-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libgl1-mesa-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libglu1-mesa-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install freeglut3-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install prelink

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

sudo apt-get install libasound2-dev

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

到官网下载最新的源代码:

wget https://dl.winehq.org/wine/source/3.0/wine-3.0-rc1.tar.xz

下载之后解压,我把wine-3.0-rc1.tar.xz源代码解压到当前用户目录下,进入目录:

tar jxvf wine-3.0-rc1.tar.xz
cd wine-3.0-rc1

./configure --enable-win64

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

......

configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libudev 64-bit development files not found, plug and play won't be supported.
configure: libcapi20 64-bit development files not found, ISDN won't be supported.
configure: libcups 64-bit development files not found, CUPS won't be supported.
configure: fontconfig 64-bit development files not found, fontconfig won't be supported.
configure: libgsm 64-bit development files not found, gsm 06.10 codec won't be supported.
configure: libkrb5 64-bit development files not found, Kerberos won't be supported.
configure: libtiff 64-bit development files not found, TIFF won't be supported.
configure: libmpg123 64-bit development files not found (or too old), mp3 codec won't be supported.
configure: libopenal 64-bit development files not found (or too old), OpenAL won't be supported.
configure: openal-soft 64-bit development files not found (or too old), XAudio2 won't be supported.
configure: libldap (OpenLDAP) 64-bit development files not found, LDAP won't be supported.

configure: WARNING: libgnutls 64-bit development files not found, no schannel support.

configure: Finished.  Do 'make' to compile Wine.

--------------------------------------分割线 --------------------------------------

然后开始编译了,编译和安装的过程很简单。

直接运行make编译,等等等吧,可以喝杯咖啡。一个多小时编译完成。

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

然后运行

sudo make install

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

会自动编译Wine 3.0 RC1并安装程序

运行命令检查Wine版本:

wine64 --version

wine-3.0-rc1

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

然后创建一个wine链接,否则很多程序不能用, 比如winecfg。

sudo ln -s /usr/local/bin/wine64 /usr/local/bin/wine

安装好之后的相关配置

首先要添加wine的执行文件目录到PATH环境变量,也可以不添加如果不想修改环境变量,可以使用下面的方式。

在启动.exe程序的时候先export导入路径到环境变量。这个可以写在脚本里面来启动。

运行winecfg程序来设置相关的参数,建议选定Windows版本为Windows 7。

其他的相关参数,根据自己的习惯爱好来选定吧。

终端运行winecfg

如下图:

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

如上图,winecfg运行的时候,窗口上的文字都是 ||(||!) 这些,那么要做下一步中文支持。

首先复制Windows下的simsun.ttc字体到~/.wine/drive-c/windows/fonts/目录下。

sudo cp simsun.ttc ~/.wine/drive_c/windows/Fonts/

然后新建一个zh.reg文件,然后打开它,输入以下内容。然后回答命令行,使用regedit zh.reg来导入到注册表。

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"

现在再运行winecfg看看,如下图:

Ubuntu 17.10下编译安装 Wine 3.0 RC1 详解

猜你喜欢

转载自www.linuxidc.com/Linux/2017-12/149285.htm