mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-12-14 19:12:05 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b27103c18 | |||
| 00c2772152 | |||
| a8463e9152 | |||
| 0f293864b6 | |||
| 6c853b2bec | |||
| 8ce2c31380 | |||
|
|
f57e80c61a | ||
|
|
8140e49602 |
@@ -1,8 +1,8 @@
|
||||
Package: cn.flamescion.bookworm-compatibility-mode
|
||||
Version: 12.4
|
||||
Version: 12.4.5
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Depends: bubblewrap,xdg-desktop-portal | flatpak,zenity,policykit-1,gcc
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Architecture: arm64
|
||||
Architecture: amd64
|
||||
Description: bwrap wrapper for install and running debs inside a bookworm container
|
||||
|
||||
17
src/etc/X11/Xsession.d/20ACE-Bookworm
Executable file
17
src/etc/X11/Xsession.d/20ACE-Bookworm
Executable file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
# Ensure base distro defaults xdg path are set if nothing filed up some
|
||||
# defaults yet.
|
||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
||||
fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||
ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# shellcheck shell=sh
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ exit 1
|
||||
fi
|
||||
|
||||
cd "`dirname $0`"
|
||||
sudo debootstrap --include=apt-utils,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 ./bookworm-env https://mirrors.ustc.edu.cn/debian/
|
||||
sudo debootstrap --include=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 ./bookworm-env https://mirrors.ustc.edu.cn/debian/
|
||||
|
||||
|
||||
sudo rm -rf bookworm-env/var/cache/apt/archives/*.deb
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Package: ace-host-integration
|
||||
Version: 1.2
|
||||
Version: 1.2.1
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Depends: bash
|
||||
|
||||
@@ -1,28 +1,6 @@
|
||||
#!/bin/bash
|
||||
ACE_dir="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env"
|
||||
function linkDir() {
|
||||
ensureTargetDir() {
|
||||
targetFile=$1
|
||||
t=$(dirname "$targetFile")
|
||||
mkdir -p "$t"
|
||||
}
|
||||
|
||||
source=$1
|
||||
target=$2
|
||||
sourceDir=$(dirname "$source")
|
||||
targetDir=$(dirname "$target")
|
||||
find "$source" -type f | while read sourceFile; do
|
||||
targetFile="$targetDir/${sourceFile#$sourceDir/}"
|
||||
if [ -L "$targetFile" ] && [ "$(readlink "$targetFile")" = "$sourceFile" ]; then
|
||||
continue
|
||||
else
|
||||
rm -f "$targetFile"
|
||||
fi
|
||||
|
||||
ensureTargetDir "$targetFile"
|
||||
ln -s "$sourceFile" "$targetFile"
|
||||
done
|
||||
}
|
||||
|
||||
function do_integrate(){
|
||||
local file=$1
|
||||
@@ -51,9 +29,7 @@ local file=$1
|
||||
for app_dir in $(ls /opt/apps/); do
|
||||
for file in /opt/apps/$app_dir/entries/applications/*.desktop;do
|
||||
do_integrate $file
|
||||
DESKTOP_FILE_NAME=$(basename $file)
|
||||
ln -sf "../../../opt/apps/$app_dir/entries/applications/$DESKTOP_FILE_NAME" "/usr/share/applications/"
|
||||
linkDir "../../../opt/apps/$app_dir/entries/icons" "/usr/share/icons/"
|
||||
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [ "$UID" = "0" ];then
|
||||
pkexec $@
|
||||
$@
|
||||
else
|
||||
host-spawn pkexec bookworm-run $@
|
||||
fi
|
||||
|
||||
17
src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm
Executable file
17
src/usr/lib/systemd/user-environment-generators/60-ACE-Bookworm
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
# Ensure base distro defaults xdg path are set if nothing filed up some
|
||||
# defaults yet.
|
||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
|
||||
fi
|
||||
|
||||
# Desktop files (used by desktop environments within both X11 and Wayland) are
|
||||
# looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for ACE
|
||||
ACE_path="/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env/usr/share/"
|
||||
if [ -n "${XDG_DATA_DIRS##*${ACE_path}}" ] && [ -n "${XDG_DATA_DIRS##*${ACE_path}:*}" ]; then
|
||||
export XDG_DATA_DIRS="${ACE_path}:${XDG_DATA_DIRS}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user