Skip to content

Commit 6384c5d

Browse files
committed
patch 7.4.2340
Problem: MS-Windows: Building with Ruby uses old version. Solution: Update to 2.2.X. Use clearer name for the API version. (Ken Takata)
1 parent 100f5c9 commit 6384c5d

6 files changed

Lines changed: 39 additions & 31 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ MINOR = 4
158158
# - Move gvim.pdb to here.
159159
# - Copy "GvimExt/gvimext.dll" to here.
160160
# - Delete vimrun.exe, install.exe and uninstal.exe.
161-
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
161+
# Win32 GUI version with OLE, PERL, Ruby, TCL, PYTHON and dynamic IME:
162162
# - Install the interfaces you want, see src/INSTALLpc.txt
163163
# - Build:
164164
# > cd src

src/INSTALLpc.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,11 @@ you need some tricks described below.
598598

599599
When building, you need to set the following variables at least:
600600

601-
RUBY: Where ruby is installed. E.g. C:\Ruby22
602-
DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes.
603-
RUBY_VER: Ruby version. E.g. 22 for Ruby 2.2.X.
604-
RUBY_VER_LONG: Ruby API version in a long format.
605-
E.g. 2.2.0 for Ruby 2.2.X.
601+
RUBY: Where ruby is installed. E.g. C:\Ruby22
602+
DYNAMIC_RUBY: Whether dynamic linking is used. Usually, set to yes.
603+
RUBY_VER: Ruby version. E.g. 22 for Ruby 2.2.X.
604+
RUBY_API_VER_LONG: Ruby API version in a long format.
605+
E.g. 2.2.0 for Ruby 2.2.X.
606606

607607
Ruby version vs. Ruby API version:
608608

@@ -653,7 +653,7 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
653653
4) Build Vim. Note that you need to adjust some variables (as one line):
654654

655655
nmake -f Make_mvc.mak
656-
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
656+
RUBY=C:\Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0
657657
RUBY_MSVCRT_NAME=msvcrt
658658
WINVER=0x501
659659

@@ -668,7 +668,7 @@ Using MinGW is easier than using MSVC when linking with RubyInstaller.
668668
After you install RubyInstaller, just type this (as one line):
669669

670670
mingw32-make -f Make_ming.mak
671-
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_VER_LONG=2.2.0
671+
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0
672672
WINVER=0x501
673673

674674
If you set WINVER explicitly, it must be set to >=0x500, when building with

src/Make_cyg_ming.mak

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -348,36 +348,39 @@ endif
348348
# Ruby interface:
349349
# RUBY=[Path to Ruby directory] (Set inside Make_cyg.mak or Make_ming.mak)
350350
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
351-
# RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18)
352-
# RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8)
353-
# You must set RUBY_VER_LONG when changing RUBY_VER.
354-
# RUBY_API_VER is derived from RUBY_VER_LONG.
351+
# RUBY_VER=[Ruby version, eg 19, 22] (default is 22)
352+
# RUBY_API_VER_LONG=[Ruby API version, eg 1.8, 1.9.1, 2.2.0]
353+
# (default is 2.2.0)
354+
# You must set RUBY_API_VER_LONG when changing RUBY_VER.
355355
# Note: If you use Ruby 1.9.3, set as follows:
356356
# RUBY_VER=19
357-
# RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
357+
# RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
358358
ifdef RUBY
359359
ifndef DYNAMIC_RUBY
360360
DYNAMIC_RUBY=yes
361361
endif
362362
# Set default value
363363
ifndef RUBY_VER
364-
RUBY_VER = 18
364+
RUBY_VER = 22
365365
endif
366366
ifndef RUBY_VER_LONG
367-
RUBY_VER_LONG = 1.8
367+
RUBY_VER_LONG = 2.2.0
368+
endif
369+
ifndef RUBY_API_VER_LONG
370+
RUBY_API_VER_LONG = $(RUBY_API_VER_LONG)
368371
endif
369372
ifndef RUBY_API_VER
370-
RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
373+
RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG))
371374
endif
372375

373376
ifndef RUBY_PLATFORM
374377
ifeq ($(RUBY_VER), 16)
375378
RUBY_PLATFORM = i586-mswin32
376379
else
377-
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
380+
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/i386-mingw32),)
378381
RUBY_PLATFORM = i386-mingw32
379382
else
380-
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
383+
ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/x64-mingw32),)
381384
RUBY_PLATFORM = x64-mingw32
382385
else
383386
RUBY_PLATFORM = i386-mswin32
@@ -406,9 +409,9 @@ ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
406409
RUBY_19_OR_LATER = 1
407410
endif
408411

409-
RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
412+
RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
410413
ifdef RUBY_19_OR_LATER
411-
RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
414+
RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
412415
endif
413416
ifeq (no, $(DYNAMIC_RUBY))
414417
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)

src/Make_mvc.mak

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
# Ruby interface:
6868
# RUBY=[Path to Ruby directory]
6969
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
70-
# RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18)
71-
# RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8)
72-
# You must set RUBY_VER_LONG when change RUBY_VER.
73-
# RUBY_API_VER is derived from RUBY_VER_LONG.
70+
# RUBY_VER=[Ruby version, eg 19, 22] (default is 22)
71+
# RUBY_API_VER_LONG=[Ruby API version, eg 1.8, 1.9.1, 2.2.0]
72+
# (default is 2.2.0)
73+
# You must set RUBY_API_VER_LONG when change RUBY_VER.
7474
# Note: If you use Ruby 1.9.3, set as follows:
7575
# RUBY_VER=19
76-
# RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
76+
# RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
7777
#
7878
# Tcl interface:
7979
# TCL=[Path to Tcl directory]
@@ -917,13 +917,16 @@ XSUBPP_TYPEMAP = $(PERL)\lib\ExtUtils\typemap
917917
!ifdef RUBY
918918
# Set default value
919919
!ifndef RUBY_VER
920-
RUBY_VER = 18
920+
RUBY_VER = 22
921921
!endif
922922
!ifndef RUBY_VER_LONG
923-
RUBY_VER_LONG = 1.8
923+
RUBY_VER_LONG = 2.2.0
924+
!endif
925+
!ifndef RUBY_API_VER_LONG
926+
RUBY_API_VER_LONG = $(RUBY_VER_LONG)
924927
!endif
925928
!ifndef RUBY_API_VER
926-
RUBY_API_VER = $(RUBY_VER_LONG:.=)
929+
RUBY_API_VER = $(RUBY_API_VER_LONG:.=)
927930
!endif
928931

929932
!if $(RUBY_VER) >= 18
@@ -966,9 +969,9 @@ RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_API_VER)
966969
CFLAGS = $(CFLAGS) -DFEAT_RUBY
967970
RUBY_OBJ = $(OUTDIR)\if_ruby.obj
968971
!if $(RUBY_VER) >= 19
969-
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
972+
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)" /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)" /I "$(RUBY)\include\ruby-$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
970973
!else
971-
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM)"
974+
RUBY_INC = /I "$(RUBY)\lib\ruby\$(RUBY_API_VER_LONG)\$(RUBY_PLATFORM)"
972975
!endif
973976
RUBY_LIB = $(RUBY)\lib\$(RUBY_INSTALL_NAME).lib
974977
# Do we want to load Ruby dynamically?

src/bigvim.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:: command to build big Vim with OLE, Perl, Python, 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%ruby192 DYNAMIC_RUBY=yes RUBY_VER=19 RUBY_VER_LONG=1.9.2 RUBY_MSVCRT_NAME=msvcrt TCL=%TOOLDIR%tcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes
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%rubyw2 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
55

src/version.c

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

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2340,
766768
/**/
767769
2339,
768770
/**/

0 commit comments

Comments
 (0)