一、安装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最新版源码编译_「已注销」的博客-优快云博客_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百科:
六、U盘安装UOS镜像:
(1)获取镜像:
(2)官方制作指导
(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源码实现:
编写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
日志如下:
获取摄像头数量为0,获取失败。