- Rootfs archive musl distro, I'm using alpine minirootfs archive. We can get it here.
- AppRun executable, it's needed for launch our app. Get it here.
- Appimagetool, available here
- Desktop file / .desktop.
- Icon file.
These are some steps I do to make appimage :
-
Download and unpack alpine minirootfs archive.
$ mkdir nvim.Appdir # cause I want to make neovim appimage, feel free to adjust $ cd nvim.Appdir $ wget -c https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-minirootfs-3.19.4-x86_64.tar.gz $ tar -xf alpine-minirootfs-3.19.4-x86_64.tar.gz
-
Download the Apprun executable.
$ cd nvim.Appdir $ wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 -O AppRun $ chmod a+x AppRun
-
Make a desktop file and copy icon file.
We need a desktop file and icon file.
[Desktop Entry] Type=Application Name=nvim Exec=nvim Icon=nvim Categories=Utility;TextEditor; Keywords=Text;editor; Comment=Edit text files
Get your favourite icon and copy it.
$ cp nvim.svg nvim.Appdir/nvim.svg
-
Install your desired application, for me it's neovim.
$ cd nvim.Appdir $ sudo chroot . /sbin/apk update $ sudo chroot . /sbin/apk upgrade $ sudo chroot . /sbin/apk add neovim
-
Generate the appimage using appimagetool.
$ cd nvim.Appdir $ cd .. $ appimagetool-x86_64.AppImage -v -n ./nvim.Appdir
The generated appimage file will be named
nvim-x86_64.AppImage
. Almost forget, make sure you're online, because it will retrieve some stuffs from github. -
Test the appimage.
Just run it from terminal to see if it works or not. Make sure you make symbolic link for
ld-linux-x86-64.so.2
from/lib/ld-musl-x86_64.so.1
or your appimage won't work.$ sudo ln -s /lib/ld-musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 $ chmod +x nvim-x86_64.AppImage $ ./nvim-x86_64.AppImage
For neovim v0.10.x , we need to copy lpeg.so library to our system. Simply extracting the appimage and then copy the library from
./squashfs-root/usr/lib/lua/5.1/lpeg.so
to/usr/lib/lua/5.1/lpeg.so
.