Skip to content

Commit 18cfa94

Browse files
committed
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.
1 parent 0ab35b2 commit 18cfa94

5 files changed

Lines changed: 102 additions & 85 deletions

File tree

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ SRC_DOS = \
406406
src/msvcsetup.bat \
407407
src/msvc2008.bat \
408408
src/msvc2010.bat \
409+
src/msvc2015.bat \
409410
src/dimm.idl \
410411
src/dlldata.c \
411412
src/dosinst.c \

Makefile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,15 @@ MINOR = 0
128128
# > make dosrt
129129
# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
130130
# Win32 console version build:
131-
# - Set environment for Visual C++ 2008, e.g.:
132-
# > src/msvc2008.bat
133-
# Or:
134-
# > C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat
135-
# Or, when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
136-
# paths when necessary).
137-
# For Windows 98/ME the 2003 version is required, but then the executable
138-
# won't work on Windows 7 and 64 bit systems.
139-
# - > cd src
131+
# - See src/INSTALLpc.txt for installing the compiler and SDK.
132+
# - Set environment for Visual C++ 2015:
133+
# > cd src
134+
# > msvc2015.bat
135+
# - Build the console binary:
140136
# > nmake -f Make_mvc.mak
141-
# - Run the tests:
137+
# - Run the tests and check the ouput:
142138
# > nmake -f Make_mvc.mak testclean
143139
# > nmake -f Make_mvc.mak test
144-
# - check the output.
145140
# - Rename (using ../tools/rename.bat):
146141
# vim.exe to vimw32.exe
147142
# tee/tee.exe to teew32.exe
@@ -152,19 +147,18 @@ MINOR = 0
152147
# Win32 GUI version build:
153148
# - > cd src
154149
# > nmake -f Make_mvc.mak GUI=yes
155-
# - Run the tests:
150+
# - Run the tests and check the output:
156151
# > nmake -f Make_mvc.mak testclean
157152
# > nmake -f Make_mvc.mak testgvim
158-
# - check the output.
159153
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
160154
# - Move gvim.pdb to here.
161155
# - Copy "GvimExt/gvimext.dll" to here.
162156
# - Delete vimrun.exe, install.exe and uninstal.exe.
163157
# Win32 GUI version with OLE, PERL, Ruby, TCL, PYTHON and dynamic IME:
164158
# - Install the interfaces you want, see src/INSTALLpc.txt
159+
# Adjust bigvim.bat to match the version of each interface you want.
165160
# - Build:
166161
# > cd src
167-
# Adjust bigvim.bat to match the version of each interface you want.
168162
# > bigvim.bat
169163
# - Run the tests:
170164
# > nmake -f Make_mvc.mak testclean
@@ -191,7 +185,7 @@ MINOR = 0
191185
# gvimext64.dll can be obtained from http://code.google.com/p/vim-win3264/
192186
# It is part of vim72.zip as vim72/gvimext.dll.
193187
# - Make sure there is a diff.exe two levels up (get it from a previous Vim
194-
# version).
188+
# version). Also put winpty32.dll and winpty-agent.exe there.
195189
# - go to ../nsis and do:
196190
# > makensis gvim.nsi (takes a few minutes).
197191
# ignore warning for libwinpthread-1.dll

src/INSTALLpc.txt

Lines changed: 88 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ INSTALLpc.txt - Installation of Vim on PC
33
This file contains instructions for compiling Vim. If you already have an
44
executable version of Vim, you don't need this.
55

6-
More information can be found here: (Very stale now.)
7-
8-
http://mywebpage.netscape.com/sharppeople/vim/howto/
6+
You can find the lastest here: https://github.com/vim/vim-win32-installer
7+
This page also has links to install support for interfaces such as Perl,
8+
Python, Lua, etc.
99

1010
The file "feature.h" can be edited to match your preferences. You can skip
1111
this, then you will get the default behavior as is documented, which should
@@ -15,6 +15,10 @@ This document assumes that you are building Vim for Win32 or later (Windows
1515
XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but
1616
they might no longer work.
1717

18+
The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can
19+
build a 64 bit Vim if you like, the executable will be bigger and Vim wan't be
20+
any faster, but you can edit files larger than 2 Gbyte.
21+
1822

1923
Contents:
2024
1. Microsoft Visual C++
@@ -24,7 +28,7 @@ Contents:
2428
5. Cross compiling for Win32 from a Linux machine
2529
6. Building with Python support
2630
7. Building with Python3 support
27-
8. Building with MzScheme/Racket support
31+
8. Building with Racket or MzScheme support
2832
9. Building with Lua support
2933
10. Building with Perl support
3034
11. Building with Ruby support
@@ -36,15 +40,17 @@ Contents:
3640
16. Installing after building from sources
3741

3842

39-
The currently preferred method is using the free Visual C++ Toolkit 2008
40-
|msvc-2008-express|, the produced binary runs on most MS-Windows systems.
43+
The currently recommended way (that means it has been verified to work) is
44+
using the "Visual Studio Community 2015" installation. This includes the SDK
45+
needed to target Windows XP. But not older Windows versions (95, 97), see
46+
|msvc-2008-express| below for that
4147

4248

4349
1. Microsoft Visual C++
4450
=======================
4551

4652
We do not provide download links, since Microsoft keeps changing them. You
47-
can search for "Visual C++ 2015 build tools", for example. You will need to
53+
can search for "Visual Studio Community 2015", for example. You will need to
4854
create a Microsoft account (it's free).
4955

5056

@@ -204,10 +210,10 @@ Now you can build Vim with Make_mvc.mak.
204210

205211
Getting the Windows Platform SDK *ms-platform-sdk*
206212

207-
You will also need a copy of the Windows Platform SDK from
208-
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
209-
Specifically, you need the Windows Core SDK subset of the Platform SDK,
210-
which contains the Windows headers and libraries.
213+
You will also need a copy of the Windows Platform SDK. Specifically, you need
214+
the Windows Core SDK subset of the Platform SDK, which contains the Windows
215+
headers and libraries. You need to search for it, Microsoft keeps changing
216+
the URL.
211217

212218

213219
Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist*
@@ -448,51 +454,22 @@ E.g. When using MSVC (as one line):
448454
PYTHON3=C:\Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34
449455

450456

451-
8. Building with MzScheme/Racket support
457+
8. Building with Racket or MzScheme support
452458
========================================
453459

454-
1) Building with MzScheme support
455-
456-
(written by Sergey Khorev <[email protected]>)
457-
458-
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
459-
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
460-
above (including 299 and 30x series).
461-
462-
The MSVC build is quite straightforward. Simply invoke (in one line)
463-
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
464-
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
465-
where <MzScheme-version> is the last seven characters from MzScheme dll name
466-
(libmzschXXXXXXX.dll).
467-
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
468-
DLL's, but will load them in runtime on demand.
469-
470-
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
471-
account that <Path-to-MzScheme> should contain slashes rather than backslashes
472-
(e.g. d:/Develop/MzScheme)
473-
474-
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
475-
explicitly) on MinGW and Cygwin requires additional step.
476-
477-
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
478-
%WINDOWS%\System32 to other location (either build directory, some temporary
479-
dir or even MzScheme home).
480-
481-
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
482-
make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
483-
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
484-
485-
After a successful build, these dlls can be freely removed, leaving them in
486-
%WINDOWS%\System32 only.
487-
488-
489-
2) Building with Racket support
460+
1) Building with Racket support (newest)
490461

491462
MzScheme and PLT Scheme names have been rebranded as Racket. Vim with Racket
492-
(https://racket-lang.org/) support can be built with either MSVC or MinGW (or
493-
Cygwin).
463+
support can be built with either MSVC or MinGW (or Cygwin).
464+
Get it from https://download.racket-lang.org/
465+
466+
Copy lib/libracket{version}.dll to your Windows system directory. The system
467+
directory depends on your Windows bitness and Vim bitness:
468+
32-bit Vim on 32-bit Windows: C:\Windows\System32
469+
32-bit Vim on 64-bit Windows: C:\Windows\SysWOW64
470+
64-bit Vim on 64-bit Windows: C:\Windows\System32
494471

495-
You need to set the following variables:
472+
For building you need to set the following variables:
496473

497474
MZSCHEME: Where Racket is installed.
498475
E.g. C:\Program Files (x86)\Racket
@@ -531,6 +508,42 @@ Or when using MinGW (as one line):
531508
Spaces should be escaped with '\'.
532509

533510

511+
2) Building with MzScheme support (older)
512+
513+
(written by Sergey Khorev <[email protected]>)
514+
515+
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
516+
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
517+
above (including 299 and 30x series).
518+
519+
The MSVC build is quite straightforward. Simply invoke (in one line)
520+
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
521+
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
522+
where <MzScheme-version> is the last seven characters from MzScheme dll name
523+
(libmzschXXXXXXX.dll).
524+
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
525+
DLL's, but will load them in runtime on demand.
526+
527+
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
528+
account that <Path-to-MzScheme> should contain slashes rather than backslashes
529+
(e.g. d:/Develop/MzScheme)
530+
531+
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
532+
explicitly) on MinGW and Cygwin requires additional step.
533+
534+
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
535+
%WINDOWS%\System32 to other location (either build directory, some temporary
536+
dir or even MzScheme home).
537+
538+
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
539+
make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
540+
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
541+
542+
After a successful build, these dlls can be freely removed, leaving them in
543+
%WINDOWS%\System32 only.
544+
545+
546+
534547
9. Building with Lua support
535548
============================
536549

@@ -576,7 +589,7 @@ E.g. When using MSVC (as one line):
576589

577590
Or when using MinGW (as one line):
578591

579-
mingw32-make -f Make_mingw.mak
592+
mingw32-make -f Make_ming.mak
580593
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
581594

582595

@@ -608,7 +621,7 @@ E.g. When using MSVC (as one line):
608621

609622
Or when using MinGW (as one line):
610623

611-
mingw32-make -f Make_mingw.mak
624+
mingw32-make -f Make_ming.mak
612625
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
613626

614627

@@ -617,7 +630,7 @@ Or when using MinGW (as one line):
617630

618631
Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
619632
Ruby doesn't provide the official Windows binaries. The most widely used
620-
Windows binaries might be RubyInstaller.
633+
Windows binaries might be RubyInstaller. Currently Ruby 2.4 is recommended.
621634

622635
http://rubyinstaller.org/
623636

@@ -628,11 +641,11 @@ you need some tricks described below.
628641

629642
When building, you need to set the following variables at least:
630643

631-
RUBY: Where ruby is installed. E.g. C:\Ruby22
644+
RUBY: Where ruby is installed. E.g. C:\Ruby24
632645
DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes.
633-
RUBY_VER: Ruby version. E.g. 22 for Ruby 2.2.X.
646+
RUBY_VER: Ruby version. E.g. 24 for Ruby 2.4.X.
634647
RUBY_API_VER_LONG: Ruby API version in a long format.
635-
E.g. 2.2.0 for Ruby 2.2.X.
648+
E.g. 2.4.0 for Ruby 2.4.X.
636649

637650
Ruby version vs. Ruby API version:
638651

@@ -657,33 +670,34 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
657670
1) Download and Install RubyInstaller.
658671
You can install RubyInstaller with the default options and directory.
659672
E.g.:
660-
C:\Ruby22 (32-bit) or C:\Ruby22-x64 (64-bit)
673+
C:\Ruby24 (32-bit) or C:\Ruby24-x64 (64-bit)
661674

662-
Ruby 2.2.X is used in this example.
675+
Ruby 2.4.X is used in this example.
663676

664-
2) Download Ruby 2.2.X's source code and generate config.h:
677+
2) Download Ruby 2.4.X's source code and generate config.h:
665678

666679
cd C:\projects
667-
git clone https://github.com/ruby/ruby.git -b ruby_2_2
680+
git clone https://github.com/ruby/ruby.git -b ruby_2_4
668681
cd ruby
669682
win32\configure.bat
670683
nmake .config.h.time
671684

672-
Note that ruby_2_2 is the branch name for Ruby 2.2.X's source code.
685+
Note that ruby_2_4 is the branch name for Ruby 2.4.X's source code.
673686
There is no need to build whole Ruby, just config.h is needed.
674687
If you use 32-bit MSVC10, the config.h is generated in the
675-
.ext\include\i386-mswin32_100 directory.
688+
.ext\include\i386-mswin32_140 directory.
676689

677690
3) Install the generated config.h.
678691

679-
xcopy /s .ext\include C:\Ruby22\include\ruby-2.2.0
692+
xcopy /s .ext\include E:\Ruby24\include\ruby-2.4.0
680693

681-
Note that 2.2.0 is Ruby API version of Ruby 2.2.X.
694+
Note that 2.4.0 is Ruby API version of Ruby 2.4.X.
695+
You may need to close the console and reopen it to pick up the new $PATH.
682696

683697
4) Build Vim. Note that you need to adjust some variables (as one line):
684698

685699
nmake -f Make_mvc.mak
686-
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0
700+
RUBY=C:\Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
687701
RUBY_MSVCRT_NAME=msvcrt
688702
WINVER=0x501
689703

@@ -714,21 +728,27 @@ You can use binaries from ActiveState (ActiveTcl).
714728

715729
http://www.activestate.com/activetcl
716730

731+
For MSVC 2015 use version 8.6.6 or later.
717732
When building, you need to set the following variables:
718733

719734
TCL: Where tcl is installed. E.g. C:\Tcl86
720735
DYNAMIC_TCL: Whether dynamic linking is used. Usually, set to yes.
721736
TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X.
722737
TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X.
723738

739+
Sometimes the Tcl dll name changes. E.g. ActiveTcl 8.6.4 comes with tcl86.dll,
740+
but ActiveTcl 8.6.6 comes with tcl86t.dll. You can set the dll name by setting
741+
the TCL_DLL variable:
742+
TCL_DLL=tcl86t.dll
743+
724744
E.g. When using MSVC (as one line):
725745

726746
nmake -f Make_mvc.mak
727747
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
728748

729749
Or when using MinGW (as one line):
730750

731-
mingw32-make -f Make_mingw.mak
751+
mingw32-make -f Make_ming.mak
732752
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
733753

734754

@@ -745,7 +765,7 @@ E.g. When using MSVC:
745765

746766
Or when using MinGW (as one line):
747767

748-
mingw32-make -f Make_mingw.mak TERMINAL=yes
768+
mingw32-make -f Make_ming.mak TERMINAL=yes
749769

750770

751771
14. Windows 3.1x

src/bigvim.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
:: command to build big Vim with OLE, Perl, Python, Ruby and Tcl
1+
:: command to build big Vim with OLE, Lua, Perl, Python, Racket, Ruby and Tcl
22
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\"
33
SET TOOLDIR=E:\
4-
%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
4+
%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
55

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1183,
764766
/**/
765767
1182,
766768
/**/

0 commit comments

Comments
 (0)