Old 15th July 2011, 17:25   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
NSIS Command Linker

some weeks ago, i've updated the docs in order to link all commands, but i don't think these have ever been published.

well, it doesn't matter anymore, because now there's this userscript for chrome (runs natively, but it's a bit unreliable) and firefox (requires greasemonkey). it will link all nsis commands to the scripting reference, while you're browsing the winamp forums or the nsis wiki.

unfortunately, this is a rather primitive script and i'd love to improve it over the time. the main problem is probably the current documentation. it works fine for offline use, but it could be better for online use.

to improve the situation, i think it'd be better to have a wiki page for each nsis command or anchors using the command-name rather than ever changing chapters. this allows better linking of commands, which will ultimately improve the script, the linking situation on the forum and will presumably produce better google hits. i'm willing to create wiki entries for each command, i'm not sure if it's desired by the nsis maintainers (let's discuss this!)

anyway, until there's a new nsis version available, the script should work fine.

install nsis.user.js and reload this page to see it working on thisexample:

code:
OutFile example.exe
XPStyle on
SetCompress auto

Section MySection
Nop
SectionEnd

!ifdef addFunction
Function MyFunction
MessageBox MB_OK "We got a function!"
FunctionEnd
!endif



i'm planning to add some common macros, as well as plugins and functions from the nsis wiki. until then, i'm happy about all kinds of feedback!

Last edited by Yathosho; 15th July 2011 at 19:42.
Yathosho is offline   Reply With Quote
Old 18th July 2011, 05:13   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 531
Send a message via ICQ to T.Slappy
Firefox 4 - working fantastic, thanks!

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 18th July 2011, 07:34   #3
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Hi Yathosho,

it's working great on Chrome 12.0.

Would it be somehow possible to implement functionality to have some directory where users can add their own definitions, which will be opened by the script?
That way plugin documentation can be added by users, and won't need an update of the script.
jpderuiter is offline   Reply With Quote
Old 18th July 2011, 07:38   #4
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
One bug though (which doesn't prevent the script from working):

The url is built with:
"http://nsis.sourceforge.net/Docs/"
+
"/Chapter4.html#4.9.4.1"
which results in:
"http://nsis.sourceforge.net/Docs//Chapter4.html#4.9.4.1"
It should be:

"http://nsis.sourceforge.net/Docs/"
+
"Chapter4.html#4.9.4.1"
jpderuiter is offline   Reply With Quote
Old 27th May 2013, 14:40   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
new version out now!

* added NSIS 3.0a0 commands
* modified detection logic
* underlined links, original text color preserved

the script doesn't work too reliable on chrome (or at least there's a delay), but in firefox it works very well

created a wiki page as well:
http://nsis.sourceforge.net/GreaseMonkey_UserScript
Yathosho is offline   Reply With Quote
Old 27th May 2013, 16:41   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
as of 0.2.2, greasemonkey will automatically update the user script once there's a new version
Yathosho is offline   Reply With Quote
Old 11th June 2013, 19:08   #7
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
v0.2.8

there have been a couple of new versions since i last posted here. these are basically the changes since last time:

- added support for FileFunc, TextFunc, WordFunc
- added support for LogicLib
- added support for callback functions
- added support for plugins ("i feel lucky!")

https://github.com/idleberg/NSIS-Linker.user.js
Yathosho is offline   Reply With Quote
Old 13th June 2013, 07:57   #8
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 531
Send a message via ICQ to T.Slappy
Are the new (NSIS 3.0a0) commands supported?

Cool looking installer with custom design: www.graphical-installer.com
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk
Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 13th June 2013, 12:47   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
Quote:
Originally Posted by T.Slappy View Post
Are the new (NSIS 3.0a0) commands supported?
yes (see above)
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
commands, documentation, highlighting, userscript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump