New cross-platform plugin template for Delphi developers
-
A new Delphi plugin template is available.
It compiles to 32- and 64-bit DLLs that are compatible with current Notepad++ versions.Many thanks to Damjan Cvetko for creating the original template from reusable components extracted from his DBGP plugin.
Related threads:
-
NICE!
Would you like that template linked from the next edition of the User Manual? Right now, it links to the original template, but if you want me to, I could add your updated 32bit/64bit template along side it.
-
@rdipardo said in New cross-platform plugin template for Delphi developers:
from his DBGP plugin
So is there any hope of resurrecting DBGp Plugin for 64-bit now?
Please?
Cheers.
-
Would you like that template linked from the next edition of the User Manual?
That was the intention, yes. But since the Scintilla 5 migration has suddenly broken ground, I should probably take the time to revise the include files first.
-
@michael-vincent,
I haven’t forgotten your request.
At this point I can confidently say this much: DBGP is a masterpiece, full stop. But it’s also a work of its time and place. The (Delphi-only) JVCL libraries it depends on for those fancy tabbed dialogs were written for Delphi 6. (See my remarks about porting NppCalc.) Throw a 64-bit pointer into the mix and the whole thing blows up, often at strange times, like application shutdown. Damjan himself found no better solution for this issue than the following self-confessed hack:{ This is hacking for trouble... We need to unset the Application handler so that the forms don't get berserk and start throwing OS error 1004. This happens because the main NPP HWND is already lost when the DLL_PROCESS_DETACH gets called, and the form tries to allocate a new handler for sending the "close" windows message... } procedure TNppPlugin.BeforeDestruction; begin Application.Handle := 0; Application.Terminate; inherited; end;
Even if this could be ported to 64-bit, I don’t know how it could conscionably be released for general consumption until it was thoroughly tested with a (modern) PHP server. All of which precedes the Scintilla compatibility issues . . .
-
@rdipardo said in New cross-platform plugin template for Delphi developers:
At this point I can confidently say this much: DBGP is a masterpiece, full stop. But it’s also a work of its time and place.
Elegant statement. :-)
Cheers.
-
So is there any hope of resurrecting DBGp Plugin for 64-bit now?
It’s far from stable, but at least it can step into a hello-world script without crashing:
The binaries are online for testing: https://bitbucket.org/rdipardo/dbgp/downloads
I can’t say when or if they’ll be ready for the central plugin repository:To ease migration, I sought out the same vintage version of the JEDI component libraries that Damjan used, but there was no getting a modern IDE to compile such old versions of the Borland sockets library or VirtualTreeView, so I linked in newer ones, at the risk of some undefined behaviour. I’ve already noticed a problem with tooltips leaving artifacts on the screen.
A new JVCL installation means nuking the previous one, or else installing a second IDE first. That can wait until the more critical bugs have been worked out.
-
Updates
1. Template compatibility with future N++ versions
As announced, Scintilla’s
*FULL
messages and structures are slated to completely replace the non-*FULL
equivalents in Notepad++'s code base, somewhat ahead of Scintilla’s own timeline, in which version 6.0 would deprecate the non-*FULL
messages, with 7.0 finally dropping them.As explained in the template README, plugins developed from the
api-v5.2.3
tagged revision or later will provide the new definitions.2. Deprecation of all current DBGp versions
Since DBGp calls into
SCI_GETTEXTRANGE
, the removal of Scintilla’s non-*FULL
APIs will cripple the core functionality of all released versions, both 32- and 64-bit, in a future N++ release.The next version of DBGp will be forward- and backward-compatible: https://bitbucket.org/rdipardo/dbgp/commits/6e09a9d5586827f9d43f5f1403cbcd627837326b