update: 通用ACE

This commit is contained in:
shenmo 2025-03-06 14:17:24 +08:00
parent 6ee00a33b2
commit 90bf57d884
61 changed files with 164 additions and 150 deletions

4
ace-base.config Normal file
View 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
View File

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

4
debian/rules vendored
View File

@ -6,7 +6,9 @@
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 -rf pkg/
cp -r src/ pkg/
cd pkg/opt/apps/amber-ce-bookworm/files && bash build-container.sh $(shell uname -m)
override_dh_dwz: override_dh_dwz:

62
replacer.sh Normal file
View 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."

View File

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

View File

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

View 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

View File

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

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -44,17 +44,17 @@ function do_integrate(){
local file=$1 local file=$1
if [ -f "$file" ]; then if [ -f "$file" ]; then
exec_line=$(grep "^Exec=" "$file") exec_line=$(grep "^Exec=" "$file")
# 检查是否是bookworm-run # 检查是否是@EXEC_NAME@
if [[ $exec_line != Exec=bookworm-run* ]]; then if [[ $exec_line != Exec="@EXEC_NAME@ "* ]]; then
echo "$file is detected. Processing host system integration..." 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 '/^TryExec=/d' "$file"
sed -i '/^Name=/ s/$/ (Bookworm)/' "$file" sed -i '/^Name=/ s/$/ (@PRETTY_NAME@)/' "$file"
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (Bookworm)/" "$file" sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (@PRETTY_NAME@)/" "$file"
icon_line=$(grep "^Icon=" "$file") icon_line=$(grep "^Icon=" "$file")
if [[ "$icon_line" == "Icon=/"* ]]; then if [[ "$icon_line" == "Icon=/"* ]]; then
# 如果Icon=后面接的是/,则添加前缀 # 如果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
fi fi

View File

@ -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兼容环境" "自动升级结束"

View File

@ -0,0 +1,2 @@
#!/bin/bash
host-spawn /opt/apps/@PKG_NAME@/files/bin/ace-run-bwrap "$@"

View File

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

View 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

View File

@ -116,15 +116,15 @@ 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
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/applications/ .
ln -sfv ../../usr/share/icons/ . ln -sfv ../../usr/share/icons/ .
#ln -svf ../../usr/share/mime . #ln -svf ../../usr/share/mime .

View File

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

View File

@ -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,6 +20,7 @@ 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))"
non_root_user=$(who | awk '{print $1}' | head -n 1) non_root_user=$(who | awk '{print $1}' | head -n 1)
@ -26,16 +28,8 @@ 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 +43,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 +53,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,7 +67,7 @@ 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
@ -82,16 +76,8 @@ 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 $(who | awk '{print $1}' | head -n 1) /usr/lib/locale/
sudo -u $(who | awk '{print $1}' | head -n 1) bwrap --dev-bind $chrootEnvPath/ / \ 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 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 +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/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,4 +100,4 @@ 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
amber-ce-bookworm-configure-nvidia || true ${HERE}/amber-ce-configure-nvidia || true

View File

@ -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
@ -96,9 +97,9 @@ ENV_VARS=(
"LC_TIME $LC_TIME" "LC_TIME $LC_TIME"
"LC_ALL $LC_ALL" "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 +121,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"
) )

View File

@ -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
@ -96,9 +97,9 @@ ENV_VARS=(
"LC_TIME $LC_TIME" "LC_TIME $LC_TIME"
"LC_ALL $LC_ALL" "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 +121,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"
) )
@ -147,6 +148,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}\""

View File

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

View File

@ -4,7 +4,7 @@ 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"
# 读取所有.desktop文件并构造应用列表 # 读取所有.desktop文件并构造应用列表
app_list=() app_list=()
@ -44,7 +44,7 @@ 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" 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 ace-uninstall-helper $app_desktop_path \n查看报错"

View File

@ -17,10 +17,9 @@ if [ -z "$nvidia_version" ]; then
fi fi
# 2\. 目标目录准备 # 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 if [[ ! -e "${ACE_DIR}" ]];then
log.error "未检测到 ACE Bookworm 安装,请安装后再试 ACE Bookworm is not detected. Please try again after installation" 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..." log.info "请按回车关闭... Press Enter to close..."
read read
exit 1 exit 1

View File

@ -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 tar -I 'xz -T0' -cvf ace-env.tar.xz ace-env/*
sudo rm -rf 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 dpkg-deb -Z xz -b . ../ace-host-integration.deb

View File

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

View File

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

View File

@ -1,2 +0,0 @@
#!/bin/bash
host-spawn /opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap "$@"

View File

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

View File

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

View File

@ -1 +0,0 @@
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper

View File

@ -1 +0,0 @@
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui

View File

@ -1 +0,0 @@
../../opt/apps/amber-ce-bookworm/files/bin/amber-ce-bookworm-configure-nvidia

View File

@ -1 +0,0 @@
../../opt/apps/amber-ce-bookworm/files/bin/bookworm-run

View File

@ -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@ /flamescion-container-tools/ace-upgrader/ace-upgrader
Restart=on-failure Restart=on-failure
RestartSec=10 RestartSec=10

View File

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

View 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

View File

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

View File

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

View File

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

View File

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

View File

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

View File

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