Skip to content

Commit 2aeaf3f

Browse files
committed
patch 8.0.0756: cannot build libvterm with MSVC
Problem: Cannot build libvterm with MSVC. Solution: Add an MSVC Makefile to libvterm. (Yasuhiro Matsumoto, closes #1865)
1 parent 26af85d commit 2aeaf3f

4 files changed

Lines changed: 48 additions & 6 deletions

File tree

src/INSTALLpc.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,17 +706,20 @@ Or when using MinGW (as one line):
706706
13. Building with Terminal support
707707
==================================
708708

709-
Vim with Terminal support can be built with MinGW or Cygwin.
710-
Terminal support require winpty which provide following two files.
709+
Vim with Terminal support can be built with either MSVC, or MinGW or Cygwin.
710+
This uses the included libvterm and winpty. No extra header files or
711+
libraries are needed for building.
712+
713+
Running Vim with terminal support requires the following two winpty files:
711714

712715
winpty.dll
713716
winpty-agent.dll
714717

715-
You can download following page:
718+
You can download them from the following page:
716719

717720
https://github.com/rprichard/winpty
718721

719-
It don't need header files or libraries. Just put them on your PATH.
722+
Just put the DLL files somewhere in your PATH.
720723

721724

722725
14. Windows 3.1x

src/Make_mvc.mak

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
# is yes)
3737
# Global IME support: GIME=yes (requires GUI=yes)
3838
#
39+
# Terminal support: TERMINAL=yes (default is no)
40+
#
3941
# Lua interface:
4042
# LUA=[Path to Lua directory]
4143
# DYNAMIC_LUA=yes (to load the Lua DLL dynamically)
@@ -354,7 +356,8 @@ CSCOPE_DEFS = -DFEAT_CSCOPE
354356
!if "$(TERMINAL)" == "yes"
355357
TERMINAL_OBJ = $(OBJDIR)/terminal.obj
356358
TERMINAL_DEFS = -DFEAT_TERMINAL
357-
TERMINAL_SRC = terminal.c
359+
TERMINAL_SRC = terminal.c
360+
VTERM_LIB = libvterm/vterm.lib
358361
!endif
359362

360363
!ifndef NETBEANS
@@ -1130,7 +1133,7 @@ conflags = $(conflags) /map /mapinfo:lines
11301133
LINKARGS1 = $(linkdebug) $(conflags)
11311134
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
11321135
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
1133-
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
1136+
$(TCL_LIB) $(NETBEANS_LIB) $(VTERM_LIB) $(XPM_LIB) $(LINK_PDB)
11341137

11351138
# Report link time code generation progress if used.
11361139
!ifdef NODEBUG
@@ -1544,5 +1547,9 @@ proto.h: \
15441547
.c.i:
15451548
$(CC) $(CFLAGS) /P /C $<
15461549

1550+
libvterm/vterm.lib :
1551+
cd libvterm
1552+
$(MAKE) /NOLOGO -f Makefile.msc
1553+
cd ..
15471554

15481555
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:

src/libvterm/Makefile.msc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
OBJS = \
2+
src\encoding.c \
3+
src\keyboard.c \
4+
src\mouse.c \
5+
src\parser.c \
6+
src\pen.c \
7+
src\screen.c \
8+
src\state.c \
9+
src\unicode.c \
10+
src\vterm.c
11+
12+
OBJS = \
13+
src\encoding.obj \
14+
src\keyboard.obj \
15+
src\mouse.obj \
16+
src\parser.obj \
17+
src\pen.obj \
18+
src\screen.obj \
19+
src\state.obj \
20+
src\unicode.obj \
21+
src\vterm.obj
22+
23+
all : vterm.lib
24+
25+
26+
.c.obj :
27+
cl /DINLINE= /Iinclude /Fo$@ /c $<
28+
29+
vterm.lib : $(OBJS)
30+
lib /OUT:$@ $(OBJS)

src/version.c

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

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
756,
772774
/**/
773775
755,
774776
/**/

0 commit comments

Comments
 (0)