How to run Wine on RPi 400
Build box64
sudo apt install git cmake -y
cd ~/projects
git clone https://github.com/ptitSeb/box64
cd box64
mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=/opt/box64
make -j2
sudo make install
Build box86
sudo apt install gcc-arm-linux-gnueabihf -y
cd ~/projects
git clone https://github.com/ptitSeb/box86
cd box86
mkdir build; cd build; cmake .. -DRPI4ARM64=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=/opt/box86
make -j2
sudo make install
Reload binfmt configuration (there are two new files in /etc/binfmt.d/ folder)
sudo systemctl restart systemd-binfmt.service
Install extra
sudo dpkg --add-architecture armhf
sudo apt update
sudo apt install libgtk2.0-0:armhf libsdl2-image-2.0-0:armhf libsdl1.2debian:armhf libopenal1:armhf libvorbisfile3:armhf libgl1:armhf libjpeg62:armhf libcurl4:armhf libasound2-plugins:armhf -y
Install wine
curl -fsSLO https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-amd64/PlayOnLinux-wine-6.17-upstream-linux-amd64.tar.gz
sudo mkdir /opt/wine
sudo tar -zxf PlayOnLinux-wine-6.17-upstream-linux-amd64.tar.gz -C /opt/wine
sudo ln -s /opt/wine/bin/wine /usr/local/bin/wine
sudo ln -s /opt/wine/bin/wine64 /usr/local/bin/wine64
sudo ln -s /opt/wine/bin/wineserver /usr/local/bin/wineserver
sudo ln -s /opt/wine/bin/winecfg /usr/local/bin/winecfg
sudo ln -s /opt/wine/bin/wineboot /usr/local/bin/wineboot
Note: x86 version is available somewhere at
https://www.playonlinux.com/wine/binaries/phoenicis/upstream-linux-x86/PlayOnLinux-wine-7.11-upstream-linux-x86.tar.gz
Technically it is possible to isolate box64 from box86 by setting BOX86_PATH
, BOX86_LD_LIBRARY_PATH
, BOX64_PATH
, BOX64_LD_LIBRARY_PATH
environment variables appropriately, for example
export BOX86_PATH=/opt/wine86/bin/
export BOX86_LD_LIBRARY_PATH=/opt/wine86/lib/wine/i386-unix/:/lib/i386-linux-gnu:/lib/aarch64-linux-gnu/
export BOX64_PATH=/opt/wine64/bin/
export BOX64_LD_LIBRARY_PATH=/opt/wine64/lib/i386-unix/:/opt/wine64/lib/wine/x86_64-unix/:/lib/i386-linux-gnu/:/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu/
Install winetricks
sudo curl -fsSL https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -o /usr/local/bin/winetricks
sudo chmod +x /usr/local/bin/winetricks
sudo winetricks --self-update
Create wine bottles
WINEPREFIX=~/.wine WINEARCH=win32 wine winecfg
WINEPREFIX=~/.wine64 WINEARCH=win64 wine winecfg
Basic alias
echo 'alias wine64="WINEPREFIX=~/.wine64 wine"' >> ~/.bash_aliases
Split scenario
$ cat ~/.bash_aliases
alias wine64="BOX64_ENV1=WINEPREFIX=/home/vja/.wine64 BOX64_ENV2=WINEARCH=win64 box64 wine64"
alias wine64desktop="BOX64_ENV1=WINEPREFIX=/home/vja/.wine64 BOX64_ENV2=WINEARCH=win64 box64 wine64 explorer /desktop=shell,1280x720 explorer++.exe"
alias wine86="BOX86_ENV1=WINEPREFIX=/home/vja/.wine86 BOX86_ENV2=WINEARCH=win32 box86 wine"
alias wine86desktop="BOX86_ENV1=WINEPREFIX=/home/vja/.wine86 BOX86_ENV2=WINEARCH=win32 box86 wine explorer /desktop=shell,1280x720 explorer++.exe"
ExplorerPlusPlus is available for both architectures:
- https://explorerplusplus.com/software/explorer++_1.3.5_x64.zip
- https://explorerplusplus.com/software/explorer++_1.3.5_x86.zip
Re-use system fonts
shopt -s globstar
cd ${WINEPREFIX:-~/.wine}/drive_c/windows/Fonts && for i in /usr/share/fonts/**/*.{ttf,otf} ; do ln -s "$i" ; done
Remove wine mime hooks
rm -f ~/.local/share/mime/packages/x-wine*
rm -f ~/.local/share/applications/wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/application-x-wine-extension*
rm -f ~/.local/share/mime/application/x-wine-extension*
rm -f ~/.local/share/icons/hicolor/*/*/*winebrowser*
Install dotnet using winetricks
WINE="/opt/wine/bin/wine" WINESERVER="/opt/wine/bin/wineserver" WINEARCH="win32" WINEPREFIX="$HOME/.wine" winetricks dotnet45
https://box86.org/2022/03/box86-box64-vs-qemu-vs-fex-vs-rosetta2/
https://forum.armbian.com/topic/19526-how-to-install-box86-box64-wine32-wine64-winetricks-on-arm64/