Building 32-bit Wine on a 64-bit (x86-64) system

EL6 (RHEL6 and SL6)

Required packages for proper building of 32-bit Wine on 64-bit EL6

yum install --setopt=protected_multilib=false install libXrender-devel.i686  mingw32-libxml2 libxslt-devel.i686 gnutls-devel.i686 libjpeg-devel.i686 libpng-devel.i686 freetype-devel.i686 libX11-devel.i686 glibc-devel.i686 alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake portaudio-devel.i686 openal-soft-devel.i686 audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 openal-soft-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc libXext-devel-1.3.2-2.1.el6.i686 libxml2-devel-2.7.6-17.el6_6.1.i686 zlib-devel-1.2.3-29.el6.i686 libjpeg-turbo-devel-1.2.1-3.el6_5.i686

Trying to rebuild the epel 6 wine srpms (wine-1.2.3-1.el6.src.rpm) in 32-bit mode, I had to do the following manual changes to the spec files:

  • portaudio.spec: add an "export CC='gcc -m32 -march=i686'" in an %ifarch %{ix86}
  • wine.spec: add an "export CC='gcc -m32 -march=i686'" in an %ifarch %{ix86}, and remove 'TARGETFLAGS="" %{?_smp_mflags}' after %{make}

The resulting packages (src and binary) are available here http://www.gymglish.com/opensource/rpms/centos6-rpms/

Then, I could build the rpms in this order:

rpmbuild -ba --sign --target i686 portaudio.spec

rpmbuild -ba --sign --target i686 openal-soft.spec

rpmbuild -ba --sign --target i686 nss-mdns.spec rpmbuild -ba --sign --target i686 wine.spec rpmbuild -ba --sign wine-docs.spec 

wine下很多中文显示成框框解决方法:

20130628121713

1、准备字体

为了让 Windows 应用程序看上去更美观,所以需要 Windows 下面的字体。

到windows系统下C:\Windows\Fonts目录拷贝 simsun.ttc 文件。复制到~/.wine/drive_c/windows/Fonts目录。

创建一个 simfang.ttc 是许多 Windows 应用默认使用 simfang.ttc 字体。

2、修改 ~/.wine/system.reg

装好字体后,还要修改一下 Wine 的注册表设置,指定与字体相关的设置:

gedit ~/.wine/system.reg

(一定要使用 gedit 或其他支持 gb2312/utf8 编码的编辑器修改这些文件,否则文件中的中文可能变乱码)

搜索: LogPixels

找到的行应该是:[System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts]

将其中的:

"LogPixels"=dword:00000060

改为:

"LogPixels"=dword:00000070

搜索: FontSubstitutes

找到的行应该是:[Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes]

将其中的:

"MS Shell Dlg"="Tahoma"

"MS Shell Dlg 2″="Tahoma"

改为:

"MS Shell Dlg"="SimSun"

"MS Shell Dlg 2″="SimSun"

3、修改 ~/.wine/drive_c/windows/win.ini

gedit ~/.wine/drive_c/windows/win.ini

在文件末尾加入:

[Desktop]

menufontsize=13

messagefontsize=13

statusfontsize=13

IconTitleSize=13

4、最关键的一步,把下面的代码保存为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"

好了,之后你会发现中文是多么的美丽。。。

 

 

from: http://wiki.winehq.org/WineOn64bit#head-25bf815250cd2c1399a85b153e15a2f2cabf246e

 

你可能感兴趣的:(System)