在Ubuntu中安装Wine

安装 WINE

安装完 Wine ,先要运行一下 winecfg

英文 wine 官方用户指南

中文 wine 用户指南

一、自Ubuntu 软件库 进行 apt-get 安装

不推荐

二、从Wine HQ 进行 apt-get 安装

推荐 可以自动更新到 最新 WineHQ 发布版

1、 根据 Wine HQ 的 Ubuntu 版下载页

首先运行

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

添加GPG钥匙

其他 Linux 版本见 Wine HQ 的 下载页

2、添加适合自己版本的源

以为7.10 gutsy为例

sudo wget http://wine.budgetdedicated.com/apt/sou ... gutsy.list -O /etc/apt/sources.list.d/winehq.list

3、安装 WineHQ 发布的最新 deb 包

sudo apt-get update

sudo apt-get install wine

三、deb 下载安装

1、在 Wine 各版本 deb下载 中选择自己需要的版本下载

2、运行安装

四、强烈推荐集成中文补丁的deb下载

windowssux提供,目前仅有 7.10 32bit 版本 ,文件夹的位置在

http://ftp.ubuntu.org.cn/home/windowssux

登录帐号在

http://forum.ubuntu.org.cn/viewtopic.php?t=9685

五、编译安装WINE

如果你的Wine 在对中文支持有问题,并有一定动手能力,推荐采用 中文 patch +编译安装

1、以前安装有 wine 的先把 wine 卸载。

2、下载最新的 wine 源码 自 WINEHQ,解压。

3、下载打过补丁的 freetype.c ,需要对应你的系统版本。自 Wine的中文按钮补丁-0.9.56 (增编译脚本-7.04-7.10) 。把 freetype.c 代替源码中的 dlls/gdi32/freetype.c。

4、根据自己的系统版本 下载 依赖安装包 自己 http://kegel.com/wine/

7.10为 gutsy.sh ,

然后运行

chmod +x gutsy.sh

sudo ./gutsy.sh

安装所需依赖。

5、在源码目录下

sudo ./configure

检测依赖环境,通过的话,根据提示可以

sudo make depend && make

6、编译完成以后,会提示你Wine built successfully,这时输入

make install

(可选)7、如果你要 卸载编译安装的 wine ,使用命令

make uninstall

配置WINE

一、配置 winecfg

1、运行 wine 配置程序 ,不要用 sudo 或者 root 权限

winecfg

这样会建立 wine 的运行文件夹 /home/user/.wine .里面有wine的注册表文件和虚拟的C盘;

稍等片刻,就会出现一个面板,这就是 wine 的一些基本的配置。

2、 Drives 标签,配置硬盘和光驱

Autodect 按钮可以自动检测,也打开 Show Advanced 手动配置,

C: /home/用户名/.wine/drive_c Local hard disk

D: /home/用户名 Local hard disk

E: /media/cdrom0 CDROM

其他分区根据需要配置

3、Audio 标签,配置声卡

这个面板会失去反映一段时间,之后出现一个声音驱动程序的选择框,一般情况下选择OSS。如果你是独立的声卡,选择ALSA更好。如果只有 OSS,就选择 OSS。

4、 Application Settings 标签,配置 Windows 版本

下面的 windows 版本把默认的改成 Windows XP ,实际中可以变更 为 Windows 2000 或 其他版本以使用 wine 的效率更高。

5、部分 DLL 设置

在真实的 windows 系统中从 C:\WINDOWS\systenm32 里复制 mfc42.dll,msvcp60.dll, riched20.dll,riched32.dll 这几个文件到 /home/用户名/.wine/drive_c/windows/system32 文件里,需要覆盖时确定。其他dll文件不要随便覆盖,要做备份。

二、字体设置

1、从 Windows 目录下的 Fonts 里的 simsun.ttc 复制到 /home/user/.wine/drive_c/windows/fonts 里面。

把下面的代码保存为 zh.reg ,然后终端执行 regedit zh.reg 。

代码:

代码:

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"

使用WINE

基本设置

winecfg

注册表

regedit

控制台

wineconsole

卸载wine内软件

wine-unintaller

辅助用GUI配置/软件安装/管理工具wine-door

sudo apt-get install wine-door

wine 程序的菜单位置

~/.local/share/applications/wine/Programs

原文链接:http://forum.ubuntu.org.cn/viewtopic.php?t=107816