mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-07-08 22:56:01 +08:00
Compare commits
62 Commits
Author | SHA1 | Date | |
---|---|---|---|
0f0c590ee4 | |||
7347bf0bee | |||
04bc7c8917 | |||
5fffd313f5 | |||
51e7c1a4d8 | |||
3fa34672ca | |||
51b30d0ef7 | |||
6246cf3c98 | |||
f169fee3ac | |||
1b2eaddb4d | |||
9071dbf2ff | |||
05c5b4a2b9 | |||
26dcf96d87 | |||
05e00b41f9 | |||
e99d4b5e58 | |||
5986f2d076 | |||
9eb23aa93f | |||
6b3ad3cc43 | |||
7c76c95dc4 | |||
8b7bc7f52a | |||
cae9256bdd | |||
3d88f051ce | |||
8eca27e209 | |||
d2c952a145 | |||
0f517db7db | |||
5ca843947e | |||
2a9cb4ea36 | |||
756373ad14 | |||
b3e870b610 | |||
a3ed194251 | |||
457a2a3f00 | |||
d2a53bb69c | |||
5b935202c9 | |||
67c2b1fc9e | |||
557fa8ed38 | |||
b0aa469684 | |||
905a642811 | |||
97fffcddd5 | |||
7b1a0d53ca | |||
f2605fb5a4 | |||
b9758bf888 | |||
745edd0c12 | |||
de34703e51 | |||
407a67fdeb | |||
c58ef6ac72 | |||
ce6feba217 | |||
90bf57d884 | |||
6ee00a33b2 | |||
ab64e78fa5 | |||
6162040d09 | |||
bfcd224c08 | |||
290623e263 | |||
0f8fb5df67 | |||
ae87013a3a | |||
885eb4cfc6 | |||
72d926d928 | |||
3da7b0c9b4 | |||
dc01ee917c | |||
0d0e8452bf | |||
b2f1a9cccb | |||
b1a2b02c1e | |||
517816ee00 |
.gitignoreLICENSEREADME.mdREADME.zh.mdace-base.configbuild-pkg.shdebian-build.sh
debian
changelogcn.flamescion.bookworm-compatibility-mode.postinstcn.flamescion.bookworm-compatibility-mode.postrmcontrolinstallrules
linker.shreplacer.shsrc
DEBIAN
etc
X11/Xsession.d
profile.d
xdg/autostart
opt/apps
@PKG_NAME@
ACE logo.pngACE-transparent.pngACE-uninstaller-orig.png
files
amber-ce-tools
ace-host-integration
DEBIAN
etc/environment.d
opt/ace-host-integration
ace-upgrader
additional-data-dir-in-container
bin-override
@EXEC_NAME@README.mdbwrapgiohost-spawn-aarch64host-spawn-loongarch64host-spawn-x86_64pkexecsudoxdg-open
container-init
data-dir
bin
ace-gxde-fixerace-initace-runace-run-bwrapace-uninstall-helperace-uninstall-helper-guiamber-ce-configure-nvidia
build-container.shamber-ce-bookworm
ACE logo.pngACE-transparent.pngACE-uninstaller-orig.png
cn.flamescion.bookworm-compatibility-modeentries
applications
icons
files
infousr
bin
lib
sysctl.d
systemd
share
2
.gitignore
vendored
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
|
||||||
|
8
LICENSE
8
LICENSE
@ -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>.
|
||||||
|
14
README.md
14
README.md
@ -18,12 +18,24 @@ Please use `git clone --recurse-submodules` to obtain the env
|
|||||||
|
|
||||||
## Install Guide(Debian/Fedora/Arch)
|
## Install Guide(Debian/Fedora/Arch)
|
||||||
|
|
||||||
Share Link:https://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4
|
Share Link:https://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 Distros(deepin/debian/AOSC OS)
|
||||||
|
|
||||||
|
Run an amd64 Debian Bookworm container via LATX
|
||||||
|
|
||||||
|
Command: bookworm-run-x86
|
||||||
|
|
||||||
|
https://mirrors.sdu.edu.cn/spark-store/amber-ce/
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
21
README.zh.md
21
README.zh.md
@ -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
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
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
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
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
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
2
debian/install
vendored
@ -1 +1 @@
|
|||||||
src/* /
|
pkg/* /
|
9
debian/rules
vendored
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
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
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
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
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
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
|
11
src/etc/xdg/autostart/@PKG_NAME@.ace-gxde-fixer.desktop
Normal file
11
src/etc/xdg/autostart/@PKG_NAME@.ace-gxde-fixer.desktop
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=@PKG_NAME@.ace-gxde-fixer
|
||||||
|
Name[zh_CN]=@PKG_NAME@.ace-gxde-fixer
|
||||||
|
Comment=@PKG_NAME@.ace-gxde-fixer
|
||||||
|
Type=Application
|
||||||
|
Exec=/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
|
||||||
|
Icon=@PKG_NAME@
|
||||||
|
Categories=System
|
||||||
|
|
||||||
|
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
@ -1,11 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=bookworm.ace-gxde-fixer
|
|
||||||
Name[zh_CN]=bookworm.ace-gxde-fixer
|
|
||||||
Comment=bookworm.ace-gxde-fixer
|
|
||||||
Type=Application
|
|
||||||
Exec=/opt/apps/amber-ce-bookworm/files/bin/bookworm.ace-gxde-fixer
|
|
||||||
Icon=amber-ce-bookworm
|
|
||||||
Categories=System
|
|
||||||
|
|
||||||
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
|
BIN
src/opt/apps/@PKG_NAME@/ACE logo.png
Normal file
BIN
src/opt/apps/@PKG_NAME@/ACE logo.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 290 KiB |
BIN
src/opt/apps/@PKG_NAME@/ACE-transparent.png
Normal file
BIN
src/opt/apps/@PKG_NAME@/ACE-transparent.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 290 KiB |
BIN
src/opt/apps/@PKG_NAME@/ACE-uninstaller-orig.png
Normal file
BIN
src/opt/apps/@PKG_NAME@/ACE-uninstaller-orig.png
Normal file
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
|
1
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/ace-host-integration/etc/environment.d/90is_ace_env.conf
Normal file
1
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/ace-host-integration/etc/environment.d/90is_ace_env.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
IS_ACE_ENV=1
|
98
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/ace-host-integration/opt/ace-host-integration/ace-host-integration
Executable file
98
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/ace-host-integration/opt/ace-host-integration/ace-host-integration
Executable file
@ -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兼容环境" "自动升级结束"
|
2
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/bwrap
Executable file
2
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/bwrap
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
host-spawn /opt/apps/@PKG_NAME@/files/bin/ace-run-bwrap "$@"
|
@ -2,5 +2,5 @@
|
|||||||
if [ "$UID" = "0" ];then
|
if [ "$UID" = "0" ];then
|
||||||
$@
|
$@
|
||||||
else
|
else
|
||||||
host-spawn pkexec bookworm-run $@
|
host-spawn pkexec @EXEC_NAME@ $@
|
||||||
fi
|
fi
|
6
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/sudo
Executable file
6
src/opt/apps/@PKG_NAME@/files/amber-ce-tools/bin-override/sudo
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ "$UID" = "0" ];then
|
||||||
|
/usr/bin/sudo $@
|
||||||
|
else
|
||||||
|
host-spawn sudo @EXEC_NAME@ sudo env IS_ACE_ENV="1" PATH="/amber-ce-tools/bin-override:$PATH" "$@"
|
||||||
|
fi
|
@ -116,15 +116,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 .
|
7
src/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
Executable file
7
src/opt/apps/@PKG_NAME@/files/bin/ace-gxde-fixer
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ "$UID" != "0" ];then
|
||||||
|
pkexec $0
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
@EXEC_NAME@ /opt/ace-host-integration/ace-host-integration
|
@ -11,6 +11,7 @@ pparent_dir=`dirname $parent_dir`
|
|||||||
ppparent_dir=`dirname $pparent_dir`
|
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
|
16
src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run → src/opt/apps/@PKG_NAME@/files/bin/ace-run
16
src/opt/apps/amber-ce-bookworm/files/bin/bookworm-run → src/opt/apps/@PKG_NAME@/files/bin/ace-run
@ -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
|
66
src/opt/apps/@PKG_NAME@/files/bin/amber-ce-configure-nvidia
Executable file
66
src/opt/apps/@PKG_NAME@/files/bin/amber-ce-configure-nvidia
Executable file
@ -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
|
48
src/opt/apps/@PKG_NAME@/files/build-container.sh
Executable file
48
src/opt/apps/@PKG_NAME@/files/build-container.sh
Executable file
@ -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
|
11
src/usr/share/applications/@PKG_NAME@-uninstaller.desktop
Normal file
11
src/usr/share/applications/@PKG_NAME@-uninstaller.desktop
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=ACE @PRETTY_NAME@ Software Uninstaller
|
||||||
|
Name[zh_CN]=ACE @PRETTY_NAME@ 软件卸载器
|
||||||
|
Comment=用于卸载ACE容器的应用
|
||||||
|
Type=Application
|
||||||
|
Exec=/opt/apps/@PKG_NAME@/files/bin/ace-uninstall-helper-gui
|
||||||
|
Icon=@PKG_NAME@-uninstaller
|
||||||
|
Categories=System
|
||||||
|
|
||||||
|
# Generated from the DesktopGenerater component of the z-Tools toolkit
|
8
src/usr/share/applications/amber-ce-bookworm.desktop → src/usr/share/applications/@PKG_NAME@.desktop
8
src/usr/share/applications/amber-ce-bookworm.desktop → src/usr/share/applications/@PKG_NAME@.desktop
@ -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
|
|
BIN
src/usr/share/icons/@PKG_NAME@-uninstaller.png
Normal file
BIN
src/usr/share/icons/@PKG_NAME@-uninstaller.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 289 KiB |
BIN
src/usr/share/icons/@PKG_NAME@.png
Normal file
BIN
src/usr/share/icons/@PKG_NAME@.png
Normal file
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>
|
Loading…
x
Reference in New Issue
Block a user