I'm in the process of updating Listary Portable, and have run into a snag, due to a change in the format settings are being saved in.
Settings are now being saved in JSON format, and I'm using the nsJSON plugin to handle the file, to be able to change specific values in the file. I've previously tried doing ConfigWrite/ConfigRead, but the app doesn't like the modified file, hence why I'm trying to read/write from the file "properly".
The problem I've encountered, is that there doesn't seem to be any way to add a plugin dll in Custom.nsh so that can be called later on in a different segment.
Here's my Custom.nsh.
Note that this is only my most recent attempt at getting the plugin recognized, and it's still not working. Not sure what to try next.
Also, if this can't be figured out, I'm ok with releasing the app without it for now, although it won't have the disabling of auto-update checking implemented.
Just put a call to !addpluginsdir anywhere in the file (the path should be something like ${PACKAGE}\Other\Source).
That works for me, at least.
Previously known as kAlug.
Ah, it was the ${PACKAGE} variable. I had tried with EXEDIR and wasn't getting anywhere, hence why I tried oninit as above. I'll be sending this to John for posting.
I would put the
!addpluginsdir
immediately after the${SegmentFile}
, but so long as it's before the use of the plugin, it doesn't matter. Also, your .onInit hook shouldn't be necessary at all. It could also be more efficient to put /NOUNLOAD on all the nsJSON::X calls except for the last one (it used to unload plugins each time unless this was specified, not sure if that's still the behvaiour employed). However it is, make sure that the plugin is not left behindI am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1