网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 
中国网管联盟
Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道
 当前位置: > bitsCN.com > linux > 新手入门 > linux技术 > Wine安装Win软件的错误及处理  

Wine安装Win软件的错误及处理

2008-03-25  作者:bitsCN整理  来源:中国网管联盟  点评 投稿 收藏

1、安装rtx软件

1)安装时,后台会报一些错误:如找不到mfc42u.dll之类的,可以从windows/system32目录拷贝到wine的相应目录。

2)如果是自动构建的wine,则有可能出现 libxml2 support was not present at compile time 的问题,这时需要安装 libxml2-dev 包。

2、安装一些带输入检测的软件如招商证券,会出现包含类似 X11DRV_SetDIBits+0x1f2() in winex11 的错误,这时需要打补丁。打补丁的方法是:

1)下载wine源代码

2)按照以下内容修改文件 wine/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c:

Skipped content of type multipart/alternative-------------- next part --------------
diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c
index cec2058..809897e 100644
--- a/dlls/winex11.drv/dib.c
+++ b/dlls/winex11.drv/dib.c
@@ -3861,6 +3861,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *ph
X11DRV_DIB_IMAGEBITS_DESCR descr;
BITMAP bitmap;
LONG width, height, tmpheight;
+ int nrsrcbytes, dibpitch;
INT result;

descr.physDev = physDev;
@@ -3880,6 +3881,16 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *ph

if (startscan + lines > height) lines = height - startscan;

+ /* pointer check */
+ dibpitch = ((width * descr.infoBpp + 31) &~31) / 8;
+ if( descr.compression)
+ nrsrcbytes = 1;
+ else {
+ nrsrcbytes = lines * dibpitch;
+ if( nrsrcbytes < 0) nrsrcbytes = - nrsrcbytes;
+ }
+ if( IsBadReadPtr( bits, nrsrcbytes)) return 0;
+
switch (descr.infoBpp)
{
case 1:
@@ -3926,7 +3937,7 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *ph
descr.width = bitmap.bmWidth;
descr.height = lines;
descr.useShm = FALSE;
- descr.dibpitch = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8;
+ descr.dibpitch = dibpitch;
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod, FALSE );
result = X11DRV_DIB_SetImageBits( &descr );
X11DRV_DIB_Unlock( physBitmap, TRUE ); 网管网www_bitscn_com 

左边有-号的,删除这一行,左边有+号的,添加这一行。

修改后编译,如果使用debian系统,则可以用以下命令编译:

cd wine
sudo debian/rules clean
sudo debian/rules build
sudo debian/rules binary 网管u家u.bitsCN.com 

3、出现断言失败错误:

text.c: usr32 pellip->under == 0 && pellip->after == 0

时,有可能是乱码导致,配置wine支持中文即可。

网管论坛bbs_bitsCN_com


TAGs
 上一篇:Linux系统下使用XP字体美化汉字   下一篇:没有了
Wine安装Win软件的错误及处理 评论:
loading.. 评论加载中…
评论:请自觉遵守互联网相关政策法规,评论不得超过250字。

验证码: 注册用户
本类热门排行:
最新推荐文章:
网管论坛交流: