安卓手机上面使用chroot+box64运行wine
前置
一部获取了root了的安卓手机 (温馨提示:root有风险,操作不当,后果自负)
合适的网络环境
安装Linux容器
使用tmoe,termux-container 或者秋秋大佬改的Linuxdeploy-Pro
安装box64
ts
sudo wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
sudo apt update && sudo apt install box64-arm64 -y
ts
git clone https://github.com/ptitSeb/box64
cd box64
mkdir build; cd build; cmake .. -D ARM_DYNAREC=ON -D CMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
sudo make install
sudo systemctl restart systemd-binfmt
安装wine
cd到opt目录
cd /opt
安装9.10(目前最新)
wget https://github.com/Kron4ek/Wine-Builds/releases/download/9.10/wine-9.10-staging-amd64.tar.xz
解压wine
tar -xvf wine-9.10-staging-amd64.tar.xz
配置环境变量
cat <<'EOF' >/usr/bin/startwine
#!/bin/bash
export DISPLAY=:0
export PULSE_SERVER=127.0.0.1
export BOX64_MMAP32=1
# 限制帧率为60FPS
export DXVK_FRAME_RATE=60
export BOX64_ALLOWMISSINGLIBS=1
export BOX64_PATH=/opt/wine-9.10-staging-amd64/bin
export BOX64_LD_LIBRARY_PATH=/opt/wine-9.10-staging-amd64/lib/wine/x86_64-unix
taskset -a f0 box64 wine $@
EOF
然后给权限
chmod +x /usr/bin/startwine
输入startwine
运行wine