To: vim_dev@googlegroups.com Subject: Patch 7.4.1766 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1766 Problem: Building instructions for MS-Windows are outdated. Solution: Mention setting SDK_INCLUDE_DIR. (Ben Franklin, closes #771) Move outdated instructions further down. Files: src/INSTALLpc.txt *** ../vim-7.4.1765/src/INSTALLpc.txt 2016-02-26 19:58:44.035326200 +0100 --- src/INSTALLpc.txt 2016-04-21 14:33:16.633825480 +0200 *************** *** 11,19 **** 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) Contents: --- 11,19 ---- this, then you will get the default behavior as is documented, which should be fine for most people. ! 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,44 **** 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|. 1. Microsoft Visual C++ --- 36,42 ---- The currently preferred method is using the free Visual C++ Toolkit 2008 ! |msvc-2008-express|, the produced binary runs on most MS-Windows systems. 1. Microsoft Visual C++ *************** *** 87,92 **** --- 85,153 ---- 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,226 **** 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 ======== --- 233,238 ---- *************** *** 253,262 **** --- 265,278 ---- 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,611 **** 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: config.h and Ruby's DLL name. Here are the steps for working around them: 1) Download and Install RubyInstaller. --- 621,627 ---- 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 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,647 **** 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 must be set to >=0x500, when building with Ruby 2.1 or later. When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt which is used for the Ruby's DLL name. --- 655,664 ---- 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=0x501 ! 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,660 **** mingw32-make -f Make_ming.mak RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0 ! WINVER=0x500 - WINVER must be set to >=0x500, when building with Ruby 2.1 or later. 12. Building with Tcl support --- 669,679 ---- mingw32-make -f Make_ming.mak RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0 ! WINVER=0x501 ! ! 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 *** ../vim-7.4.1765/src/version.c 2016-04-21 14:05:16.299162032 +0200 --- src/version.c 2016-04-21 14:31:42.718794061 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1766, /**/ -- WOMAN: King of the who? ARTHUR: The Britons. WOMAN: Who are the Britons? ARTHUR: Well, we all are. we're all Britons and I am your king. The Quest for the Holy Grail (Monty Python) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///