changeset 12610:c6dc5d62cf5e v8.0.1183

patch 8.0.1183: MS-Windows build instructions are outdated commit https://github.com/vim/vim/commit/18cfa940e2bbf657e8f90e6486812876198ef963 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 8 17:58:44 2017 +0200 patch 8.0.1183: MS-Windows build instructions are outdated Problem: MS-Windows build instructions are outdated. Solution: Update instructions for MSVC 2015. Update the build script.
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Oct 2017 18:00:05 +0200
parents 89ca46c016d2
children af7824b76b06
files Filelist Makefile src/INSTALLpc.txt src/bigvim.bat src/version.c
diffstat 5 files changed, 102 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/Filelist
+++ b/Filelist
@@ -406,6 +406,7 @@ SRC_DOS =	\
 		src/msvcsetup.bat \
 		src/msvc2008.bat \
 		src/msvc2010.bat \
+		src/msvc2015.bat \
 		src/dimm.idl \
 		src/dlldata.c \
 		src/dosinst.c \
--- a/Makefile
+++ b/Makefile
@@ -128,20 +128,15 @@ MINOR = 0
 #   > make dosrt
 #   Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
 # Win32 console version build:
-# - Set environment for Visual C++ 2008, e.g.:
-#   > src/msvc2008.bat
-#   Or: 
-#   > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
-#   Or, when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
-#   paths when necessary).
-#   For Windows 98/ME the 2003 version is required, but then the executable
-#   won't work on Windows 7 and 64 bit systems.
-# - > cd src
+# - See src/INSTALLpc.txt for installing the compiler and SDK.
+# - Set environment for Visual C++ 2015:
+#   > cd src
+#   > msvc2015.bat
+# - Build the console binary:
 #   > nmake -f Make_mvc.mak
-# - Run the tests:
+# - Run the tests and check the ouput:
 #   > nmake -f Make_mvc.mak testclean
 #   > nmake -f Make_mvc.mak test
-#   - check the output.
 # - Rename (using ../tools/rename.bat):
 #           vim.exe to vimw32.exe
 #           tee/tee.exe to teew32.exe
@@ -152,19 +147,18 @@ MINOR = 0
 # Win32 GUI version build:
 # - > cd src
 #   > nmake -f Make_mvc.mak GUI=yes
-# - Run the tests:
+# - Run the tests and check the output:
 #   > nmake -f Make_mvc.mak testclean
 #   > nmake -f Make_mvc.mak testgvim
-#   - check the output.
 # - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
 # - Move gvim.pdb to here.
 # - Copy "GvimExt/gvimext.dll" to here.
 # - Delete vimrun.exe, install.exe and uninstal.exe.
 # Win32 GUI version with OLE, PERL, Ruby, TCL, PYTHON and dynamic IME:
 # - Install the interfaces you want, see src/INSTALLpc.txt
+#   Adjust bigvim.bat to match the version of each interface you want.
 # - Build:
 #   > cd src
-#   Adjust bigvim.bat to match the version of each interface you want.
 #   > bigvim.bat
 # - Run the tests:
 #   > nmake -f Make_mvc.mak testclean
@@ -191,7 +185,7 @@ MINOR = 0
 #   gvimext64.dll can be obtained from http://code.google.com/p/vim-win3264/
 #	It is part of vim72.zip as vim72/gvimext.dll.
 # - Make sure there is a diff.exe two levels up (get it from a previous Vim
-#   version).
+#   version).  Also put winpty32.dll and winpty-agent.exe there.
 # - go to ../nsis and do:
 #   > makensis gvim.nsi  (takes a few minutes).
 #      ignore warning for libwinpthread-1.dll
--- a/src/INSTALLpc.txt
+++ b/src/INSTALLpc.txt
@@ -3,9 +3,9 @@ INSTALLpc.txt - Installation of Vim on P
 This file contains instructions for compiling Vim. If you already have an
 executable version of Vim, you don't need this.
 
-More information can be found here: (Very stale now.)
-
-    http://mywebpage.netscape.com/sharppeople/vim/howto/
+You can find the lastest here: https://github.com/vim/vim-win32-installer
+This page also has links to install support for interfaces such as Perl,
+Python, Lua, etc.
 
 The file "feature.h" can be edited to match your preferences. You can skip
 this, then you will get the default behavior as is documented, which should
@@ -15,6 +15,10 @@ This document assumes that you are build
 XP/2003/Vista/7/8/10).  There are also instructions for pre-XP systems, but
 they might no longer work.
 
+The recommended way is to build a 32 bit Vim, also on 64 bit systems.  You can
+build a 64 bit Vim if you like, the executable will be bigger and Vim wan't be
+any faster, but you can edit files larger than 2 Gbyte.
+
 
 Contents:
 1. Microsoft Visual C++
@@ -24,7 +28,7 @@ 4. Borland
 5. Cross compiling for Win32 from a Linux machine
 6. Building with Python support
 7. Building with Python3 support
-8. Building with MzScheme/Racket support
+8. Building with Racket or MzScheme support
 9. Building with Lua support
 10. Building with Perl support
 11. Building with Ruby support
@@ -36,15 +40,17 @@ 15. MS-DOS
 16. Installing after building from sources
 
 
-The currently preferred method is using the free Visual C++ Toolkit 2008
-|msvc-2008-express|, the produced binary runs on most MS-Windows systems.
+The currently recommended way (that means it has been verified to work) is
+using the "Visual Studio Community 2015" installation.  This includes the SDK
+needed to target Windows XP.  But not older Windows versions (95, 97), see
+|msvc-2008-express| below for that
 
 
 1. Microsoft Visual C++
 =======================
 
 We do not provide download links, since Microsoft keeps changing them.  You
-can search for "Visual C++ 2015 build tools", for example.  You will need to
+can search for "Visual Studio Community 2015", for example.  You will need to
 create a Microsoft account (it's free).
 
 
@@ -204,10 +210,10 @@ Now you can build Vim with Make_mvc.mak.
 
 Getting the Windows Platform SDK	    *ms-platform-sdk*
 
-You will also need a copy of the Windows Platform SDK from
-    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
-Specifically, you need the Windows Core SDK subset of the Platform SDK,
-which contains the Windows headers and libraries.
+You will also need a copy of the Windows Platform SDK.  Specifically, you need
+the Windows Core SDK subset of the Platform SDK, which contains the Windows
+headers and libraries.  You need to search for it, Microsoft keeps changing
+the URL.
 
 
 Getting the .NET Framework 1.1 Runtime      *dotnet-1.1-redist*
@@ -448,51 +454,22 @@ E.g. When using MSVC (as one line):
         PYTHON3=C:\Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34
 
 
-8. Building with MzScheme/Racket support
+8. Building with Racket or MzScheme support
 ========================================
 
-1) Building with MzScheme support
-
-(written by Sergey Khorev <sergey.khorev@gmail.com>)
-
-Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
-be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
-above (including 299 and 30x series).
-
-The MSVC build is quite straightforward. Simply invoke (in one line)
-nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
-    [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
-where <MzScheme-version> is the last seven characters from MzScheme dll name
-(libmzschXXXXXXX.dll).
-If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
-DLL's, but will load them in runtime on demand.
-
-Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
-account that <Path-to-MzScheme> should contain slashes rather than backslashes
-(e.g. d:/Develop/MzScheme)
-
-"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
-explicitly) on MinGW and Cygwin requires additional step.
-
-libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
-%WINDOWS%\System32 to other location (either build directory, some temporary
-dir or even MzScheme home).
-
-Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
-make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
-    MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
-
-After a successful build, these dlls can be freely removed, leaving them in
-%WINDOWS%\System32 only.
-
-
-2) Building with Racket support
+1) Building with Racket support (newest)
 
 MzScheme and PLT Scheme names have been rebranded as Racket.  Vim with Racket
-(https://racket-lang.org/) support can be built with either MSVC or MinGW (or
-Cygwin).
+support can be built with either MSVC or MinGW (or Cygwin).
+Get it from https://download.racket-lang.org/
 
-You need to set the following variables:
+Copy lib/libracket{version}.dll to your Windows system directory. The system
+directory depends on your Windows bitness and Vim bitness:
+  32-bit Vim on 32-bit Windows: C:\Windows\System32
+  32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64
+  64-bit Vim on 64-bit Windows: C:\Windows\System32
+
+For building you need to set the following variables:
 
     MZSCHEME:          Where Racket is installed.
                        E.g. C:\Program Files (x86)\Racket
@@ -531,6 +508,42 @@ Or when using MinGW (as one line):
     Spaces should be escaped with '\'.
 
 
+2) Building with MzScheme support (older)
+
+(written by Sergey Khorev <sergey.khorev@gmail.com>)
+
+Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
+be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
+above (including 299 and 30x series).
+
+The MSVC build is quite straightforward. Simply invoke (in one line)
+nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
+    [MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
+where <MzScheme-version> is the last seven characters from MzScheme dll name
+(libmzschXXXXXXX.dll).
+If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
+DLL's, but will load them in runtime on demand.
+
+Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
+account that <Path-to-MzScheme> should contain slashes rather than backslashes
+(e.g. d:/Develop/MzScheme)
+
+"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
+explicitly) on MinGW and Cygwin requires additional step.
+
+libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
+%WINDOWS%\System32 to other location (either build directory, some temporary
+dir or even MzScheme home).
+
+Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
+make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
+    MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
+
+After a successful build, these dlls can be freely removed, leaving them in
+%WINDOWS%\System32 only.
+
+
+
 9. Building with Lua support
 ============================
 
@@ -576,7 +589,7 @@ E.g. When using MSVC (as one line):
 
 Or when using MinGW (as one line):
 
-    mingw32-make -f Make_mingw.mak
+    mingw32-make -f Make_ming.mak
         LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
 
 
@@ -608,7 +621,7 @@ E.g. When using MSVC (as one line):
 
 Or when using MinGW (as one line):
 
-    mingw32-make -f Make_mingw.mak
+    mingw32-make -f Make_ming.mak
         PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
 
 
@@ -617,7 +630,7 @@ 11. Building with Ruby support
 
 Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
 Ruby doesn't provide the official Windows binaries.  The most widely used
-Windows binaries might be RubyInstaller.
+Windows binaries might be RubyInstaller.  Currently Ruby 2.4 is recommended.
 
     http://rubyinstaller.org/
 
@@ -628,11 +641,11 @@ you need some tricks described below.
 
 When building, you need to set the following variables at least:
 
-    RUBY:              Where ruby is installed. E.g. C:\Ruby22
+    RUBY:              Where ruby is installed. E.g. C:\Ruby24
     DYNAMIC_RUBY:      Whether dynamic linking is used. Usually, set to yes.
-    RUBY_VER:          Ruby version. E.g. 22 for Ruby 2.2.X.
+    RUBY_VER:          Ruby version. E.g. 24 for Ruby 2.4.X.
     RUBY_API_VER_LONG: Ruby API version in a long format.
-                       E.g. 2.2.0 for Ruby 2.2.X.
+                       E.g. 2.4.0 for Ruby 2.4.X.
 
 Ruby version vs. Ruby API version:
 
@@ -657,33 +670,34 @@ config.h and Ruby's DLL name. Here are t
   1) Download and Install RubyInstaller.
     You can install RubyInstaller with the default options and directory.
     E.g.:
-      C:\Ruby22 (32-bit) or C:\Ruby22-x64 (64-bit)
+      C:\Ruby24 (32-bit) or C:\Ruby24-x64 (64-bit)
 
-    Ruby 2.2.X is used in this example.
+    Ruby 2.4.X is used in this example.
 
-  2) Download Ruby 2.2.X's source code and generate config.h:
+  2) Download Ruby 2.4.X's source code and generate config.h:
 
       cd C:\projects
-      git clone https://github.com/ruby/ruby.git -b ruby_2_2
+      git clone https://github.com/ruby/ruby.git -b ruby_2_4
       cd ruby
       win32\configure.bat
       nmake .config.h.time
 
-    Note that ruby_2_2 is the branch name for Ruby 2.2.X's source code.
+    Note that ruby_2_4 is the branch name for Ruby 2.4.X's source code.
     There is no need to build whole Ruby, just config.h is needed.
     If you use 32-bit MSVC10, the config.h is generated in the
-    .ext\include\i386-mswin32_100 directory.
+    .ext\include\i386-mswin32_140 directory.
 
   3) Install the generated config.h.
 
-      xcopy /s .ext\include C:\Ruby22\include\ruby-2.2.0
+      xcopy /s .ext\include E:\Ruby24\include\ruby-2.4.0
 
-    Note that 2.2.0 is Ruby API version of Ruby 2.2.X.
+    Note that 2.4.0 is Ruby API version of Ruby 2.4.X.
+    You may need to close the console and reopen it to pick up the new $PATH.
 
   4) Build Vim. Note that you need to adjust some variables (as one line):
 
       nmake -f Make_mvc.mak
-          RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0
+          RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
           RUBY_MSVCRT_NAME=msvcrt
           WINVER=0x501
 
@@ -714,6 +728,7 @@ You can use binaries from ActiveState (A
 
     http://www.activestate.com/activetcl
 
+For MSVC 2015 use version 8.6.6 or later.
 When building, you need to set the following variables:
 
     TCL:          Where tcl is installed. E.g. C:\Tcl86
@@ -721,6 +736,11 @@ When building, you need to set the follo
     TCL_VER:      Tcl version in a short format. E.g. 86 for Tcl 8.6.X.
     TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X.
 
+Sometimes the Tcl dll name changes.  E.g. ActiveTcl 8.6.4 comes with tcl86.dll,
+but ActiveTcl 8.6.6 comes with tcl86t.dll.  You can set the dll name by setting
+the TCL_DLL variable:
+    TCL_DLL=tcl86t.dll
+
 E.g. When using MSVC (as one line):
 
     nmake -f Make_mvc.mak
@@ -728,7 +748,7 @@ E.g. When using MSVC (as one line):
 
 Or when using MinGW (as one line):
 
-    mingw32-make -f Make_mingw.mak
+    mingw32-make -f Make_ming.mak
         TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
 
 
@@ -745,7 +765,7 @@ E.g. When using MSVC:
 
 Or when using MinGW (as one line):
 
-    mingw32-make -f Make_mingw.mak TERMINAL=yes
+    mingw32-make -f Make_ming.mak TERMINAL=yes
 
 
 14. Windows 3.1x
--- a/src/bigvim.bat
+++ b/src/bigvim.bat
@@ -1,5 +1,5 @@
-:: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
+:: command to build big Vim with OLE, Lua, Perl, Python, Racket, Ruby and Tcl
 SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\"
 SET TOOLDIR=E:\
-%VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes PERL=%TOOLDIR%perl524 DYNAMIC_PERL=yes PERL_VER=524 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python35 DYNAMIC_PYTHON3=yes PYTHON3_VER=35 RUBY=%TOOLDIR%ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0 RUBY_MSVCRT_NAME=msvcrt TCL=%TOOLDIR%tcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes DIRECTX=yes
+%VCDIR%nmake -f Make_mvc.mak GUI=yes OLE=yes LUA=%TOOLDIR%lua53 DYNAMIC_LUA=yes LUA_VER=53 PERL=%TOOLDIR%perl524 DYNAMIC_PERL=yes PERL_VER=524 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python35 DYNAMIC_PYTHON3=yes PYTHON3_VER=35 MZSCHEME=%TOOLDIR%Racket DYNAMIC_MZSCHEME=yes MZSCHEME_VER=3m_a36fs8 RUBY=%TOOLDIR%ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0 RUBY_MSVCRT_NAME=msvcrt TCL=%TOOLDIR%ActiveTcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes TCL_DLL=tcl86t.dll %1 IME=yes CSCOPE=yes DIRECTX=yes
 
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1183,
+/**/
     1182,
 /**/
     1181,