1.0.8 修复GXDE上无法选择

This commit is contained in:
2025-10-24 13:41:56 +08:00
parent 4aaef32ba9
commit 8d49cec009
3 changed files with 33 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ Source: amber-ce
Version: 1.0.8
Architecture: amd64
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: 48712
Installed-Size: 48716
Depends: bubblewrap, flatpak, policykit-1 | pkexec | polkit-1 | polkit, systemd, procps,coreutils,fuse-overlayfs,xz-utils
Section: misc
Conflicts: ace-host-integration

View File

@@ -0,0 +1,30 @@
#!/bin/bash
if [[ ! -e "/usr/share/gxde-api" ]];then
exit 0 # No needed
fi
# 函数:检查目录并创建符号链接
process_directory() {
local source_dir="$1"
local target_dir="$2"
local name="$3"
if [ -d "$source_dir" ] && [ -n "$(ls -A "$source_dir")" ]; then
ln -sv $source_dir/* "$target_dir" 2>/dev/null
find "$target_dir" -xtype l -exec echo '{} is invalid now and going to be cleaned' \; -exec unlink {} \; 2>/dev/null &
else
echo "$name directory is empty or does not exist, skipping..."
fi
}
# 处理 applications 目录
process_directory "/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/applications/" \
"/usr/local/share/applications/" "Applications"
# 处理 icons 目录
process_directory "/var/lib/apm/apm/files/ace-env/amber-ce-tools/data-dir/icons/" \
"/usr/local/share/icons/" "Icons"
# 等待所有后台任务完成
wait

View File

@@ -120,6 +120,7 @@ case "$1" in
fi
amber-pm-debug amber-pm-dstore-patch
apm-nvidia-toggle
amber-pm-gxde-desktop-fix
;;
download|search|policy|list|update|clean)
command=$1
@@ -147,6 +148,7 @@ case "$1" in
exit $exit_code
fi
amber-pm-debug amber-pm-dstore-patch
amber-pm-gxde-desktop-fix
;;
run)
# 运行包命令:第二个参数必须是包名