Allow to run GVim or Vim from the AppImage. Which one is started depends on the
name used to start the AppImage. If the name starts with 'vim', the terminal
version of Vim is started, else GVim is started.
The script scripts/appimage.sh downloads a file name functions.sh. This script uses v6 of the AppImageKit.
Copied some lines from functions.sh to appimage.sh and changed the URLs to use AppImageKit v11 (newest release). Important new feature: ARGV0, see below.
Startup
The gvim.desktop file is changed to call a script named vim.startup.sh. This script ...
Sets the environment variables VIM and VIMRUNTIME (if not already set). With this Vim can cd to other directories and still find its runtime files.
Unsets Python related variables set by AppImageKit. As Python is not packed into the image, we rely on host provided Python.
Evaluates the env var ARGV0 set by AppImageKit. This variable contains the name the executable was started with. If the name starts with vim, terminal Vim is started, else GVim is started. Now you can create a symlink vim.appimage -> GVim*.AppImage to get a terminal Vim.
Returns to the directory the AppImage was started from. AppImageKit sets the env var OWD for this. This fixes #4.
Building
new script scripts/build_vim.sh to configure and make Vim. Also the configuration options are defined in that script. This script is also used on Travis.
reworked the script scripts/appimage.sh
It is now possible to build the AppImage on the local machine:
scripts/build_vim.sh
scripts/appimage.sh
The resulting AppImage is in build/out.
Testing
It is possible to copy the GVim*.AppImage file to vim/src/vim and then start make test.
This is currently not part of the Travis build, but could be added if wanted.
Terminal Vim
Allow to run GVim or Vim from the AppImage. Which one is started depends on the name used to start the AppImage. If the name starts with 'vim', the terminal version of Vim is started, else GVim is started.
Setup could be:
Changes
Using AppImageKit V11
The script
scripts/appimage.sh
downloads a file namefunctions.sh
. This script uses v6 of the AppImageKit.Copied some lines from
functions.sh
toappimage.sh
and changed the URLs to use AppImageKit v11 (newest release). Important new feature:ARGV0
, see below.Startup
The
gvim.desktop
file is changed to call a script namedvim.startup.sh
. This script ...VIM
andVIMRUNTIME
(if not already set). With this Vim cancd
to other directories and still find its runtime files.ARGV0
set by AppImageKit. This variable contains the name the executable was started with. If the name starts withvim
, terminal Vim is started, else GVim is started. Now you can create a symlinkvim.appimage -> GVim*.AppImage
to get a terminal Vim.OWD
for this. This fixes #4.Building
scripts/build_vim.sh
to configure and make Vim. Also the configuration options are defined in that script. This script is also used on Travis.scripts/appimage.sh
It is now possible to build the AppImage on the local machine:
The resulting AppImage is in
build/out
.Testing
It is possible to copy the
GVim*.AppImage
file tovim/src/vim
and then startmake test
.This is currently not part of the Travis build, but could be added if wanted.