diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-04 16:41:24 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-04 16:41:24 +1000 |
commit | b8caeebffe178f292d636e3075de6c4a24c7a56a (patch) | |
tree | 9f70d93731e6cf12a9f09637216fbab35ac506c7 | |
parent | dfedaa13977bcd49c14ac6c45aa86047f88aa6fe (diff) | |
download | scintilla-mirror-b8caeebffe178f292d636e3075de6c4a24c7a56a.tar.gz |
Backport: Remove automatic detection of Direct2D support during build.
DISABLE_D2D may still be defined to remove Direct2D features.
Backport of changeset 6672:9c1997a14d89.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | win32/CheckD2D.cxx | 3 | ||||
-rw-r--r-- | win32/PlatWin.cxx | 2 | ||||
-rw-r--r-- | win32/ScintillaWin.cxx | 2 | ||||
-rw-r--r-- | win32/deps.mak | 1 | ||||
-rw-r--r-- | win32/makefile | 10 | ||||
-rw-r--r-- | win32/scintilla.mak | 7 |
7 files changed, 8 insertions, 21 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 67aeed2ad..d3c1cda8c 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -545,6 +545,10 @@ The STATIC_BUILD preprocessor symbol is no longer used. </li> <li> + On Win32, Direct2D support is no longer automatically detected during build. + DISABLE_D2D may still be defined to remove Direct2D features. + </li> + <li> In some cases, invalid UTF-8 is handled in a way that is a little friendlier. For example, when copying to the clipboard on Windows, an invalid lead byte will be copied as the equivalent ISO 8859-1 character and will not hide the following byte. diff --git a/win32/CheckD2D.cxx b/win32/CheckD2D.cxx deleted file mode 100644 index 80f5d46d2..000000000 --- a/win32/CheckD2D.cxx +++ /dev/null @@ -1,3 +0,0 @@ -// This file is compiled to check whether Direct2D and DirectWrite headers are available. -#include <d2d1.h> -#include <dwrite.h> diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 2eab32b60..00b118c82 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -33,7 +33,7 @@ #include <richedit.h> #include <windowsx.h> -#if defined(NTDDI_WIN7) && !defined(DISABLE_D2D) +#if !defined(DISABLE_D2D) #define USE_D2D 1 #endif diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 07ade8edb..7fdc0cc09 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -33,7 +33,7 @@ #include <zmouse.h> #include <ole2.h> -#if defined(NTDDI_WIN7) && !defined(DISABLE_D2D) +#if !defined(DISABLE_D2D) #define USE_D2D 1 #endif diff --git a/win32/deps.mak b/win32/deps.mak index f4db4cd0f..d504484c2 100644 --- a/win32/deps.mak +++ b/win32/deps.mak @@ -1,4 +1,3 @@ -CheckD2D.o: CheckD2D.cxx HanjaDic.o: HanjaDic.cxx ../src/UniConversion.h HanjaDic.h PlatWin.o: PlatWin.cxx ../include/Platform.h ../lexlib/StringCopy.h \ ../src/XPM.h ../src/UniConversion.h ../src/DBCS.h ../src/FontQuality.h diff --git a/win32/makefile b/win32/makefile index 1d5d4d6c2..b190cc4d5 100644 --- a/win32/makefile +++ b/win32/makefile @@ -43,13 +43,7 @@ LIBS=-lgdi32 -luser32 -limm32 -lole32 -luuid -loleaut32 -lmsimg32 $(LIBSMINGW) # Add -MMD to get dependencies INCLUDEDIRS=-I ../include -I ../src -I../lexlib -# Check if Direct2D headers are available by trying to compile a file that includes them. -# Most distributions of MinGW32 do not include Direct2D support but MinGW64 does. -ifneq "$(shell $(CXX) -c CheckD2D.cxx 2>&1)" "" -D2DFLAGS=-DDISABLE_D2D -endif - -CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) $(D2DFLAGS) -D_CRT_SECURE_NO_DEPRECATE=1 $(CLANG_OPTS) +CXXBASEFLAGS=--std=$(CXXSTD) -Wall -pedantic $(INCLUDEDIRS) -D_CRT_SECURE_NO_DEPRECATE=1 $(CLANG_OPTS) ifdef NO_CXX11_REGEX REFLAGS=-DNO_CXX11_REGEX @@ -84,7 +78,7 @@ endif $(CC) $(CFLAGS) -c $< analyze: - $(CXX) --analyze $(D2DFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx + $(CXX) --analyze $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx deps: $(CXX) -MM $(CXXFLAGS) *.cxx ../src/*.cxx ../lexlib/*.cxx ../lexers/*.cxx >deps.mak diff --git a/win32/scintilla.mak b/win32/scintilla.mak index b61099bdf..a48345745 100644 --- a/win32/scintilla.mak +++ b/win32/scintilla.mak @@ -40,11 +40,6 @@ CXXFLAGS=$(CXXFLAGS) $(NOLOGO) LDFLAGS=$(LDFLAGS) $(NOLOGO) !ENDIF -!IF [cl -c -nologo CheckD2D.cxx >NUL:] -CXXFLAGS=$(CXXFLAGS) -DDISABLE_D2D -!MESSAGE Direct2D is not available -!ENDIF - !IFDEF NO_CXX11_REGEX CXXFLAGS=$(CXXFLAGS) -DNO_CXX11_REGEX !ENDIF @@ -348,8 +343,6 @@ $(DIR_O)\CharacterSet.obj: \ $(DIR_O)\CharClassify.obj: \ ../src/CharClassify.cxx \ ../src/CharClassify.h -$(DIR_O)\CheckD2D.obj: \ - CheckD2D.cxx $(DIR_O)\ContractionState.obj: \ ../src/ContractionState.cxx \ ../include/Platform.h \ |