Compare commits

...

102 Commits

Author SHA1 Message Date
51b30d0ef7 修复递归问题
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-06-04 15:30:40 +00:00
6246cf3c98 自动添加 X-AMBER-CE-DESKTOP-NAME
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-05-30 15:32:16 +00:00
f169fee3ac fix init lauguage
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-27 19:09:35 +00:00
1b2eaddb4d !9 Revert "update src/opt/apps/@PKG_NAME@/files/bin/ace-init."
Merge pull request !9 from shenmo/revert-05c5b4a
2025-04-27 19:08:43 +00:00
9071dbf2ff Revert "update src/opt/apps/@PKG_NAME@/files/bin/ace-init."
This reverts commit 05c5b4a2b9.
2025-04-27 19:08:24 +00:00
05c5b4a2b9 update src/opt/apps/@PKG_NAME@/files/bin/ace-init.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-27 17:43:23 +00:00
26dcf96d87 支持 Ubuntu 25 等 systemd 不再提供 utmp 的情景下获取当前用户名
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-18 15:01:44 +00:00
05e00b41f9 12.7.6
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-16 13:40:04 +00:00
e99d4b5e58 pkgname 通用
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:41:58 +00:00
5986f2d076 不再硬编码pkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:14:59 +00:00
9eb23aa93f 在rules里做src->pkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:09:28 +00:00
6b3ad3cc43 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-15 14:04:11 +00:00
7c76c95dc4 先link 2025-04-15 18:52:34 +08:00
8b7bc7f52a uname -m 2025-04-15 18:33:12 +08:00
cae9256bdd build-pkg.sh 2025-04-15 18:32:02 +08:00
3d88f051ce build-pkg.sh 2025-04-15 18:29:30 +08:00
8eca27e209 linker.sh 2025-04-15 18:24:35 +08:00
d2c952a145 fakerootenv
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-04-14 06:22:30 +00:00
0f517db7db 设计成与自己冲突,防止套娃安装 2025-03-29 00:51:15 +08:00
5ca843947e 不再在构建阶段需要dpkg
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-17 04:00:04 +00:00
2a9cb4ea36 update src/opt/apps/@PKG_NAME@/files/bin/amber-ce-configure-nvidia.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-16 15:16:06 +00:00
756373ad14 "FAKEROOTDONTTRYCHOWN" "1"
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-13 05:37:27 +00:00
b3e870b610 Revert "remove additionxxxxx-data-dir"
This reverts commit a3ed194251.
2025-03-08 07:27:16 +00:00
a3ed194251 remove additionxxxxx-data-dir 2025-03-08 15:24:37 +08:00
457a2a3f00 ACE x86
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-07 05:17:34 +00:00
d2a53bb69c update auto upgrader 2025-03-06 23:44:26 +08:00
5b935202c9 update gui 2025-03-06 23:37:17 +08:00
67c2b1fc9e update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 14:29:49 +00:00
557fa8ed38 update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 14:28:03 +00:00
b0aa469684 postinst/rm
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:50:40 +00:00
905a642811 update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:37:08 +00:00
97fffcddd5 update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:30:10 +00:00
7b1a0d53ca update src/opt/apps/@PKG_NAME@/files/build-container.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 13:10:25 +00:00
f2605fb5a4 update debian/rules.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 07:36:03 +00:00
b9758bf888 update debian/rules.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-06 07:29:38 +00:00
745edd0c12 12.7.0 2025-03-06 15:00:19 +08:00
de34703e51 update bin 2025-03-06 14:59:51 +08:00
407a67fdeb replacer 2025-03-06 14:45:47 +08:00
c58ef6ac72 space to tab 2025-03-06 14:44:48 +08:00
ce6feba217 implented replacer 2025-03-06 14:43:57 +08:00
90bf57d884 update: 通用ACE 2025-03-06 14:17:24 +08:00
6ee00a33b2 12.6.5
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-03-03 13:50:01 +00:00
ab64e78fa5 update src/opt/apps/amber-ce-bookworm/files/flamescion-container-tools/bin-override/sudo.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-28 17:03:58 +00:00
6162040d09 12.6.4
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-28 15:03:45 +00:00
bfcd224c08 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-26 15:04:37 +00:00
290623e263 fix: Bwrap failed on Arch 2025-02-26 23:02:43 +08:00
0f8fb5df67 修复:无法正确展开环境
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-25 03:10:40 +00:00
ae87013a3a 12.6.2 2025-02-24 19:08:38 +08:00
885eb4cfc6 update:在root下也有 IS_ACE_ENV=1 了 2025-02-24 19:06:58 +08:00
72d926d928 删除文件 src/opt/apps/cn.flamescion.bookworm-compatibility-mode 2025-02-16 17:48:37 +00:00
3da7b0c9b4 update: 现在安装时可正确拉起N卡配置 2025-02-14 21:46:59 +08:00
dc01ee917c update:gitignore 2025-02-14 21:46:42 +08:00
0d0e8452bf update: amber-ce-bookworm-configure-nvidia 2025-02-14 21:39:05 +08:00
b2f1a9cccb update: bookworm-configure-nvidia 2025-02-14 21:31:46 +08:00
b1a2b02c1e update: 改为软链接到容器中
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-14 12:54:47 +00:00
517816ee00 update:nvidia-configure 2025-02-14 20:44:03 +08:00
f2f0c58436 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-14 12:19:57 +00:00
c5819be7d5 !8 feat: Support Nvidia Accelerate
Merge pull request !8 from shenmo/N/A
2025-02-12 15:16:38 +00:00
1f7a026401 feat: Support Nvidia Accelerate
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2025-02-12 15:15:00 +00:00
fa745aed12 12.5.16 2025-02-06 14:04:28 +08:00
5a7c2b41d4 update: 重新使用dpkg构建 ACE Host Integration 2025-02-06 14:02:54 +08:00
ded8320249 修改文案 2025-01-22 20:20:19 +08:00
1db8d4b98c adjust: 默认目录改成 amber-ce-bookworm 2025-01-17 21:13:16 +08:00
1ad4a2bfd4 update ignore 2025-01-17 21:12:43 +08:00
b8bbe9a672 adjust: now we don't depend dpkg in building 2024-12-24 11:26:20 +08:00
250e48b98e update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-12-19 04:54:05 +00:00
5f54c92b84 fix: can not pass args via bwrap
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-12-19 04:51:04 +00:00
df0b714c8b https://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-12-15 07:03:06 +00:00
cd1f0c0c22 Nope we don't proxy mimetypes as it cause dde down
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-12-07 10:44:51 +00:00
7c2dc1bbb2 update: build-container.sh to adapt debian sid 2024-12-06 23:18:15 +08:00
338f647763 ```
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-28 17:35:36 +00:00
286ced4488 yay -S amber-ce-bookworm
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-28 17:22:57 +00:00
f8c7a53864 https://pan.huang1111.cn/s/jR1GdUy
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-13 05:04:49 +00:00
5b09d279ea readme
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-12 17:50:20 +00:00
7fdb227c93 readme
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-12 17:33:49 +00:00
b9a0472b78 update README.zh.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-12 16:52:33 +00:00
e4cc26e3ea update .workflow/Debian-Build-amd64.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-12 11:28:44 +00:00
09a12d3595 update Debian-Build-amd64.yml 2024-11-12 10:28:32 +00:00
fc711b285e update debian/control.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-12 10:10:09 +00:00
968f30b1c3 update debian/changelog.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-04 18:12:11 +00:00
3c3feb5f85 update ace-host-integration/ace-host-integration.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-11-04 18:11:08 +00:00
04ef4b73b5 update src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bin/bookworm-run-bwrap.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-10-29 10:23:42 +00:00
8dc2624dc5 update Debian-Build-amd64.yml 2024-10-26 11:06:24 +00:00
fdfde11782 update Debian-Build-amd64.yml 2024-10-26 11:02:14 +00:00
e24682194e update Debian-Build-amd64.yml 2024-10-26 11:00:09 +00:00
8913d11cc3 update Debian-Build-amd64.yml 2024-10-26 10:57:20 +00:00
518c349c7f update Debian-Build-amd64.yml 2024-10-26 10:54:14 +00:00
f134bb12fe create Debian-Build-amd64.yml 2024-10-26 10:51:23 +00:00
75754f9dec 删除文件 .workflow/pipeline-20241025.yml 2024-10-26 10:50:57 +00:00
3e42120495 删除文件 .workflow/debian-amd64-pipeline-20241025.yml 2024-10-26 10:50:52 +00:00
3edcbbbf0a update .workflow/debian-amd64-pipeline-20241025.yml.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-10-26 10:50:16 +00:00
c476163ad8 update pipeline-20241025.yml 2024-10-26 10:49:50 +00:00
8f015507ee update pipeline-20241025.yml 2024-10-26 10:49:18 +00:00
15a3edc644 update pipeline-20241025.yml 2024-10-26 10:49:02 +00:00
8654212663 update pipeline-20241025.yml 2024-10-26 10:42:17 +00:00
195e6cc053 update pipeline-20241025.yml 2024-10-25 06:19:46 +00:00
31db0eb36c 重命名 .workflow/pipeline-20241025.yml 为 .workflow/debian-amd64-pipeline-20241025.yml 2024-10-25 06:18:39 +00:00
960fb63570 删除文件 .workflow/master-pipeline.yml 2024-10-25 06:18:28 +00:00
5ad185528f 删除文件 .workflow/branch-pipeline.yml 2024-10-25 06:18:21 +00:00
b3187660e0 删除文件 .workflow/pr-pipeline.yml 2024-10-25 06:18:13 +00:00
dbd4d7c7ce create pipeline-20241025.yml 2024-10-25 06:17:40 +00:00
d0125c983d add default pipeline template yaml 2024-10-25 06:05:07 +00:00
73 changed files with 650 additions and 360 deletions

2
.gitignore vendored
View File

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

View File

@@ -0,0 +1,59 @@
version: '1.0'
name: Debian-Build-amd64
displayName: Debian-Build-amd64
triggers:
trigger: manual
push:
tags:
prefix:
- ''
stages:
- name: stage-d1472d18
displayName: Build DEB
strategy: naturally
trigger: auto
executor: []
steps:
- step: execute@docker
name: execute_by_docker
displayName: Build Debian amd64
certificate: ''
image: docker.jianmuhub.com/library/debian:bookworm
command:
- export DEBIAN_FRONTEND=noninteractive
- apt update
- apt install ca-certificates -y
- echo 'deb [trusted=yes] http://mirrors.sdu.edu.cn/debian bookworm main contrib non-free non-free-firmware' > /etc/apt/sources.list
- rm -rfv /etc/apt/sources.list.d/*
- apt update
- apt build-dep . -y
- dpkg-buildpackage -b -us -uc
- cd ..
- ''
- mkdir target
- for f in $(find . -type f -name "*.deb")
- 'do '
- mv -v $f target
- done
- ls -all
artifacts:
- name: BUILD_ARTIFACT
path:
- ../target/
notify: []
strategy:
retry: '0'
- name: stage-41e41b9f
displayName: push
strategy: naturally
trigger: auto
executor: []
steps:
- step: publish@general_artifacts
name: publish_general_artifacts
displayName: 上传制品
dependArtifact: BUILD_ARTIFACT
artifactName: output
notify: []
strategy:
retry: '0'

View File

@@ -16,42 +16,38 @@ With the help of bubblewrap, a super tiny container solution, you can run a `Deb
Please use `git clone --recurse-submodules` to obtain the env Please use `git clone --recurse-submodules` to obtain the env
## Install Guide ## Install GuideDebian/Fedora/Arch)
Share Linkhttps://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4
### Quick Install (Need to install Spark Store first)
[spk://store/tools/cn.flamescion.bookworm-compatibility-mode/](https://spk-resolv.spark-app.store/?spk=spk://store/tools/cn.flamescion.bookworm-compatibility-mode/)
### Manual InstallDebian/Fedora/Arch)
https://pan.huang1111.cn/s/jR1GdUy
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`
### Amber-CE x86 Usage: Run `bookworm-run` in host OS. You can also add command direct after `bookworm-run`
Use LAT to run a x86 bookworm container. Can install x86 debs and run x86 apps
https://pan.huang1111.cn/s/P63D6Cm ## ACE x86
Only capable with ABI2 Distrosdeepin/debian/AOSC OS)
Run an amd64 Debian Bookworm container via LATX
Command bookworm-run-x86
https://share.spark-app.store/index.php?share/folder&user=1&sid=GnktisUQ
--- ---
## Build Guide ## Build From.Source
### Debian ### Debian
Build the container first then build the package. Container at `src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files` ```
Here are the details: apt build-dep .
1. Install dependencies: sudo apt-get install arch-test debootstrap libnss-mymachines systemd-container dpkg-buildpackage -us -uc -b
2. Enter the terminal at `src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files` and execute `./build-container.sh amd64`.[for amd,other arch please change] ```
3. Wait for the container to complete.
4.Get in to `amber-ce-bookworm` dir,run`fakeroot dpkg-deb -b src .`
5.Wating for complete.
### Fedora ### Fedora

View File

@@ -11,42 +11,40 @@
请使用 `git clone --recurse-submodules` 来获取 请使用 `git clone --recurse-submodules` 来获取
## 安装指南 ## 安装指南 Debian/Fedora/Arch)
### 快捷安装 (需要安装星火应用商店)
[spk://store/tools/cn.flamescion.bookworm-compatibility-mode/](https://spk-resolv.spark-app.store/?spk=spk://store/tools/cn.flamescion.bookworm-compatibility-mode/) 分享链接https://share.spark-app.store/index.php?share/folder&user=1&sid=wHP86Kp4
### 手动安装Debian/Fedora/Arch)
https://pan.huang1111.cn/s/jR1GdUy
Ubuntu 18.04 需要安装 https://packages.debian.org/buster/bubblewrap Ubuntu 18.04 需要安装 https://packages.debian.org/buster/bubblewrap
Arch`yay -S amber-ce-bookworm`
### Amber-CE x86 使用方法:在宿主机使用 bookworm-run 进入环境,亦可直接在 bookworm-run 后添加要执行的指令
利用 LAT 运行的x86容器可安装和运行x86的deb ## ACE x86
https://pan.huang1111.cn/s/P63D6Cm 仅适用于龙芯新世界发行版deepin/debian/AOSC OS)
安装后可在龙芯上依赖 LATX 运行一个 amd64 Debian Bookworm
使用方法: bookworm-run-x86
https://share.spark-app.store/index.php?share/folder&user=1&sid=GnktisUQ
--- ---
## 构建指南 ## 从源代码构建指南
### Debian ### Debian
先构建容器再打包,容器位置在`src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files` ```
apt build-dep .
下面是详细步骤: dpkg-buildpackage -us -uc -b
```
1. 安装依赖sudo apt-get install arch-test debootstrap libnss-mymachines systemd-container
2.`src/opt/apps/cn.flamescion.bookworm-compatibility-mode/files`位置进入终端,执行`./build-container.sh amd64`[amd架构其他架构同理]`
3. 等待容器打包完成
4. 进入`amber-ce-bookworm`目录,执行`fakeroot dpkg-deb -b src .`
5. 等待打包完成
### Fedora ### Fedora
@@ -57,3 +55,8 @@ https://pan.huang1111.cn/s/P63D6Cm
`yay -S amber-ce-bookworm` `yay -S amber-ce-bookworm`
--- ---
Single Build:
cp -r src/ pkg/
./build-pkg.sh pkg/

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

42
build-pkg.sh Executable file
View File

@@ -0,0 +1,42 @@
#!/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))
read_config "ace-base.config"
# 访问变量
echo "Package Name: $PKG_NAME"
echo "Host Name: $HOST_NAME"
echo "Executable Name: $EXEC_NAME"
echo "Pretty Name: $PRETTY_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 $(uname -m)
popd

25
debian/changelog vendored
View File

@@ -1,7 +1,30 @@
amber-ce-bookworm (12.4.14-3) UNRELEASED; urgency=low amber-ce-bookworm (12.8.3) 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: 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
* fix: sudo function error: Need sudo sudo to really sudo * fix: sudo function error: Need sudo sudo to really sudo
* fix: ACE Host Integration fail
* adjust: remove dpkg from building depends
* 把默认目录改为 amber-ce-bookworm
* 支持使用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

View File

@@ -2,27 +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/files/bookworm-env ];then PACKAGE_NAME=amber-ce-bookworm # 为了后面正确清理
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/ ];then
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env unlink /opt/apps/amber-ce-bookworm
ln -sfv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env mv -v /opt/apps/cn.flamescion.bookworm-compatibility-mode/ /opt/apps/amber-ce-bookworm/
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

View File

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

3
debian/control vendored
View File

@@ -2,7 +2,7 @@ Source: amber-ce-bookworm
Section: misc Section: misc
Priority: optional Priority: optional
Maintainer: shenmo <shenmo@spark-app.store> Maintainer: shenmo <shenmo@spark-app.store>
Build-Depends: debhelper-compat (= 13),debootstrap,systemd-container Build-Depends: debhelper-compat (= 13),debootstrap,systemd-container,sudo
Standards-Version: 4.5.1 Standards-Version: 4.5.1
Homepage: https://gitee.com/amber-ce/amber-ce-bookworm/ Homepage: https://gitee.com/amber-ce/amber-ce-bookworm/
Rules-Requires-Root: binary-targets Rules-Requires-Root: binary-targets
@@ -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
View File

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

7
debian/rules vendored
View File

@@ -6,8 +6,13 @@
dh $@ dh $@
override_dh_auto_configure: override_dh_auto_configure:
cd src/opt/apps/cn.flamescion.bookworm-compatibility-mode/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

35
linker.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/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.config"
# 访问变量
echo "Package Name: $PKG_NAME"
echo "Host Name: $HOST_NAME"
echo "Executable Name: $EXEC_NAME"
echo "Pretty Name: $PRETTY_NAME"
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 Normal file
View File

@@ -0,0 +1,92 @@
#!/usr/bin/env bash
########################################
# 配置部分
########################################
config_file="ace-base.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 "处理完成!"

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

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

View 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

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,17 +116,22 @@ 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 .
rm -vf ./mime
update-desktop-database /usr/share/applications || true update-desktop-database /usr/share/applications || true
update-mime-database /usr/share/mime || true update-mime-database /usr/share/mime || true

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,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,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
${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
@@ -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=(
@@ -107,8 +101,7 @@ BIND_DIRS=(
"--dev-bind-try /mnt /mnt" "--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"
@@ -121,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"
) )

View File

@@ -5,7 +5,8 @@ parent_dir=`dirname $curdir`
pparent_dir=`dirname $parent_dir` pparent_dir=`dirname $parent_dir`
ppparent_dir=`dirname $pparent_dir` ppparent_dir=`dirname $pparent_dir`
PKGNAME=`basename $ppparent_dir` PKGNAME=`basename $ppparent_dir`
export 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}\""

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

View 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

View File

@@ -0,0 +1,43 @@
#!/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,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,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" = "loongarch64" ] || [ "$1" = "loong64" ];then
ARCH="loong64"
ARCH_ANOTHERWAY="loong64"
sudo debootstrap --no-check-gpg --include=libnotify-bin,debian-ports-archive-keyring,apt-utils,bash-completion,bc,curl,dialog,diffutils,gnupg,findutils,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 https://deb.debian.org/debian-ports/
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

View File

@@ -1 +0,0 @@
./cn.flamescion.bookworm-compatibility-mode/

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

@@ -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,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-mesa,libgl1-mesa-glx,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-mesa,libgl1-mesa-glx,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

View File

@@ -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}" != "" ];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

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

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>