forums › forums › SQLyog › SQLyog Localization and Source Code Discussions › Scilexer.dll
- This topic is empty.
-
AuthorPosts
-
-
August 8, 2010 at 4:25 pm #12071jan marco alkemaMember
When I put the SciLexer.dll build from the scite220.zip source file in sqlyog-2010080, the Query window does not 'translate' the SQL keywords to upper case and bleu color characters.
To try to get it working I build it from included SQLYog scintilla files:
I overwrite the scintilla (source and include) files from “Checked out revision 261” in http://sourceforge.net/projects/scintilla/files/SciTE/2.20/scite220.zip/download :
cd win32
vsvars32
nmake -f Makefile.mak
I get errors.
Also I put the scintilla files in a standalone programma to build the SciLexer.dll
I get the next compiler errors:
1>
Rebuild All started: Project: SciLexer, Configuration: Debug Win32
1>Deleting intermediate and output files for project 'SciLexer', configuration 'Debug|Win32'
1>Compiling…
1>XPM.cxx
1>AutoComplete.cxx
1>c:devtempSciLexersrcautocomplete.cxx(52) : error C2065: 'location' : undeclared identifier
1>CallTip.cxx
1>CellBuffer.cxx
1>ContractionState.cxx
1>Document.cxx
1>DocumentAccessor.cxx
1>Editor.cxx
1>c:devtempSciLexersrceditor.cxx(4931) : error C2664: 'Editor::PointIsHotspot' : cannot convert parameter 1 from 'int' to 'Point'
1> Constructor for class 'Point' is declared 'explicit'
1>ExternalLexer.cxx
1>Indicator.cxx
1>KeyMap.cxx
1>KeyWords.cxx
1>c:devtempSciLexersrckeywords.cxx(27) : error C2511: 'LexerModule::LexerModule(int,LexerFunction,const char *,LexerFunction,const char *const [])' : overloaded member function not found in 'LexerModule'
1> c:devtempSciLexerincludekeywords.h(16) : see declaration of 'LexerModule'
1>c:devtempSciLexersrckeywords.cxx(199) : fatal error C1004: unexpected end-of-file found
1>LexMySQL.cxx
1>LexSQL.cxx
1>LineMarker.cxx
1>PlatWin.cxx
1>c:devtempSciLexersrcplatwin.cxx(36) : warning C4312: 'reinterpret_cast' : conversion from 'LONG' to 'void *' of greater size
1>c:devtempSciLexersrcplatwin.cxx(96) : error C2065: 'numEntries' : undeclared identifier
.
.
I hope someone can tell me how to compile it to a version of SciLexer.dll that works like the included 'SciLexer.dll' –)
-
August 9, 2010 at 8:55 am #31224vishal.prMember
Hi,
The Scintilla control will style the characters based on the style we give (http://www.scintilla.org/ScintillaDoc.html#Styling). Normally this is done by writing a lexer for the language of choice and then setting the lexer language (http://www.scintilla.org/ScintillaDoc.html#Lexer). The Scintilla version SQLyog uses is 1.72 and thus it uses a different MySQL lexer as compared to the version 2.22. You can check the LexMySQL.cxx and LexMySQL.h for details. Also please take a look at http://www.scintilla.org/Lexer.txt to know more about how to write a lexer.
Regards,
Vishal
-
August 14, 2010 at 4:20 pm #31225jan marco alkemaMember
Vishal, Thank you, for your good advise/feedback —)
//Checked out revision 263, XP, VS2005:
LexMySQL.cxx and LexMySQL.h are not included in http://sourceforge.net/projects/scintilla/files/scintilla/1.72/scintilla172.zip/download I included both files from revision 263. I put entry “LINK_LEXER(lmMySQL);” in file 'KeyWords.cxx'.
The obtained DLL 'SciLexer.dll' works properly in SQLYog!
I prefer to link a static build version of scintilla172 in SQLYog
I build scintilla172 als library output, and linkt it in SQLYog, I changed in WinMain.cpp linenumber 123:
#ifdef STATIC_BUILD
Scintilla_LinkLexers();
Scintilla_RegisterClasses(hinstance);
#else
VERIFY(hsci = ::LoadLibrary(L”SciLexer.dll”));
if(!hsci)
{
DisplayErrorText(GetLastError(), “Error loading SciLexer.dll”);
VERIFY(FreeLibrary(hsci));
return 0;
}
#endif
Static build version works properly also (in 32 bits),
Greeting Jan Marco
-
-
AuthorPosts
- You must be logged in to reply to this topic.