aboutsummaryrefslogtreecommitdiffhomepage
path: root/check.mak
diff options
context:
space:
mode:
Diffstat (limited to 'check.mak')
-rw-r--r--check.mak77
1 files changed, 5 insertions, 72 deletions
diff --git a/check.mak b/check.mak
index b5cbf5526..69a61f3e4 100644
--- a/check.mak
+++ b/check.mak
@@ -8,7 +8,6 @@
# make -f check.mak test # run all tests
# make -f check.mak bait # run test GTK program
# make -f check.mak dmapp # run test Win32 program using WINE
-# make -f check.mak lexilla # run test Win32 program with Lexilla
# make -f check.mak jinx # run test curses program with Lua LPeg lexers
# make -f check.mak gen # update all version info and dates based on
# version.txt and the current date
@@ -236,12 +235,9 @@ bait: | /tmp/scintilla/gtk/bait
wget -O $@ https://www.scintilla.org/bait.zip
# dmapp test program for Win32.
-# There are two configurations: one that uses the standard SciLexer.dll, and one
-# that uses the standard Scintilla.dll (no lexers) with a Lexilla.dll from
-# SciTE 4.x+. Since the test program is mean to be build on Windows, create a
-# makefile for cross-compiling from Linux and also patch the test program to
-# support the Lexilla configuration.
-dmapp_dlls = $(addprefix /tmp/scintilla/win32/dmapp/,Scintilla.dll SciLexer.dll Lexilla.dll)
+# Since the test program is mean to be build on Windows, create a makefile for
+# cross-compiling from Linux.
+dmapp_dlls = /tmp/scintilla/win32/dmapp/SciLexer.dll
define _dmapp_makefile
ALL: DMApp.exe
DMApp.o: DMApp.cxx ; i686-w64-mingw32-g++ -std=c++11 -I ../../include -c $< -o $@
@@ -250,89 +246,26 @@ DMApp.exe: DMApp.o DMApp_rc.o ; i686-w64-mingw32-g++ $^ -o $@ -lkernel32 -luser3
clean: ; rm -f *.exe *.o *.res
endef
export dmapp_makefile = $(value _dmapp_makefile)
-define _dmapp_patch
---- a/DMApp.cxx 2000-03-08 01:37:03.000000000 -0500
-+++ b/DMApp.cxx 2020-06-07 10:13:31.328183977 -0400
-@@ -4,6 +4,7 @@
- #include <windows.h>
- #include <richedit.h>
-
-+#include "ILexer.h"
- #include "Scintilla.h"
- #include "SciLexer.h"
- #include "resource.h"
-@@ -20,6 +21,7 @@
- HWND currentDialog;
- HWND wMain;
- HWND wEditor;
-+ bool lexilla;
- bool isDirty;
- char fullPath[MAX_PATH];
-
-@@ -56,6 +58,7 @@
- currentDialog = 0;
- wMain = 0;
- wEditor = 0;
-+ lexilla = false;
- isDirty = false;
- fullPath[0] = '\\0';
- }
-@@ -335,7 +338,13 @@
-
- void DMApp::InitialiseEditor() {
- SendEditor(SCI_SETLEXER, SCLEX_HTML);
-- SendEditor(SCI_SETSTYLEBITS, 7);
-+ if (lexilla) {
-+ typedef Scintilla::ILexer5 *(__stdcall *CreateLexerFn)(const char *name);
-+ auto fp = ::GetProcAddress(::LoadLibrary("Lexilla.dll"), "CreateLexer");
-+ CreateLexerFn f;
-+ memcpy(&f, &fp, sizeof(CreateLexerFn));
-+ SendEditor(SCI_SETILEXER, 1, reinterpret_cast<LPARAM>(f("hypertext")));
-+ }
-
- SendEditor(SCI_SETKEYWORDS, 0,
- reinterpret_cast<LPARAM>(htmlKeyWords));
-@@ -539,11 +548,12 @@
- int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdShow) {
-
- app.hInstance = hInstance;
-+ app.lexilla = lpszCmdLine[0] == 'X';
-
- HACCEL hAccTable = LoadAccelerators(hInstance, "DMApp");
-
- //::LoadLibrary("Scintilla.DLL");
-- ::LoadLibrary("SciLexer.DLL");
-+ ::LoadLibrary(!app.lexilla ? "SciLexer.DLL" : "Scintilla.DLL");
-
- RegisterWindowClass();
-
-endef
-export dmapp_patch = $(value _dmapp_patch)
dmapp: /tmp/scintilla/win32/dmapp/DMApp.exe
WINEPREFIX=$(dir $<)/wine WINEARCH=win32 wine $<
lexilla: /tmp/scintilla/win32/dmapp/DMApp.exe
WINEPREFIX=$(dir $<)/wine WINEARCH=win32 wine $< X
/tmp/scintilla/win32/dmapp/DMApp.exe: $(dmapp_dlls) | /tmp/scintilla/win32/dmapp
make -C $|
-$(dmapp_dlls): /tmp/scintilla/scite.zip | /tmp/scintilla/win32/dmapp
+$(dmapp_dlls): | /tmp/scintilla/win32/dmapp
rm -f $|/../Catalogue.o $|/../ScintillaBase.o
make -C $(dir $|) CXX=/opt/mingw-w64/bin/i686-w64-mingw32-g++ \
AR=/opt/mingw-w64/bin/i686-w64-mingw32-ar \
RANLIB=/opt/mingw-w64/bin/i686-w64-mingw32-ranlib \
WINDRES=/opt/mingw-w64/bin/i686-w64-mingw32-windres -j4
cd $| && ln -sf ../../bin/*.dll .
- unzip -d $| $< wscite/Lexilla.dll && mv $|/wscite/* $|
/tmp/scintilla/win32/dmapp: /tmp/scintilla/dmapp.zip | /tmp/scintilla
mkdir $@
unzip -d $@ $<
- perl -pi -e 's/\r\n/\n/g' $@/DMApp.cxx
+ sed -i -e '/SCI_SETSTYLEBITS/d' $@/DMApp.cxx
echo "$$dmapp_makefile" > $@/makefile
- echo "$$dmapp_patch" > $@/patch
- cd $@ && patch -p1 < patch
/tmp/scintilla/dmapp.zip: | /tmp/scintilla
wget -O $@ https://www.scintilla.org/dmapp.zip
-/tmp/scintilla/scite.zip: | /tmp/scintilla
- wget -O $@ https://www.scintilla.org/wscite32_443.zip
# jinx test program for curses.
jinx: | /tmp/scintilla/curses/jinx