From 1cd26e8ee9577099631a72836197afd101aaaff5 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 4 Apr 2018 16:21:09 +1000 Subject: Backport: Move DLL entry points DllMain and Scintilla_DirectFunction into ScintillaDLL.cxx to simplify build process by eliminating the compilation of ScintillaWin.cxx into ScintillaWinS.o|obj. Backport of changeset 6670:cfe90078d684. --- cppcheck.suppress | 3 --- doc/ScintillaDoc.html | 9 ++++----- doc/ScintillaHistory.html | 14 ++++++++++---- scripts/HeaderOrder.txt | 1 + win32/SciLexer.vcxproj | 1 + win32/ScintillaDLL.cxx | 35 +++++++++++++++++++++++++++++++++ win32/ScintillaWin.cxx | 34 ++++++++++++-------------------- win32/ScintillaWin.h | 15 +++++++++++++++ win32/deps.mak | 1 + win32/makefile | 21 ++++---------------- win32/scintilla.mak | 49 ++++++----------------------------------------- 11 files changed, 89 insertions(+), 94 deletions(-) create mode 100644 win32/ScintillaDLL.cxx create mode 100644 win32/ScintillaWin.h diff --git a/cppcheck.suppress b/cppcheck.suppress index 35b25eac5..edaaa7d36 100644 --- a/cppcheck.suppress +++ b/cppcheck.suppress @@ -15,9 +15,6 @@ unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp // code legibility. passedByValue -// The three private methods DefWndProc, ScrollText, and ModifyScrollBars are called by superclasses -unusedPrivateFunction:scintilla/win32/ScintillaWin.cxx - // Suppress most lexer warnings since the lexers are maintained by others redundantCondition:scintilla/lexers/LexA68k.cxx useInitializationList:scintilla/lexers/LexAsm.cxx diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 2fcc5612b..00b912750 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -8320,12 +8320,11 @@ EM_SETTARGETDEVICE

On Windows, Scintilla is normally used as a dynamic library as a .DLL file. If you want to link Scintilla directly into your application .EXE or .DLL file, then you can link to the static library - bin/libscintilla.lib (or .a if using GCC) and call Scintilla_RegisterClasses. Otherwise, if using an IDE or other build system, then the - STATIC_BUILD preprocessor symbol should be defined and - Scintilla_RegisterClasses called. STATIC_BUILD prevents compiling the - DllMain function which will conflict with any DllMain defined in your - code. Scintilla_RegisterClasses takes the HINSTANCE of your + bin/libscintilla.lib (or .a if using GCC) and call Scintilla_RegisterClasses. + Scintilla_RegisterClasses takes the HINSTANCE of your application and ensures that the "Scintilla" window class is registered.

+

When producing a stand-alone Scintilla DLL, the ScintillaDLL.cxx file should be compiled and + linked in to provide DllMain and Scintilla_RegisterClasses.

Ensuring lexers are linked into Scintilla

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 0324381d2..67aeed2ad 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -531,14 +531,20 @@ Icons Copyright(C) 1998 by Dean S. Jones
-

- Release 3.? -

-