# HG changeset patch # User Christian Brabandt # Date 1461242704 -7200 # Node ID ea3eb5a815b5729354a441e30b136f98b74af739 # Parent d355b5a8375350a86323c37728f3c4797f12c1c3 commit https://github.com/vim/vim/commit/02cfac85b4e4b038bb2df6962699fa93a42c7eb1 Author: Bram Moolenaar Date: Thu Apr 21 14:34:58 2016 +0200 patch 7.4.1766 Problem: Building instructions for MS-Windows are outdated. Solution: Mention setting SDK_INCLUDE_DIR. (Ben Franklin, closes https://github.com/vim/vim/issues/771) Move outdated instructions further down. diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt --- a/src/INSTALLpc.txt +++ b/src/INSTALLpc.txt @@ -11,9 +11,9 @@ The file "feature.h" can be edited to ma this, then you will get the default behavior as is documented, which should be fine for most people. -With the exception of two sections (Windows 3.1 and MS-DOS), this document -assumes that you are building Vim for Win32 or later. -(Windows 95/98/Me/NT/2000/XP/2003/Vista/7/8/10) +This document assumes that you are building Vim for Win32 or later (Windows +XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but +they might no longer work. Contents: @@ -36,9 +36,7 @@ 15. Installing after building from sourc The currently preferred method is using the free Visual C++ Toolkit 2008 -|msvc-2008-express|, the produced binary runs on most MS-Windows systems. If -you need the executable to run on Windows 98 or ME, use the 2003 one -|msvc-2003-toolkit|. +|msvc-2008-express|, the produced binary runs on most MS-Windows systems. 1. Microsoft Visual C++ @@ -87,6 +85,69 @@ These files have been supplied by George Ron Aaron; they have been tested. +Visual C++ 2008 Express Edition *msvc-2008-express* +------------------------------- + +Visual C++ 2008 Express Edition can be downloaded for free from: + http://www.microsoft.com/express/downloads/ +This includes the IDE and the debugger. + +To set the environment execute the msvc2008.bat script. You can then build +Vim with Make_mvc.mak. + +For building 64 bit binaries you also need to install the SDK: +"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" +You don't need the examples and documentation. + +If you get an error that Win32.mak can't be found, you have to set the +variable SDK_INCLUDE_DIR. For example, on Windows 10, installation of MSVC +puts include files in the following directory: + set SDK_INCLUDE_DIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include + + +Visual C++ 2010 Express Edition *msvc-2010-express* +------------------------------- + +Visual C++ 2010 Express Edition can be downloaded for free from: + http://www.microsoft.com/express/vc/Default.aspx +This includes the IDE and the debugger. + +To set the environment execute the msvc2010.bat script. You can then build +Vim with Make_mvc.mak. + + +Targeting Windows XP with new MSVC *new-msvc-windows-xp* +---------------------------------- + +Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE +so that it targets Windows 6.0 (Vista) by default. In order to override +this, the target Windows version number needs to be passed to LINK like +follows: + LINK ... /subsystem:console,5.01 + +Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version. +Use lines like follows to target Windows XP (assuming using Visual C++ 2012 +under 64-bit Windows): + set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A + set SDK_INCLUDE_DIR=%WinSdk71%\Include + set INCLUDE=%WinSdk71%\Include;%INCLUDE% + set LIB=%WinSdk71%\Lib;%LIB% + set PATH=%WinSdk71%\Bin;%PATH% + set CL=/D_USING_V110_SDK71_ + nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01 + +The following Visual C++ team blog can serve as a reference page: + http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx + + +OLDER VERSIONS + +The minimal supported version is Windows XP. Building with older compilers +might still work, but these instructions might be outdated. + +If you need the executable to run on Windows 98 or ME, use the 2003 one +|msvc-2003-toolkit|. + Visual C++ Toolkit 2003 *msvc-2003-toolkit* ----------------------- @@ -172,55 +233,6 @@ Instructions for integrating the Platfor http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx -Visual C++ 2008 Express Edition *msvc-2008-express* -------------------------------- - -Visual C++ 2008 Express Edition can be downloaded for free from: - http://www.microsoft.com/express/downloads/ -This includes the IDE and the debugger. - -To set the environment execute the msvc2008.bat script. You can then build -Vim with Make_mvc.mak. - -For building 64 bit binaries you also need to install the SDK: -"Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1" -You don't need the examples and documentation. - - -Visual C++ 2010 Express Edition *msvc-2010-express* -------------------------------- - -Visual C++ 2010 Express Edition can be downloaded for free from: - http://www.microsoft.com/express/vc/Default.aspx -This includes the IDE and the debugger. - -To set the environment execute the msvc2010.bat script. You can then build -Vim with Make_mvc.mak. - - -Targeting Windows XP with new MSVC *new-msvc-windows-xp* ----------------------------------- - -Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE -so that it targets Windows 6.0 (Vista) by default. In order to override -this, the target Windows version number needs to be passed to LINK like -follows: - LINK ... /subsystem:console,5.01 - -Make_mvc.mak now supports a macro SUBSYSTEM_VER to pass the Windows version. -Use lines like follows to target Windows XP (assuming using Visual C++ 2012 -under 64-bit Windows): - set WinSdk71=%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.1A - set SDK_INCLUDE_DIR=%WinSdk71%\Include - set INCLUDE=%WinSdk71%\Include;%INCLUDE% - set LIB=%WinSdk71%\Lib;%LIB% - set PATH=%WinSdk71%\Bin;%PATH% - set CL=/D_USING_V110_SDK71_ - nmake -f Make_mvc.mak ... WINVER=0x0501 SUBSYSTEM_VER=5.01 - -The following Visual C++ team blog can serve as a reference page: - http://blogs.msdn.com/b/vcblog/archive/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012.aspx - 2. MinGW ======== @@ -253,10 +265,14 @@ System, Advanced, and edit the environme compilers, set your installed paths: C:\msys2\mingw32\bin +or + C:\msys64\mingw32\bin for 32bit. And 64bit: C:\msys2\mingw64\bin +or + C:\msys64\mingw64\bin Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window: @@ -605,7 +621,7 @@ A) Using MSVC If you want to link with ruby, normally you must use the same compiler as which was used to build the ruby binary. RubyInstaller is built with MinGW, so normally you cannot use MSVC for building Vim if you want to link with -RubyInstaller. If you use a different complier, there are mainly two problems: +RubyInstaller. If you use a different compiler, there are mainly two problems: config.h and Ruby's DLL name. Here are the steps for working around them: 1) Download and Install RubyInstaller. @@ -639,9 +655,10 @@ config.h and Ruby's DLL name. Here are t nmake -f Make_mvc.mak RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0 RUBY_MSVCRT_NAME=msvcrt - WINVER=0x500 + WINVER=0x501 - WINVER must be set to >=0x500, when building with Ruby 2.1 or later. + If you set WINVER explicitly, it must be set to >=0x500, when building + with Ruby 2.1 or later. (Default is 0x501.) When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt which is used for the Ruby's DLL name. @@ -652,9 +669,11 @@ After you install RubyInstaller, just ty mingw32-make -f Make_ming.mak RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0 - WINVER=0x500 + WINVER=0x501 -WINVER must be set to >=0x500, when building with Ruby 2.1 or later. +If you set WINVER explicitly, it must be set to >=0x500, when building with +Ruby 2.1 or later. (Default is 0x501.) + 12. Building with Tcl support diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1766, +/**/ 1765, /**/ 1764,