diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-18 21:59:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-18 21:59:36 +0200 |
commit | b5b95750a688d1fabafc6dbc2f31df90d5b5a17e (patch) | |
tree | ecc187fd1ef6bf86dd7494e6f995958b4eac6e51 | |
parent | 678e480529bce7ba3c09e71233249e3b56531b24 (diff) | |
download | vim-git-7.4.1944.tar.gz |
patch 7.4.1944v7.4.1944
Problem: Win32: Cannot compile with XPM feature using VC2015
Solution: Add XPM libraries compiled with VC2015, and enable to build
gvim.exe which supports XPM using VC2015. (Ken Takata)
-rw-r--r-- | src/Make_mvc.mak | 95 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/xpm/x64/lib-vc14/libXpm.lib | bin | 0 -> 121904 bytes | |||
-rw-r--r-- | src/xpm/x86/lib-vc14/libXpm.lib | bin | 0 -> 86422 bytes |
4 files changed, 57 insertions, 40 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index c4529b72b..f1e3f0138 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -255,6 +255,45 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes !endif +# Check VC version. +!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] +!message *** ERROR +!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. +!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. +!error Make aborted. +!else +!include msvcver.~ +!if [del msvcver.c msvcver.~] +!endif +!endif + +!if $(MSVCVER) < 1900 +MSVC_MAJOR = ($(MSVCVER) / 100 - 6) +MSVCRT_VER = ($(MSVCVER) / 10 - 60) +!else +MSVC_MAJOR = ($(MSVCVER) / 100 - 5) +MSVCRT_VER = ($(MSVCVER) / 10 - 50) +!endif + +# Calculate MSVCRT_VER +!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0 +!include msvcrtver.~ +!if [del msvcrtver.~] +!endif +!endif + +# Base name of the msvcrXX.dll +!if $(MSVCRT_VER) <= 60 +MSVCRT_NAME = msvcrt +!else +MSVCRT_NAME = msvcr$(MSVCRT_VER) +!endif + +!if $(MSVC_MAJOR) == 6 +CPU = ix86 +!endif + + # Flag to turn on Win64 compatibility warnings for VC7.x and VC8. WP64CHECK = /Wp64 @@ -294,8 +333,9 @@ CHANNEL = $(GUI) !endif !endif -# Only allow NETBEANS and XPM for a GUI build and CHANNEL. +# GUI sepcific features. !if "$(GUI)" == "yes" +# Only allow NETBEANS for a GUI build and CHANNEL. !if "$(NETBEANS)" == "yes" && "$(CHANNEL)" == "yes" # NETBEANS - Include support for Netbeans integration NETBEANS_PRO = proto/netbeans.pro @@ -317,8 +357,11 @@ DIRECTX_INCL = gui_dwrite.h DIRECTX_OBJ = $(OUTDIR)\gui_dwrite.obj !endif +# Only allow XPM for a GUI build. !ifndef XPM -# XPM is not set, use the included xpm files, depending on the architecture. +!ifndef USE_MSVCRT +# Both XPM and USE_MSVCRT are not set, use the included xpm files, depending +# on the architecture. !if "$(CPU)" == "AMD64" XPM = xpm\x64 !elseif "$(CPU)" == "i386" @@ -326,13 +369,22 @@ XPM = xpm\x86 !else XPM = no !endif -!endif +!else # USE_MSVCRT +XPM = no +!endif # USE_MSVCRT +!endif # XPM !if "$(XPM)" != "no" # XPM - Include support for XPM signs # See the xpm directory for more information. XPM_OBJ = $(OBJDIR)/xpm_w32.obj XPM_DEFS = -DFEAT_XPM_W32 +!if $(MSVC_MAJOR) >= 14 +# VC14 cannot use a library built by VC12 or eariler, because VC14 uses +# Universal CRT. +XPM_LIB = $(XPM)\lib-vc14\libXpm.lib +!else XPM_LIB = $(XPM)\lib\libXpm.lib +!endif XPM_INC = -I $(XPM)\include -I $(XPM)\..\include !endif !endif @@ -395,43 +447,6 @@ DEL_TREE = deltree /y INTDIR=$(OBJDIR) OUTDIR=$(OBJDIR) -!if [echo MSVCVER=_MSC_VER> msvcver.c && $(CC) /EP msvcver.c > msvcver.~ 2> nul] -!message *** ERROR -!message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH. -!message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed. -!error Make aborted. -!else -!include msvcver.~ -!if [del msvcver.c msvcver.~] -!endif -!endif - -!if $(MSVCVER) < 1900 -MSVC_MAJOR = ($(MSVCVER) / 100 - 6) -MSVCRT_VER = ($(MSVCVER) / 10 - 60) -!else -MSVC_MAJOR = ($(MSVCVER) / 100 - 5) -MSVCRT_VER = ($(MSVCVER) / 10 - 50) -!endif - -# Calculate MSVCRT_VER -!if [(set /a MSVCRT_VER="$(MSVCRT_VER)" > nul) && set MSVCRT_VER > msvcrtver.~] == 0 -!include msvcrtver.~ -!if [del msvcrtver.~] -!endif -!endif - -# Base name of the msvcrXX.dll -!if $(MSVCRT_VER) <= 60 -MSVCRT_NAME = msvcrt -!else -MSVCRT_NAME = msvcr$(MSVCRT_VER) -!endif - -!if $(MSVC_MAJOR) == 6 -CPU = ix86 -!endif - # Convert processor ID to MVC-compatible number !if $(MSVC_MAJOR) < 8 !if "$(CPUNR)" == "i386" diff --git a/src/version.c b/src/version.c index 52097f674..d1683fecb 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1944, +/**/ 1943, /**/ 1942, diff --git a/src/xpm/x64/lib-vc14/libXpm.lib b/src/xpm/x64/lib-vc14/libXpm.lib Binary files differnew file mode 100644 index 000000000..db79b4a89 --- /dev/null +++ b/src/xpm/x64/lib-vc14/libXpm.lib diff --git a/src/xpm/x86/lib-vc14/libXpm.lib b/src/xpm/x86/lib-vc14/libXpm.lib Binary files differnew file mode 100644 index 000000000..7010d30ee --- /dev/null +++ b/src/xpm/x86/lib-vc14/libXpm.lib |