vim / vim-appimage

AppImage for gVim
118 stars 18 forks source link

appimage.sh: detect vim/gvim self name #68

Closed mralusw closed 3 months ago

mralusw commented 3 months ago
mralusw commented 3 months ago

Fixes #67 (partially)

chrisbra commented 3 months ago

Thanks. Regarding:

currently impossible to extract GVim.appimage and symlink AppRun

Why would one need that? Isn't the whole point of the appimage to have it readily available and running without having to extract it manually?

mralusw commented 3 months ago

Why would one need that? Isn't the whole point of the appimage to have it readily available and running without having to extract it manually?

Yes and no. Every appimage has a hidden --appimage-extract flag. And if you look into apprun-hooks/linuxdeploy-plugin-gtk.sh, it tries to take this scenario into account (but ultimately fails):

export APPDIR="${APPDIR:-"$(dirname "$(realpath "$0")")"}" # Workaround to run extracted AppImage

Some users extract the appimage to some folder ("AppDir") in the filesystem, then symlink from AppRun to /usr/local/bin/real-app-name. It's a good way to get a clean build of an app without incurring the

The problem is that for GVim.appimage (but not Vim.appimage), linuxdeploy creates a "broken" AppRun that can't be symlinked to and renames "our" AppRun to *.wrapped.

Now, if you never even considered extracted appimages, I wonder why the code didn't just use $APPDIR (provided by the appimage infra) to begin with, instead of trying to compute $HERE by itself. Taking all this into account, I would

chrisbra commented 3 months ago

okay thanks. Let me merge your changes for now. If you think it is beneficial, to further improve the AppRun script generated, I welcome you to make those change and create a new PR. I am not planning to work further on this, since I am too busy with Vim maintenance.