ubuntu8.04下源码安装wine 设置中文

时间:2021-08-01 18:03:24

1、wine编译环境安装:

将下面的内容复制到控制台下运行:

sudo apt-get install \

bison \

cvs git-core \

flex \

fontforge \

gcc \

git \

libasound2-dev \

libaudio-dev \

libc6-dev \

libcapi20-3 \

libcapi20-dev \

libcupsys2-dev \

libdbus-1-dev \

libesd0-dev \

libexif-dev \

libexpat1-dev \

libfontconfig1-dev \

libfreetype6-dev \

libgcrypt11-dev \

libgl1-mesa-dev \

libglib1.2-dev \

libglib2.0-dev \

libglu1-mesa-dev \

libgnutls-dev \

libgpg-error-dev \

libgphoto2-2-dev \

libhal-dev \

libice-dev \

libieee1284-3-dev \

libjpeg62-dev \

liblcms1-dev \

libldap2-dev \

libltdl3 \

libltdl3-dev \

liblzo-dev \

libmad0 \

libmad0-dev \

libmng-dev \

libncurses5-dev \

libodbcinstq1c2 \

libogg-dev \

libopencdk10-dev \

libpng12-dev \

libpopt-dev \

libqt3-headers \

libqt3-mt \

libqt3-mt-dev \

libsane-dev \

libsm-dev \

libssl-dev \

libtasn1-3-dev \

libtiff4-dev \

libtiffxx0c2 \

libusb-dev \

libvorbis-dev \

libvorbisfile3 \

libx11-dev \

libxau-dev \

libxcomposite-dev \

libxcursor-dev \

libxdmcp-dev \

libxext-dev \

libxfixes-dev \

libxft-dev \

libxi-dev \

libxinerama-dev \

libxml2-dev \

libxmu-dev \

libxmu-headers \

libxrandr-dev \

libxrender-dev \

libxslt1-dev \

libxt-dev \

libxv-dev \

libxxf86vm-dev \

linux-libc-dev \

m4 \

make \

mesa-common-dev \

odbcinst1debian1 \

qt3-dev-tools \

unixodbc \

unixodbc-dev \

valgrind \

x11proto-composite-dev \

x11proto-core-dev \

x11proto-fixes-dev \

x11proto-input-dev \

x11proto-kb-dev \

x11proto-randr-dev \

x11proto-video-dev \

x11proto-xext-dev \

x11proto-xf86vidmode-dev \

x11proto-xinerama-dev \

x-dev \

xtrans-dev \

zlib1g-dev

2、编译

安装完环境后进入wine源码目录

运行./configure

之后再运行 make

make结束没有错误再运行 make install

此时wine已经安装好了。

运行 winecfg 配置就好了。

使用winecfg打开的页面里显示中文会有问题,从网上搜到一个解决办法,按照下面的方法修改就可以使用了。

3、修改中文问题

先把字体simsun.ttc(在你的windows的安装目录里的font文件夹里找,找不到可以从网上下到) 复制到 /home/你的用户名/.wine/drive_c/windows/fonts 文件夹中,要显示隐藏文件夹按Ctrl+H

修改注册表,在命令行输入 gedit ~/.wine/system.reg

找到“[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]”,将其中的““LogPixels”=dword:00000060”改成 ““LogPixels”=dword:00000070“。

再找到”[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] xxxx“项,将其中的”MS Shell Dlg“相关的两项修改成如下内容(即更换字体为宋体):

“MS Shell Dlg”=”SimSun”

“MS Shell Dlg 2″=”SimSun”

然后:gedit ~/.wine/drive_c/windows/win.ini

在其中加上(如果没有),有的话修改成如下

[Desktop]

menufontsize=13

messagefontsize=13

statusfontsize=13

IconTitleSize=13

现在中文显示应该正常了。