diff --git a/deb-ace/DEBIAN/control b/deb-ace/DEBIAN/control index cbb9abf..6d72970 100755 --- a/deb-ace/DEBIAN/control +++ b/deb-ace/DEBIAN/control @@ -8,7 +8,7 @@ Certainty: possible Check: binaries Type: binary, udeb Priority: optional -Depends: cn.flamescion.bookworm-compatibility-mode,bash,wget,sudo,libnotify-bin +Depends: amber-ce-loongnix | cn.flamescion.bookworm-compatibility-mode,bash,wget,sudo,libnotify-bin Section: utils Installed-Size: @@SIZE@@ Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。 diff --git a/deb-ace/DEBIAN/postinst b/deb-ace/DEBIAN/postinst index 52ff163..767ba0b 100755 --- a/deb-ace/DEBIAN/postinst +++ b/deb-ace/DEBIAN/postinst @@ -17,21 +17,39 @@ function zenity(){ sudo -u $user DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus zenity "$@" } -###检查aptss在不在 -if [ -z `which bookworm-run` ];then -echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit" -exit 1 +### 判断 ACE 类型 +if [[ `arch` == "loongarch64" ]]; then + # loongarch 架构有多个 ACE,优先安装至旧世界的 ACE + if [[ ! -z `which bookworm-run` ]]; then + aceCommand="bookworm-run" + fi + if [[ ! -z `which loongnix-run` ]]; then + aceCommand="loongnix-run" + fi + if [[ $aceCommand == "" ]]; then + echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit" + exit 1 + fi + echo "Installing Wine Runner to " $aceCommand +else + ###检查aptss在不在 + if [ -z `which bookworm-run` ];then + echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit" + exit 1 + fi + aceCommand="bookworm-run" fi -bookworm-run echo "Welcome to BCM! Trying to install package" + +$aceCommand echo "Welcome to BCM! Trying to install package" if [ -z "`bookworm-run which aptss`" ];then wget https://zunyun01.store.deepinos.org.cn/store/depends/spark-store-console-in-container_4.2.6.2_all.deb -O /tmp/ssconsole.deb -bookworm-run apt install /tmp/ssconsole.deb -y +$aceCommand apt install /tmp/ssconsole.deb -y rm /tmp/ssconsole.deb -f fi notify-send "Installing Wine Runner BCM, may cost some time please ensure your network is fine" notify-send "正在书虫兼容环境中安装 Wine 运行器,可能会花费一些时间,请保持网络畅通" -bookworm-run aptss update +$aceCommand aptss update cp /opt/apps/spark-deepin-wine-runner-ace/spark-deepin-wine-runner.deb /tmp -bookworm-run aptss reinstall /tmp/spark-deepin-wine-runner.deb -y +$aceCommand aptss reinstall /tmp/spark-deepin-wine-runner.deb -y -bookworm-run aptss clean +$aceCommand aptss clean diff --git a/deb-ace/DEBIAN/postrm b/deb-ace/DEBIAN/postrm index 6261d1c..14f0cb4 100755 --- a/deb-ace/DEBIAN/postrm +++ b/deb-ace/DEBIAN/postrm @@ -7,48 +7,33 @@ # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 # 基于 sh ################################################################################################################# -# 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告 -# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装) -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - rm -rf /opt/apps/deepin-wine-runner/ -fi -# 删除软件缓存(留着也没什么用了) -# 缓存目录:~/.cache/deepin-wine-runner -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - echo "清理程序缓存" - - for username in $(ls /home); do - echo /home/$username - if [ -d "/home/$username/.cache/deepin-wine-runner/" ]; then - rm -rf "/home/$username/.cache/deepin-wine-runner/" - fi - done - # 清理 root 用户的缓存文件 - echo /root - if [ -d "/root/.cache/deepin-wine-runner/" ]; then - rm -rf "/root/.cache/deepin-wine-runner/" +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + ### 判断 ACE 类型 + if [[ `arch` == "loongarch64" ]]; then + # loongarch 架构有多个 ACE,优先安装至旧世界的 ACE + if [[ ! -z `which bookworm-run` ]]; then + aceCommand="bookworm-run" + fi + if [[ ! -z `which loongnix-run` ]]; then + aceCommand="loongnix-run" + fi + if [[ $aceCommand == "" ]]; then + echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit" + #exit 1 + fi + echo "Removing Wine Runner to " $aceCommand + else + ###检查aptss在不在 + if [ -z `which bookworm-run` ];then + echo "Oh no, ssinstall have not installed bookworm-run dependency yet! Exit" + #exit 1 + fi + aceCommand="bookworm-run" fi + # 卸载应用 + $aceCommand apt purge spark-deepin-wine-runner -y | true + else echo "非卸载,跳过清理" fi -# 删除软件配置文件(只限“purge”) -# 配置目录:~/.config/deepin-wine-runner -if [ "$1" = "purge" ]; then - - echo "清理程序配置文件" - - for username in $(ls /home); do - echo /home/$username - if [ -d "/home/$username/.config/deepin-wine-runner/" ]; then - rm -rf "/home/$username/.config/deepin-wine-runner/" - fi - done - # 清理 root 用户的配置文件 - echo /root - if [ -d "/root/.config/deepin-wine-runner/" ]; then - rm -rf "/root/.config/deepin-wine-runner/" - fi -else - echo "非 purge,跳过清理" -fi