论坛首页 移动开发技术论坛

mac osx wine 1.7.5 源码编译方法及中文乱码的解决

浏览 1779 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2016-09-23  

源码编译

1、先安装apple-gcc42,Mac osx自带的 llvm-gcc,编译后,无法运行wine。

1
sudo port install apple-gcc42

2、下载wine源码

1
2
git clone git://source.winehq.org/git/wine.git ~/wine-git
cd ~/wine-git

3、安装 X11/XQuartz ,官网下载 XQuartz

4、我是用的是1.7.5编译的

1
git checkout -b 1.7.5 wine-1.7.5

5、切换编译工具为 apple-gcc42

1
2
sudo port select gcc apple-gcc42
hash gcc

如果想恢复苹果默认的llvm-gcc:

1
2
sudo port select gcc none
hash gcc

6、编译源码

1
2
./configure --verbose --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib
make

7、安装

1
2
3
4
make install
 
# 卸载
make uninstall

中文乱码解决

1、参考下面的文章:

http://linfan.info/blog/2012/03/01/wine-mac/

字体最好是用 SimSun.ttc,宋体,可以从windows 中提取。

2、通过以上注册表中的方式,仍然会存在乱码,是字符集的问题,可以参考下面文章:

http://forum.ubuntu.org.cn/viewtopic.php?t=291611&p=2719632

dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c 源码中添加一句,最新源码中的位置有所变化,如下:

1
2
3
4
5
6
7
8
9
10
11
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index fb4f2af..5bc1393 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
, Courier, monospace !important; padding: 0px !important; border-radius: 0px !important; border: 0px !important; float: none !important; height: auto !important; line-height: 1.1em !important; margin: 0px !important; overflow: visible !important; vertical-align: baseline !important; width: auto !important; direction: ltr !important; display: inline !important; background: none
论坛首页 移动开发技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics