Update with new installer and changes for building 7.3:
http://ionipti.blogspot.com/2010/08/gvim-73-64-bit-x64-windows-7-vista-xp.html
I've been getting kinda tired of not having a decent installer for gvim 7.2 on my Vista x64 system. I have figured out all of these steps, and I'm sharing them with you. You can download the actual installer from:
http://nkcorner.com/gvim72.exe (64 bit only, includes all patches up to and including 7.2.411)
This version is built exactly as I've shown below. The printing works in Windows, and so do the context menus. It also installs to the Program Files directory as it should. This is only tested on Vista x64.
Here are the steps: (I'm sure they can be somewhat simplified and I'd be happy to hear about that.)
Create a folder called building, eg c:\building
Download these files:
ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2
ftp://ftp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz
ftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz
Unzip them using 7-zip or alternative program.
Each of these archives contain a vim72 folder, extract them all into c:\building\vim72 folder.
Download these files, and extract them to c:\building\patches
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.001-100.gz
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.101-200.gz
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.201-300.gz
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.301-400.gz
Download these files into c:\building\patches
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.401
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.402
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.403
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.404
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.405
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.406
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.407
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.408
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.409
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.410
ftp://ftp.vim.org/pub/vim/patches/7.2/7.2.411
Download and install these programs:
http://cdnetworks-us-2.dl.sourceforge.net/project/gnuwin32/sed/4.2-1/sed-4.2-1-setup.exe
http://cdnetworks-us-2.dl.sourceforge.net/project/nsis/NSIS%202/2.46/nsis-2.46-setup.exe
http://hivelocity.dl.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-setup.exe
Optionally install make, although we will be bypassing the make with a manual command due to incorrect syntax in the Makefile when running on Windows.
http://cdnetworks-us-2.dl.sourceforge.net/project/gnuwin32/make/3.81/make-3.81.exe
Add "C:\Program Files (x86)\GnuWin32\bin\" to your path variable and reopen any command prompts.
Download and extract diff.exe from:
http://hivelocity.dl.sourceforge.net/project/unxutils/unxutils/current/UnxUtils.zip
Copy diff.exe to c:\building\
Download and install Windows SDK for AMD64:
http://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDKX_EN_DVD.iso
If this link doesn't work, then go to
http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1&displaylang=en
and download the GRMSDKX_EN_DVD.iso (which is the AMD64 version)
Download this package and copy upx.exe to c:\building\vim72\nsis
http://upx.sourceforge.net/download/upx304w.zip
Open a command prompt and run
C:\Windows\System32\cmd.exe /E:ON /V:ON /T:0E /K "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\SetEnv.cmd" /release
Use this command prompt for building as it is now set to 64 bit release.
Install patches by changing directory to c:\building\vim72 and running these commands in this order:
patch --binary -p0 < ..\patches\7.2.001-100
patch --binary -p0 < ..\patches\7.2.101-200
patch --binary -p0 < ..\patches\7.2.201-300
patch --binary -p0 < ..\patches\7.2.301-400
patch --binary -p0 < ..\patches\7.2.401
patch --binary -p0 < ..\patches\7.2.402
patch --binary -p0 < ..\patches\7.2.403
patch --binary -p0 < ..\patches\7.2.404
patch --binary -p0 < ..\patches\7.2.405
patch --binary -p0 < ..\patches\7.2.406
patch --binary -p0 < ..\patches\7.2.407
patch --binary -p0 < ..\patches\7.2.408
patch --binary -p0 < ..\patches\7.2.409
patch --binary -p0 < ..\patches\7.2.410
patch --binary -p0 < ..\patches\7.2.411
Change directory to c:\building\vim72\src, and build using this command:
nmake -f Make_mvc.mak OLE=yes
and
nmake -f Make_mvc.mak OLE=yes GUI=yes
(First command produces vim.exe and second one produces gvim.exe)
Change directory to c:\building\vim72\runtime\doc and run
sed -e "s/[ \t]*\*[-a-zA-Z0-9.]*\*//g" -e "s/vim:tw=78://" uganda.txt | uniq >uganda.nsis.txt
This is the line that should be run from the Makefile in this directory, but Windows make.exe has trouble with it.
Change directory to c:\building\vim72\nsis and open gvmi.nsi in a text editor (preferably not notepad or wordpad...)
At line 22 change (comment out)
!define HAVE_NLS
to
#!define HAVE_NLS
(I don't have a 64-bit libintl.dll)
Replace all instances of PROGRAMFILES with PROGRAMFILES64
(Forces the default installation directory to be the Program Files directory instead of Program Files (x86).)
At line 248 change
File /oname=vim.exe ${VIMSRC}\vimd32.exe
to
File /oname=vim.exe ${VIMSRC}\vimw32.exe
(The check for WINNT isn't working on my Vista x64 system... so I force it)
Copy all files and directory from c:\building\vim72\runtime to c:\building\vim72
Rename these files:
c:\building\vim72\src\gvim.exe -> c:\building\vim72\src\gvim_ole.exe
c:\building\vim72\src\vim.exe -> c:\building\vim72\src\vimw32.exe
c:\building\vim72\src\install.exe -> c:\building\vim72\src\installw32.exe
c:\building\vim72\src\uninstal.exe -> c:\building\vim72\src\uninstalw32.exe
Copy and rename this file:
c:\building\vim72\src\xxd\xxd.exe -> c:\building\vim72\src\xxdw32.exe
Change directory to c:\building\vim72\nsis and run:
"c:\Program Files (x86)\NSIS\makensis.exe" gvim.nsi
Enjoy!
Nachum Kanovsky
http://nkcornerconsulting.com
FPGA & Embedded Software Expert