Skip to content

Possible strategy for "thinning" AppImages #23

Open
@probonopd

Description

@probonopd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions