mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-05-23 08:19:51 +08:00
update: 通用ACE
This commit is contained in:
parent
6ee00a33b2
commit
90bf57d884
ace-base.config
debian
replacer.shsrc
etc
X11/Xsession.d
profile.d
xdg/autostart
opt/apps
@PKG_NAME@
ACE logo.pngACE-transparent.pngACE-uninstaller-orig.png
files
amber-ce-tools
ace-host-integration
DEBIAN
etc/environment.d
opt/ace-host-integration
ace-upgrader
additional-data-dir-in-container
bin-override
@EXEC_NAME@README.mdbwrapgiohost-spawn-aarch64host-spawn-loongarch64host-spawn-x86_64pkexecsudoxdg-open
container-init
data-dir
bin
ace-gxde-fixerace-initace-runace-run-bwrapace-uninstall-helperace-uninstall-helper-guiamber-ce-configure-nvidia
build-container.shamber-ce-bookworm
usr
4
ace-base.config
Normal file
4
ace-base.config
Normal file
@ -0,0 +1,4 @@
|
||||
@PKG_NAME@=amber-ce-bookworm
|
||||
@HOST_NAME@=Amber-CE-Bookworm
|
||||
@EXEC_NAME@=bookworm-run
|
||||
@PRETTY_NAME@=Bookworm
|
2
debian/install
vendored
2
debian/install
vendored
@ -1 +1 @@
|
||||
src/* /
|
||||
pkg/* /
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -6,7 +6,9 @@
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
cd src/opt/apps/amber-ce-bookworm/files && bash build-container.sh $(shell uname -m)
|
||||
rm -rf pkg/
|
||||
cp -r src/ pkg/
|
||||
cd pkg/opt/apps/amber-ce-bookworm/files && bash build-container.sh $(shell uname -m)
|
||||
|
||||
override_dh_dwz:
|
||||
|
||||
|
62
replacer.sh
Normal file
62
replacer.sh
Normal file
@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 读取配置文件并解析键值对
|
||||
declare -A REPLACEMENTS
|
||||
while IFS='=' read -r key value; do
|
||||
[[ $key =~ ^@.*@$ ]] || continue # 仅处理形如 @VAR@ 的键
|
||||
REPLACEMENTS["$key"]="$value"
|
||||
done < ace-base.config
|
||||
|
||||
# 目标目录(默认当前目录)
|
||||
if [[ -z "$1" ]];then
|
||||
echo "Need appoint target dir."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
TARGET_DIR="${1}"
|
||||
|
||||
# 替换文件内容
|
||||
replace_in_files() {
|
||||
local file="$1"
|
||||
local temp_file="${file}.tmp"
|
||||
|
||||
# 遍历所有替换规则
|
||||
cp "$file" "$temp_file"
|
||||
for key in "${!REPLACEMENTS[@]}"; do
|
||||
sed -i "s|$key|${REPLACEMENTS[$key]}|g" "$temp_file"
|
||||
done
|
||||
|
||||
# 确保有更改后才覆盖原文件
|
||||
if ! cmp -s "$file" "$temp_file"; then
|
||||
mv "$temp_file" "$file"
|
||||
echo "Updated content in: $file"
|
||||
else
|
||||
rm "$temp_file"
|
||||
fi
|
||||
}
|
||||
|
||||
# 递归扫描目录,处理文本文件的内容
|
||||
find "$TARGET_DIR" -type f | while read -r file; do
|
||||
if file --mime-type "$file" | grep -q 'text/'; then
|
||||
replace_in_files "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# 处理文件名和目录名
|
||||
find "$TARGET_DIR" -depth | while read -r old_name; do
|
||||
new_name="$old_name"
|
||||
|
||||
# 替换文件名中的占位符
|
||||
for key in "${!REPLACEMENTS[@]}"; do
|
||||
new_name="${new_name//$key/${REPLACEMENTS[$key]}}"
|
||||
done
|
||||
|
||||
# 如果名称有变化,则重命名
|
||||
if [[ "$old_name" != "$new_name" ]]; then
|
||||
mv "$old_name" "$new_name"
|
||||
echo "Renamed: $old_name -> $new_name"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Processing completed."
|
@ -10,7 +10,7 @@ fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||
ACE_path="/opt/apps/@PKG_NAME@/files/ace-env/amber-ce-tools/data-dir/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||
fi
|
@ -9,7 +9,7 @@ fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||
ACE_path="/opt/apps/@PKG_NAME@/files/ace-env/amber-ce-tools/data-dir/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||
fi
|
11
src/etc/xdg/autostart/@PKG_NAME@.ace-gxde-fixer.desktop
Normal file
11
src/etc/xdg/autostart/@PKG_NAME@.ace-gxde-fixer.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=@PKG_NAME@.ace-gxde-fixer
|
||||
Name[zh_CN]=@PKG_NAME@.ace-gxde-fixer
|
||||
Comment=@PKG_NAME@.ace-gxde-fixer
|
||||
Type=Application
|
||||
Exec=/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
|
||||
Icon=@PKG_NAME@
|
||||
Categories=System
|
||||
|
||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=bookworm.ace-gxde-fixer
|
||||
Name[zh_CN]=bookworm.ace-gxde-fixer
|
||||
Comment=bookworm.ace-gxde-fixer
|
||||
Type=Application
|
||||
Exec=/opt/apps/amber-ce-bookworm/files/bin/bookworm.ace-gxde-fixer
|
||||
Icon=amber-ce-bookworm
|
||||
Categories=System
|
||||
|
||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
Before ![]() (image error) Size: 196 KiB After ![]() (image error) Size: 196 KiB ![]() ![]() |
Before ![]() (image error) Size: 134 KiB After ![]() (image error) Size: 134 KiB ![]() ![]() |
Before ![]() (image error) Size: 118 KiB After ![]() (image error) Size: 118 KiB ![]() ![]() |
@ -44,17 +44,17 @@ function do_integrate(){
|
||||
local file=$1
|
||||
if [ -f "$file" ]; then
|
||||
exec_line=$(grep "^Exec=" "$file")
|
||||
# 检查是否是bookworm-run
|
||||
if [[ $exec_line != Exec=bookworm-run* ]]; then
|
||||
# 检查是否是@EXEC_NAME@
|
||||
if [[ $exec_line != Exec="@EXEC_NAME@ "* ]]; then
|
||||
echo "$file is detected. Processing host system integration..."
|
||||
sed -i 's|^Exec=\(.*\)|Exec=bookworm-run \1|' "$file"
|
||||
sed -i 's|^Exec=\(.*\)|Exec=@EXEC_NAME@ \1|' "$file"
|
||||
sed -i '/^TryExec=/d' "$file"
|
||||
sed -i '/^Name=/ s/$/ (Bookworm)/' "$file"
|
||||
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (Bookworm)/" "$file"
|
||||
sed -i '/^Name=/ s/$/ (@PRETTY_NAME@)/' "$file"
|
||||
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (@PRETTY_NAME@)/" "$file"
|
||||
icon_line=$(grep "^Icon=" "$file")
|
||||
if [[ "$icon_line" == "Icon=/"* ]]; then
|
||||
# 如果Icon=后面接的是/,则添加前缀
|
||||
sed -i 's|^Icon=/|Icon=/opt/apps/amber-ce-bookworm/files/ace-env/|' "$file"
|
||||
sed -i 's|^Icon=/|Icon=/opt/apps/@PKG_NAME@/files/ace-env/|' "$file"
|
||||
fi
|
||||
|
||||
fi
|
@ -167,10 +167,10 @@ fi
|
||||
|
||||
user=$(who | awk '{print $1}' | head -n 1)
|
||||
|
||||
log.info "ACE Bookworm环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
||||
notify-send -a amber-ce-bookworm "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
||||
log.info "ACE @PRETTY_NAME@ 环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
||||
notify-send -a @PKG_NAME@ "ACE @PRETTY_NAME@" "ACE @PRETTY_NAME@环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
||||
|
||||
${APT_COMMAND} clean
|
||||
${APT_COMMAND} full-upgrade -y
|
||||
${APT_COMMAND} clean
|
||||
notify-send -a amber-ce-bookworm "ACE兼容环境" "自动升级结束"
|
||||
notify-send -a @PKG_NAME@ "ACE兼容环境" "自动升级结束"
|
2
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/bwrap
Executable file
2
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/bwrap
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
host-spawn /opt/apps/@PKG_NAME@/files/bin/ace-run-bwrap "$@"
|
@ -2,5 +2,5 @@
|
||||
if [ "$UID" = "0" ];then
|
||||
$@
|
||||
else
|
||||
host-spawn pkexec bookworm-run $@
|
||||
host-spawn pkexec @EXEC_NAME@ $@
|
||||
fi
|
6
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/sudo
Executable file
6
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/sudo
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$UID" = "0" ];then
|
||||
/usr/bin/sudo $@
|
||||
else
|
||||
host-spawn sudo @EXEC_NAME@ sudo env IS_ACE_ENV="1" PATH="/amber-ce-tools/bin-override:$PATH" "$@"
|
||||
fi
|
@ -116,15 +116,15 @@ mkdir -p /usr/share/icons
|
||||
mkdir -p /usr/share/themes
|
||||
|
||||
## init host-spawn
|
||||
unlink /flamescion-container-tools/bin-override/host-spawn
|
||||
ln -sfv /flamescion-container-tools/bin-override/host-spawn-$(uname -m) /flamescion-container-tools/bin-override/host-spawn
|
||||
unlink /amber-ce-tools/bin-override/host-spawn
|
||||
ln -sfv /amber-ce-tools/bin-override/host-spawn-$(uname -m) /amber-ce-tools/bin-override/host-spawn
|
||||
|
||||
## install host-integration
|
||||
|
||||
apt install --reinstall /flamescion-container-tools/ace-host-integration.deb
|
||||
apt install --reinstall /amber-ce-tools/ace-host-integration.deb
|
||||
|
||||
|
||||
cd /flamescion-container-tools/data-dir/
|
||||
cd /amber-ce-tools/data-dir/
|
||||
ln -sfv ../../usr/share/applications/ .
|
||||
ln -sfv ../../usr/share/icons/ .
|
||||
#ln -svf ../../usr/share/mime .
|
7
src/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
Executable file
7
src/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
if [ "$UID" != "0" ];then
|
||||
pkexec $0
|
||||
exit
|
||||
fi
|
||||
|
||||
@EXEC_NAME@ /opt/ace-host-integration/ace-host-integration
|
@ -11,6 +11,7 @@ pparent_dir=`dirname $parent_dir`
|
||||
ppparent_dir=`dirname $pparent_dir`
|
||||
PKGNAME=`basename $ppparent_dir`
|
||||
else
|
||||
|
||||
PKGNAME=$PACKAGE_NAME
|
||||
fi
|
||||
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||
@ -19,6 +20,7 @@ echo "Uncompress the env...."
|
||||
tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/
|
||||
fi
|
||||
|
||||
HERE="$(dirname $(realpath $0))"
|
||||
|
||||
|
||||
non_root_user=$(who | awk '{print $1}' | head -n 1)
|
||||
@ -26,16 +28,8 @@ uid=$(id -u $non_root_user)
|
||||
|
||||
function bookworm-run(){
|
||||
bwrap --dev-bind $chrootEnvPath/ / \
|
||||
--setenv LANG "$LANG" \
|
||||
--setenv LC_COLLATE "$LC_COLLATE" \
|
||||
--setenv LC_CTYPE "$LC_CTYPE" \
|
||||
--setenv LC_MONETARY "$LC_MONETARY" \
|
||||
--setenv LC_MESSAGES "$LC_MESSAGES" \
|
||||
--setenv LC_NUMERIC "$LC_NUMERIC" \
|
||||
--setenv LC_TIME "$LC_TIME" \
|
||||
--setenv LC_ALL "$LC_ALL" \
|
||||
--setenv PULSE_SERVER /run/user/$uid/pulse/native \
|
||||
--setenv PATH /flamescion-container-tools/bin-override:$PATH \
|
||||
--setenv PATH /amber-ce-tools/bin-override:$PATH \
|
||||
--setenv IS_ACE_ENV "1" \
|
||||
--dev-bind-try /media /media \
|
||||
--dev-bind-try /tmp /tmp \
|
||||
@ -49,7 +43,7 @@ bwrap --dev-bind $chrootEnvPath/ / \
|
||||
--bind-try /usr/share/themes /usr/local/share/themes \
|
||||
--bind-try /usr/share/icons /usr/local/share/icons \
|
||||
--bind-try /usr/share/fonts /usr/local/share/fonts \
|
||||
--hostname Amber-CE-Bookworm \
|
||||
--hostname @HOST_NAME@ \
|
||||
--unshare-uts \
|
||||
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \
|
||||
--dev-bind-try /home /home \
|
||||
@ -59,7 +53,7 @@ bwrap --dev-bind $chrootEnvPath/ / \
|
||||
}
|
||||
|
||||
echo "Update the flamescion container tools"
|
||||
cp -r `dirname $chrootEnvPath`/flamescion-container-tools/ $chrootEnvPath
|
||||
cp -r `dirname $chrootEnvPath`/amber-ce-tools/ $chrootEnvPath
|
||||
|
||||
|
||||
export container_user_gid="$(sudo -u $non_root_user id -rg)"
|
||||
@ -73,7 +67,7 @@ export container_user_uid="$(sudo -u $non_root_user id -ru)"
|
||||
#####init
|
||||
|
||||
|
||||
bookworm-run bash /flamescion-container-tools/container-init/init.sh
|
||||
bookworm-run bash /amber-ce-tools/container-init/init.sh
|
||||
rm $chrootEnvPath/etc/localtime
|
||||
cp $(realpath /etc/localtime) $chrootEnvPath/etc/localtime
|
||||
chmod 777 $chrootEnvPath/etc/localtime
|
||||
@ -82,16 +76,8 @@ bookworm-run touch /finish.flag
|
||||
bookworm-run apt clean
|
||||
bookworm-run chown -R $(who | awk '{print $1}' | head -n 1) /usr/lib/locale/
|
||||
sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ / \
|
||||
--setenv LANG "$LANG" \
|
||||
--setenv LC_COLLATE "$LC_COLLATE" \
|
||||
--setenv LC_CTYPE "$LC_CTYPE" \
|
||||
--setenv LC_MONETARY "$LC_MONETARY" \
|
||||
--setenv LC_MESSAGES "$LC_MESSAGES" \
|
||||
--setenv LC_NUMERIC "$LC_NUMERIC" \
|
||||
--setenv LC_TIME "$LC_TIME" \
|
||||
--setenv LC_ALL "$LC_ALL" \
|
||||
--setenv PULSE_SERVER /run/user/$uid/pulse/native \
|
||||
--setenv PATH /flamescion-container-tools/bin-override:$PATH \
|
||||
--setenv PATH /amber-ce-tools/bin-override:$PATH \
|
||||
--setenv IS_ACE_ENV "1" \
|
||||
--dev-bind $chrootEnvPath/ / \
|
||||
--dev-bind-try /media /media \
|
||||
@ -106,7 +92,7 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
|
||||
--bind-try /usr/share/themes /usr/local/share/themes \
|
||||
--bind-try /usr/share/icons /usr/local/share/icons \
|
||||
--bind-try /usr/share/fonts /usr/local/share/fonts \
|
||||
--hostname Amber-CE-Bookworm \
|
||||
--hostname @HOST_NAME@ \
|
||||
--unshare-uts \
|
||||
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \
|
||||
--dev-bind-try /home /home \
|
||||
@ -114,4 +100,4 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
|
||||
bookworm-run update-locale LANG=$LANG
|
||||
chown -R root $chrootEnvPath
|
||||
chmod 777 -R $chrootEnvPath/usr/share/icons
|
||||
amber-ce-bookworm-configure-nvidia || true
|
||||
${HERE}/amber-ce-configure-nvidia || true
|
@ -6,6 +6,7 @@ pparent_dir=`dirname $parent_dir`
|
||||
ppparent_dir=`dirname $pparent_dir`
|
||||
PKGNAME=`basename $ppparent_dir`
|
||||
export ACE_PACKAGE_NAME=$PKGNAME
|
||||
|
||||
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||
|
||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||
@ -96,9 +97,9 @@ ENV_VARS=(
|
||||
"LC_TIME $LC_TIME"
|
||||
"LC_ALL $LC_ALL"
|
||||
"PULSE_SERVER /run/user/\$uid/pulse/native"
|
||||
"PATH /flamescion-container-tools/bin-override:\$PATH"
|
||||
"PATH /amber-ce-tools/bin-override:\$PATH"
|
||||
"IS_ACE_ENV 1"
|
||||
"XDG_DATA_DIRS /flamescion-container-tools/additional-data-dir-in-container:\$XDG_DATA_DIRS"
|
||||
"XDG_DATA_DIRS /amber-ce-tools/additional-data-dir-in-container:\$XDG_DATA_DIRS"
|
||||
)
|
||||
|
||||
BIND_DIRS=(
|
||||
@ -120,7 +121,7 @@ BIND_DIRS=(
|
||||
"--dev-bind-try /home /home"
|
||||
)
|
||||
EXTRA_ARGS=(
|
||||
"--hostname Amber-CE-Bookworm"
|
||||
"--hostname @HOST_NAME@"
|
||||
"--unshare-uts"
|
||||
"--cap-add CAP_SYS_ADMIN"
|
||||
)
|
@ -6,6 +6,7 @@ pparent_dir=`dirname $parent_dir`
|
||||
ppparent_dir=`dirname $pparent_dir`
|
||||
PKGNAME=`basename $ppparent_dir`
|
||||
export ACE_PACKAGE_NAME=$PKGNAME
|
||||
|
||||
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
|
||||
|
||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||
@ -96,9 +97,9 @@ ENV_VARS=(
|
||||
"LC_TIME $LC_TIME"
|
||||
"LC_ALL $LC_ALL"
|
||||
"PULSE_SERVER /run/user/\$uid/pulse/native"
|
||||
"PATH /flamescion-container-tools/bin-override:\$PATH"
|
||||
"PATH /amber-ce-tools/bin-override:\$PATH"
|
||||
"IS_ACE_ENV 1"
|
||||
"XDG_DATA_DIRS /flamescion-container-tools/additional-data-dir-in-container:\$XDG_DATA_DIRS"
|
||||
"XDG_DATA_DIRS /amber-ce-tools/additional-data-dir-in-container:\$XDG_DATA_DIRS"
|
||||
)
|
||||
|
||||
BIND_DIRS=(
|
||||
@ -120,7 +121,7 @@ BIND_DIRS=(
|
||||
"--dev-bind-try /home /home"
|
||||
)
|
||||
EXTRA_ARGS=(
|
||||
"--hostname Amber-CE-Bookworm"
|
||||
"--hostname @HOST_NAME@"
|
||||
"--unshare-uts"
|
||||
# "--cap-add CAP_SYS_ADMIN"
|
||||
)
|
||||
@ -147,6 +148,8 @@ for var in "${EXTRA_SCRIPTS[@]}"; do
|
||||
$var
|
||||
done
|
||||
|
||||
|
||||
|
||||
# 添加最终的 bash 命令
|
||||
add_command "bash -c \"/usr/bin/bwrap ${container_command}\""
|
||||
|
@ -8,7 +8,7 @@ fi
|
||||
unset ABSOLUTE_PATH IN_CONTAINER_PATH PKGNAME_GUESS DPKG_LIST_FILE ACE_ENV_PATH
|
||||
|
||||
# 定义环境路径变量
|
||||
ACE_ENV_PATH="/opt/apps/amber-ce-bookworm/files/ace-env"
|
||||
ACE_ENV_PATH="/opt/apps/@PKG_NAME@/files/ace-env"
|
||||
|
||||
# 检查参数个数
|
||||
if [ "$#" -ne 1 ]; then
|
@ -4,7 +4,7 @@ pkexec $0
|
||||
exit
|
||||
fi
|
||||
# 定义应用列表文件路径
|
||||
ACE_dir="/opt/apps/amber-ce-bookworm/files/ace-env"
|
||||
ACE_dir="/opt/apps/@PKG_NAME@/files/ace-env"
|
||||
|
||||
# 读取所有.desktop文件,并构造应用列表
|
||||
app_list=()
|
||||
@ -44,7 +44,7 @@ selected_apps=$(zenity --list --title "应用列表" --column "是否卸载" --c
|
||||
if [ -n "$selected_apps" ]; then
|
||||
# 卸载选中的应用
|
||||
(for app_desktop_path in $selected_apps; do
|
||||
ace-bookworm-uninstall-helper "$app_desktop_path"
|
||||
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查看报错!"
|
@ -17,10 +17,9 @@ if [ -z "$nvidia_version" ]; then
|
||||
fi
|
||||
|
||||
# 2\. 目标目录准备
|
||||
ACE_DIR="/opt/apps/amber-ce-bookworm/files/ace-env"
|
||||
ACE_DIR="/opt/apps/@PKG_NAME@/files/ace-env"
|
||||
if [[ ! -e "${ACE_DIR}" ]];then
|
||||
log.error "未检测到 ACE Bookworm 安装,请安装后再试 ACE Bookworm is not detected. Please try again after installation"
|
||||
spark-store spk://store/tools/cn.flamescion.bookworm-compatibility-mode &
|
||||
log.info "请按回车关闭... Press Enter to close..."
|
||||
read
|
||||
exit 1
|
@ -38,7 +38,7 @@ sudo rm -rf ace-env/var/cache/apt/archives/*.deb
|
||||
sudo tar -I 'xz -T0' -cvf ace-env.tar.xz ace-env/*
|
||||
sudo rm -rf ace-env
|
||||
|
||||
pushd flamescion-container-tools/ace-host-integration
|
||||
pushd amber-ce-tools/ace-host-integration
|
||||
|
||||
dpkg-deb -Z xz -b . ../ace-host-integration.deb
|
||||
|
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=ACE Bookworm Software Uninstaller
|
||||
Name[zh_CN]=ACE Bookworm软件卸载器
|
||||
Comment=用于卸载ACE容器的应用
|
||||
Type=Application
|
||||
Exec=/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
||||
Icon=ACE-bookworm-uninstaller
|
||||
Categories=System
|
||||
|
||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ "$UID" != "0" ];then
|
||||
pkexec $0
|
||||
exit
|
||||
fi
|
||||
|
||||
bookworm-run /opt/ace-host-integration/ace-host-integration
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
host-spawn /opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap "$@"
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ "$UID" = "0" ];then
|
||||
/usr/bin/sudo $@
|
||||
else
|
||||
host-spawn sudo bookworm-run sudo env IS_ACE_ENV="1" PATH="/flamescion-container-tools/bin-override:$PATH" "$@"
|
||||
fi
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
"appid": "amber-ce-bookworm",
|
||||
"name": "cn.flamescion.bookworm-compatibility-mode",
|
||||
"version": "12.1.4",
|
||||
"arch": ["amd64"],
|
||||
"permissions": {
|
||||
"autostart": true,
|
||||
"notification": true,
|
||||
"trayicon": true,
|
||||
"clipboard": true,
|
||||
"account": true,
|
||||
"bluetooth": true,
|
||||
"camera": true,
|
||||
"audio_record": true,
|
||||
"installed_apps": true
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper
|
@ -1 +0,0 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
@ -1 +0,0 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/amber-ce-bookworm-configure-nvidia
|
@ -1 +0,0 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/bookworm-run
|
@ -1,12 +1,12 @@
|
||||
[Unit]
|
||||
Description=Amber CE Auto upgrade
|
||||
Description=Amber CE @PRETTY_NAME@ Auto upgrade
|
||||
After=apt-daily.service network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
|
||||
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
ExecStart=bookworm-run /flamescion-container-tools/ace-upgrader/ace-upgrader
|
||||
ExecStart=@EXEC_NAME@ /flamescion-container-tools/ace-upgrader/ace-upgrader
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
@ -10,7 +10,7 @@ fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/ace-env/flamescion-container-tools/data-dir/"
|
||||
ACE_path="/opt/apps/@PKG_NAME@/files/ace-env/amber-ce-tools/data-dir/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
|
||||
fi
|
11
src/usr/share/applications/@PKG_NAME@-uninstaller.desktop
Normal file
11
src/usr/share/applications/@PKG_NAME@-uninstaller.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=ACE @PRETTY_NAME@ Software Uninstaller
|
||||
Name[zh_CN]=ACE @PRETTY_NAME@ 软件卸载器
|
||||
Comment=用于卸载ACE容器的应用
|
||||
Type=Application
|
||||
Exec=/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui
|
||||
Icon=@PKG_NAME@-uninstaller
|
||||
Categories=System
|
||||
|
||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
@ -1,9 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Categories=utils
|
||||
Exec=bookworm-run %U
|
||||
Icon=amber-ce-bookworm
|
||||
Name=Amber CE Bookworm
|
||||
Name[zh_CN]=ACE Bookworm兼容环境
|
||||
Exec=@EXEC_NAME@ %U
|
||||
Icon=@PKG_NAME@
|
||||
Name=Amber CE @PRETTY_NAME@
|
||||
Name[zh_CN]=ACE @PRETTY_NAME@兼容环境
|
||||
Keywords=BCM,ACE,ace,mode
|
||||
StartupNotify=true
|
||||
Type=Application
|
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=ACE Bookworm Software Uninstaller
|
||||
Name[zh_CN]=ACE Bookworm软件卸载器
|
||||
Comment=用于卸载ACE容器的应用
|
||||
Type=Application
|
||||
Exec=/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
||||
Icon=ACE-bookworm-uninstaller
|
||||
Categories=System
|
||||
|
||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Categories=utils
|
||||
Exec=bookworm-run %U
|
||||
Icon=amber-ce-bookworm
|
||||
Name=Amber CE Bookworm
|
||||
Name[zh_CN]=ACE Bookworm兼容环境
|
||||
Keywords=BCM,ACE,ace,mode
|
||||
StartupNotify=true
|
||||
Type=Application
|
||||
Terminal=true
|
||||
Categories=System
|
Before ![]() (image error) Size: 79 KiB After ![]() (image error) Size: 79 KiB ![]() ![]() |
Before ![]() (image error) Size: 93 KiB After ![]() (image error) Size: 93 KiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 79 KiB |
Binary file not shown.
Before ![]() (image error) Size: 93 KiB |
@ -2,17 +2,17 @@
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>bookworm.ace-gxde-fixer</vendor>
|
||||
<vendor>@PKG_NAME@.ace-gxde-fixer</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="bookworm.ace-gxde-fixer">
|
||||
<description>运行bookworm.ace-gxde-fixer需要权限</description>
|
||||
<message>要使用bookworm.ace-gxde-fixer需要权限</message>
|
||||
<action id="@PKG_NAME@.ace-gxde-fixer">
|
||||
<description>运行@PKG_NAME@.ace-gxde-fixer需要权限</description>
|
||||
<message>要使用@PKG_NAME@.ace-gxde-fixer需要权限</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/amber-ce-bookworm/files/bin/bookworm.ace-gxde-fixer</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
@ -2,17 +2,17 @@
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<vendor>amber-ce-bookworm.ace-uninstaller</vendor>
|
||||
<vendor>@PKG_NAME@.ace-uninstaller</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="amber-ce-bookworm.ace-uninstaller">
|
||||
<description>运行amber-ce-bookworm.ace-uninstaller需要权限</description>
|
||||
<message>要使用amber-ce-bookworm.ace-uninstaller需要权限</message>
|
||||
<action id="@PKG_NAME@.ace-uninstaller">
|
||||
<description>运行@PKG_NAME@.ace-uninstaller需要权限</description>
|
||||
<message>要使用@PKG_NAME@.ace-uninstaller需要权限</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
Loading…
x
Reference in New Issue
Block a user