diff options
author | Holger Paradies <retabell@gmx.de> | 2024-02-11 16:56:35 +0100 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2024-02-11 16:56:35 +0100 |
commit | adac2e7c64f52ab8f72186ebb5eb877594085914 (patch) | |
tree | 4d8091f1011feeb92286a1031183ba3e2f6e9751 | |
parent | 44742bda281f7d9d86ff2072b5ddafd586c67c85 (diff) | |
download | kanotix-adac2e7c64f52ab8f72186ebb5eb877594085914.zip kanotix-adac2e7c64f52ab8f72186ebb5eb877594085914.tar.gz |
Add option to include x86_64.AppImages
Appimages are includede in the iso filesystem.
A Starter is created on Desktop (live-only).
-rw-r--r-- | auto/functions/appimage-hook | 29 | ||||
-rwxr-xr-x | config/chroot_local-includes/lib/live/config/9027-appimage-desktop | 42 |
2 files changed, 71 insertions, 0 deletions
diff --git a/auto/functions/appimage-hook b/auto/functions/appimage-hook new file mode 100644 index 0000000..1c88873 --- /dev/null +++ b/auto/functions/appimage-hook @@ -0,0 +1,29 @@ +#!/bin/sh + +current_script="$(basename "$0"|sed 's/^lb_//')" + +if [ "$current_script" = "chroot_hooks" ]; then + echo "HOOK: appimage@chroot_hooks" + if [ -e config/chroot_appimage ]; then + mkdir -p chroot/run/live/medium + cp -rf config/chroot_appimage/* chroot/run/live/medium/ + fi +fi + +if [ "$current_script" = "binary_rootfs" ]; then + echo "HOOK: appimage@binary-rootfs" + + if [ -e chroot/var/lib/dpkg/info/libc6:amd64.postinst ]; then + echo "DEBUG amd64" + if [ -e /tmp/chroot_appimage ]; then + echo "DEBUG: appimages folder found" + + # figure out arch TODO + + echo "DEBUG: appimage amd64" + mkdir -p binary/appimages + cp -f /tmp/chroot_appimage/* binary/appimages/ + chmod ugo+x binary/appimages/* + fi + fi +fi diff --git a/config/chroot_local-includes/lib/live/config/9027-appimage-desktop b/config/chroot_local-includes/lib/live/config/9027-appimage-desktop new file mode 100755 index 0000000..ac9b88b --- /dev/null +++ b/config/chroot_local-includes/lib/live/config/9027-appimage-desktop @@ -0,0 +1,42 @@ +#!/bin/sh + +Appimage () +{ + # Checking if configured + if [ -e /var/lib/live/config/appimage ] + then + return + fi + echo -n " appimage" + Configure_appimage +} +Configure_appimage () +{ + # +if [ -e /run/live/medium/appimages ]; then +# Create desktop icons for each appimage + for files in /run/live/medium/appimages/* + do + +file=$(basename $files) + +cat <<EOT >/home/${LIVE_USERNAME}/Desktop/"$file".desktop +[Desktop Entry] +Name="$file" +Comment="$file" +Exec=/run/live/medium/appimages/"$file" +Terminal=false +Type=Application +Icon=appimage +Categories=Misc; +EOT + chown 1000:1000 /home/${LIVE_USERNAME}/Desktop/"$file".desktop + chmod +x /home/${LIVE_USERNAME}/Desktop/"$file".desktop + done + +fi + # Creating state file + touch /var/lib/live/config/appimage +} + +Appimage |