hi,
im currently writing a small plugin for nsis based on the exdll example, which handles some file functions by itself.
now i need to resolve a nsis path like "$DESKTOP\blah" within the plugin, but couldnt find any solutions (am i missing some dev docs here?)
any hints are welcome
plugin development
5 posts
NSIS doesn't provide any plug-in API to do that, but you can call SHGetSpecialFolderLocation yourself. There's a usage example in GetNSISString in Source\exehead\util.c.
yeah i know, but it would be nice to use that vars directly. most of the path constants eg depend on SetShellVarContext, its just too many cases
atm i push $INSTDIR $DESKTOP etc and do a search&replace in a plugin function.
thx for the reply
btw: i tried this, but failed. any solution for this?
- set a user var in the plugin. string contains eg $DESKTOP
- installerscript "resolves" these tokens
- push them back for use in the plugin
i tried a few things, but i keep failing at step 2
atm i push $INSTDIR $DESKTOP etc and do a search&replace in a plugin function.
thx for the reply
btw: i tried this, but failed. any solution for this?
- set a user var in the plugin. string contains eg $DESKTOP
- installerscript "resolves" these tokens
- push them back for use in the plugin
i tried a few things, but i keep failing at step 2
It's probably easier to pass them as plugin parameters I guess.
e.g.
/EXEDIR $EXEDIR etc
-Stu
e.g.
/EXEDIR $EXEDIR etc
-Stu
The resolving of the variables is done in the compiler. The compiler (makensis) pre-processes the strings and turns each variable and constant into a special sign, taking two to three bytes, that the installer itself can interpret. You can not pre-process the strings yourself in a plug-in.