This projects based on NotepadPlusPlusPluginPack.Net
but doesn't required installed Visual C++ and other stuff except of this submodule
(LibToolPath
and LibToolDllPath
has been deleted from NppPlugin.DllExport.targets).
Also it's a bit easy to use.
The main goal is independence of plugin and infrastructure code and simplicity.
- Create plugin solution with .NET project like
MyAwesomePlugin
. - Add submodule https://github.com/KvanTTT/NppNetInf.git to your repository.
- Add a line
<Import Project="$(SolutionDir)NppNetInf\src\DllExport\NppPlugin.DllExport.targets" />
to MyAwesomePlugin.csproj. This target executed after every build and changes assembly for corresponding to Notepad++ format. - Create subdirectory
NppNetInf
inside your projectMyAwesomePlugin
directory and "Add As Link" all *.cs files from NppNetInf submodule (Win32.cs, Scintilla.cs, PluginMain.cs, etc.). - Add a class
Main
that implementsPluginMain
and override required methods and properties (PluginName
,CommandMenuInit
). Also you can override other optional methods (OnNotification(ScNotification notification)
,PluginCleanUp()
,SetToolBarIcon
). - Choose platform (x86 or x64), build project and move compilied assembly to
Notepad++ plugins directory
(as usual
C:\Program Files\Notepad++\plugins
orC:\Program Files (x86)\Notepad++\plugins
). - Open Notepad++ and enjoy your awesome plugin!
At start this infrastructure tries to find plugin Main
class via reflection.
Such Main
class should implement PluginMain
abstract class.
NppGist is built on NppNetInf. It has configured CI with both x86 and x64 builds.
Apache 2.0.