From d335a72aeed2dec15c363a55280e881388b112b7 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 23 Jul 2024 22:19:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../building-off-line-package-arm.yml | 77 +++++++++++++++++++ .../workflows/building-off-line-package.yml | 1 - 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/building-off-line-package-arm.yml diff --git a/.github/workflows/building-off-line-package-arm.yml b/.github/workflows/building-off-line-package-arm.yml new file mode 100644 index 0000000..c52c55f --- /dev/null +++ b/.github/workflows/building-off-line-package-arm.yml @@ -0,0 +1,77 @@ +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/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 + + \ No newline at end of file diff --git a/.github/workflows/building-off-line-package.yml b/.github/workflows/building-off-line-package.yml index fe82053..c52c55f 100644 --- a/.github/workflows/building-off-line-package.yml +++ b/.github/workflows/building-off-line-package.yml @@ -50,7 +50,6 @@ jobs: 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