频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

Wine安装Windows软件的错误以及处理

来源: 作者:佚名 出处:巧巧读书 2008-03-24 进入讨论组
    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 );

 
  左边有-号的,删除这一行,左边有+号的,添加这一行。
 
  修改后编译,如果使用debian系统,则可以用以下命令编译:
 
  
 cd wine
sudo debian/rules clean
sudo debian/rules build
sudo debian/rules binary

 
  3、出现断言失败错误:
 
  text.c: usr32 pellip->under == 0 && pellip->after == 0
 
  时,有可能是乱码导致,配置wine支持中文即可。 更多文章 更多内容请看Windows操作系统安装系统安装手册常用软件加密宝典专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章