A proof of concept to demonstrate a viable way to turn a Flatpak into AppDir, just pass a flatpak app as argument and this tool generate
- Download
wget https://github.com/sudo-give-me-coffee/flatpak2appdir/archive/master.zip -O flatpak2appdir.zip
- Unzip
unzip flatpak2appdir.zip
- Enter on repository dir:
cd flatpak2appdir-master
- Turn executable:
chmod +x flatpak2appdir
- Run as root:
sudo ./flatpak2appdir com.example.app
Note: to do these steps
flatpak2appdir
will create a.img
file with the runtime name, you can delete this after AppDir creation
It's working by chrooting under runtime
of app
and mapping used files using strictatime
and nodiratime
and copying to AppDir
In general, about 8 to 10 MB, the resulting AppDir when and if sanitized and compressed as AppImage in my tests will use disk space close to that of the original application without the main runtime (application files + ostree objects)
This is a PoC, so it has a large list of missing features:
- Find executable dinamically (currently generated AppRun only looks at /app/bin)
- Support non binary apps
- Enable
dconf
anddbus
during test phase - Support to apps that depends of libexecs but doesn't load them automatically
- Support no required
runtimes