diff --git a/.github/workflows/building-off-line-package-arm.yml b/.github/workflows/building-off-line-package-arm.yml index 6b3a5e1..c8873f8 100644 --- a/.github/workflows/building-off-line-package-arm.yml +++ b/.github/workflows/building-off-line-package-arm.yml @@ -33,7 +33,7 @@ jobs: 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 + 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 @@ -45,9 +45,7 @@ jobs: ## 安装 sudo chroot debian apt install locales /tmp/wine-runner.deb 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 @@ -61,17 +59,10 @@ jobs: 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 fa57146..4e5a938 100644 --- a/.github/workflows/building-off-line-package.yml +++ b/.github/workflows/building-off-line-package.yml @@ -45,9 +45,7 @@ jobs: ## 安装 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 @@ -61,17 +59,10 @@ jobs: 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/off-line-shell/run.sh b/off-line-shell/run.sh index aefee61..e9d0eb9 100755 --- a/off-line-shell/run.sh +++ b/off-line-shell/run.sh @@ -2,43 +2,18 @@ SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) # /opt 目录识别 option="" -for path in `ls /opt` -do - echo /opt/$path - if [[ $path != wine-staging ]]; then - # 支持识别正确的 wine - mkdir -pv "$SHELL_FOLDER/opt/$path" - option="$option --dev-bind /opt/$path /opt/$path" - fi -done -wineName=(deepin-wine - deepin-wine8-stable - deepin-wine6-stable - deepin-wine5-stable - spark-wine - spark-wine8 - deepin-wine6-vannila - spark-wine7-devel - spark-wine8-wow - deepin-wine5 - ukylin-wine - okylin-wine - bookworm-run -) -for i in ${wineName[*]}; do - if [[ -e /usr/bin/$i ]]; then - option="$option --dev-bind /usr/bin/$i /usr/bin/$i" - if [[ ! -e "$SHELL_FOLDER/bin/$i" ]]; then - touch "$SHELL_FOLDER/bin/$i" - fi - fi -done + +if [[ -d /usr/lib32 ]]; then + option="$option --dev-bind \"$SHELL_FOLDER/lib32\" /usr/lib32 " +fi + +if [[ -d /usr/lib64 ]]; then + option="$option --dev-bind \"$SHELL_FOLDER/lib64\" /usr/lib64 " +fi + "$SHELL_FOLDER/bwrap" --dev-bind / / \ - --dev-bind "$SHELL_FOLDER/opt" /opt \ --dev-bind "$SHELL_FOLDER/bin" /usr/bin \ --dev-bind "$SHELL_FOLDER/lib" /usr/lib \ - --dev-bind "$SHELL_FOLDER/lib32" /usr/lib32 \ - --dev-bind "$SHELL_FOLDER/lib64" /usr/lib64 \ --dev-bind /usr/lib/locale /usr/lib/locale \ $option \ - $SHELL_FOLDER/runner/deepin-wine-runner + $SHELL_FOLDER/runner/deepin-wine-runner $*