mijorus/gearlever

Consider releasing an AppImage version of GearLever

Opened this issue ยท 26 comments

I consider the absence of an AppImage version for Gear Lever and its reliance on Flatpak to be an egregious error. Please don't take offense, but as a Linux user, I strongly dislike the unnecessary clutter caused by Flatpak, Snap, and Java โ€“ they consume resources needlessly, and their background processes remain opaque to users. Flatpak and Snap seem like makeshift solutions tailored for former Windows users who migrated to Ubuntu to avoid Microsoft's system charges. The developers behind this decision are reminiscent of Canonical, which altered Debian into something unrecognizable without bothering to consult the documentation, merely patching it to mimic Windows. Although I appreciate the program, if it insists on using Flatpak, I regret to say that I'll stick to AppMan via the terminal.

Hi, I have updated the title to something more appropriate.
Also, your post seems like a rant, more than a bug report.

An AppImage version of Gear Lever means that I would have to redesign the app to be able to "install itself" of the first run, and a bunch of other things.

Also, I found NO examples on how to build a GTK appimage, which definitely does not make things easier

I regret to say that I'll stick to AppMan via the terminal.

I feel like, if this is the case, you're likely not in the target demographic that an app like this is trying to cater to. I get that you have philosophical complaints about the flatpak packaging system, but this seems to be a program made for those without those complaints. It's good to hear that you have found a preferred alternative, though!

Hi @mijorus I've contacted you on Reddit some minutes ago about our previous conversation on creating an AppImage. I've seen that you have an AUR package, so I've worked with it using my project "Archimage", at https://github.com/ivan-hc/ArchImage

This is the script I wrote for you

Click here to expand
#!/usr/bin/env bash

# NAME OF THE APP BY REPLACING "SAMPLE"
APP=gearlever
BIN="$APP" #CHANGE THIS IF THE NAME OF THE BINARY IS DIFFERENT FROM "$APP" (for example, the binary of "obs-studio" is "obs")
DEPENDENCES="ca-certificates python python-gobject glib2 python-dbus python-graphene graphene python-cairo cairo fuse3 libadwaita ibus"
BASICSTUFF="binutils debugedit gzip"
COMPILERS="base-devel"

# CREATE THE APPDIR (DON'T TOUCH THIS)...
if ! test -f ./appimagetool; then
	wget -q "$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - | sed 's/"/ /g; s/ /\n/g' | grep -o 'https.*continuous.*tool.*86_64.*mage$')" -O appimagetool
	chmod a+x appimagetool
fi
mkdir -p $APP.AppDir

# ENTER THE APPDIR
cd $APP.AppDir || return

# SET APPDIR AS A TEMPORARY $HOME DIRECTORY, THIS WILL DO ALL WORK INTO THE APPDIR
HOME="$(dirname "$(readlink -f $0)")"

# DOWNLOAD AND INSTALL JUNEST (DON'T TOUCH THIS)
if ! test -d "$HOME/.local/share/junest"; then
	git clone https://github.com/fsquillace/junest.git ./.local/share/junest
	wget -q --show-progress https://github.com/ivan-hc/junest/releases/download/continuous/junest-x86_64.tar.gz
	./.local/share/junest/bin/junest setup -i junest-x86_64.tar.gz
	rm -f junest-x86_64.tar.gz

	# ENABLE MULTILIB (optional)
	echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> ./.junest/etc/pacman.conf

	# ENABLE LIBSELINUX FROM THIRD PARTY REPOSITORY
	if [[ $DEPENDENCES = *"libselinux"* ]]; then
		echo -e "\n[selinux]\nServer = https://github.com/archlinuxhardened/selinux/releases/download/ArchLinux-SELinux\nSigLevel = Never" >> ./.junest/etc/pacman.conf
	fi

	# ENABLE CHAOTIC-AUR
	function _enable_chaoticaur(){
		./.local/share/junest/bin/junest -- sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
		./.local/share/junest/bin/junest -- sudo pacman-key --lsign-key 3056513887B78AEB
		./.local/share/junest/bin/junest -- sudo pacman-key --populate chaotic
		./.local/share/junest/bin/junest -- sudo pacman --noconfirm -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
		echo -e "\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist" >> ./.junest/etc/pacman.conf
	}
	###_enable_chaoticaur

	# CUSTOM MIRRORLIST, THIS SHOULD SPEEDUP THE INSTALLATION OF THE PACKAGES IN PACMAN (COMMENT EVERYTHING TO USE THE DEFAULT MIRROR)
	function _custom_mirrorlist(){
		#COUNTRY=$(curl -i ipinfo.io | grep country | cut -c 15- | cut -c -2)
		rm -R ./.junest/etc/pacman.d/mirrorlist
		wget -q https://archlinux.org/mirrorlist/all/ -O - | awk NR==2 RS= | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES WORLDWIDE MIRRORS
		#wget -q https://archlinux.org/mirrorlist/?country="$(echo $COUNTRY)" -O - | sed 's/#Server/Server/g' >> ./.junest/etc/pacman.d/mirrorlist # ENABLES MIRRORS OF YOUR COUNTY
	}
	_custom_mirrorlist

	# BYPASS SIGNATURE CHECK LEVEL
	sed -i 's/#SigLevel/SigLevel/g' ./.junest/etc/pacman.conf
	sed -i 's/Required DatabaseOptional/Never/g' ./.junest/etc/pacman.conf

	# UPDATE ARCH LINUX IN JUNEST
	./.local/share/junest/bin/junest -- sudo pacman -Syy
	./.local/share/junest/bin/junest -- sudo pacman --noconfirm -Syu
else
	cd ..
	rsync -av ./junest-backups/* ./$APP.AppDir/.junest/
	rsync -av ./stock-cache/* ./$APP.AppDir/.cache/
	rsync -av ./stock-local/* ./$APP.AppDir/.local/
	cd ./$APP.AppDir || return
fi

# INSTALL THE PROGRAM USING YAY
./.local/share/junest/bin/junest -- yay -Syy
./.local/share/junest/bin/junest -- gpg --keyserver keyserver.ubuntu.com --recv-key C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF # UNCOMMENT IF YOU USE THE AUR
./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$BASICSTUFF $COMPILERS")
./.local/share/junest/bin/junest -- yay --noconfirm -S $(echo "$DEPENDENCES $APP")

# DO A BACKUP OF THE CURRENT STATE OF JUNEST
cd ..
mkdir -p ./junest-backups
mkdir -p ./stock-cache
mkdir -p ./stock-local
rsync -av --ignore-existing ./$APP.AppDir/.junest/* ./junest-backups/
rsync -av --ignore-existing ./$APP.AppDir/.cache/* ./stock-cache/
rsync -av --ignore-existing ./$APP.AppDir/.local/* ./stock-local/
cd ./$APP.AppDir || return

# SET THE LOCALE (DON'T TOUCH THIS)
#sed "s/# /#>/g" ./.junest/etc/locale.gen | sed "s/#//g" | sed "s/>/#/g" >> ./locale.gen # UNCOMMENT TO ENABLE ALL THE LANGUAGES
#sed "s/#$(echo $LANG)/$(echo $LANG)/g" ./.junest/etc/locale.gen >> ./locale.gen # ENABLE ONLY YOUR LANGUAGE, COMMENT IF YOU NEED MORE THAN ONE
#rm ./.junest/etc/locale.gen
#mv ./locale.gen ./.junest/etc/locale.gen
rm ./.junest/etc/locale.conf
#echo "LANG=$LANG" >> ./.junest/etc/locale.conf
sed -i 's/LANG=${LANG:-C}/LANG=$LANG/g' ./.junest/etc/profile.d/locale.sh
#./.local/share/junest/bin/junest -- sudo pacman --noconfirm -S glibc gzip
#./.local/share/junest/bin/junest -- sudo locale-gen

# ...ADD THE ICON AND THE DESKTOP FILE AT THE ROOT OF THE APPDIR...
rm -R -f ./*.desktop
LAUNCHER=$(grep -iRl $BIN ./.junest/usr/share/applications/* | grep ".desktop" | head -1)
cp -r "$LAUNCHER" ./
ICON=$(cat $LAUNCHER | grep "Icon=" | cut -c 6-)
cp -r ./.junest/usr/share/icons/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/22x22/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/24x24/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/32x32/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/48x48/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/64x64/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/128x128/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/192x192/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/256x256/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/512x512/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/icons/hicolor/scalable/apps/*"$ICON"* ./ 2>/dev/null
cp -r ./.junest/usr/share/pixmaps/*"$ICON"* ./ 2>/dev/null

# TEST IF THE DESKTOP FILE AND THE ICON ARE IN THE ROOT OF THE FUTURE APPIMAGE (./*AppDir/*)
if test -f ./*.desktop; then
	echo "The .desktop file is available in $APP.AppDir/"
else
	if test -f ./.junest/usr/bin/$BIN; then
 		echo "No .desktop file available for $APP, creating a new one..."
 		cat <<-HEREDOC >> "./$APP.desktop"
		[Desktop Entry]
		Version=1.0
		Type=Application
		Name=NAME
		Comment=
		Exec=BINARY
		Icon=tux
		Categories=Utility;
		Terminal=true
		StartupNotify=true
		HEREDOC
		sed -i "s#BINARY#$BIN#g" ./$APP.desktop
		sed -i "s#Name=NAME#Name=$(echo $APP | tr a-z A-Z)#g" ./$APP.desktop
		wget https://raw.githubusercontent.com/Portable-Linux-Apps/Portable-Linux-Apps.github.io/main/favicon.ico -O ./tux.png
	else
 		echo "No binary in path... aborting all the processes."
		exit
	fi
fi

# ...AND FINALLY CREATE THE APPRUN, IE THE MAIN SCRIPT TO RUN THE APPIMAGE!
# EDIT THE FOLLOWING LINES IF YOU THINK SOME ENVIRONMENT VARIABLES ARE MISSING
rm -R -f ./AppRun
cat >> ./AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$PATH:$HERE/.local/share/junest/bin

if test -f /etc/resolv.conf; then
ETC_RESOLV=' --bind /etc/resolv.conf /etc/resolv.conf '; fi
if test -d /media; then
MNT_MEDIA_DIR=' --bind /media /media '; fi
if test -d /mnt; then
MNT_DIR=' --bind /mnt /mnt '; fi
if test -d /opt; then
OPT_DIR=' --bind /opt /opt '; fi
if test -d /run/user; then
USR_LIB_LOCALE_DIR=' --bind /usr/lib/locale /usr/lib/locale '; fi
if test -d /usr/share/fonts; then
USR_SHARE_FONTS_DIR=' --bind /usr/share/fonts /usr/share/fonts '; fi
if test -d /usr/share/themes; then
USR_SHARE_THEMES_DIR=' --bind /usr/share/themes /usr/share/themes '; fi

BINDS=" $ETC_RESOLV $MNT_MEDIA_DIR $MNT_DIR $OPT_DIR $USR_LIB_LOCALE_DIR $USR_SHARE_FONTS_DIR $USR_SHARE_THEMES_DIR "

if test -f $JUNEST_HOME/usr/lib/libselinux.so; then
	export LD_LIBRARY_PATH=/lib/:/lib64/:/lib/x86_64-linux-gnu/:/usr/lib/:"${LD_LIBRARY_PATH}"
fi

EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/.local/share/junest/bin/junest -n -b "$BINDS" -- $EXEC "$@"
EOF
chmod a+x ./AppRun

# REMOVE "READ-ONLY FILE SYSTEM" ERRORS
sed -i 's#${JUNEST_HOME}/usr/bin/junest_wrapper#${HOME}/.cache/junest_wrapper.old#g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/rm -f "${JUNEST_HOME}${bin_path}_wrappers/#rm -f "${JUNEST_HOME}${bin_path}_wrappers/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's/ln/#ln/g' ./.local/share/junest/lib/core/wrappers.sh
sed -i 's#--bind "$HOME" "$HOME"#--bind /home /home --bind /run/user /run/user#g' .local/share/junest/lib/core/namespace.sh
sed -i 's/rm -f "$file"/test -f "$file"/g' ./.local/share/junest/lib/core/wrappers.sh

# EXIT THE APPDIR
cd ..

# EXTRACT PACKAGE CONTENT
mkdir -p base
rm -R -f ./base/*

tar fx "$(find ./$APP.AppDir -name "$APP-[0-9]*zst" | head -1)" -C ./base/
VERSION=$(cat ./base/.PKGINFO | grep pkgver | cut -c 10- | sed 's@.*:@@')

mkdir -p deps
rm -R -f ./deps/*

ARGS=$(echo "$DEPENDENCES" | tr " " "\n")
for arg in $ARGS; do
	tar fx "$(find ./$APP.AppDir -name "$arg-[0-9]*zst")" -C ./deps/
 	cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
done

DEPS=$(cat ./base/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<")
for arg in $DEPS; do
	tar fx "$(find ./$APP.AppDir -name "$arg-[0-9]*zst")" -C ./deps/
 	cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps
done

DEPS2=$(cat ./depdeps | uniq)
for arg in $DEPS2; do
	tar fx "$(find ./$APP.AppDir -name "$arg-[0-9]*zst")" -C ./deps/
 	cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps2
done

DEPS3=$(cat ./depdeps2 | uniq)
for arg in $DEPS3; do
	tar fx "$(find ./$APP.AppDir -name "$arg-[0-9]*zst")" -C ./deps/
 	cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps3
done

DEPS4=$(cat ./depdeps3 | uniq)
for arg in $DEPS4; do
	tar fx "$(find ./$APP.AppDir -name "$arg-[0-9]*zst")" -C ./deps/
 	cat ./deps/.PKGINFO | grep "depend = " | grep -v "makedepend = " | cut -c 10- | grep -v "=\|>\|<" > depdeps4
done

# REMOVE SOME BLOATWARES
echo Y | rm -R -f ./$APP.AppDir/.cache/yay/*
find ./$APP.AppDir/.junest/usr/share/doc/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL DOCUMENTATION NOT RELATED TO THE APP
find ./$APP.AppDir/.junest/usr/share/locale/*/*/* -not -iname "*$BIN*" -a -not -name "." -delete #REMOVE ALL ADDITIONAL LOCALE FILES
rm -R -f ./$APP.AppDir/.junest/etc/makepkg.conf
rm -R -f ./$APP.AppDir/.junest/etc/pacman.conf
rm -R -f ./$APP.AppDir/.junest/usr/include #FILES RELATED TO THE COMPILER
rm -R -f ./$APP.AppDir/.junest/usr/man #APPIMAGES ARE NOT MENT TO HAVE MAN COMMAND
rm -R -f ./$APP.AppDir/.junest/var/* #REMOVE ALL PACKAGES DOWNLOADED WITH THE PACKAGE MANAGER

# SAVE FILES USING KEYWORDS
BINSAVED="certificates SAVEBINSPLEASE" # Enter here keywords to find and save in /usr/bin
SHARESAVED="certificates SAVESHAREPLEASE" # Enter here keywords or file/folder names to save in both /usr/share and /usr/lib
LIBSAVED="pk p11 alsa jack pipewire pulse girepository Graphene cairo libgstplayer libcups libprintbackend libgstgl libmedia-gstreamer libcolord" # Enter here keywords or file/folder names to save in /usr/lib

# STEP 2, FUNCTION TO SAVE THE BINARIES IN /usr/bin THAT ARE NEEDED TO MADE JUNEST WORK, PLUS THE MAIN BINARY/BINARIES OF THE APP
# IF YOU NEED TO SAVE MORE BINARIES, LIST THEM IN THE "BINSAVED" VARIABLE. COMMENT THE LINE "_savebins" IF YOU ARE NOT SURE.
function _savebins(){
	mkdir save
	mv ./$APP.AppDir/.junest/usr/bin/*$BIN* ./save/
	mv ./$APP.AppDir/.junest/usr/bin/bash ./save/
 	mv ./$APP.AppDir/.junest/usr/bin/bwrap ./save/
	mv ./$APP.AppDir/.junest/usr/bin/env ./save/
	mv ./$APP.AppDir/.junest/usr/bin/sh ./save/
 	mv ./$APP.AppDir/.junest/usr/bin/tr ./save/
   	mv ./$APP.AppDir/.junest/usr/bin/tty ./save/
	for arg in $BINSAVED; do
		mv ./$APP.AppDir/.junest/usr/bin/*"$arg"* ./save/
	done
	rm -R -f ./$APP.AppDir/.junest/usr/bin/*
	mv ./save/* ./$APP.AppDir/.junest/usr/bin/
	rmdir save
}
_savebins 2> /dev/null

# STEP 3, MOVE UNNECESSARY LIBRARIES TO A BACKUP FOLDER (FOR TESTING PURPOSES)
mkdir save

function _binlibs(){
	readelf -d ./$APP.AppDir/.junest/usr/bin/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	mv ./$APP.AppDir/.junest/usr/lib/ld-linux-x86-64.so* ./save/
	mv ./$APP.AppDir/.junest/usr/lib/*$APP* ./save/
	mv ./$APP.AppDir/.junest/usr/lib/*$BIN* ./save/
	mv ./$APP.AppDir/.junest/usr/lib/libdw* ./save/
	mv ./$APP.AppDir/.junest/usr/lib/libelf* ./save/
	for arg in $SHARESAVED; do
		mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
	done
	ARGS=$(tail -n +2 ./list | sort -u | uniq)
	for arg in $ARGS; do
		mv ./$APP.AppDir/.junest/usr/lib/$arg* ./save/
		find ./$APP.AppDir/.junest/usr/lib/ -name "$arg" -exec cp -r --parents -t save/ {} +
	done
	rm -R -f "$(find ./save/ | sort | grep ".AppDir" | head -1)"
	rm list
}

function _include_swrast_dri(){
	mkdir ./save/dri
	mv ./$APP.AppDir/.junest/usr/lib/dri/swrast_dri.so ./save/dri/
}

function _libkeywords(){
	for arg in $LIBSAVED; do
		mv ./$APP.AppDir/.junest/usr/lib/*"$arg"* ./save/
	done
}

function _liblibs(){
	readelf -d ./save/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./save/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./save/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./save/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./save/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
 	readelf -d ./base/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./base/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./base/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./base/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./base/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
  	readelf -d ./deps/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./deps/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./deps/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./deps/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	readelf -d ./deps/*/*/*/*/* | grep .so | sed 's:.* ::' | cut -c 2- | sed 's/\(^.*so\).*$/\1/' | uniq >> ./list
	ARGS=$(tail -n +2 ./list | sort -u | uniq)
	for arg in $ARGS; do
		mv ./$APP.AppDir/.junest/usr/lib/"$arg"* ./save/
		find ./$APP.AppDir/.junest/usr/lib/ -name "$arg" -exec cp -r --parents -t save/ {} +
	done
	rsync -av ./save/$APP.AppDir/.junest/usr/lib/* ./save/
 	rm -R -f "$(find ./save/ | sort | grep ".AppDir" | head -1)"
	rm list
}

function _mvlibs(){
	rm -R -f ./$APP.AppDir/.junest/usr/lib/*
	mv ./save/* ./$APP.AppDir/.junest/usr/lib/
}

_binlibs 2> /dev/null

#_include_swrast_dri 2> /dev/null

_libkeywords 2> /dev/null

_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null
_liblibs 2> /dev/null

_mvlibs 2> /dev/null

rmdir save

# STEP 4, SAVE ONLY SOME DIRECTORIES CONTAINED IN /usr/share
# IF YOU NEED TO SAVE MORE FOLDERS, LIST THEM IN THE "SHARESAVED" VARIABLE. COMMENT THE LINE "_saveshare" IF YOU ARE NOT SURE.
function _saveshare(){
	mkdir save
	mv ./$APP.AppDir/.junest/usr/share/*$APP* ./save/
 	mv ./$APP.AppDir/.junest/usr/share/*$BIN* ./save/
	mv ./$APP.AppDir/.junest/usr/share/fontconfig ./save/
	mv ./$APP.AppDir/.junest/usr/share/glib-* ./save/
	mv ./$APP.AppDir/.junest/usr/share/locale ./save/
	mv ./$APP.AppDir/.junest/usr/share/mime ./save/
	mv ./$APP.AppDir/.junest/usr/share/wayland ./save/
	mv ./$APP.AppDir/.junest/usr/share/X11 ./save/
	for arg in $SHARESAVED; do
		mv ./$APP.AppDir/.junest/usr/share/*"$arg"* ./save/
	done
	rm -R -f ./$APP.AppDir/.junest/usr/share/*
	mv ./save/* ./$APP.AppDir/.junest/usr/share/
 	rmdir save
}
_saveshare 2> /dev/null

# RSYNC THE CONTENT OF THE APP'S PACKAGE
rm -R -f ./base/.*
rsync -av ./base/* ./$APP.AppDir/.junest/

# RSYNC DEPENDENCES
rm -R -f ./deps/.*
rsync -av ./deps/* ./$APP.AppDir/.junest/

# ADDITIONAL REMOVALS
#rm -R -f ./$APP.AppDir/.junest/usr/lib/libLLVM-* #INCLUDED IN THE COMPILATION PHASE, CAN SOMETIMES BE EXCLUDED FOR DAILY USE
rm -R -f ./$APP.AppDir/.junest/usr/lib/python*/__pycache__/* #IF PYTHON IS INSTALLED, REMOVING THIS DIRECTORY CAN SAVE SEVERAL MEGABYTES

# REMOVE THE INBUILT HOME
rm -R -f ./$APP.AppDir/.junest/home

# ENABLE MOUNTPOINTS
mkdir -p ./$APP.AppDir/.junest/home
mkdir -p ./$APP.AppDir/.junest/media
mkdir -p ./$APP.AppDir/.junest/usr/lib/locale
mkdir -p ./$APP.AppDir/.junest/usr/share/fonts
mkdir -p ./$APP.AppDir/.junest/usr/share/themes
mkdir -p ./$APP.AppDir/.junest/run/user

# CREATE THE APPIMAGE
if test -f ./*.AppImage; then
	rm -R -f ./*archimage*.AppImage
fi
ARCH=x86_64 VERSION=$(./appimagetool -v | grep -o '[[:digit:]]*') ./appimagetool -s ./$APP.AppDir
mv ./*AppImage ./"$(cat ./$APP.AppDir/*.desktop | grep 'Name=' | head -1 | cut -c 6- | sed 's/ /-/g')"_"$VERSION"-archimage3.4.1-x86_64.AppImage

To create it using Archimage its enough to do so:

Istantanea_2024-06-06_02-22-15 png

archimage-cli -b gearlever
  • first question leave blank, because the binary is named "gearlever"
  • secon question, add these dependences `python python-gobject glib2 python-dbus python-graphene graphene python-cairo cairo
  • third question write "Y" to include all dependences
  • last question, write "Y" to use the standard configuration
  • when the script is ready, open the script and replace the content of the variable "LIBSAVED", at line 243, it should appear like this
LIBSAVED="pk p11 alsa jack pipewire pulse girepository Graphene cairo libgstplayer libcups libprintbackend libgstgl libmedia-gstreamer libcolord" # Enter here keywords or file/folder names to save in /usr/lib

then save and run the script and be sure you have imagemagick installed on your host system.

This is how the script works

simplescreenrecorder-2024-06-06_02.30.44.mkv.mkv.mp4.mkv.mp4.mp4.mkv.mp4

as you can see, there to work a bit on missing icons in the buttons.

I've tested it using one of my Type3 AppImages and I was unable to launch it... also Gear Lever detects it as a Type2, and this is strange, the mine does not need libfuse2 to work... but I think that it was not launched because Archimage is a Arch Linux container into an AppImage, and I've not included "fuse3", so "fusermount3" was not in the package, and this is why it has not started... but the launcher was created in my applications menu, and a directory "Appimages" has been created in my $HOME directory... and my AppImage has been moved from my "AM" installation to that directory.

Anyway, I've just shown a way to build AppImages with ease... the package is 90 MB. But anyone of you can do better, I'm sure.

I leave you the tools, if you have questions, contact me.

EDIT: I've just updated the script above enough to prevent many error messages related to missing libraries

@MauricioLucas I understand your aversion towards Flatpaks, I fully share it, I wouldn't have created "AM" and AppMan otherwise. Thanks for choosing me.

However, you need to understand that not everyone can create something from scratch using different languages. I myself only know the Shell language, which is why all my tools can only be used from the terminal. I don't have the skills to create a GUI. Likewise, @mijorus has his knack for building other things using other languages, and admittedly Flatpak provides developers with all the tools needed to build applications well... even if it's limited to what those damn runtimes offer, which they just take up space.

We shouldn't blame him, on the contrary, if he wants to create AppImage packages, we need to offer him someone more experienced and help him do it. Even my solutions and tools are rudimentary, but they are already an important suggestion "to lead him on the right path".

I hate Flatpak and I hate projects that are based exclusively on it, they monopolize what on Linux should be within the reach of anyone who wants to create and test packages. In this sense, his version of "gearlever" on AUR helped me to experiment and propose... as already happened with my "Bottles"... otherwise, I wouldn't even have proposed to help him.

@ivan-hc just to clarify for everyone, the release on AUR is not mine, as you can see from the username of the publisher.

Thanks to the .deb package @mijorus has provided at https://github.com/mijorus/gearlever/tree/test-debian-package I was able to create a .deb based version of the AppImage using https://github.com/ivan-hc/AppImaGen

This is the script I've used:

Click here to expand
#!/usr/bin/env bash

APP=gearlever

# CREATE A TEMPORARY DIRECTORY
mkdir -p tmp
cd tmp

# DOWNLOADING THE DEPENDENCIES
if test -f ./appimagetool; then
	echo " appimagetool already exists" 1> /dev/null
else
	echo " Downloading appimagetool..."
	wget -q "$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - | sed 's/"/ /g; s/ /\n/g' | grep -o 'https.*continuous.*tool.*86_64.*mage$')" -O appimagetool
fi
if test -f ./pkg2appimage; then
	echo " pkg2appimage already exists" 1> /dev/null
else
	echo " Downloading pkg2appimage..."
	wget -q https://raw.githubusercontent.com/ivan-hc/AM-application-manager/main/tools/pkg2appimage
fi
chmod a+x ./appimagetool ./pkg2appimage
rm -f ./recipe.yml

# DOWNLOAD AND EXTRACT THE DEB PACKAGE
mkdir -p ./$APP/$APP.AppDir
VERSION="1.0.0-1"
if ! test -f ./$APP/gearlever_*.deb; then
	cd ./$APP
	wget https://github.com/mijorus/gearlever/raw/test-debian-package/gearlever_1.0.0-1_amd64.deb
	ar x gearlever_*
	mkdir -p gltmp
	tar fx data.tar.zst -C ./gltmp
	cd ..
fi

# CREATING THE HEAD OF THE RECIPE
echo "app: gearlever
binpatch: true

ingredients:

  dist: testing
  sources:
    - deb http://ftp.debian.org/debian/ testing main contrib non-free
    - deb http://security.debian.org/debian-security/ testing-security main contrib non-free
    - deb http://ftp.debian.org/debian/ testing-updates main contrib non-free
  packages:
    - gearlever
    - python3
    - python3-gi
    - python3-dbus
    - libgtk-4-dev
    - libadwaita-1-dev
    - python3-xdg
    - 7zip
    - gsettings-backend
    - dconf-gsettings-backend" >> recipe.yml

# DOWNLOAD ALL THE NEEDED PACKAGES AND COMPILE THE APPDIR
./pkg2appimage ./recipe.yml

rsync -av ./$APP/gltmp/* ./$APP/$APP.AppDir/

# LIBUNIONPRELOAD
wget https://github.com/project-portable/libunionpreload/releases/download/amd64/libunionpreload.so
chmod a+x libunionpreload.so
mv ./libunionpreload.so ./$APP/$APP.AppDir/

# COMPILE SCHEMAS
glib-compile-schemas ./$APP/$APP.AppDir/usr/share/glib-2.0/schemas/ || echo "No ./usr/share/glib-2.0/schemas/"

# CUSTOMIZE THE APPRUN
rm -R -f ./$APP/$APP.AppDir/AppRun
cat >> ./$APP/$APP.AppDir/AppRun << 'EOF'
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export UNION_PRELOAD="${HERE}"
export LD_PRELOAD="${HERE}"/libunionpreload.so
export LD_LIBRARY_PATH=/lib/:/lib64/:/lib/x86_64-linux-gnu/:/usr/lib/:"${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${LD_LIBRARY_PATH}"
export PATH="${HERE}"/usr/bin/:"${HERE}"/usr/sbin/:"${HERE}"/usr/games/:"${HERE}"/bin/:"${HERE}"/sbin/:"${PATH}"
export PYTHONPATH="${HERE}"/usr/lib/python3/dist-packages/:"${HERE}"/usr/lib/python3.11/lib-dynload/:"${PYTHONPATH}"
export PYTHONHOME="${HERE}"/usr/
export XDG_DATA_DIRS="${HERE}"/usr/share/:"${XDG_DATA_DIRS}"
export PERLLIB="${HERE}"/usr/share/perl5/:"${HERE}"/usr/lib/perl5/:"${PERLLIB}"
export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2- | sed -e 's|%.||g')
$HERE/usr/bin/${EXEC}
EOF
	
# MADE THE APPRUN EXECUTABLE
chmod a+x ./$APP/$APP.AppDir/AppRun
# END OF THE PART RELATED TO THE APPRUN, NOW WE WELL SEE IF EVERYTHING WORKS ----------------------------------------------------------------------

# IMPORT THE LAUNCHER AND THE ICON TO THE APPDIR IF THEY NOT EXIST
if test -f ./$APP/$APP.AppDir/*.desktop; then
	echo "The desktop file exists"
else
	echo "Trying to get the .desktop file"
	cp ./$APP/$APP.AppDir/usr/share/applications/*$(ls . | grep -i $APP | cut -c -4)*desktop ./$APP/$APP.AppDir/ 2>/dev/null
fi

ICONNAME=$(cat ./$APP/$APP.AppDir/*desktop | grep "Icon=" | head -1 | cut -c 6-)
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/22x22/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/24x24/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/32x32/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/48x48/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/64x64/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/128x128/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/256x256/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/512x512/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/icons/hicolor/scalable/apps/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null
cp ./$APP/$APP.AppDir/usr/share/applications/*$ICONNAME* ./$APP/$APP.AppDir/ 2>/dev/null

# DEBLOAT PACKAGE
rm -R -f ./$APP/$APP.AppDir/usr/lib/gcc
rm -R -f ./$APP/$APP.AppDir/.*

# EXPORT THE APP TO AN APPIMAGE
ARCH=x86_64 VERSION=$(./appimagetool -v | grep -o '[[:digit:]]*') ./appimagetool -s ./$APP/$APP.AppDir
cd ..
mv ./tmp/*.AppImage ./GearLever-"$VERSION"-x86_64.AppImage
chmod a+x *.AppImage

In the script I had to extract the .deb package of gearlever manually, because it is not detected by pkg2appimage (I use it to compile the basic dependences at least).

Also, the original video was 2 minutes, I had to cut some parts and speedup it to fit it under the 10MB quota allowed on github.

And this is how it works:

simplescreenrecorder-2024-06-07_18.01.05_edit.mkv_edit.mkv.mp4

NOTE, here are some issues to solve using this method:

  1. GearLever depends on the newer libadwaita libraries, those that are now available only on the Testing and Unstable brances of Debian, so this is only compatible with newer GLIBC versions. If you know some PPAs for old Ubuntu versions that installs the new versions of libadwaita, we should use it, to guarantee the compatibility with older distros;
  2. it is quite bloat (137 MB), due to the "libgtk-4-dev" and "libadwaita-1-dev" dependences;
  3. GearLever asks for a Flatpak component when I try to launch an AppImage
simplescreenrecorder-2024-06-07_18.44.21.mkv.mp4

I receive this error mesage:

libEGL warning: DRI2: failed to authenticate
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
Logging to file /home/ivan/.cache/logs/gearlever.log

(gearlever:525038): Gtk-WARNING **: 18:44:28.158: No IM module matching GTK_IM_MODULE=ibus found
Exception in thread Thread-3 (run_command):
Traceback (most recent call last):
  File "/tmp/.mount_GearLemALIaE/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/tmp/.mount_GearLemALIaE/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/share/gearlever/gearlever/lib/terminal.py", line 41, in run_command
    output = host_sh(command, return_stderr)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/gearlever/gearlever/lib/terminal.py", line 13, in host_sh
    output = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_GearLemALIaE/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/.mount_GearLemALIaE/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/tmp/.mount_GearLemALIaE/usr/lib/python3.11/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] File o directory non esistente: 'flatpak-spawn'

@probonopd @Samueru-sama I'd like you join this issue

EDIT: @mijorus if you need a ready to use sample AppImage, download it from https://github.com/ivan-hc/My-workbench/releases/tag/test-gearlever , the CI process is the same for all my 60+ repositories, the ones where I build my Appimages.

EDIT2: the error I get is related to a missing command flatpak-spawn

I feel like a much needed context is missing here.

If I am not mistaken, @MauricioLucas had an issue when using multiple users with am, which wasn't actually fully fixed and as result you can only use am with one user at the moment. So I guess that caused you look into Gearlever and ran into the problem that Gearlever needs flatpak to be installed and yeah that's a big frustration.

I personally don't use flatpak, mostly because of these issues 1 2 3 and it really gets me that they tried to argue that it doesn't apply to them and even talked about updating the xdg spec to be exempt, but this is turning into as rant as well so sorry lol.

@ivan-hc I really don't know how to turn python apps into appimages. I also haven't use pk2appimage either.

I normally just use linuxdeploy + the needed plugin + Go appimagetool as this one is compatible with libfuse3.

@Samueru-sama the key parts needed to build GearLever as an AppImage are these (for now)

  1. the .deb package does not work in pkg2appimage (also if @mijorus said on Reddit that it has been installed in Ubuntu 24.04), so I have to download and extract the package separatelly... and essentially it is a standalone "usr" directory to add to the base using rsync
wget https://github.com/mijorus/gearlever/raw/test-debian-package/gearlever_1.0.0-1_amd64.deb
ar x gearlever_*
mkdir -p gltmp
tar fx data.tar.zst -C ./gltmp
  1. these are the dependences that you can find in Debian Testing/Unstable
python3
python3-gi
python3-dbus
libgtk-4-dev
libadwaita-1-dev
python3-xdg

while these are in the "control" file of the .deb package provided by @mijorus

7zip
gsettings-backend
dconf-gsettings-backend
  1. the AppRun must point the Python directories, as a workaround (I've based this on the AppImage of Bottles):
export PYTHONPATH="${HERE}"/usr/lib/python3/dist-packages/:"${HERE}"/usr/lib/python3.11/lib-dynload/:"${PYTHONPATH}"
export PYTHONHOME="${HERE}"/usr/

EXTRA: to made it work and run, I had to add the local libraries to prevent errors with missing "libpango"

export LD_LIBRARY_PATH=/lib/:/lib64/:/lib/x86_64-linux-gnu/:/usr/lib/:"${HERE}"/usr/lib/:"${HERE}"/usr/lib/i386-linux-gnu/:"${HERE}"/usr/lib/x86_64-linux-gnu/:"${HERE}"/lib/:"${HERE}"/lib/i386-linux-gnu/:"${HERE}"/lib/x86_64-linux-gnu/:"${LD_LIBRARY_PATH}"

also, libunionpreload must be included

wget https://github.com/project-portable/libunionpreload/releases/download/amd64/libunionpreload.so
chmod a+x libunionpreload.so
mv ./libunionpreload.so ./$APP/$APP.AppDir/

and during my process, I need to compile GearLever schemas

glib-compile-schemas ./$APP/$APP.AppDir/usr/share/glib-2.0/schemas/ || echo "No ./usr/share/glib-2.0/schemas/"

this is in detail what I've done in the script of my previous message.

So I guess that caused you look into Gearlever and ran into the problem that Gearlever needs flatpak to be installed and yeah that's a big frustration

@Samueru-sama Nope, I've already talked with @mijorus into another issue and on Reddit, him is italian too, and I offered to help him. You know how much I fight to promote the use and creation of AppImages.

EDIT: to @Samueru-sama , the fact that they have to depend on a platform like Flatpak to work, demotes AppImages to second-rate software packages, when in reality we know very well that this is not the case. I wrote a post on Reddit about it! All software packages on Linux are quickly searchable and installable via package managers, even Flatpak. The only one that didn't have a package manager was AppImage, and that's why people aim to use them via GearLever. It was created to simplify the use of AppImages, according to the purpose they were created for... and it is easy to update, precisely because it relies on a centralized repository. That's why people choose it, GearLever is a "better" AppImageLauncher, in this sense. It is useful if you want to use AppImages the way they are intended, that is, by dragging them and integrating them into the desktop, even if inserted into a USB stick, and the GearLever developer can always implement improvements by updating it via Flatpak. For users like us, however, AppImages were just missing a package manager to always update them, install them easily and list them all without people having to open the browser every time... to compete with other packaging formats. That's why I wrote "AM"/AppMan, I hope to fill this gap somehow. And I hope to add a "gearlever" package to my package manager in the future, to avoid people always having to install those damn Flatpaks.

So I guess that caused you look into Gearlever and ran into the problem that Gearlever needs flatpak to be installed and yeah that's a big frustration

@Samueru-sama Nope, I've already talked with @mijorus into another issue and on Reddit, him is italian too, and I offered to help him. You know how much I fight to promote the use and creation of AppImages.

That "You" was at @MauricioLucas which once again is my theory as to why this issue was opened. (Given the other issue that we had at AM)

Yes, I remember, it was very useful to deepen the discussion, where we tried to improve "AM".

But please, let's not turn this issue into a chat, let's try to help the GearLever developer to create an AppImage package. Let's try to bring him back to our side.

As I said in my second answer here, Flatpak offers many very attractive tools that encourage developers to create and improve "things", and that's why it grows so much. To build an AppImage, however, requires experience, and if I tagged you it's because I know how good you have become in such a short time, and I trust your skills, @Samueru-sama

Let's not create an off-topic discussion.

Hi @ivan-hc ,
one question, why are you using your own version of pkg2appimage here?
https://github.com/ivan-hc/My-workbench/blob/71ef52929eacd5debdfcf5690862c6154b973f2a/gearlever.sh#L20C10-L20C85

Does it have specific modifications that are needed for this script to run?

Also, why are you always referring to Debian repos, where we know they are out-of-date? Could't we use Ubuntu's?

@mijorus

Hi @ivan-hc , one question, why are you using your own version of pkg2appimage here? https://github.com/ivan-hc/My-workbench/blob/71ef52929eacd5debdfcf5690862c6154b973f2a/gearlever.sh#L20C10-L20C85

Does it have specific modifications that are needed for this script to run?

Yes, except that it doesn't automatically generate the AppImage file, which "appimagetool" has to do instead... it's also repackaged as "type3", so it would also work on Fedora and Ubuntu, where "libfuse2" is not installed by default .

Also, why are you always referring to Debian repos, where we know they are out-of-date? Could't we use Ubuntu's?

Debian Testing (my distro) or Debian Unstable/Sid are as up to date as Arch Linux, sometimes less and sometimes more. These are the development branches for Debian Stable, where packages are tested maniacally to make the future release of Debian Stable something indestructible.

https://wiki.debian.org/it/DebianTesting

https://wiki.debian.org/it/DebianUnstable

Ubuntu is based on Debian Unstable, while Ubuntu LTS is based on Debian Testing.

However, I would prefer to use an Ubuntu LTS base, an older one in fact, to have GLIBC at an older version, compatible with newer distributions. Even @probonopd has been saying this ever since he invented AppImage.

But to do this, I need at least one "reliable" PPA... I'm telling you this because I don't consider PPAs a security, nor a guarantee of continuity. This is why I invented Archimage. But classic AppImages are the only ones that are 100% compatible with the host system's hardware.

If you need PPAs due to lack of dependency in ubuntu LTS, in that case the ideal solution would be building that dependency as well. Which yeah it complicates things a bit.

So all we need is the more recent libadwaita and gtk4. We can also create it on debian Oldstable or Oldoldstable... but we need it t made GearLever work.

I've used Debian Testing because the newer versions are not in Debian Stable. So consider my AppImage a "draft".

EDIT: only "libadwaita" and "gtk4". Any other old package is OK for our work here.

However, I would prefer to use an Ubuntu LTS base, an older one in fact, to have GLIBC at an older version, compatible with newer distributions. Even @probonopd has been saying this ever since he invented AppImage.

But to do this, I need at least one "reliable" PPA... I'm telling you this because I don't consider PPAs a security, nor a guarantee of continuity. This is why I invented Archimage. But classic AppImages are the only ones that are 100% compatible with the host system's hardware.

I want to correct my answer above, about "Ubuntu preference". I said that because Ubuntu has PPAs. Just for that.

If we had the latest version of "libadwaita" and GTK4" for Debian oldoldstable, it would be even better!

EDIT: before Debian developers stopped updating "chromium" for Debian oldstable, I was using the latter as a base for my AppImage, this is why I switched to Debian Stable. No other official .deb packages of chromium are so updated.

Can anyone help me to create a recipe with AppimageBuilder? I tried but couldn't go very far

Can anyone help me to create a recipe with AppimageBuilder? I tried but couldn't go very far

I would gladly help you if you would show me where you are building using this method. I'm not familiar with AppimageBuilder.

In the meantime, I call out the lead developer of that project, @azubieta

So all we need is the more recent libadwaita and gtk4

I fail to understand why people develop applications using the latest and greatest and then are surprised when that latest and greatest is not what all users are running. Personally, as a rule of thumb, I would always develop on and for the oldest system I can expect my users to still run (e.g., the oldest still-supported long term stable distributions). The expectation being that what runs on older systems will continue to run on newer systems, but not the other way around. This is basic "backward compatibility".

This being said, it is possible (although not recommended by everyone) to bundle all libraries privately (including glibc), which would make it possible to run binaries built on newer build systems on older target systems. (Similar to what Flatpak does, essentially.)

This being said, it is possible (although not recommended by everyone) to bundle all libraries privately (including glibc), which would make it possible to run binaries built on newer build systems on older target systems. (Similar to what Flatpak does, essentially.)

As I do with Archimage. The only limit my project have are Nvidia drivers support, so no hardware accelleration at all, because it is an Arch Linux container into an AppImage, powered by ts internal version of Bubblewrap.

I'm not that good to handle classic AppImage construction using linuxdeploy or appimage-builder, so I rely much on easier solutions, like your pkg2appimage I use in AppImaGen, but it does not includes glibc.

@probonopd can you point us on your solution? It would be great to made AppImages as much standalone as possible, even by including their own glibc version. I think that it may cost few megabytes, but priority is to made them work everywhere. Really everywhere, not just the old still supported Ubuntu LTS.

can you point us on your solution?

./appimagetool-*.AppImage -s deploy appdir/usr/share/applications/*.desktop # Bundle EVERYTHING

https://github.com/probonopd/go-appimage/tree/master/src/appimagetool#appimagetool

@probonopd the appimage team should definitely improve the developer documentation.

I'm finding it extremely hard to bundle this app, especially considering that I'm using gtk, which is one of the two most popular frameworks.

It's not surprising that most appimages around are Electron or Tauri apps, where the developer just has to flip a switch in a configuration file to produce a bundle.

Don't get me wrong, electron support alone has been crucial to increase the amount of Linux applications, but you should probably have more detailed guides like snap or flatpak have, especially for Qt and Gtk

Making appimages of gtk apps is very easy, you just need to use the linuxdeploy-gtk plugin with linuxdeploy.

Making appimages of python apps is not easy though ๐Ÿ˜…

Making appimages of python apps is not easy though ๐Ÿ˜…

Why? What's the problem

Making appimages of python apps is not easy though ๐Ÿ˜…

Why? What's the problem

Python apps are a mess: different versions of Python, several modules may be needed, and sometime they need modules to be compiled with PIP and that can't be easily exported into a portable package.

For example, in this package I have 40 games into one AppImage and it was super easy to create, until I had to add "Kajongg" ivan-hc/KDE-games-suite-appimage#3

Making appimages of python apps is not easy though ๐Ÿ˜…

Why? What's the problem

The way it works with linuxdeploy for non python apps is that it runs ldd on the binary and that tells it which libraries it needs to bundle and it has a list which libraries don't need to be included as well, it copies the libraries in the AppDir and then it automatically patches the binary to not depend on hardcoded paths and that is it. This is very simple and even projects like suyu use a deploy shell script instead of linuxdeployqt for this.

If you need an extra library that didn't show up with ldd you can manually add it thru linuxdeploy or just directly setting LD_LIBRARY_PATH in the AppRun script.

With python apps there is the anaconda plugin and you have to set a bunch of parameters instead. I tried to use it when trying to build a puddletag appimage and it didn't work. Ivan also tested making an archimage of puddletag and it didn't work either.