Patch 7.4.2302

60 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 1, 2016, 2:51:35 PM9/1/16
to vim...@googlegroups.com

Patch 7.4.2302
Problem: Default interface versions for MS-Windows are outdated.
Solution: Use Active Perl 5.24, Python 3.5.2. Could only make it work with
Ruby 1.9.2.
Files: src/bigvim.bat, src/bigvim64.bat


*** ../vim-7.4.2301/src/bigvim.bat 2016-01-02 15:06:59.571330038 +0100
--- src/bigvim.bat 2016-09-01 20:48:05.689249907 +0200
***************
*** 1,5 ****
:: command to build big Vim with OLE, Perl, Python, 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%perl522\perl DYNAMIC_PERL=yes PERL_VER=522 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python34 DYNAMIC_PYTHON3=yes PYTHON3_VER=34 RUBY=%TOOLDIR%ruby192 DYNAMIC_RUBY=yes RUBY_VER=19 RUBY_VER_LONG=1.9.2 TCL=%TOOLDIR%tcl TCL_VER=86 TCL_VER_LONG=8.6 DYNAMIC_TCL=yes %1 IME=yes CSCOPE=yes

--- 1,5 ----
:: command to build big Vim with OLE, Perl, Python, 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%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

*** ../vim-7.4.2301/src/bigvim64.bat 2012-08-29 17:32:55.000000000 +0200
--- src/bigvim64.bat 2016-09-01 19:54:43.163505365 +0200
***************
*** 1,7 ****
! :: command to build big Vim 64 bit with OLE, Perl, Python, Ruby and Tcl
:: First run: %VCDIR%\vcvarsall.bat x86_amd64
:: Ruby and Tcl are excluded, doesn't seem to work.
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\"
SET TOOLDIR=E:\
! %VCDIR%\bin\nmake -f Make_mvc.mak CPU=AMD64 GUI=yes OLE=yes PERL=E:\perl514 DYNAMIC_PERL=yes PERL_VER=514 PYTHON=%TOOLDIR%python27 DYNAMIC_PYTHON=yes PYTHON_VER=27 PYTHON3=%TOOLDIR%python32 DYNAMIC_PYTHON3=yes PYTHON3_VER=32 %1 IME=yes CSCOPE=yes

--- 1,7 ----
! :: command to build big Vim 64 bit with OLE, Perl and Python.
:: First run: %VCDIR%\vcvarsall.bat x86_amd64
:: Ruby and Tcl are excluded, doesn't seem to work.
SET VCDIR="C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\"
SET TOOLDIR=E:\
! %VCDIR%\bin\nmake -f Make_mvc.mak CPU=AMD64 GUI=yes OLE=yes PERL=E:\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 %1 IME=yes CSCOPE=yes

*** ../vim-7.4.2301/src/Make_mvc.mak 2016-07-19 16:38:45.507086996 +0200
--- src/Make_mvc.mak 2016-09-01 20:50:25.109513054 +0200
***************
*** 934,940 ****
!else # CPU
RUBY_PLATFORM = x64-mswin64
!endif # CPU
! !if $(MSVCRT_VER) >= 70
RUBY_PLATFORM = $(RUBY_PLATFORM)_$(MSVCRT_VER)
!endif # MSVCRT_VER
!endif # RUBY_PLATFORM
--- 934,940 ----
!else # CPU
RUBY_PLATFORM = x64-mswin64
!endif # CPU
! !if $(MSVCRT_VER) >= 70 && $(RUBY_VER) > 19
RUBY_PLATFORM = $(RUBY_PLATFORM)_$(MSVCRT_VER)
!endif # MSVCRT_VER
!endif # RUBY_PLATFORM
*** ../vim-7.4.2301/src/version.c 2016-09-01 18:32:05.302122915 +0200
--- src/version.c 2016-09-01 20:48:37.136726475 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2302,
/**/

--
I'm writing a book. I've got the page numbers done.

/// Bram Moolenaar -- Br...@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 ///

Ken Takata

unread,
Sep 2, 2016, 9:49:36 AM9/2/16
to vim_dev
Hi Bram,

2016/9/2 Fri 3:51:35 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.2302
> Problem: Default interface versions for MS-Windows are outdated.
> Solution: Use Active Perl 5.24, Python 3.5.2. Could only make it work with
> Ruby 1.9.2.
> Files: src/bigvim.bat, src/bigvim64.bat

As I wrote in INSTALLpc.txt, you need a hack to link with recent Ruby.
(If you use a binary from rubyinstaller.org .)
You need to generate config.h from Ruby's source code. Also you need to set
RUBY_MSVCRT_NAME=msvcrt .
The build script in vim-win32-installer uses this hack.
https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L113-L122
https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L163

BTW, which ruby binary do you use? Maybe ruby-1.9.2-p136-i386-mswin32.zip
form http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html ?
If you use this, you also need to set RUBY_VER_LONG=1.9.1 instead of 1.9.2.
Because Ruby 1.9.2's API version is 1.9.1 and RUBY_VER_LONG is used for
specifying API version.

I think the name RUBY_VER_LONG is confusing. Renaming to RUBY_API_VER_LONG
makes the thing clearer. (But the name is long.)

Regards,
Ken Takata

Bram Moolenaar

unread,
Sep 2, 2016, 1:34:31 PM9/2/16
to Ken Takata, vim_dev

Ken Takata wrote:

> 2016/9/2 Fri 3:51:35 UTC+9 Bram Moolenaar wrote:
> > Patch 7.4.2302
> > Problem: Default interface versions for MS-Windows are outdated.
> > Solution: Use Active Perl 5.24, Python 3.5.2. Could only make it work with
> > Ruby 1.9.2.
> > Files: src/bigvim.bat, src/bigvim64.bat
>
> As I wrote in INSTALLpc.txt, you need a hack to link with recent Ruby.
> (If you use a binary from rubyinstaller.org .)
> You need to generate config.h from Ruby's source code. Also you need to set
> RUBY_MSVCRT_NAME=msvcrt .
> The build script in vim-win32-installer uses this hack.
> https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L113-L122
> https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L163

I tried part of this and it failed. I'll give it another try.

> BTW, which ruby binary do you use? Maybe ruby-1.9.2-p136-i386-mswin32.zip
> form http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html ?
> If you use this, you also need to set RUBY_VER_LONG=1.9.1 instead of 1.9.2.
> Because Ruby 1.9.2's API version is 1.9.1 and RUBY_VER_LONG is used for
> specifying API version.

Yes, that's what I used before. I renamed the directory.

> I think the name RUBY_VER_LONG is confusing. Renaming to RUBY_API_VER_LONG
> makes the thing clearer. (But the name is long.)

Yes, that's better.

--
Never eat yellow snow.

Ken Takata

unread,
Sep 3, 2016, 5:32:14 AM9/3/16
to vim_dev, ktakat...@gmail.com
Hi Bram,

2016/9/3 Sat 2:34:31 UTC+9 Bram Moolenaar wrote:
> Ken Takata wrote:
>
> > 2016/9/2 Fri 3:51:35 UTC+9 Bram Moolenaar wrote:
> > > Patch 7.4.2302
> > > Problem: Default interface versions for MS-Windows are outdated.
> > > Solution: Use Active Perl 5.24, Python 3.5.2. Could only make it work with
> > > Ruby 1.9.2.
> > > Files: src/bigvim.bat, src/bigvim64.bat
> >
> > As I wrote in INSTALLpc.txt, you need a hack to link with recent Ruby.
> > (If you use a binary from rubyinstaller.org .)
> > You need to generate config.h from Ruby's source code. Also you need to set
> > RUBY_MSVCRT_NAME=msvcrt .
> > The build script in vim-win32-installer uses this hack.
> > https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L113-L122
> > https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat#L163
>
> I tried part of this and it failed. I'll give it another try.
>
> > BTW, which ruby binary do you use? Maybe ruby-1.9.2-p136-i386-mswin32.zip
> > form http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html ?
> > If you use this, you also need to set RUBY_VER_LONG=1.9.1 instead of 1.9.2.
> > Because Ruby 1.9.2's API version is 1.9.1 and RUBY_VER_LONG is used for
> > specifying API version.
>
> Yes, that's what I used before. I renamed the directory.

Oh, that was incorrect. RUBY_VER_LONG is also used for the name of ruby's DLL.
The Vim binary with your configuration will try to load msvcrt-ruby192.dll, but
actual filename is msvcrt-ruby191.dll.


> > I think the name RUBY_VER_LONG is confusing. Renaming to RUBY_API_VER_LONG
> > makes the thing clearer. (But the name is long.)
>
> Yes, that's better.

Okay, I wrote a patch for this. RUBY_VER_LONG can be still used for backward
compatibility, but if RUBY_API_VER_LONG is defined, it overrides RUBY_VER_LONG.

And, when I wrote the patch, I found that makefiles for cygwin/mingw don't
have modelines. So I copied them from Make_mvc.mak. (But they differ from
Makefile. I'm not sure which modelines are prefer.)

Regards,
Ken Takata

rename-to-RUBY_API_VER_LONG.patch
add-modelines-to-cygming-makefiles.patch

Bram Moolenaar

unread,
Sep 3, 2016, 11:34:21 AM9/3/16
to Ken Takata, vim_dev
I believe we had this discussion before. The dll must have the actual
version to work properly. So it's named msvcrt-ruby192.dll. I know
that on MS-Windows there is this weird habit of giving libraries the
same name even when it's a different version. That is bad, you can't
see what version you actually have. Well, I suppose it's because
Windows has no way to distinguish between major and minor version
numbers. Hell, it doesn't know anything about version numbers.

> > > I think the name RUBY_VER_LONG is confusing. Renaming to
> > > RUBY_API_VER_LONG makes the thing clearer. (But the name is long.)
> >
> > Yes, that's better.
>
> Okay, I wrote a patch for this. RUBY_VER_LONG can be still used for
> backward compatibility, but if RUBY_API_VER_LONG is defined, it
> overrides RUBY_VER_LONG.
>
> And, when I wrote the patch, I found that makefiles for cygwin/mingw don't
> have modelines. So I copied them from Make_mvc.mak. (But they differ from
> Makefile. I'm not sure which modelines are prefer.)

Thanks.

--
hundred-and-one symptoms of being an internet addict:
148. You find it easier to dial-up the National Weather Service
Weather/your_town/now.html than to simply look out the window.
Reply all
Reply to author
Forward
0 new messages