Skip to content
gpwen edited this page Oct 12, 2010 · 3 revisions

Patch and Build Vim NSIS Installer

The following guide shows how to patch official Vim source code to build the new NSIS installer. I assume you already knew how to build Vim NSIS installer.

Software Requirement

In addition to all those softwares required to access Vim source repository, build Vim binary and the NSIS installer, you also need git to access the repository for the new installer, and GNU patch to patch Vim source.

You may perform all the following steps on Linux, or simply install cygwin on Windows, which gives you access to all required tools.

Patch and Build New Vim NSIS Installer

Please follow steps listed below to patch and build the new installer:

  1. Download source code for the new NSIS installer
mkdir vim-nsis
cd vim-nsis
git clone git://github.com/gpwen/vim-installer-mui2.git
  1. Generate patch for Vim official code (the latest revision on the default branch of the [[official mercurial repository of Vim|http://www.vim.org/mercurial.php]]). Please note the changeset contains some binary files (bitmaps), so the conventional patch won't work. The binary diff format of git will be used here.
cd path/to/vim-installer-mui2
git diff -p --binary origin/vim-official origin/master > path/to/nsis.patch
  1. Applies the patch to the official Vim code. Again, as binary files are present in the changeset, we'll use the mercurial import command instead of the conventional patch here.
cd path/to/vim
hg import --no-commit -f path/to/nsis.patch
  1. As an alternative to the above two steps (steps 2 and 3), you can also replace the following file/directory in vim repository with the same file/directory from the vim-installer-mui2 repository directly:

    • Filelist
    • nsis

    Like this:

cd path/to/vim
rm -r Filelist nsis
cp path/to/vim-installer-mui2/Filelist .
cp -r path/to/vim-installer-mui2/nsis .
  1. You can now build the NSIS installer as normal.