Compare commits

...

62 Commits

Author SHA1 Message Date
0f0c590ee4 fix 磐石 2025-07-07 10:55:29 +08:00
7347bf0bee
https://mirrors.sdu.edu.cn/spark-store/amber-ce/
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-07-07 02:52:51 +00:00
04bc7c8917
update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-06-14 04:15:08 +00:00
5fffd313f5 更新 ACE 兼容环境图标
* 删除文件 src/usr/share/icons/.keep
* 更新图标
* 新建 icons
* 删除文件 src/usr/share/icons/@PKG_NAME@.png
* 删除文件 src/usr/share/icons/@PKG_NAME@-uninstaller.png
* 更新图标
* 删除文件 src/opt/apps/@PKG_NAME@/ACE-uninstaller-orig.png
* 删除文件 src/opt/apps/@PKG_NAME@/ACE-transparent.png
* 删除文件 src/opt/apps/@PKG_NAME@/ACE logo.png
2025-06-14 04:14:33 +00:00
51e7c1a4d8
new share link
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-06-07 04:01:54 +00:00
3fa34672ca 8.4 2025-06-07 10:59:02 +08:00
51b30d0ef7
修复递归问题
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-06-04 15:30:40 +00:00
6246cf3c98
自动添加 X-AMBER-CE-DESKTOP-NAME
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-05-30 15:32:16 +00:00
f169fee3ac
fix init lauguage
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-27 19:09:35 +00:00
1b2eaddb4d
Revert "update src/opt/apps/@PKG_NAME@/files/bin/ace-init."
Merge pull request  from shenmo/revert-05c5b4a
2025-04-27 19:08:43 +00:00
9071dbf2ff
Revert "update src/opt/apps/@PKG_NAME@/files/bin/ace-init."
This reverts commit 05c5b4a2b90525ba78e89e3fb0245e6dd513e6fe.
2025-04-27 19:08:24 +00:00
05c5b4a2b9
update src/opt/apps/@PKG_NAME@/files/bin/ace-init.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-27 17:43:23 +00:00
26dcf96d87
支持 Ubuntu 25 等 systemd 不再提供 utmp 的情景下获取当前用户名
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-18 15:01:44 +00:00
05e00b41f9
12.7.6
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-16 13:40:04 +00:00
e99d4b5e58
pkgname 通用
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:41:58 +00:00
5986f2d076
不再硬编码pkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:14:59 +00:00
9eb23aa93f
在rules里做src->pkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:09:28 +00:00
6b3ad3cc43
update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:04:11 +00:00
7c76c95dc4 先link 2025-04-15 18:52:34 +08:00
8b7bc7f52a uname -m 2025-04-15 18:33:12 +08:00
cae9256bdd build-pkg.sh 2025-04-15 18:32:02 +08:00
3d88f051ce build-pkg.sh 2025-04-15 18:29:30 +08:00
8eca27e209 linker.sh 2025-04-15 18:24:35 +08:00
d2c952a145
fakerootenv
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-14 06:22:30 +00:00
0f517db7db 设计成与自己冲突,防止套娃安装 2025-03-29 00:51:15 +08:00
5ca843947e
不再在构建阶段需要dpkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-17 04:00:04 +00:00
2a9cb4ea36
update src/opt/apps/@PKG_NAME@/files/bin/amber-ce-configure-nvidia.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-16 15:16:06 +00:00
756373ad14
"FAKEROOTDONTTRYCHOWN" "1"
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-13 05:37:27 +00:00
b3e870b610
Revert "remove additionxxxxx-data-dir"
This reverts commit a3ed1942512a11ad7c666b52c0030ae6836acd42.
2025-03-08 07:27:16 +00:00
a3ed194251 remove additionxxxxx-data-dir 2025-03-08 15:24:37 +08:00
457a2a3f00
ACE x86
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-07 05:17:34 +00:00
d2a53bb69c update auto upgrader 2025-03-06 23:44:26 +08:00
5b935202c9 update gui 2025-03-06 23:37:17 +08:00
67c2b1fc9e
update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 14:29:49 +00:00
557fa8ed38
update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 14:28:03 +00:00
b0aa469684
postinst/rm
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:50:40 +00:00
905a642811
update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:37:08 +00:00
97fffcddd5
update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:30:10 +00:00
7b1a0d53ca
update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:10:25 +00:00
f2605fb5a4
update debian/rules.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 07:36:03 +00:00
b9758bf888
update debian/rules.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 07:29:38 +00:00
745edd0c12 12.7.0 2025-03-06 15:00:19 +08:00
de34703e51 update bin 2025-03-06 14:59:51 +08:00
407a67fdeb replacer 2025-03-06 14:45:47 +08:00
c58ef6ac72 space to tab 2025-03-06 14:44:48 +08:00
ce6feba217 implented replacer 2025-03-06 14:43:57 +08:00
90bf57d884 update: 通用ACE 2025-03-06 14:17:24 +08:00
6ee00a33b2
12.6.5
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-03 13:50:01 +00:00
ab64e78fa5
update src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/sudo.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-28 17:03:58 +00:00
6162040d09
12.6.4
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-28 15:03:45 +00:00
bfcd224c08
update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-26 15:04:37 +00:00
290623e263 fix: Bwrap failed on Arch 2025-02-26 23:02:43 +08:00
0f8fb5df67
修复:无法正确展开环境
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-25 03:10:40 +00:00
ae87013a3a 12.6.2 2025-02-24 19:08:38 +08:00
885eb4cfc6 update:在root下也有 IS_ACE_ENV=1 了 2025-02-24 19:06:58 +08:00
72d926d928
删除文件 src/opt/apps/cn.flamescion.bookworm-compatibility-mode 2025-02-16 17:48:37 +00:00
3da7b0c9b4 update: 现在安装时可正确拉起N卡配置 2025-02-14 21:46:59 +08:00
dc01ee917c update:gitignore 2025-02-14 21:46:42 +08:00
0d0e8452bf update: amber-ce-bookworm-configure-nvidia 2025-02-14 21:39:05 +08:00
b2f1a9cccb update: bookworm-configure-nvidia 2025-02-14 21:31:46 +08:00
b1a2b02c1e
update: 改为软链接到容器中
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-14 12:54:47 +00:00
517816ee00 update:nvidia-configure 2025-02-14 20:44:03 +08:00
82 changed files with 647 additions and 321 deletions
.gitignoreLICENSEREADME.mdREADME.zh.mdace-base.configbuild-pkg.shdebian-build.sh
debian
linker.shreplacer.sh
src
DEBIAN
etc
opt/apps
usr

2
.gitignore vendored

@ -1,2 +1,2 @@
#*.deb *.deb
src/opt/apps/amber-ce-bookworm/files/ace-env.tar.xz src/opt/apps/amber-ce-bookworm/files/ace-env.tar.xz

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>. <https://www.gnu.org/licenses/why-not-lgpl.html>.

@ -18,12 +18,24 @@ Please use `git clone --recurse-submodules` to obtain the env
## Install GuideDebian/Fedora/Arch) ## Install GuideDebian/Fedora/Arch)
Share Linkhttps://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4 Share Linkhttps://mirrors.sdu.edu.cn/spark-store/amber-ce/
Ubuntu 18.04 Need install https://packages.debian.org/buster/bubblewrap Ubuntu 18.04 Need install https://packages.debian.org/buster/bubblewrap
Arch: `yay -S amber-ce-bookworm` Arch: `yay -S amber-ce-bookworm`
Usage: Run `bookworm-run` in host OS. You can also add command direct after `bookworm-run`
## ACE x86
Only capable with ABI2 Distrosdeepin/debian/AOSC OS)
Run an amd64 Debian Bookworm container via LATX
Command bookworm-run-x86
https://mirrors.sdu.edu.cn/spark-store/amber-ce/
--- ---

@ -14,17 +14,31 @@
## 安装指南 Debian/Fedora/Arch) ## 安装指南 Debian/Fedora/Arch)
分享链接https://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4 分享链接https://mirrors.sdu.edu.cn/spark-store/amber-ce/
Ubuntu 18.04 需要安装 https://packages.debian.org/buster/bubblewrap Ubuntu 18.04 需要安装 https://packages.debian.org/buster/bubblewrap
Arch`yay -S amber-ce-bookworm` Arch`yay -S amber-ce-bookworm`
使用方法:在宿主机使用 bookworm-run 进入环境,亦可直接在 bookworm-run 后添加要执行的指令
## ACE x86
仅适用于龙芯新世界发行版deepin/debian/AOSC OS)
安装后可在龙芯上依赖 LATX 运行一个 amd64 Debian Bookworm
使用方法: bookworm-run-x86
https://mirrors.sdu.edu.cn/spark-store/amber-ce/
--- ---
## 从源代码构建指南 ## 从源代码构建指南
### Debian ### Debian
``` ```
@ -41,3 +55,8 @@ dpkg-buildpackage -us -uc -b
`yay -S amber-ce-bookworm` `yay -S amber-ce-bookworm`
--- ---
Single Build:
cp -r src/ pkg/
./build-pkg.sh pkg/

6
ace-base.config Normal file

@ -0,0 +1,6 @@
@PKG_NAME@=amber-ce-bookworm
@HOST_NAME@=Amber-CE-Bookworm
@EXEC_NAME@=bookworm-run
@PRETTY_NAME@=Bookworm
@VERSION@=12.8.5
@CODE_NAME@=bookworm

46
build-pkg.sh Executable file

@ -0,0 +1,46 @@
#!/bin/bash
# 安全读取配置文件的推荐方式
read_config() {
local config_file="$1"
# 检查文件是否存在
if [ ! -f "$config_file" ]; then
echo "Error: Config file $config_file not found" >&2
return 1
fi
# 处理并加载配置
source <(
sed -nE '
# 跳过注释和空行
/^[[:space:]]*#/d # 删除注释行
/^[[:space:]]*$/d # 删除空行
# 转换 @VAR@=value 格式
s/^@([^@]+)@=(.*)$/\1=\2/p
' "$config_file"
)
}
pushd $(dirname $(realpath $0))
cp ace-base.config ace-base-build.config
echo "@ARCH@=$(dpkg --print-architecture)" >> ace-base-build.config
read_config "ace-base-build.config"
# 访问变量
echo "Package Name: $PKG_NAME"
echo "Host Name: $HOST_NAME"
echo "Executable Name: $EXEC_NAME"
echo "Pretty Name: $PRETTY_NAME"
echo "Architecture: $ARCH"
echo "Codename: $CODE_NAME"
if [[ -z "$1" ]];then
echo "Need TARGET DIR"
exit
fi
target_dir="${1}" # 要处理的目标目录
bash replacer.sh ${target_dir}/
bash linker.sh ${target_dir}/
cd ${target_dir}/opt/apps/$PKG_NAME/files && bash build-container.sh $ARCH $CODE_NAME
popd

7
debian-build.sh Executable file

@ -0,0 +1,7 @@
#!/bin/bash
pushd $(dirname $(realpath $0))
sudo apt install debootstrap systemd-container sudo file -y
cp -vr src pkg
bash build-pkg.sh pkg
dpkg-deb -Z gzip -b pkg/ ./
popd

21
debian/changelog vendored

@ -1,4 +1,22 @@
amber-ce-bookworm (12.6.0) UNRELEASED; urgency=low amber-ce-bookworm (12.8.5) UNRELEASED; urgency=low
* 通用 ACE 构建,现不再需要单独使用构建脚本
* 更方便地更改成其他ACE
* 现可在容器内使用 dpkg-buildpackage
* 支持 Ubuntu 25 等 systemd 不再提供 utmp 的情景下获取当前用户名
* 自动添加 X-AMBER-CE-DESKTOP-NAME
* 修复更新时的递归问题
-- shenmo <shenmo@spark-app.store> Wed, 25 Sep 2024 23:15:49 +0800
amber-ce-bookworm (12.6.5) UNRELEASED; urgency=low
* 修复 Arch 下无法在容器中使用 Bwrap
* 修复 bwrap 下无法使用N卡加速
* 修复 无法启动自动更新
* 修复 绝对路径图标路径检查出错
-- shenmo <shenmo@spark-app.store> Wed, 25 Sep 2024 23:15:49 +0800
amber-ce-bookworm (12.6.2) UNRELEASED; urgency=low
* fix: Can't pass args via bwrap * fix: Can't pass args via bwrap
* fix: Auto upgrade service always pop up upgradable notifier * fix: Auto upgrade service always pop up upgradable notifier
* fix: /etc/apt/sources.list only request main repo * fix: /etc/apt/sources.list only request main repo
@ -7,5 +25,6 @@ amber-ce-bookworm (12.6.0) UNRELEASED; urgency=low
* adjust: remove dpkg from building depends * adjust: remove dpkg from building depends
* 把默认目录改为 amber-ce-bookworm * 把默认目录改为 amber-ce-bookworm
* 支持使用Nvidia驱动加速 * 支持使用Nvidia驱动加速
* 修复 Root 下无法获取IS_ACE_ENV=1
-- shenmo <shenmo@spark-app.store> Wed, 25 Sep 2024 23:15:49 +0800 -- shenmo <shenmo@spark-app.store> Wed, 25 Sep 2024 23:15:49 +0800

@ -2,31 +2,33 @@
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE" export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/ ] || [[ -f "/opt/apps/amber-ce-bookworm" ]];then PACKAGE_NAME=amber-ce-bookworm # 为了后面正确清理
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/ ];then
unlink /opt/apps/amber-ce-bookworm unlink /opt/apps/amber-ce-bookworm
mv -v /opt/apps/cn.flamescion.bookworm-compatibility-mode/ /opt/apps/amber-ce-bookworm/ mv -v /opt/apps/cn.flamescion.bookworm-compatibility-mode/ /opt/apps/amber-ce-bookworm/
ln -sv ./amber-ce-bookworm /opt/apps/cn.flamescion.bookworm-compatibility-mode
fi fi
fi fi
/opt/apps/$PACKAGE_NAME/files/bin/ace-init /opt/apps/$PACKAGE_NAME/files/bin/ace-init
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
systemctl daemon-reload systemctl daemon-reload
systemctl enable ace-bookworm-auto-upgrade systemctl enable $PACKAGE_NAME-auto-upgrade
systemctl start ace-bookworm-auto-upgrade systemctl start $PACKAGE_NAME-auto-upgrade
# enable kernel.unprivileged_userns_clone # enable kernel.unprivileged_userns_clone
# disable kernel.apparmor_restrict_unprivileged_unconfined and kernel.apparmor_restrict_unprivileged_userns # disable kernel.apparmor_restrict_unprivileged_unconfined and kernel.apparmor_restrict_unprivileged_userns
if [ -f /usr/lib/sysctl.d/amber-ce.conf ];then if [ -f /usr/lib/sysctl.d/$PACKAGE_NAME.conf ];then
sysctl -p /usr/lib/sysctl.d/amber-ce.conf sysctl -p /usr/lib/sysctl.d/$PACKAGE_NAME.conf
fi fi
fi
true true

@ -3,8 +3,8 @@ PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
PACKAGE_NAME=amber-ce-bookworm # 为了后面正确清理 PACKAGE_NAME=amber-ce-bookworm # 为了后面正确清理
systemctl stop ace-bookworm-auto-upgrade systemctl stop $PACKAGE_NAME-auto-upgrade
systemctl disable ace-bookworm-auto-upgrade systemctl disable $PACKAGE_NAME-auto-upgrade
fi fi

1
debian/control vendored

@ -13,4 +13,5 @@ Package: cn.flamescion.bookworm-compatibility-mode
Architecture: any Architecture: any
Multi-Arch: foreign Multi-Arch: foreign
Depends: ${misc:Depends},bubblewrap,flatpak,zenity,policykit-1 | pkexec | polkit-1 | polkit,systemd,procps Depends: ${misc:Depends},bubblewrap,flatpak,zenity,policykit-1 | pkexec | polkit-1 | polkit,systemd,procps
Conflicts: ace-host-integration
Description: bwrap wrapper for install and running debs inside a bookworm container Description: bwrap wrapper for install and running debs inside a bookworm container

2
debian/install vendored

@ -1 +1 @@
src/* / pkg/* /

9
debian/rules vendored

@ -6,8 +6,13 @@
dh $@ dh $@
override_dh_auto_configure: override_dh_auto_configure:
cd src/opt/apps/amber-ce-bookworm/files && bash build-container.sh $(shell uname -m) rm -vfr pkg/
cp -r src/ pkg/
bash build-pkg.sh pkg/
override_dh_dwz: override_dh_dwz:
override_dh_strip: override_dh_strip:
override_dh_clean:
rm -vfr pkg/ && dh_clean

36
linker.sh Executable file

@ -0,0 +1,36 @@
#!/bin/bash
# 安全读取配置文件的推荐方式
read_config() {
local config_file="$1"
# 检查文件是否存在
if [ ! -f "$config_file" ]; then
echo "Error: Config file $config_file not found" >&2
return 1
fi
# 处理并加载配置
source <(
sed -nE '
# 跳过注释和空行
/^[[:space:]]*#/d # 删除注释行
/^[[:space:]]*$/d # 删除空行
# 转换 @VAR@=value 格式
s/^@([^@]+)@=(.*)$/\1=\2/p
' "$config_file"
)
}
read_config "ace-base-build.config"
# 访问变量
echo "Package Name: $PKG_NAME"
echo "Host Name: $HOST_NAME"
echo "Executable Name: $EXEC_NAME"
echo "Pretty Name: $PRETTY_NAME"
echo "Version: $VERSION"
target_dir="${1}"
mkdir ${target_dir}/usr/bin
ln -vfs ../../opt/apps/$PKG_NAME/files/bin/ace-run ${target_dir}/usr/bin/$EXEC_NAME
ln -vfs ../../opt/apps/$PKG_NAME/files/bin/amber-ce-configure-nvidia ${target_dir}/usr/bin/$PKG_NAME-configure-nvidia

92
replacer.sh Executable file

@ -0,0 +1,92 @@
#!/usr/bin/env bash
########################################
# 配置部分
########################################
config_file="ace-base-build.config" # 配置文件路径
if [[ -z "$1" ]];then
echo "Need TARGET DIR"
exit
fi
target_dir="${1}" # 要处理的目标目录
########################################
# 读取 ace-base.config 生成替换字典
########################################
declare -A replacements
while IFS= read -r line; do
# 跳过空行
[[ -z "$line" ]] && continue
# 匹配类似 @PKG_NAME@=amber-ce-bookworm 的格式
if [[ "$line" =~ ^@(.*)@=(.*)$ ]]; then
key="${BASH_REMATCH[1]}"
val="${BASH_REMATCH[2]}"
replacements["$key"]="$val"
fi
done < "$config_file"
########################################
# 第一步:文本文件内容替换
########################################
# 定义一个函数来判断文件是否是文本文件(示例仅供参考)
is_text_file() {
local f="$1"
file --mime-type "$f" | grep -q "text/"
}
# 查找所有文件,逐一判断是否文本类型,如果是则进行内容替换
find "$target_dir" -type f -print0 | while IFS= read -r -d '' file; do
if is_text_file "$file"; then
for key in "${!replacements[@]}"; do
# 用 sed 对文件内容进行替换
sed -i "s|@$key@|${replacements[$key]}|g" "$file"
done
fi
done
########################################
# 第二步:先重命名文件
########################################
find "$target_dir" -type f -print0 | while IFS= read -r -d '' file; do
# 拆分目录和文件名
dir_path="$(dirname "$file")"
filename="$(basename "$file")"
newfilename="$filename"
for key in "${!replacements[@]}"; do
newfilename="${newfilename//@$key@/${replacements[$key]}}"
done
# 如果新文件名和原文件名不同,则执行重命名
if [[ "$newfilename" != "$filename" ]]; then
mv -v "$file" "$dir_path/$newfilename"
fi
done
########################################
# 第三步:再重命名目录(由浅到深)
########################################
# 先按目录层级进行排序(层数少的先处理)
# awk -F/ '{print NF, $0}' 会将路径按 / 分割并统计层数,然后 sort -n 升序,层数越小越先处理
find "$target_dir" -type d | awk -F/ '{print NF, $0}' | sort -n | cut -d' ' -f2- | while IFS= read -r dir; do
# 如果要连同最顶层目录一起改名,可以保留;若不需要改最顶层,可以加条件跳过
# [ "$dir" = "$target_dir" ] && continue # 如需跳过顶层可取消注释
parent_path="$(dirname "$dir")"
dirname_only="$(basename "$dir")"
newdirname="$dirname_only"
for key in "${!replacements[@]}"; do
newdirname="${newdirname//@$key@/${replacements[$key]}}"
done
# 需要改名则执行
if [[ "$newdirname" != "$dirname_only" ]]; then
mv -v "$dir" "$parent_path/$newdirname"
fi
done
echo "处理完成!"

13
src/DEBIAN/control Normal file

@ -0,0 +1,13 @@
Package: @PKG_NAME@
Source: amber-ce
Version: @VERSION@
Architecture: @ARCH@
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: 145627
Depends: bubblewrap, flatpak, zenity, policykit-1 | pkexec | polkit-1 | polkit, systemd, procps
Section: misc
Conflists: ace-host-integration
Priority: optional
Multi-Arch: foreign
Homepage: https://gitee.com/amber-ce/amber-ce-bookworm/
Description: bwrap wrapper for install and running debs inside a @PRETTY_NAME@ container

18
src/DEBIAN/postinst Executable file

@ -0,0 +1,18 @@
#!/bin/bash
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
/opt/apps/$PACKAGE_NAME/files/bin/ace-init
systemctl daemon-reload
systemctl enable $PACKAGE_NAME-auto-upgrade
systemctl start $PACKAGE_NAME-auto-upgrade
if [ -f /usr/lib/sysctl.d/$PACKAGE_NAME.conf ];then
sysctl -p /usr/lib/sysctl.d/$PACKAGE_NAME.conf
fi
true

21
src/DEBIAN/postrm Executable file

@ -0,0 +1,21 @@
#!/bin/bash
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
systemctl stop $PACKAGE_NAME-auto-upgrade
systemctl disable $PACKAGE_NAME-auto-upgrade
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
echo "清理卸载残留"
rm -rf /opt/apps/$PACKAGE_NAME
else
echo "非卸载,跳过清理"
fi

@ -10,7 +10,7 @@ fi
# Desktop files (used by desktop environments within both X11 and Wayland) are # 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 # 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 if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}" export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi fi

@ -9,7 +9,7 @@ fi
# Desktop files (used by desktop environments within both X11 and Wayland) are # 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 # 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 if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}" export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi fi

@ -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

Binary file not shown.

After

(image error) Size: 290 KiB

Binary file not shown.

After

(image error) Size: 290 KiB

Binary file not shown.

After

(image error) Size: 289 KiB

@ -5,4 +5,5 @@ Priority: optional
Depends: bash Depends: bash
Maintainer: shenmo <shenmo@spark-app.store> Maintainer: shenmo <shenmo@spark-app.store>
Architecture: all Architecture: all
Conflicts: @PKG_NAME@
Description: ace-host-integration Description: ace-host-integration

@ -0,0 +1,98 @@
#!/bin/bash
# ===== Log =====
# log.info xxx
# log.warn xxx
# log.info xxx
# log.debug xxx
# 带颜色的echo
function log.color_output() {
local color=$1
shift 1
echo >&2 -e "\033[${color}m$@\033[0m"
return 0
}
# Log is named without prefix "utils." for convenience
# Usage: log.log <level> ...content
function log.log() {
if [[ $# < 2 ]]; then
return -1
fi
local level=$1
shift 1
case $level in
error) log.color_output "0;31" "[ERROR] $@" ;;
warn) log.color_output "1;33" "[WARN] $@" ;;
info) log.color_output "1;37" "[INFO] $@" ;;
debug) log.color_output "1;30" "[DEBUG] $@" ;;
esac
return 0
}
function log.error() { log.log "error" "$@"; }
function log.warn() { log.log "warn" $@; }
function log.info() { log.log "info" $@; }
function log.debug() { log.log "debug" $@; }
function do_integrate(){
local file=$1
if [ -f "$file" ]; then
# 获取文件名(不带.desktop后缀作为X-AMBER-CE-DESKTOP-NAME的值
local desktop_name=$(basename "$file" .desktop)
# 检查是否已经处理过通过检查X-AMBER-CE-DESKTOP-NAME字段
if ! grep -q "^X-AMBER-CE-DESKTOP-NAME=" "$file"; then
echo "$file is detected. Processing host system integration..."
# 修改Exec行如果尚未修改
if ! grep -q "^Exec=@EXEC_NAME@ " "$file"; then
sed -i 's|^Exec=\(.*\)|Exec=@EXEC_NAME@ \1|' "$file"
fi
# 删除TryExec行
sed -i '/^TryExec=/d' "$file"
# 修改Name行包括本地化Name
sed -i '/^Name=/ s/$/ (@PRETTY_NAME@)/' "$file"
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (@PRETTY_NAME@)/" "$file"
# 修改GenericName行包括本地化GenericName
sed -i '/^GenericName=/ s/$/ (@PRETTY_NAME@)/' "$file"
sed -i "/^GenericName\[${LANGUAGE}\]=/ s/\$/ (@PRETTY_NAME@)/" "$file"
# 添加X-AMBER-CE-DESKTOP-NAME字段
echo "X-AMBER-CE-DESKTOP-NAME=${desktop_name}" >> "$file"
# 处理Icon行
icon_line=$(grep "^Icon=" "$file")
if [[ "$icon_line" == "Icon=/"* ]]; then
# 如果Icon=后面接的是/,则添加前缀
sed -i 's|^Icon=/|Icon=/opt/apps/@PKG_NAME@/files/ace-env/|' "$file"
fi
fi
fi
chmod +x "$file"
}
if [ "${IS_ACE_ENV}" != "" ]; then
if [ -e /opt/apps/ ]; then
for app_dir in $(ls /opt/apps/); do
for file in /opt/apps/$app_dir/entries/applications/*.desktop; do
do_integrate "$file"
done
done
else
log.warn "No /opt/apps directory. Skip..."
fi
for file in /usr/share/applications/*.desktop; do
do_integrate "$file"
done
find "/usr/share/applications/" -xtype l -delete
else
log.error "DO NOT run me on host OS"
fi

@ -167,10 +167,10 @@ fi
user=$(who | awk '{print $1}' | head -n 1) user=$(who | awk '{print $1}' | head -n 1)
log.info "ACE Bookworm环境中有 $update_app_number 个软件包可升级,正在自动升级" log.info "ACE @PRETTY_NAME@ 环境中有 $update_app_number 个软件包可升级,正在自动升级"
notify-send -a amber-ce-bookworm "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..." notify-send -a @PKG_NAME@ "ACE @PRETTY_NAME@" "ACE @PRETTY_NAME@环境中有${update_app_number}个软件包可升级,执行自动升级..."
${APT_COMMAND} clean ${APT_COMMAND} clean
${APT_COMMAND} full-upgrade -y ${APT_COMMAND} full-upgrade -y
${APT_COMMAND} clean ${APT_COMMAND} clean
notify-send -a amber-ce-bookworm "ACE兼容环境" "自动升级结束" notify-send -a @PKG_NAME@ "ACE兼容环境" "自动升级结束"

@ -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 if [ "$UID" = "0" ];then
$@ $@
else else
host-spawn pkexec bookworm-run $@ host-spawn pkexec @EXEC_NAME@ $@
fi fi

@ -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,19 @@ mkdir -p /usr/share/icons
mkdir -p /usr/share/themes mkdir -p /usr/share/themes
## init host-spawn ## init host-spawn
unlink /flamescion-container-tools/bin-override/host-spawn unlink /amber-ce-tools/bin-override/host-spawn
ln -sfv /flamescion-container-tools/bin-override/host-spawn-$(uname -m) /flamescion-container-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 ## install host-integration
pushd /amber-ce-tools/ace-host-integration
apt install --reinstall /flamescion-container-tools/ace-host-integration.deb dpkg-deb -Z xz -b . ../ace-host-integration.deb
popd
apt install --reinstall /amber-ce-tools/ace-host-integration.deb -y
cd /flamescion-container-tools/data-dir/ cd /amber-ce-tools/data-dir/
ln -sfv ../../usr/share/applications/ . ln -sfv ../../usr/share/applications/ .
ln -sfv ../../usr/share/icons/ . ln -sfv ../../usr/share/icons/ .
#ln -svf ../../usr/share/mime . #ln -svf ../../usr/share/mime .

@ -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` ppparent_dir=`dirname $pparent_dir`
PKGNAME=`basename $ppparent_dir` PKGNAME=`basename $ppparent_dir`
else else
PKGNAME=$PACKAGE_NAME PKGNAME=$PACKAGE_NAME
fi fi
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
@ -19,23 +20,28 @@ echo "Uncompress the env...."
tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/ tar -xvf $chrootEnvPath.tar.xz -C /opt/apps/$PKGNAME/files/
fi fi
HERE="$(dirname $(realpath $0))"
function get_current_user() {
# 优先通过 who 命令获取用户
local user
user=$(who | awk '{print $1}' | head -n 1 2>/dev/null)
non_root_user=$(who | awk '{print $1}' | head -n 1) # 如果 who 无输出,则通过 loginctl 获取
if [[ -z "$user" ]]; then
user=$(loginctl list-sessions --no-legend 2>/dev/null | awk '{print $3}' | head -n 1)
fi
# 返回最终结果(可能为空)
echo "${user}"
}
non_root_user=$(get_current_user)
uid=$(id -u $non_root_user) uid=$(id -u $non_root_user)
function bookworm-run(){ function bookworm-run(){
bwrap --dev-bind $chrootEnvPath/ / \ 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 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" \ --setenv IS_ACE_ENV "1" \
--dev-bind-try /media /media \ --dev-bind-try /media /media \
--dev-bind-try /tmp /tmp \ --dev-bind-try /tmp /tmp \
@ -49,7 +55,7 @@ bwrap --dev-bind $chrootEnvPath/ / \
--bind-try /usr/share/themes /usr/local/share/themes \ --bind-try /usr/share/themes /usr/local/share/themes \
--bind-try /usr/share/icons /usr/local/share/icons \ --bind-try /usr/share/icons /usr/local/share/icons \
--bind-try /usr/share/fonts /usr/local/share/fonts \ --bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname Amber-CE-Bookworm \ --hostname @HOST_NAME@ \
--unshare-uts \ --unshare-uts \
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--dev-bind-try /home /home \ --dev-bind-try /home /home \
@ -59,7 +65,7 @@ bwrap --dev-bind $chrootEnvPath/ / \
} }
echo "Update the flamescion container tools" 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)" export container_user_gid="$(sudo -u $non_root_user id -rg)"
@ -73,25 +79,17 @@ export container_user_uid="$(sudo -u $non_root_user id -ru)"
#####init #####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 rm $chrootEnvPath/etc/localtime
cp $(realpath /etc/localtime) $chrootEnvPath/etc/localtime cp $(realpath /etc/localtime) $chrootEnvPath/etc/localtime
chmod 777 $chrootEnvPath/etc/localtime chmod 777 $chrootEnvPath/etc/localtime
bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen
bookworm-run touch /finish.flag bookworm-run touch /finish.flag
bookworm-run apt clean bookworm-run apt clean
bookworm-run chown -R $(who | awk '{print $1}' | head -n 1) /usr/lib/locale/ bookworm-run chown -R $(get_current_user) /usr/lib/locale/
sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ / \ sudo -u $(get_current_user) 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 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" \ --setenv IS_ACE_ENV "1" \
--dev-bind $chrootEnvPath/ / \ --dev-bind $chrootEnvPath/ / \
--dev-bind-try /media /media \ --dev-bind-try /media /media \
@ -106,7 +104,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/themes /usr/local/share/themes \
--bind-try /usr/share/icons /usr/local/share/icons \ --bind-try /usr/share/icons /usr/local/share/icons \
--bind-try /usr/share/fonts /usr/local/share/fonts \ --bind-try /usr/share/fonts /usr/local/share/fonts \
--hostname Amber-CE-Bookworm \ --hostname @HOST_NAME@ \
--unshare-uts \ --unshare-uts \
--dev-bind-try /etc/resolv.conf /etc/resolv.conf \ --dev-bind-try /etc/resolv.conf /etc/resolv.conf \
--dev-bind-try /home /home \ --dev-bind-try /home /home \
@ -114,3 +112,5 @@ sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ /
bookworm-run update-locale LANG=$LANG bookworm-run update-locale LANG=$LANG
chown -R root $chrootEnvPath chown -R root $chrootEnvPath
chmod 777 -R $chrootEnvPath/usr/share/icons chmod 777 -R $chrootEnvPath/usr/share/icons
rm -vfr $chrootEnvPath/dev/*
${HERE}/amber-ce-configure-nvidia || true

@ -6,6 +6,7 @@ pparent_dir=`dirname $parent_dir`
ppparent_dir=`dirname $pparent_dir` ppparent_dir=`dirname $pparent_dir`
PKGNAME=`basename $ppparent_dir` PKGNAME=`basename $ppparent_dir`
export ACE_PACKAGE_NAME=$PKGNAME export ACE_PACKAGE_NAME=$PKGNAME
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
if [ ! -e $chrootEnvPath/finish.flag ];then if [ ! -e $chrootEnvPath/finish.flag ];then
@ -87,18 +88,11 @@ done
##########合成bwrap 3. 环境变量和目录绑定配置段 ##########合成bwrap 3. 环境变量和目录绑定配置段
# 添加环境变量和其他初始设置 # 添加环境变量和其他初始设置
ENV_VARS=( ENV_VARS=(
"LANG $LANG" "FAKEROOTDONTTRYCHOWN 1"
"LC_COLLATE $LC_COLLATE"
"LC_CTYPE $LC_CTYPE"
"LC_MONETARY $LC_MONETARY"
"LC_MESSAGES $LC_MESSAGES"
"LC_NUMERIC $LC_NUMERIC"
"LC_TIME $LC_TIME"
"LC_ALL $LC_ALL"
"PULSE_SERVER /run/user/\$uid/pulse/native" "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" "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=( BIND_DIRS=(
@ -120,7 +114,7 @@ BIND_DIRS=(
"--dev-bind-try /home /home" "--dev-bind-try /home /home"
) )
EXTRA_ARGS=( EXTRA_ARGS=(
"--hostname Amber-CE-Bookworm" "--hostname @HOST_NAME@"
"--unshare-uts" "--unshare-uts"
"--cap-add CAP_SYS_ADMIN" "--cap-add CAP_SYS_ADMIN"
) )

@ -6,6 +6,7 @@ pparent_dir=`dirname $parent_dir`
ppparent_dir=`dirname $pparent_dir` ppparent_dir=`dirname $pparent_dir`
PKGNAME=`basename $ppparent_dir` PKGNAME=`basename $ppparent_dir`
export ACE_PACKAGE_NAME=$PKGNAME export ACE_PACKAGE_NAME=$PKGNAME
chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env chrootEnvPath=/opt/apps/$PKGNAME/files/ace-env
if [ ! -e $chrootEnvPath/finish.flag ];then if [ ! -e $chrootEnvPath/finish.flag ];then
@ -87,27 +88,20 @@ done
##########合成bwrap 3. 环境变量和目录绑定配置段 ##########合成bwrap 3. 环境变量和目录绑定配置段
# 添加环境变量和其他初始设置 # 添加环境变量和其他初始设置
ENV_VARS=( ENV_VARS=(
"LANG $LANG" "FAKEROOTDONTTRYCHOWN 1"
"LC_COLLATE $LC_COLLATE"
"LC_CTYPE $LC_CTYPE"
"LC_MONETARY $LC_MONETARY"
"LC_MESSAGES $LC_MESSAGES"
"LC_NUMERIC $LC_NUMERIC"
"LC_TIME $LC_TIME"
"LC_ALL $LC_ALL"
"PULSE_SERVER /run/user/\$uid/pulse/native" "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" "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=( BIND_DIRS=(
"--dev-bind $chrootEnvPath/ /" "--dev-bind $chrootEnvPath/ /"
"--dev-bind-try /media /media" "--dev-bind-try /media /media"
"--dev-bind-try /mnt /mnt"
"--dev-bind-try /tmp /tmp" "--dev-bind-try /tmp /tmp"
"--dev-bind-try /data /data" "--dev-bind-try /data /data"
"--dev /dev" "--dev-bind-try /dev /dev"
"--dev-bind-try /dev/dri /dev/dri"
"--proc /proc" "--proc /proc"
"--dev-bind /sys /sys" "--dev-bind /sys /sys"
"--dev-bind /run /run" "--dev-bind /run /run"
@ -116,13 +110,11 @@ BIND_DIRS=(
"--ro-bind-try /usr/share/themes /usr/local/share/themes" "--ro-bind-try /usr/share/themes /usr/local/share/themes"
"--ro-bind-try /usr/share/icons /usr/local/share/icons" "--ro-bind-try /usr/share/icons /usr/local/share/icons"
"--ro-bind-try /usr/share/fonts /usr/local/share/fonts" "--ro-bind-try /usr/share/fonts /usr/local/share/fonts"
"--ro-bind-try $(realpath /etc/localtime) /etc/localtime"
"--dev-bind-try /etc/resolv.conf /etc/resolv.conf" "--dev-bind-try /etc/resolv.conf /etc/resolv.conf"
"--dev-bind-try /home /home" "--dev-bind-try /home /home"
) )
EXTRA_ARGS=( EXTRA_ARGS=(
"--hostname Amber-CE-Bookworm" "--hostname @HOST_NAME@"
"--unshare-uts" "--unshare-uts"
# "--cap-add CAP_SYS_ADMIN" # "--cap-add CAP_SYS_ADMIN"
) )
@ -149,6 +141,8 @@ for var in "${EXTRA_SCRIPTS[@]}"; do
$var $var
done done
# 添加最终的 bash 命令 # 添加最终的 bash 命令
add_command "bash -c \"/usr/bin/bwrap ${container_command}\"" 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 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 if [ "$#" -ne 1 ]; then
@ -54,7 +54,7 @@ fi
if [ -f "$DPKG_LIST_FILE" ]; then if [ -f "$DPKG_LIST_FILE" ]; then
if grep -q "$IN_CONTAINER_PATH" "$DPKG_LIST_FILE" || grep -q "/opt/apps/$PKGNAME_GUESS/entries/applications/$PKGNAME_GUESS.desktop" "$DPKG_LIST_FILE"; then if grep -q "$IN_CONTAINER_PATH" "$DPKG_LIST_FILE" || grep -q "/opt/apps/$PKGNAME_GUESS/entries/applications/$PKGNAME_GUESS.desktop" "$DPKG_LIST_FILE"; then
bookworm-run apt autopurge $PKGNAME_GUESS -y @EXEC_NAME@ apt autopurge $PKGNAME_GUESS -y
ret=$? ret=$?
if [ "$ret" = "0" ];then if [ "$ret" = "0" ];then
echo "Operation succeeded." echo "Operation succeeded."
@ -73,7 +73,7 @@ fi
if grep -q "$IN_CONTAINER_PATH" "$file"; then if grep -q "$IN_CONTAINER_PATH" "$file"; then
PKGNAME_GUESS=$(basename "$file" .list | cut -d':' -f1) PKGNAME_GUESS=$(basename "$file" .list | cut -d':' -f1)
echo "Get pkgname $PKGNAME_GUESS, uninstalling..." echo "Get pkgname $PKGNAME_GUESS, uninstalling..."
bookworm-run apt autopurge $PKGNAME_GUESS -y @EXEC_NAME@ apt autopurge $PKGNAME_GUESS -y
ret=$? ret=$?
if [ "$ret" = "0" ];then if [ "$ret" = "0" ];then
echo "Operation succeeded." echo "Operation succeeded."

@ -4,8 +4,8 @@ pkexec $0
exit exit
fi fi
# 定义应用列表文件路径 # 定义应用列表文件路径
ACE_dir="/opt/apps/amber-ce-bookworm/files/ace-env" ACE_dir="/opt/apps/@PKG_NAME@/files/ace-env"
HERE="$(dirname $(realpath $0))"
# 读取所有.desktop文件并构造应用列表 # 读取所有.desktop文件并构造应用列表
app_list=() app_list=()
for file in "$ACE_dir"/usr/share/applications/*.desktop; do 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 if [ -n "$selected_apps" ]; then
# 卸载选中的应用 # 卸载选中的应用
(for app_desktop_path in $selected_apps; do (for app_desktop_path in $selected_apps; do
ace-bookworm-uninstall-helper "$app_desktop_path" ${HERE}/ace-uninstall-helper "$app_desktop_path"
ret=$? ret=$?
if [ "$ret" != "0" ];then 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 exit 1
break break
fi fi

@ -0,0 +1,66 @@
#!/bin/bash
log.warn() { echo -e "[\e[33mWARN\e[0m]: \e[1m$*\e[0m"; }
log.error() { echo -e "[\e[31mERROR\e[0m]: \e[1m$*\e[0m"; }
log.info() { echo -e "[\e[96mINFO\e[0m]: \e[1m$*\e[0m"; }
log.debug() { echo -e "[\e[32mDEBUG\e[0m]: \e[1m$*\e[0m"; }
if [ "$UID" != "0" ];then
log.error "需要以root权限运行 Need to be run as root."
exit 1
fi
# 1\. 获取宿主机 NVIDIA 驱动版本
nvidia_version=$(cat /sys/module/nvidia/version 2>/dev/null)
if [ -z "$nvidia_version" ]; then
log.error "无法获取 NVIDIA 驱动版本 Can not determine NVIDIA Driver version"
exit 1
fi
# 2\. 目标目录准备
ACE_DIR="/opt/apps/@PKG_NAME@/files/ace-env"
if [[ ! -e "${ACE_DIR}" ]];then
log.error "未检测到 @PKG_NAME@安装,请安装后再试 @PKG_NAME@ is not detected. Please try again after installation"
log.info "请按回车关闭... Press Enter to close..."
read
exit 1
fi
mkdir -p "$ACE_DIR/usr/lib" "$ACE_DIR/usr/lib32"
log.info "正在链接 NVIDIA 驱动库 Linking NVIDIA Driver Libs"
# 3\. 收集库文件路径
lib_list=$(ldconfig -p | grep -Ei "nvidia|libcuda" | cut -d'>' -f2)
# 4\. 复制库文件
copied=0
for lib in $lib_list; do
resolved=$(readlink -f "$lib") # 解析符号链接
if file "$resolved" | grep -q "32-bit"; then
ln -sf "/host/$resolved" "$ACE_DIR/usr/lib32/$(basename $lib)"
else
ln -sf "/host/$resolved" "$ACE_DIR/usr/lib/$(basename $lib)"
copied=1
fi
done
# 5\. 复制辅助文件
additional_files=(
/usr/share/vulkan/icd.d/nvidia_icd.json
/usr/share/egl/egl_external_platform.d/20_nvidia_xcb.json
)
for file in "${additional_files[@]}"; do
if [ -f "$file" ]; then
file=$(readlink -f "$file")
dir=$(dirname "$file")
mkdir -p "$ACE_DIR/$dir"
ln -sf "/host/$file" "$ACE_DIR/$dir"
fi
done
# 6\. 标记版本
if [ $copied -eq 1 ]; then
echo "$nvidia_version" > "$ACE_DIR/current_version"
log.info "NVIDIA 驱动库已成功链接 Nvidia Driver Libs are successfully linked. "
else
log.error "未找到有效 NVIDIA 库文件 No valid NVIDIA Driver Libs found."
fi

@ -0,0 +1,48 @@
#!/bin/bash
set -e
if [ `which debootstrap` = "" ];then
echo "Need to install debootstrap!"
exit
fi
if [ `which systemd-nspawn` = "" ];then
echo "Need to install systemd-container!"
exit
fi
if [ "$2" = "" ];then
echo "Usage: $0 ARCHITECTURE CODENAME"
exit
fi
sudo cp /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/crimson -v
sudo cp /usr/share/debootstrap/scripts/sid /usr/share/debootstrap/scripts/beige -v
CODENAME=$2
# Set distroname based on codename
if [ "$CODENAME" = "beige" ] || [ "$CODENAME" = "crimson" ]; then
DISTRONAME="deepin"
else
DISTRONAME="debian"
fi
if [ "$1" = "amd64" ] || [ "$1" = "x86_64" ];then
ARCH="amd64"
ARCH_ANOTHERWAY="x64"
cd "`dirname $0`"
sudo debootstrap --components=main,contrib,non-free,non-free-firmware --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} $2 ./ace-env https://mirrors.cernet.edu.cn/${DISTRONAME}/
elif [ "$1" = "arm64" ] || [ "$1" = "arm" ]|| [ "$1" = "aarch64" ];then
ARCH="arm64"
ARCH_ANOTHERWAY="arm64"
cd "`dirname $0`"
sudo debootstrap --components=main,contrib,non-free,non-free-firmware --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} $2 ./ace-env https://mirrors.cernet.edu.cn/${DISTRONAME}/
fi
sudo rm -rf ace-env/var/cache/apt/archives/*.deb
sudo rm -vfr ace-env/dev/*
sudo tar -I 'xz -T0' -cvf ace-env.tar.xz ace-env/*
sudo rm -rf ace-env

Binary file not shown.

Before

(image error) Size: 196 KiB

Binary file not shown.

Before

(image error) Size: 134 KiB

Binary file not shown.

Before

(image error) Size: 118 KiB

@ -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

Binary file not shown.

Before

(image error) Size: 79 KiB

Binary file not shown.

Before

(image error) Size: 93 KiB

@ -1,7 +0,0 @@
#!/bin/bash
if [ "$UID" != "0" ];then
pkexec $0
exit
fi
bookworm-run /opt/ace-host-integration/ace-host-integration

@ -1,47 +0,0 @@
#!/bin/bash
set -e
if [ `which debootstrap` = "" ];then
echo "Need to install debootstrap!"
exit
fi
if [ `which systemd-nspawn` = "" ];then
echo "Need to install systemd-container!"
exit
fi
if [ "$1" = "amd64" ] || [ "$1" = "x86_64" ];then
ARCH="amd64"
ARCH_ANOTHERWAY="x64"
cd "`dirname $0`"
sudo debootstrap --components=main,contrib,non-free,non-free-firmware --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} bookworm ./ace-env https://mirrors.ustc.edu.cn/debian/
elif [ "$1" = "arm64" ] || [ "$1" = "arm" ]|| [ "$1" = "aarch64" ];then
ARCH="arm64"
ARCH_ANOTHERWAY="arm64"
cd "`dirname $0`"
sudo debootstrap --components=main,contrib,non-free,non-free-firmware --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} bookworm ./ace-env https://mirrors.ustc.edu.cn/debian/
elif [ "$1" = "loong" ] || [ "$1" = "loong64" ];then
ARCH="loong64"
ARCH_ANOTHERWAY="loong64"
sudo debootstrap --no-check-gpg --include=libnotify-bin,apt-utils,bash-completion,bc,curl,dialog,diffutils,findutils,gnupg2,less,libnss-myhostname,libvte-common,lsof,ncurses-base,passwd,pinentry-curses,procps,sudo,time,util-linux,wget,libegl1,libgl1-mesa-dri,libvulkan1,mesa-vulkan-drivers,locales,libglib2.0-bin --arch=${ARCH} --variant=buildd sid ./ace-env http://lauosc.cn:11232/debian
else
echo "Need to point out architecture"
exit
fi
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
dpkg-deb -Z xz -b . ../ace-host-integration.deb
popd

@ -1,87 +0,0 @@
#!/bin/bash
# ===== Log =====
# log.info xxx
# log.warn xxx
# log.info xxx
# log.debug xxx
# 带颜色的echo
function log.color_output() {
local color=$1
shift 1
echo >&2 -e "\033[${color}m$@\033[0m"
return 0
}
# Log is named without prefix "utils." for convenience
# Usage: log.log <level> ...content
function log.log() {
if [[ $# < 2 ]]; then
return -1
fi
local level=$1
shift 1
case $level in
error) log.color_output "0;31" "[ERROR] $@" ;;
warn) log.color_output "1;33" "[WARN] $@" ;;
info) log.color_output "1;37" "[INFO] $@" ;;
debug) log.color_output "1;30" "[DEBUG] $@" ;;
esac
return 0
}
function log.error() { log.log "error" "$@"; }
function log.warn() { log.log "warn" $@; }
function log.info() { log.log "info" $@; }
function log.debug() { log.log "debug" $@; }
function do_integrate(){
local file=$1
if [ -f "$file" ]; then
exec_line=$(grep "^Exec=" "$file")
# 检查是否是bookworm-run
if [[ $exec_line != Exec=bookworm-run* ]]; then
echo "$file is detected. Processing host system integration..."
sed -i 's|^Exec=\(.*\)|Exec=bookworm-run \1|' "$file"
sed -i '/^TryExec=/d' "$file"
sed -i '/^Name=/ s/$/ (Bookworm)/' "$file"
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (Bookworm)/" "$file"
icon_line=$(grep "^Icon=" "$file")
if [[ "$icon_line" == "Icon=/"* ]]; then
# 如果Icon=后面接的是/,则添加前缀
sed -i 's|^Icon=/|Icon=/opt/apps/amber-ce-bookworm/files/bookworm-env/|' "$file"
fi
fi
fi
chmod +x $file
}
if [ "${IS_ACE_ENV}" != "" ] || [[ -e /opt/ace-host-integration/ace-host-integration ]] && [[ -e /flamescion-container-tools ]];then
if [ -e /opt/apps/ ];then
for app_dir in $(ls /opt/apps/); do
for file in /opt/apps/$app_dir/entries/applications/*.desktop;do
do_integrate $file
done
done
else
log.warn "No /opt/apps directory. Skip..."
fi
for file in /usr/share/applications/*.desktop; do
do_integrate $file
done
find "/usr/share/applications/" -xtype l -delete
else
log.error "DO NOT run me on host OS"
fi

@ -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 $@
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 @@
./amber-ce-bookworm/

@ -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/bookworm-run

@ -1,12 +1,12 @@
[Unit] [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 After=apt-daily.service network.target network-online.target systemd-networkd.service NetworkManager.service connman.service
[Service] [Service]
Type=simple Type=simple
RemainAfterExit=yes RemainAfterExit=yes
ExecStart=bookworm-run /flamescion-container-tools/ace-upgrader/ace-upgrader ExecStart=@EXEC_NAME@ /amber-ce-tools/ace-upgrader/ace-upgrader
Restart=on-failure Restart=on-failure
RestartSec=10 RestartSec=10

@ -10,7 +10,7 @@ fi
# Desktop files (used by desktop environments within both X11 and Wayland) are # 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 # 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 if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}" export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${ACE_path}"
fi fi

@ -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] [Desktop Entry]
Categories=utils Categories=utils
Exec=bookworm-run %U Exec=@EXEC_NAME@ %U
Icon=amber-ce-bookworm Icon=@PKG_NAME@
Name=Amber CE Bookworm Name=Amber CE @PRETTY_NAME@
Name[zh_CN]=ACE Bookworm Name[zh_CN]=ACE @PRETTY_NAME@
Keywords=BCM,ACE,ace,mode Keywords=BCM,ACE,ace,mode
StartupNotify=true StartupNotify=true
Type=Application 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

Binary file not shown.

After

(image error) Size: 289 KiB

Binary file not shown.

After

(image error) Size: 290 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" <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>bookworm.ace-gxde-fixer</vendor> <vendor>@PKG_NAME@.ace-gxde-fixer</vendor>
<icon_name>x-package-repository</icon_name> <icon_name>x-package-repository</icon_name>
<action id="bookworm.ace-gxde-fixer"> <action id="@PKG_NAME@.ace-gxde-fixer">
<description>运行bookworm.ace-gxde-fixer需要权限</description> <description>运行@PKG_NAME@.ace-gxde-fixer需要权限</description>
<message>要使用bookworm.ace-gxde-fixer需要权限</message> <message>要使用@PKG_NAME@.ace-gxde-fixer需要权限</message>
<defaults> <defaults>
<allow_any>yes</allow_any> <allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive> <allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active> <allow_active>yes</allow_active>
</defaults> </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> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action> </action>
</policyconfig> </policyconfig>

@ -2,17 +2,17 @@
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>amber-ce-bookworm.ace-uninstaller</vendor> <vendor>@PKG_NAME@.ace-uninstaller</vendor>
<icon_name>x-package-repository</icon_name> <icon_name>x-package-repository</icon_name>
<action id="amber-ce-bookworm.ace-uninstaller"> <action id="@PKG_NAME@.ace-uninstaller">
<description>运行amber-ce-bookworm.ace-uninstaller需要权限</description> <description>运行@PKG_NAME@.ace-uninstaller需要权限</description>
<message>要使用amber-ce-bookworm.ace-uninstaller需要权限</message> <message>要使用@PKG_NAME@.ace-uninstaller需要权限</message>
<defaults> <defaults>
<allow_any>yes</allow_any> <allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive> <allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active> <allow_active>yes</allow_active>
</defaults> </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> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action> </action>
</policyconfig> </policyconfig>