Skip to content

Commit 1c45294

Browse files
committed
update the nppPluginList verification instructions to make it more clear (especially for finding the debug binaries)
1 parent eeb04c0 commit 1c45294

File tree

1 file changed

+47
-27
lines changed

1 file changed

+47
-27
lines changed

content/docs/plugins.md

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -377,38 +377,57 @@ It needs **Plugin List** (see next section) to work.
377377
A list in JSON format wrapped in a dll contains the most popular Notepad++ plugins.
378378
This list which is maintained by the team, is also an open source project hosted
379379
in the GitHub: https://github.com/notepad-plus-plus/nppPluginList/.
380-
Any plugin is welcome to join in the list.
380+
Any publicly-downloadable plugin is welcome to be submitted to the list.
381381

382382
### Test your plugins locally
383383

384384
For testing your plugin for listing, installation, removal and update under
385-
Plugin Admin, you need Notepad++ binary in debug mode
385+
Plugin Admin, these are the steps you need:
386+
387+
1. Get a recent Notepad++ installation; or, recommended, a portable unzip
388+
- (For the purpose of these instructions, the directory of this installation
389+
or portable unzip will be referred to as `<DebugDirectory>`)
390+
2. Get a debug binary, which is required for trying out the locally-edited nppPluginList:
391+
- the debug binaries might be available for
386392
[32-bit](https://notepad-plus-plus.org/assets/pluginListTestTools/npp.debug.x32.zip)
387393
or [64-bit](https://notepad-plus-plus.org/assets/pluginListTestTools/npp.debug.x64.zip),
388-
the latest version of wingup
389-
[32-bit](https://notepad-plus-plus.org/assets/pluginListTestTools/wingup.release.x32.zip)
390-
or
391-
[64-bit](https://notepad-plus-plus.org/assets/pluginListTestTools/wingup.release.x64.zip)
392-
and nppPluginList.json (you should rename it from `pl.x64.json` or `pl.x86.json`,
393-
according your plugin's architecture). Replace `notepad++.exe` and `GUP.exe` of your
394-
Notepad++ installation by downloaded ones, copy `pl.x64.json` or `pl.x86.json` to
395-
`<NPP_INST_DIR>\plugins\Config\nppPluginList.json`, then
396-
you're all set - the menu item **Plugins Admin** will be under menu **Plugins** of your
397-
debug mode notepad++.exe. Launch this command will launch the **Plugins Admin** dialog
398-
and the rest should be intuitive.
394+
depending on your architecture.
395+
- If those links give you problems, you can also git a debug binary from a recent build on
396+
GitHub.
397+
1. Go to https://github.com/notepad-plus-plus/notepad-plus-plus/releases/latest
398+
2. Click on the <span style="color: green">green ✓</span> or <span style="color: red">red ✗</span> near the top of that page.
399+
3. Click one of the **details** links (it doesn’t actually matter which) in the popup.
400+
4. Click on the **🏠 Summary** link, and scroll down to the **Artifacts** section
401+
5. Download the artifact `Notepad++.MSVC.<XXX>.Debug`, which will download a zipfile. The `<XXX>` is the Architecture of the installation:
402+
- `x86`: for 32-bit Notepad++
403+
- `x64`: for 64-bit Notepad++
404+
- `ARM64`: for ARM64 builds of Notepad++
405+
6. Extract the `.exe` from the downloaded zipfile, rename it to `notepad++.<XXX>.dbg.exe`, and save it alongside the normal `notepad++.exe` in the `<DebugDirectory>`.
406+
- If it's been so long since the last release that GitHub has cleaned out the last release's Artifacts,
407+
go to https://github.com/notepad-plus-plus/notepad-plus-plus/actions and find the most-recent commit to the `master`,
408+
click on that commit, then follow the instructions from the "**🏠 Summary** link" and following (sub-steps 4-6, above)
409+
3. Get the JSON for nppPluginList:
410+
- If you have a fork of the nppPluginList repo (with a branch for making your copies), you can use the copies there.
411+
- If you haven't done a fork yet (you will need to in order to create a PR), you can access them from https://github.com/notepad-plus-plus/nppPluginList/tree/master/src as well.
412+
- Grab the `pl.<XXX>.json` as appropriate, and save it as `<DebugDirectory>\Plugins\Config\nppPluginList.json`
413+
4. Edit `nppPluginList.json`, adding or updating the entry for your plugin per the rules in the next section, below.
414+
5. Launch the `<DebugDirectory>\notepad++.<XXX>.dbg.exe`.
415+
6. You should be able to use **Plugins > Plugins Admin** to install your new or updated plugin.
399416

400417
### Rules for adding your plugins into list
401418

402-
1. Architecture: your 32-bits plugin should be added to
403-
[pl.x86.json](https://github.com/notepad-plus-plus/nppPluginList/blob/master/src/pl.x86.json),
404-
64-bits plugin should be added to [pl.x64.json](https://github.com/notepad-plus-plus/nppPluginList/blob/master/src/pl.x64.json).
405-
2. Unicity: the value of **folder-name** of your plugin should be unique in the list.
419+
1. Architecture:
420+
- The 32-bit copy of the plugin should be added to
421+
[pl.x86.json](https://github.com/notepad-plus-plus/nppPluginList/blob/master/src/pl.x86.json)
422+
- The 64-bit copy of the plugin should be added to [pl.x64.json](https://github.com/notepad-plus-plus/nppPluginList/blob/master/src/pl.x64.json)
423+
- The ARM64 copy of the plugin should be added to [pl.arm64.json](https://github.com/notepad-plus-plus/nppPluginList/blob/master/src/pl.arm64.json)
424+
2. Uniqueness: the value of **folder-name** of your plugin should be unique in the list.
406425
it means if there's already another same name plugin in the list, you have to rename
407426
your plugin's folder-name (and your plugin). Keep in mind that your plugin binary
408427
name (w/o the extension .dll) should be always the same as the folder-name,
409428
otherwise your plugins won't be loaded.
410-
3. Security: the value of **id** is plugin package's (zip file) finger print in
411-
SHA-256. This id is checked with the downloaded dll to avoid
429+
3. Security: the value of **id** is the SHA-256 fingerprint of the plugin package's zip file.
430+
This id is checked against the downloaded zipfile to avoid
412431
[MITM](https://en.wikipedia.org/wiki/Man-in-the-middle_attack).
413432
You can use Notepad++ to get your plugin's SHA-256 hash
414433
(Menu: **Tools > SHA-256 > Generate from files...**) or some online sha256 generators.
@@ -418,10 +437,11 @@ and the rest should be intuitive.
418437
Please check [Microsoft's document about binary version](https://docs.microsoft.com/en-us/windows/desktop/menurc/versioninfo-resource)
419438
for setting the version correctly onto your DLL.
420439
5. Download location: the value of **repository** is the URL where Plugin Admin can
421-
download the plugin to install/update it.
440+
download the plugin to install/update it. (It must be a link to a downloadable `.zip`,
441+
not just a link to the repository.)
422442
6. Packaging: Only zip package is supported. Your plugin (DLL) should have the same
423443
name as the **folder-name** and the plugin DLL file should be placed at the root
424-
level of the ZIP file. Otherwise Plugin Admin won't install it. Any additionals
444+
level of the ZIP file. Otherwise Plugin Admin won't install it. Any additional
425445
files (DLL or data) can be placed at the root level or in an arbitrary subfolder.
426446
7. Compatibility: In March 2022, two new parameters were added to the JSON file format,
427447
to indicate your plugin's compatibility with various versions of Notepad++, called
@@ -463,8 +483,8 @@ and the rest should be intuitive.
463483
through Notepad++ v8.2.1, the two attributes in the JSON should look like:
464484
```
465485
"version": "2.7",
466-
"npp-compatible-versions": "[8.3.1,]",
467-
"old-versions-compatibility": "[,2.6][,8.2.1]",
486+
"npp-compatible-versions": "[8.3.1,]",
487+
"old-versions-compatibility": "[,2.6][,8.2.1]",
468488
```
469489
(Where the first line gives the recent plugin version, the second line is telling
470490
what versions of Notepad++ the new plugin works with, and the third line explains
@@ -482,10 +502,10 @@ and the rest should be intuitive.
482502
483503
### Do your PR to join plugin list
484504
485-
Once your test has been done, and everything is ok, you can fork and do your PR on:
486-
https://github.com/notepad-plus-plus/nppPluginList/. Only the json part you should
487-
modify. The json file will be built into the a binary (`nppPluginList.dll`), which will
488-
be signed (for thes sake of security) and be included in the official distribution.
505+
Once your test has been done, and everything is working, you can fork and do your PR on:
506+
https://github.com/notepad-plus-plus/nppPluginList/. Only modify the JSON files for your
507+
submission. Those JSON files will be built into the a binary (`nppPluginList.dll`), which will
508+
be signed (for the sake of security) and be included in the official distribution.
489509
490510
### Questions & support
491511

0 commit comments

Comments
 (0)