diff --git a/src/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui b/src/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui index a87c969..48349a2 100755 --- a/src/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui +++ b/src/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui @@ -5,7 +5,7 @@ exit fi # 定义应用列表文件路径 ACE_dir="/opt/apps/@PKG_NAME@/files/ace-env" - +HERE="$(dirname $(realpath $0))" # 读取所有.desktop文件,并构造应用列表 app_list=() for file in "$ACE_dir"/usr/share/applications/*.desktop; do @@ -44,10 +44,10 @@ selected_apps=$(zenity --list --title "应用列表" --column "是否卸载" --c if [ -n "$selected_apps" ]; then # 卸载选中的应用 (for app_desktop_path in $selected_apps; do - ace-uninstall-helper "$app_desktop_path" + ${HERE}/ace-uninstall-helper "$app_desktop_path" ret=$? if [ "$ret" != "0" ];then - zenity --error --width 768 --text "$app_desktop_path 卸载失败,中止操作\n请手动执行\nsudo ace-uninstall-helper $app_desktop_path \n查看报错!" + zenity --error --width 768 --text "$app_desktop_path 卸载失败,中止操作\n请手动执行\nsudo $0 $app_desktop_path \n查看报错!" exit 1 break fi