diff src/Make_ming.mak @ 6110:1bff71d20262 v7.4.393

updated for version 7.4.393 Problem: Text drawing on newer MS-Windows systems is suboptimal. Some multi-byte characters are not displayed, even though the same font in Notepad can display them. (Srinath Avadhanula) Solution: Add the 'renderoptions' option to enable Direct-X drawing. (Taro Muraoka)
author Bram Moolenaar <bram@vim.org>
date Wed, 06 Aug 2014 14:52:30 +0200
parents 0defb460a0eb
children ab71bb81b84e
line wrap: on
line diff
--- a/src/Make_ming.mak
+++ b/src/Make_ming.mak
@@ -31,6 +31,8 @@ DEBUG=no
 OPTIMIZE=MAXSPEED
 # set to yes to make gvim, no for vim
 GUI=yes
+# set to yes if you want to use DirectWrite (DirectX)
+DIRECTX=no
 # FEATURES=[TINY | SMALL  | NORMAL | BIG | HUGE]
 # Set to TINY to make minimal version (few features).
 FEATURES=BIG
@@ -456,6 +458,14 @@ endif
 endif
 endif
 
+# DirectWrite (DirectX)
+ifeq ($(DIRECTX),yes)
+# Only allow DirectWrite for a GUI build.
+ifeq (yes, $(GUI))
+DEFINES += -DFEAT_DIRECTX -DDYNAMIC_DIRECTX
+endif
+endif
+
 # Only allow XPM for a GUI build.
 ifeq (yes, $(GUI))
 
@@ -593,6 +603,14 @@ OBJ += $(OUTDIR)/netbeans.o
 LIB += -lwsock32
 endif
 endif
+ifeq ($(DIRECTX),yes)
+# Only allow DIRECTX for a GUI build.
+ifeq (yes, $(GUI))
+OBJ += $(OUTDIR)/gui_dwrite.o
+LIB += -ld2d1 -ldwrite
+USE_STDCPLUS = yes
+endif
+endif
 ifdef XPM
 # Only allow XPM for a GUI build.
 ifeq (yes, $(GUI))
@@ -650,11 +668,7 @@ endif
 ifeq (yes, $(OLE))
 LIB += -loleaut32
 OBJ += $(OUTDIR)/if_ole.o
-ifeq (yes, $(STATIC_STDCPLUS))
-LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
-else
-LIB += -lstdc++
-endif
+USE_STDCPLUS = yes
 endif
 
 ifeq (yes, $(MBYTE))
@@ -678,6 +692,14 @@ endif
 DEFINES+=-DDYNAMIC_ICONV
 endif
 
+ifeq (yes, $(USE_STDCPLUS))
+ifeq (yes, $(STATIC_STDCPLUS))
+LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
+else
+LIB += -lstdc++
+endif
+endif
+
 all: $(TARGET) vimrun.exe xxd/xxd.exe install.exe uninstal.exe GvimExt/gvimext.dll
 
 vimrun.exe: vimrun.c
@@ -751,6 +773,9 @@ INCL = vim.h feature.h os_win32.h os_dos
 $(OUTDIR)/gui_w32.o:	gui_w32.c gui_w48.c $(INCL)
 	$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
 
+$(OUTDIR)/gui_dwrite.o:	gui_dwrite.cpp $(INCL) gui_dwrite.h
+	$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
+
 $(OUTDIR)/if_cscope.o:	if_cscope.c $(INCL) if_cscope.h
 	$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o