mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-13 01:58:27 +08:00
78 lines
3.4 KiB
YAML
78 lines
3.4 KiB
YAML
name: Building Wine Runner Off-line Pages(amd64)
|
|
run-name: ${{ github.actor }} Building Wine Runner Off-line Pages(amd64) 🚀
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
Explore-GitHub-Actions:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Building DEB
|
|
env:
|
|
GUSER: ${{ secrets.GUSER }}
|
|
PASSWORD: ${{ secrets.PASSWORD }}
|
|
UPLOADURL: ${{ secrets.UPLOADURL }}
|
|
run: |
|
|
# 获取所需数据
|
|
cpu=$(cat /proc/cpuinfo | grep processor | wc -l)
|
|
# 配置环境
|
|
sudo apt update
|
|
sudo apt install python3-requests debootstrap xz-utils -y
|
|
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools psmisc -y
|
|
cd ~
|
|
mkdir package
|
|
# 部署 chroot 环境
|
|
sudo debootstrap 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 dpkg --add-architecture i386
|
|
sudo chroot debian apt update
|
|
sudo chroot debian apt install wget -y
|
|
sudo chroot debian wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
|
sudo chroot debian wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
|
|
sudo chroot debian apt update
|
|
## 获取 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 winehq-devel fcitx xfce4-terminal -y
|
|
# 构建软件包
|
|
mkdir package/opt -p
|
|
mkdir package/runner -p
|
|
sudo cp debian/opt/wine-devel package/opt -rv
|
|
sudo cp debian/usr/bin package -rv
|
|
sudo cp debian/usr/lib package -rv
|
|
sudo cp debian/usr/lib32 package -rv
|
|
sudo cp debian/usr/lib64 package -rv
|
|
sudo cp debian/opt/apps/deepin-wine-runner/* package/runner -rv
|
|
cp deep-wine-runner/off-line-shell/run.sh package -rv
|
|
cp deep-wine-runner/off-line-shell/bwrap_amd64 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
|
|
cp deep-wine-runner/off-line-shell/compression-packager.sh spark-deepin-wine-runner-off-line.sh
|
|
cat spark-deepin-wine-runner-off-line.tar.xz >> spark-deepin-wine-runner-off-line.sh
|
|
- 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
|
|
- name: upload result
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: spark-deepin-wine-runner-off-line.sh
|
|
path: /home/runner/spark-deepin-wine-runner-off-line.sh
|
|
|
|
|