Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103691899
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-04-13 19:56:48

作者: Goando  出自:
$sudo apt-get update
$sudo apt-get build-dep wine
$sudo apt-get install fakeroot libglib1.2-dev libglib2.0-dev libltdl3-dev libmad0-dev libmng-dev libodbcinstq1c2 libogg-dev libpng12-dev libqt3-headers libqt3-mt-dev libvorbis-dev libxft-dev libxi-dev libxinerama-dev libxmu-dev libxmu-headers libxmuu-dev libxpm-dev libxtrap-dev libxtst-dev libxv-dev libxxf86dga-dev qt3-dev-tools render-dev unixodbc-dev x-dev x11proto-record-dev x11proto-trap-dev x11proto-video-dev x11proto-xf86dga-dev xlibs-dev

创建一个编译Wine时所需要的目录:
$mkdir wine-src
$cd wine-src
sudo apt-get source wine
或下载Wine的源码包
地址
解压
tar jxvf wine-0.9.59.tar.bz2

修改源代码
--- wine-20050111/dlls/gdi/freetype.c 2005-01-06 01:12:07.000000000 +0800
+++ wine-20050111.gbhack/dlls/gdi/freetype.c 2005-01-15 18:30:32.481788272 +0800
@@ -1677,7 +1677,22 @@
if(!strcmpiW(lf.lfFaceName, SymbolW))
lf.lfCharSet = SYMBOL_CHARSET;

- if(!TranslateCharsetInfo((DWORD*)(INT_PTR)lf.lfCharSet, &csi, TCI_SRCCHARSET)) {
+ if( lf.lfCharSet == DEFAULT_CHARSET || lf.lfCharSet == ANSI_CHARSET)
+ {
+ int codepage = 936; /* I'm Chinese. Let me do something selfish. */
+ char *env_wdc = getenv("WINE_DEFAULT_CODEPAGE");
+ if (env_wdc != NULL)
+ {
+ codepage = atoi(env_wdc);
+ }
+ FIXME("Dirty hack. Default and ansi charset is translated to getenv(\"WINE_DEFAULT_CODEPAGE\")\n");
+ if(!TranslateCharsetInfo((DWORD*)(INT_PTR)codepage, &csi, TCI_SRCCODEPAGE)) {
+ FIXME("OMG. Even this dirty hack doesn't work. Let's PRAY.\n");
+ csi.fs.fsCsb[0] = 0;
+ }
+ lf.lfCharSet = csi.ciCharset;
+ }
+ else if(!TranslateCharsetInfo((DWORD*)(INT_PTR)lf.lfCharSet, &csi, TCI_SRCCHARSET)) {
switch(lf.lfCharSet) {
case DEFAULT_CHARSET:
csi.fs.fsCsb[0] = 0;
@@ -1861,6 +1876,10 @@
width = face->size.x_ppem >> 6;
height = face->size.y_ppem >> 6;
}
+
+ if (0 <= height && height <12) height =12;
+ else if ( 0 > height && height > -12) height = -12;
+
ret->ft_face = OpenFontFile(ret, face->file, face->face_index, width, height);

if (!ret->ft_face)

编译安装
cd wine-0.9.59
sudo ./configure
sudo make depend && make
编译完成以后
sudo make install
阅读(358) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~