deep-wine-runner/.github/workflows/building-off-line-package-arm.yml
gfdgd_xi dd4785d8e2
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
Building Wine Runner Off-line Pages(arm64) / Explore-GitHub-Actions (push) Waiting to run
Building Wine Runner Off-line Pages(amd64) / Explore-GitHub-Actions (push) Waiting to run
加入box64
2024-07-25 09:40:29 +08:00

76 lines
3.3 KiB
YAML

name: Building Wine Runner Off-line Pages(arm64)
run-name: ${{ github.actor }} Building Wine Runner Off-line Pages(arm64) 🚀
on:
push:
workflow_dispatch:
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- name: Building DEB
run: |
# 获取所需数据
cpu=$(cat /proc/cpuinfo | grep processor | wc -l)
# 配置环境
sudo apt update
sudo apt install python3-requests debootstrap xz-utils qemu-user-static -y
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools psmisc -y
cd ~
mkdir package
# 部署 chroot 环境
sudo debootstrap --arch=arm64 bookworm debian
wget https://github.com/gfdgd-xi/deep-wine-runner/raw/main/pardus-chroot
sudo cp pardus-chroot /usr/bin
sudo chmod 777 /usr/bin/pardus-chroot
sudo pardus-chroot debian
### 配置容器
## 加入 wine 源
sudo chroot debian apt update
sudo chroot debian apt install sudo gpg wget -y
sudo chroot debian wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
sudo chroot debian bash -c "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 chroot debian apt update
sudo chroot debian apt install box64 wine -y
## 获取 Wine 运行器安装包
git clone https://github.com/gfdgd-xi/deep-wine-runner --depth=1
cd deep-wine-runner
make package-deb
cd ..
url=`python3 deep-wine-runner/off-line-shell/GetNewestDebUrl.py`
#wget $url
mv deep-wine-runner/spark-deepin-wine-runner.deb debian/tmp/wine-runner.deb
## 安装
sudo chroot debian apt install locales /tmp/wine-runner.deb fcitx xfce4-terminal -y
sudo chroot debian apt install libxenmisc4.17 libxenstore4 libxenforeignmemory1 -y
# 构建软件包
mkdir package/runner -p
sudo cp debian/usr/local/bin package -rv
sudo cp debian/usr/bin package -rv
sudo cp debian/usr/lib package -rv
sudo cp debian/usr/share package -rv
#sudo cp debian/usr/lib64 package -rv
sudo cp debian/opt/apps/deepin-wine-runner/* package/runner -rv
# 精简运行器体积
sudo rm -rf package/runner/2048
sudo rm -rf package/runner/geek.exe
sudo rm -rf package/runner/BeCyIconGrabber.exe
sudo rm -rf package/runner/Icon
sudo rm -rf package/runner/RegShot.exe
sudo rm -rf package/runner/novnc
sudo rm -rf package/bin/wine*
cp deep-wine-runner/off-line-shell/run.sh package -rv
cp deep-wine-runner/off-line-shell/bwrap_arm64 package/bwrap -rv
sudo chmod 777 -Rv package ; true
cd package
# 添加 Wine 运行器离线模式标识
touch runner/off-line.lock
tar -cvf ../spark-deepin-wine-runner-off-line.tar *
cd ..
xz -T $cpu spark-deepin-wine-runner-off-line.tar
- name: upload result
uses: actions/upload-artifact@v1
with:
name: spark-deepin-wine-runner-off-line.tar.xz
path: /home/runner/spark-deepin-wine-runner-off-line.tar.xz