如何在 Raspberry Pi OS 上安装 Wine 并运行 windows 程序

本文主要介绍如何在Raspberry Pi OS 上安装 wine32,wine64暂时还不清楚如何安装

Wine 是什么?

Wine(Wine Is Not an Emulator)是一个能够在多种 POSIX-compliant 操作系统(诸如 Linux,macOS 及 BSD 等)上运行 Windows 应用的兼容层。Wine 不是像虚拟机或者模拟器一样模仿内部的 Windows 逻辑,而是將 Windows API 调用翻译成为动态的 POSIX 调用,免除了性能和其他一些行为的内存占用

安装Box86

因为树莓派是基于arm架构的,没有办法直接运行x86应用,因此需要先安装Box86
请参考前一篇文章

安装wine相关的依赖库

sudo apt install libasound2 libc6 libglib2.0–0 libgphoto2–6 libgphoto2-port12 libgstreamer-plugins-base1.0–0 libgstreamer1.0–0 libldap-2.4–2 libopenal1 libpcap0.8 libpulse0 libsane1 libudev1 libunwind8 libusb-1.0–0 libvkd3d1 libx11–6 libxext6 ocl-icd-libopencl1 libasound2-plugins libncurses6 libtinfo5 libasound2:armhf libc6:armhf libglib2.0–0:armhf libgphoto2–6:armhf libgphoto2-port12:armhf libgstreamer-plugins-base1.0–0:armhf libgstreamer1。 0–0:armhf libldap-2.4–2:armhf libopenal1:armhf libpcap0.8:armhf libpulse0:armhf libsane1:armhf libudev1:armhf libunwind8:armhf libusb-1.0–0:armhf libvkd3d1:armhf libx11–6:armhf libxext6:armhf ocl-icd-libopencl1:armhf libasound2-plugins:armhf libncurses6:armhf libmpeg2–4:armhf libmpeg2encpp-2.1–0:armhf libtinfo6:armhf libmpg123–0:armhf libtinfo5:armhf cabextract libxslt1.1:armhf zenityCode language: CSS (css)

进入主文件夹并下载wine并解压

cd ~
wget https://twisteros.com/wine.tgz -O ~/wine.tgz
tar -xzvf ~/wine.tgzCode language: JavaScript (javascript)

安装wine

sudo ln -s ~/wine/bin/wineboot /usr/local/bin/wineboot
sudo ln -s ~/ wine/bin/winecfg /usr/local/bin/winecfg sudo ln -s ~/
wine/bin/wineserver / usr/local/bin/wineserver
sudo chmod +x /usr/local/bin/wine /usr/local/bin/wineboot /usr/local/bin/winecfg /usr/local/bin/wineserver

启动wine

wine wineboot

安装winetricks

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
sudo mv winetricks /usr/local/bin/
sudo chmod +x /usr/local/bin/winetricksCode language: JavaScript (javascript)

通过winecfg 配置wine

运行winecfg 选择模拟虚拟桌面,建议在 800×600 虚拟桌面中运行所有内容

发表评论