Wine -- Windows应用生态迁移到x86/Arm64 Linux

一、安装wine:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine

二、源码编译Wine最新稳定版7.x

(0)编译:

./configure

make depend

make

sudo make install

(1)安装报错:
configure: error: no suitable flex found. Please install the 'flex' package.
解决方法:可以运行:sudo apt-get install flex 解决。

(2)安装报错:
configure: error: no suitable flex found. Please install the 'bison' package.
解决方法:可以运行:sudo apt-get install bison解决。

(3)安装报错:

configure: error: FreeType 32-bit development files not found. Fonts will not be built. 
Use the --without-freetype option if you really want this.

解决方法:编译时候 ./configure --without-freetype

(4)安装依赖的库

Linux下wine最新版源码编译_「已注销」的博客-CSDN博客_wine编译

三、安装exe方法:

UOS双击运行windows 的绿色软件 Wine6版-统信UOS官方论坛

终端安装命令:

env WINEPREFIX=/home/huawei/.deepinwine/Deepin-WeChat/ "/opt/deepin-box86/box86" "/opt/deepin-wine6-stable/bin/wine" xxx_7.22.0.8.exe

安装完exe后,处理器:Huawei Kirin 内核为arm,双击无法启动应用。

解决办法:

终端命令方式启动:

env WINEPREFIX=/home/huawei/.deepinwine/Deepin-WeChat/ "/opt/deepin-box86/box86" "/opt/deepin-wine6-stable/bin/wine" xxxxx.exe

WINEPREFIX表示环境位置

四、调试方法:

WINEDEBUG=+all env WINEPREFIX=/home/huawei/.deepinwine/Deepin-WeChat/ "/opt/deepin-box86/box86" "/opt/deepin-wine6-stable/bin/wine" xxxxx.exe

WINEDEBUG=+loaddll env WINEPREFIX=/home/huawei/.deepinwine/Deepin-WeChat/ "/opt/deepin-box86/box86" "/opt/deepin-wine6-stable/bin/wine" xxxxx.exe

WINEDEBUG=+heap env WINEPREFIX=/home/huawei/.deepinwine/Deepin-WeChat/ "/opt/deepin-box86/box86" "/opt/deepin-wine6-stable/bin/wine" xxxxx.exe

五、Wine百科:

Wine (简体中文) - ArchWiki

六、U盘安装UOS镜像:

(1)获取镜像:

统信UOS生态社区 - 打造操作系统创新生态

 (2)官方制作指导

https://home.uniontech.com/home/%E7%BB%9F%E4%BF%A1UOS%E9%95%9C%E5%83%8F%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B%20V1.1%2020211207.pdf

(3)联想电脑启动,按住Fn,多次点击F12,选择U盘启动,按照提示安装镜像 

七、通过Wine软件包方式安装Wine最新版本(ubuntu系统可以直接安装,其他系统需要解决依赖问题)

# 添加系统架构、配置apt source
$ sudo dpkg --add-architecture i386
$ sudo mkdir -pm755 /etc/apt/keyrings
$ sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
$ sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources

# 安装wine-devel
$ sudo apt-get update
$ sudo apt install --install-recommends winehq-devel

 

八、通过MF方式获取摄像头数据

wine源码中MFEnumDeviceSources接口没有实现,导致MF功能无法使用,wine源码实现:

d0161619bf514bd796495f80be0d1a33.png

 

编写MF代码,生成MF.exe,在win10平台运行,使用buildin mfplat.dll,mf.dll mfcore.dll mfperfhelper.dll mfreadwrite.dll使用windows 原生dll。

启动命令:WINEDEBUG=trace=-all,warn=-all,err=-all,fixme=-all,+mfplat wine MF.exe

日志如下:

9c2a931d030c4b818fae8daebea1b5a9.png

获取摄像头数量为0,获取失败。 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值