Skip to content

Commit 30a8947

Browse files
committed
patch 7.4.1077
Problem: The build instructions for MS-Windows are incomplete. Solution: Add explanations for how to build with various interfaces. (Ken Takata)
1 parent 6a3c8af commit 30a8947

File tree

2 files changed

+251
-29
lines changed

2 files changed

+251
-29
lines changed

src/INSTALLpc.txt

Lines changed: 249 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ be fine for most people.
1313

1414
With the exception of two sections (Windows 3.1 and MS-DOS), this document
1515
assumes that you are building Vim for Win32 or later.
16-
(Windows 95/98/Me/NT/2000/XP/2003/Vista/7)
16+
(Windows 95/98/Me/NT/2000/XP/2003/Vista/7/8/10)
1717

1818

1919
Contents:
@@ -23,11 +23,16 @@ Contents:
2323
4. Borland
2424
5. Cross compiling for Win32 from a Linux machine
2525
6. Building with Python support
26-
7. Building with MzScheme support
27-
8. Windows 3.1
28-
9. MS-DOS
26+
7. Building with Python3 support
27+
8. Building with MzScheme support
28+
9. Building with Lua support
29+
10. Building with Perl support
30+
11. Building with Ruby support
31+
12. Building with Tcl support
32+
13. Windows 3.1
33+
14. MS-DOS
2934

30-
10. Installing after building from sources
35+
15. Installing after building from sources
3136

3237

3338
The currently preferred method is using the free Visual C++ Toolkit 2008
@@ -42,8 +47,9 @@ you need the executable to run on Windows 98 or ME, use the 2003 one
4247
Visual Studio
4348
-------------
4449

45-
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, and VS 2008)
46-
is straightforward. (These instructions should also work for VS 4 and VS 5.)
50+
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, VS 2005, VS 2008,
51+
VS2010, VS2012, VS2013 and VS2015) is straightforward. (These instructions
52+
should also work for VS 4 and VS 5.)
4753

4854
Using VS C++ 2008 Express is recommended, the binaries build with that run on
4955
nearly all platforms. Binaries from later versions may not run on Windows 95
@@ -195,7 +201,7 @@ Vim with Make_mvc.mak.
195201
Targeting Windows XP with new MSVC *new-msvc-windows-xp*
196202
----------------------------------
197203

198-
Beginning with Visual C++ 2010, Microsoft changed the behavior of LINK.EXE
204+
Beginning with Visual C++ 2012, Microsoft changed the behavior of LINK.EXE
199205
so that it targets Windows 6.0 (Vista) by default. In order to override
200206
this, the target Windows version number needs to be passed to LINK like
201207
follows:
@@ -345,6 +351,17 @@ Now you have created the Windows binary from your Linux box! Have fun...
345351
For building with MSVC 2008 the "Windows Installer" from www.python.org
346352
works fine.
347353

354+
When building, you need to set the following variables at least:
355+
356+
PYTHON: Where Python is installed. E.g. C:\Python27
357+
DYNAMIC_PYTHON: Whether dynamic linking is used. Usually, set to yes.
358+
PYTHON_VER: Python version. E.g. 27 for Python 2.7.X.
359+
360+
E.g. When using MSVC (as one line):
361+
362+
nmake -f Make_mvc.mak
363+
PYTHON=C:\Python27 DYNAMIC_PYTHON=yes PYTHON_VER=27
364+
348365
(rest written by Ron Aaron: <[email protected]>)
349366

350367
Building with the mingw32 compiler, and the ActiveState ActivePython:
@@ -380,7 +397,25 @@ And if you use msys2 to build python support (as one line):
380397
You will end up with a Python-enabled, Win32 version. Enjoy!
381398

382399

383-
7. Building with MzScheme support
400+
7. Building with Python3 support
401+
================================
402+
403+
For building with MSVC 2008 the "Windows Installer" from www.python.org
404+
works fine. Python 3.4 is recommended.
405+
406+
When building, you need to set the following variables at least:
407+
408+
PYTHON3: Where Python3 is installed. E.g. C:\Python34
409+
DYNAMIC_PYTHON3: Whether dynamic linking is used. Usually, set to yes.
410+
PYTHON3_VER: Python3 version. E.g. 34 for Python 3.4.X.
411+
412+
E.g. When using MSVC (as one line):
413+
414+
nmake -f Make_mvc.mak
415+
PYTHON3=C:\Python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34
416+
417+
418+
8. Building with MzScheme support
384419
=================================
385420

386421
(written by Sergey Khorev <[email protected]>)
@@ -416,8 +451,193 @@ After a successful build, these dlls can be freely removed, leaving them in
416451
%WINDOWS%\System32 only.
417452

418453

419-
8. Windows 3.1x
420-
===============
454+
9. Building with Lua support
455+
============================
456+
457+
Vim with Lua support can be built with either MSVC or MinGW (or Cygwin).
458+
You can use binaries from LuaBinaries.
459+
http://luabinaries.sourceforge.net/
460+
461+
1) Download and install LuaBinaries
462+
Go to the Download page of LuaBinaries:
463+
http://luabinaries.sourceforge.net/download.html
464+
465+
Download lua-X.Y.Z_Win32_dllw4_lib.zip for x86 or
466+
lua-X.Y.Z_Win64_dllw4_lib.zip for x64. You can use them for both MSVC and
467+
MinGW.
468+
469+
Unpack it to a working directory. E.g. C:\projects\lua53.
470+
Lua's header files will be installed under the include directory.
471+
472+
473+
2) Build
474+
You need to set the following variables:
475+
476+
LUA: Where Lua is installed. E.g. C:\projects\lua53.
477+
DYNAMIC_LUA: Whether dynamic linking is used. Usually, set to yes.
478+
LUA_VER: Lua version. E.g. 53 for Lua 5.3.X.
479+
480+
E.g. When using MSVC (as one line):
481+
482+
nmake -f Make_mvc.mak
483+
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
484+
485+
Or when using MinGW (as one line):
486+
487+
mingw32-make -f Make_mingw.mak
488+
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
489+
490+
Or when using Cygwin (as one line):
491+
492+
make -f Make_cyg.mak
493+
LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
494+
495+
496+
10. Building with Perl support
497+
==============================
498+
499+
Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
500+
You can use binaries from ActiveState (ActivePerl) or Strawberry Perl.
501+
502+
http://www.activestate.com/activeperl
503+
http://strawberryperl.com/
504+
505+
When building, you need to set the following variables:
506+
507+
PERL: Where perl is installed. E.g. C:\Perl, C:\Strawberry\perl
508+
DYNAMIC_PERL: Whether dynamic linking is used. Usually, set to yes.
509+
PERL_VER: Perl version. E.g. 522 for Perl 5.22.X.
510+
511+
E.g. When using MSVC (as one line):
512+
513+
nmake -f Make_mvc.mak
514+
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
515+
516+
Or when using MinGW (as one line):
517+
518+
mingw32-make -f Make_mingw.mak
519+
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
520+
521+
522+
11. Building with Ruby support
523+
==============================
524+
525+
Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
526+
Ruby doesn't provide the official Windows binaries. The most widely used
527+
Windows binaries might be RubyInstaller.
528+
529+
http://rubyinstaller.org/
530+
531+
If you use MinGW you can easily build with RubyInstaller, but if you use MSVC
532+
you need some tricks described below.
533+
(Another binary distribution is ActiveScriptRuby:
534+
http://www.artonx.org/data/asr/)
535+
536+
When building, you need to set the following variables at least:
537+
538+
RUBY: Where ruby is installed. E.g. C:\Ruby22
539+
DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes.
540+
RUBY_VER: Ruby version. E.g. 22 for Ruby 2.2.X.
541+
RUBY_VER_LONG: Ruby API version in a long format.
542+
E.g. 2.2.0 for Ruby 2.2.X.
543+
544+
Ruby version vs. Ruby API version:
545+
546+
Ruby ver. | Ruby API ver.
547+
=========================
548+
1.8.X | 1.8
549+
1.9.[1-3] | 1.9.1
550+
2.0.0 | 2.0.0
551+
2.X.Y | 2.X.0
552+
553+
(Ruby 1.9.0 is excluded from the table because it is an unstable version.)
554+
555+
556+
A) Using MSVC
557+
558+
If you want to link with ruby, normally you must use the same compiler as
559+
which was used to build the ruby binary. RubyInstaller is built with MinGW,
560+
so normally you cannot use MSVC for building Vim if you want to link with
561+
RubyInstaller. If you use a different complier, there are mainly two problems:
562+
config.h and Ruby's DLL name. Here are the steps for working around them:
563+
564+
1) Download and Install RubyInstaller.
565+
You can install RubyInstaller with the default options and directory.
566+
E.g.:
567+
C:\Ruby22 (32-bit) or C:\Ruby22-x64 (64-bit)
568+
569+
Ruby 2.2.X is used in this example.
570+
571+
2) Download Ruby 2.2.X's source code and generate config.h:
572+
573+
cd C:\projects
574+
git clone https://github.com/ruby/ruby.git -b ruby_2_2
575+
cd ruby
576+
win32\configure.bat
577+
nmake .config.h.time
578+
579+
Note that ruby_2_2 is the branch name for Ruby 2.2.X's source code.
580+
There is no need to build whole Ruby, just config.h is needed.
581+
If you use 32-bit MSVC10, the config.h is generated in the
582+
.ext\include\i386-mswin32_100 directory.
583+
584+
3) Install the generated config.h.
585+
586+
xcopy /s .ext\include C:\Ruby22\include\ruby-2.2.0
587+
588+
Note that 2.2.0 is Ruby API version of Ruby 2.2.X.
589+
590+
4) Build Vim. Note that you need to adjust some variables (as one line):
591+
592+
nmake -f Make_mvc.mak
593+
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
594+
RUBY_MSVCRT_NAME=msvcrt
595+
WINVER=0x500
596+
597+
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
598+
When using this trick, you also need to set RUBY_MSVCRT_NAME to msvcrt
599+
which is used for the Ruby's DLL name.
600+
601+
B) Using MinGW
602+
603+
Using MinGW is easier than using MSVC when linking with RubyInstaller.
604+
After you install RubyInstaller, just type this (as one line):
605+
606+
mingw32-make -f Make_ming.mak
607+
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
608+
WINVER=0x500
609+
610+
WINVER must be set to >=0x500, when building with Ruby 2.1 or later.
611+
612+
613+
12. Building with Tcl support
614+
=============================
615+
616+
Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
617+
You can use binaries from ActiveState (ActiveTcl).
618+
619+
http://www.activestate.com/activetcl
620+
621+
When building, you need to set the following variables:
622+
623+
TCL: Where tcl is installed. E.g. C:\Tcl86
624+
DYNAMIC_TCL: Whether dynamic linking is used. Usually, set to yes.
625+
TCL_VER: Tcl version in a short format. E.g. 86 for Tcl 8.6.X.
626+
TCL_VER_LONG: Tcl version in a long format. E.g. 8.6 for Tcl 8.6.X.
627+
628+
E.g. When using MSVC (as one line):
629+
630+
nmake -f Make_mvc.mak
631+
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
632+
633+
Or when using MinGW (as one line):
634+
635+
mingw32-make -f Make_mingw.mak
636+
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
637+
638+
639+
13. Windows 3.1x
640+
================
421641

422642
make -f Make_w16.mak 16 bit, Borland C++ 5.0
423643

@@ -436,8 +656,8 @@ In MSVC 4.2 support for Win32s was dropped! Use this command:
436656
nmake -f Make_mvc.mak GUI=yes
437657

438658

439-
9. MS-DOS
440-
=========
659+
14. MS-DOS
660+
==========
441661

442662
Summary:
443663
ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
@@ -479,48 +699,48 @@ If you get all kinds of strange error messages when compiling, try changing
479699
the file format from "unix" to "dos".
480700

481701

482-
10. Installing after building from sources
702+
15. Installing after building from sources
483703
==========================================
484704

485705
[provided by Michael Soyka]
486706

487707
After you've built the Vim binaries as described above, you're ready to
488708
install Vim on your system. However, if you've obtained the Vim sources
489-
using Mercurial or by downloading them as a unix tar file, you must first
490-
create a "vim73" directory. If you instead downloaded the sources as
709+
using Git, Mercurial or by downloading them as a unix tar file, you must
710+
first create a "vim74" directory. If you instead downloaded the sources as
491711
zip files, you can skip this setup as the zip archives already have the
492712
correct directory structure.
493713

494-
A. Create a Vim "runtime" subdirectory named "vim73"
714+
A. Create a Vim "runtime" subdirectory named "vim74"
495715
-----------------------------------------------------
496716
If you obtained your Vim sources as zip files, you can skip this step.
497717
Otherwise, continue reading.
498718

499719
Go to the directory that contains the Vim "src" and "runtime"
500-
directories and create a new subdirectory named "vim73".
720+
directories and create a new subdirectory named "vim74".
501721

502-
Copy the "runtime" files into "vim73":
503-
copy runtime\* vim73
722+
Copy the "runtime" files into "vim74":
723+
copy runtime\* vim74
504724

505-
B. Copy the new binaries into the "vim73" directory
725+
B. Copy the new binaries into the "vim74" directory
506726
----------------------------------------------------
507727
Regardless of how you installed the Vim sources, you need to copy the
508-
new binaries you created above into "vim73":
728+
new binaries you created above into "vim74":
509729

510-
copy src\*.exe vim73
511-
copy src\GvimExt\gvimext.dll vim73
512-
copy src\xxd\xxd.exe vim73
730+
copy src\*.exe vim74
731+
copy src\GvimExt\gvimext.dll vim74
732+
copy src\xxd\xxd.exe vim74
513733

514-
C. Move the "vim73" directory into the Vim installation subdirectory
734+
C. Move the "vim74" directory into the Vim installation subdirectory
515735
---------------------------------------------------------------------
516-
Move the "vim73" subdirectory into the subdirectory where you want Vim
736+
Move the "vim74" subdirectory into the subdirectory where you want Vim
517737
to be installed. Typically, this subdirectory will be named "vim".
518-
If you already have a "vim73" subdirectory in "vim", delete it first
738+
If you already have a "vim74" subdirectory in "vim", delete it first
519739
by running its uninstal.exe program.
520740

521741
D. Install Vim
522742
---------------
523-
"cd" to your Vim installation subdirectory "vim\vim73" and run the
743+
"cd" to your Vim installation subdirectory "vim\vim74" and run the
524744
"install.exe" program. It will ask you a number of questions about
525745
how you would like to have your Vim setup. Among these are:
526746
- You can tell it to write a "_vimrc" file with your preferences in the

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1077,
744746
/**/
745747
1076,
746748
/**/

0 commit comments

Comments
 (0)