mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-06-05 06:39:54 +08:00
Now change to ACE Bookworm
This commit is contained in:
parent
d74b603469
commit
24fe84d5be
.gitignore
src
DEBIAN
etc
opt/apps
amber-ce-bookworm
ACE logo.pngACE-transparent.pngACE-uninstaller-orig.pnginfo
files
bin
ace-bookworm-uninstall-helperace-bookworm-uninstall-helper-guiace-initbookworm-runbookworm-run-bwrap
build-container.shflamescion-container-tools
ace-host-integration
ace-upgrader
bin-override
README.mdbookworm-runbwrapgiohost-spawn-aarch64host-spawn-loongarch64host-spawn-x86_64pkexecsudoxdg-open
container-init
cn.flamescion.bookworm-compatibility-mode/files/flamescion-container-tools/bin-override
usr
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
*.deb
|
||||
src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env.tar.xz
|
||||
src/opt/apps/amber-ce-bookworm/files/bookworm-env.tar.xz
|
||||
|
@ -1,8 +1,8 @@
|
||||
Package: cn.flamescion.bookworm-compatibility-mode
|
||||
Version: 12.4.10
|
||||
Package: amber-ce-bookworm
|
||||
Version: 12.4.11
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Depends: bubblewrap,flatpak,zenity,policykit-1,gcc,systemd
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Architecture: amd64
|
||||
Architecture: loong64
|
||||
Description: bwrap wrapper for install and running debs inside a bookworm container
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
||||
/opt/apps/$PACKAGE_NAME/files/bin/bookworm-init
|
||||
/opt/apps/$PACKAGE_NAME/files/bin/ace-init
|
||||
|
||||
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
||||
if [ "${PACKAGE_NAME}" = "amber-ce-bookworm" ];then
|
||||
systemctl daemon-reload
|
||||
systemctl enable ace-auto-upgrade
|
||||
systemctl start ace-auto-upgrade
|
||||
systemctl enable ace-bookworm-auto-upgrade
|
||||
systemctl start ace-bookworm-auto-upgrade
|
||||
fi
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
||||
|
||||
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
||||
systemctl stop ace-auto-upgrade
|
||||
systemctl disable ace-auto-upgrade
|
||||
if [ "${PACKAGE_NAME}" = "amber-ce-bookworm" ];then
|
||||
systemctl stop ace-bookworm-auto-upgrade
|
||||
systemctl disable ace-bookworm-auto-upgrade
|
||||
fi
|
||||
|
||||
|
||||
|
9
src/DEBIAN/preinst
Executable file
9
src/DEBIAN/preinst
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "${PACKAGE_NAME}" = "amber-ce-bookworm" ];then
|
||||
if [ -e /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then
|
||||
if [ "$(arch)" != "loongarch64" ];then
|
||||
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/amber-ce-bookworm/files/bookworm-env
|
||||
fi
|
||||
fi
|
||||
fi
|
@ -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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||
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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||
fi
|
||||
|
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 ![]() ![]() |
@ -8,7 +8,7 @@ fi
|
||||
unset ABSOLUTE_PATH IN_CONTAINER_PATH PKGNAME_GUESS DPKG_LIST_FILE ACE_ENV_PATH
|
||||
|
||||
# 定义环境路径变量
|
||||
ACE_ENV_PATH="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
||||
ACE_ENV_PATH="/opt/apps/amber-ce-bookworm/files/bookworm-env"
|
||||
|
||||
# 检查参数个数
|
||||
if [ "$#" -ne 1 ]; then
|
@ -4,7 +4,7 @@ pkexec $0
|
||||
exit
|
||||
fi
|
||||
# 定义应用列表文件路径
|
||||
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
||||
ACE_dir="/opt/apps/amber-ce-bookworm/files/bookworm-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-uninstall-helper "$app_desktop_path"
|
||||
ace-bookworm-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查看报错!"
|
@ -76,6 +76,9 @@ export container_user_uid="$(sudo -u $non_root_user id -ru)"
|
||||
|
||||
|
||||
bookworm-run bash /flamescion-container-tools/container-init/init.sh
|
||||
rm $chrootEnvPath/etc/localtime
|
||||
cp $(realpath /etc/localtime) $chrootEnvPath/etc/localtime
|
||||
chmod 777 $chrootEnvPath/etc/localtime
|
||||
bookworm-run cp /host/etc/locale.gen /etc/locale.gen && locale-gen
|
||||
bookworm-run touch /finish.flag
|
||||
bookworm-run apt clean
|
@ -11,9 +11,9 @@ chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env
|
||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
`dirname $chrootEnvPath`/bin/bookworm-init
|
||||
`dirname $chrootEnvPath`/bin/ace-init
|
||||
else
|
||||
pkexec `dirname $chrootEnvPath`/bin/bookworm-init
|
||||
pkexec `dirname $chrootEnvPath`/bin/ace-init
|
||||
fi
|
||||
|
||||
|
@ -11,9 +11,9 @@ chrootEnvPath=/opt/apps/$PKGNAME/files/bookworm-env
|
||||
if [ ! -e $chrootEnvPath/finish.flag ];then
|
||||
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
`dirname $chrootEnvPath`/bin/bookworm-init
|
||||
`dirname $chrootEnvPath`/bin/ace-init
|
||||
else
|
||||
pkexec `dirname $chrootEnvPath`/bin/bookworm-init
|
||||
pkexec `dirname $chrootEnvPath`/bin/ace-init
|
||||
fi
|
||||
|
||||
|
@ -49,12 +49,12 @@ local file=$1
|
||||
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/$/ (ACE)/' "$file"
|
||||
sed -i "/^Name\[${LANGUAGE}\]=/ s/\$/ (ACE)/" "$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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/|' "$file"
|
||||
sed -i 's|^Icon=/|Icon=/opt/apps/amber-ce-bookworm/files/bookworm-env/|' "$file"
|
||||
fi
|
||||
|
||||
fi
|
@ -166,10 +166,10 @@ fi
|
||||
|
||||
user=$(who | awk '{print $1}' | head -n 1)
|
||||
|
||||
log.info "ACE环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
||||
notify-send -a cn.flamescion.bookworm-compatibility-mode "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
||||
log.info "ACE Bookworm环境中有 $update_app_number 个软件包可升级,正在自动升级"
|
||||
notify-send -a amber-ce-bookworm "ACE兼容环境" "ACE环境中有${update_app_number}个软件包可升级,执行自动升级..."
|
||||
|
||||
${APT_COMMAND} clean
|
||||
${APT_COMMAND} full-upgrade -y
|
||||
${APT_COMMAND} clean
|
||||
notify-send -a cn.flamescion.bookworm-compatibility-mode "ACE兼容环境" "自动升级结束"
|
||||
notify-send -a amber-ce-bookworm "ACE兼容环境" "自动升级结束"
|
2
src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/bwrap
Executable file
2
src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/bwrap
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
host-spawn /opt/apps/amber-ce-bookworm/files/bin/bookworm-run-bwrap $@
|
BIN
src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/host-spawn-loongarch64
Executable file
BIN
src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/host-spawn-loongarch64
Executable file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
{
|
||||
"appid": "cn.flamescion.bookworm-compatibility-mode",
|
||||
"appid": "amber-ce-bookworm",
|
||||
"name": "cn.flamescion.bookworm-compatibility-mode",
|
||||
"version": "12.1.4",
|
||||
"arch": ["amd64"],
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
host-spawn /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run-bwrap $@
|
1
src/usr/bin/ace-bookworm-uninstall-helper
Symbolic link
1
src/usr/bin/ace-bookworm-uninstall-helper
Symbolic link
@ -0,0 +1 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper
|
1
src/usr/bin/ace-bookworm-uninstall-helper-gui
Symbolic link
1
src/usr/bin/ace-bookworm-uninstall-helper-gui
Symbolic link
@ -0,0 +1 @@
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/ace-bookworm-uninstall-helper-gui
|
@ -1 +0,0 @@
|
||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper
|
@ -1 +0,0 @@
|
||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui
|
@ -1 +1 @@
|
||||
../../opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run
|
||||
../../opt/apps/amber-ce-bookworm/files/bin/bookworm-run
|
@ -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/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
||||
ACE_path="/opt/apps/amber-ce-bookworm/files/bookworm-env/usr/share/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||
fi
|
||||
|
11
src/usr/share/applications/ACE-bookworm-uninstaller.desktop
Normal file
11
src/usr/share/applications/ACE-bookworm-uninstaller.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[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]
|
||||
Version=1.0
|
||||
Name=ACE Software Uninstaller
|
||||
Name[zh_CN]=ACE软件卸载器
|
||||
Comment=用于卸载ACE容器的应用
|
||||
Type=Application
|
||||
Exec=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui
|
||||
Icon=ACE-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=cn.flamescion.bookworm-compatibility-mode
|
||||
Name=Amber CE
|
||||
Name[zh_CN]=ACE兼容环境
|
||||
Icon=amber-ce-bookworm
|
||||
Name=Amber CE Bookworm
|
||||
Name[zh_CN]=ACE Bookworm兼容环境
|
||||
Keywords=BCM,ACE,ace,mode
|
||||
StartupNotify=true
|
||||
Type=Application
|
Before ![]() (image error) Size: 118 KiB After ![]() (image error) Size: 118 KiB ![]() ![]() |
Before ![]() (image error) Size: 134 KiB After ![]() (image error) Size: 134 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>cn.flamescion.ace-uninstaller</vendor>
|
||||
<vendor>amber-ce-bookworm.ace-uninstaller</vendor>
|
||||
<icon_name>x-package-repository</icon_name>
|
||||
<action id="cn.flamescion.ace-uninstaller">
|
||||
<description>运行cn.flamescion.ace-uninstaller需要权限</description>
|
||||
<message>要使用cn.flamescion.ace-uninstaller需要权限</message>
|
||||
<action id="amber-ce-bookworm.ace-uninstaller">
|
||||
<description>运行amber-ce-bookworm.ace-uninstaller需要权限</description>
|
||||
<message>要使用amber-ce-bookworm.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/cn.flamescion.bookworm-compatibility-mode/files/bin/ace-uninstall-helper-gui</annotate>
|
||||
<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.allow_gui">true</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
Loading…
x
Reference in New Issue
Block a user