-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
Here is one possible strategy for "thinning" AppImages so that they contain only the subset of Python and other files that is actually needed. Using this, I could reduce the size of TruFont from approximately 120 MB to just one third, under 40 MB.
mkdir squashfs-root
sudo mount -t tmpfs tmpfs squashfs-root/ -o strictatime,nodiratime
./TruFont-*-x86_64.AppImage --appimage-extract
touch test
./squashfs-root/AppRun
# Kill
find squashfs-root/ -mindepth 3 -not -anewer test -not -path '*/share/icons/*' -not -path '*/share/applications/*' -not -path '*/share/metainfo/*' -delete || true
find squashfs-root/ -type d -empty -delete
./squashfs-root/AppRun
appimagetool ./squashfs-root
The downside is that you need to manually "exercise" all parts of the application, so that the mechanism detects all files that are actually needed.