Arrays in NSIS: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (inline links)
 
(25 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{PageAuthor|Afrow UK}}
{{PageAuthor|Afrow UK}}


NSIS is currently missing array support.
NSIS is currently missing '''native''' array support. There are only fixed length variables; no arrays or structures of any kind. A feature request has been submitted to add array support to NSIS [http://sourceforge.net/tracker/index.php?func=detail&aid=1414916&group_id=22049&atid=373088]. In the meantime, this page lists plug-ins to allow one to store and manipulate dynamically sized arrays of data.
There are only single-dimensional variables, no arrays or structures of any kind.


A feature request has been submitted to fix this issue and add array support to NSIS [http://sourceforge.net/tracker/index.php?func=detail&aid=1414916&group_id=22049&atid=373088].
== Array Header File ==
The Array header (nsh) file is a collection of macros and functions that simulates arrays in native NSIS (link at the bottom). This is no longer supported. You should use one of the plug-ins below instead.
 
== nsArray plug-in ==
A much simpler and smaller DLL than NSISArray (below). Provides less out-of-the-box functionality but is faster and uses less memory. Supports any number of named dynamic arrays, indexed or hashed arrays, value getting, setting, insertion, removal, copying, joining and sorting (via quick sort algo.). DLL is only 6KB (ANSI & Unicode).
 
<attach>NsArray.zip</attach> ''by Afrow UK''


Meanwhile, two solutions have been created by Afrow UK, to work with arrays in NSIS:
== NSISArray plug-in (deprecated) ==
The plug-in features full '''dynamic''' array support for NSIS, though not with native commands.
The .dll file handles everything related to the arrays on runtime while the NSISArray script header adds friendly scripting syntax for working with arrays that masks the plug-in's function calls.


== Array Header File ==
<font color=red><strong>Please use the nsArray plug-in instead. It is faster and uses much less memory.</strong></font>
The Array Header File is a collection of macros and functions that simulate arrays in native NSIS.
 
It has been superseeded by the NSISArray.dll PlugIn, which is faster and offers more advanced options.
<strike><attach>NSISArray.zip</attach> ''by Afrow UK''</strike>
 
== Stack plug-in ==
The [[Stack plug-in]] allows you to manipulate the NSIS run-time stack while also creating your own private stacks.
 
<attach>Stack.zip</attach> ''by Instructor''


== NSISArray plug-in ==
== NSISList plug-in ==
The plug-in features full array support for NSIS, though not with native commands.
The [[NSISList plug-in]] allows you to create, manage and manipulate several independent '''lists''' (''dynamic arrays'') and/or '''maps''' (''associative arrays'', aka ''dictionaries'') in your NSIS installer. The plug-in provides a lot of functionality but at the cost of a fairly large DLL (~100KB).
The .dll file handles everything related to the arrays on runtime.


<attach>NSISArray.zip</attach>
<attach>NSISList-Plugin.zip</attach> ''by LoRd_MuldeR''
''Also includes documentation and example files''


== Links ==
== Links ==
* [http://forums.winamp.com/showthread.php?threadid=222275 Forum thread for the plug-in]
* [http://forums.winamp.com/showthread.php?t=330425 nsArray plug-in forum topic]
* [http://forums.winamp.com/showthread.php?t=222275 NSISArray plug-in forum topic]
* [[Image:Zip.gif]] [http://myweb.tiscali.co.uk/imker/downloads/Array.zip Old NSIS script header that uses INI files] (6 KB) ''Old script header''
* [[Image:Zip.gif]] [http://myweb.tiscali.co.uk/imker/downloads/Array.zip Old NSIS script header that uses INI files] (6 KB) ''Old script header''


[[Category:Plugins]]
[[Category:Plugins]]
[[Category:String Functions]]
[[Category:String Functions]]

Latest revision as of 17:03, 9 March 2022

Author: Afrow UK (talk, contrib)


NSIS is currently missing native array support. There are only fixed length variables; no arrays or structures of any kind. A feature request has been submitted to add array support to NSIS [1]. In the meantime, this page lists plug-ins to allow one to store and manipulate dynamically sized arrays of data.

Array Header File

The Array header (nsh) file is a collection of macros and functions that simulates arrays in native NSIS (link at the bottom). This is no longer supported. You should use one of the plug-ins below instead.

nsArray plug-in

A much simpler and smaller DLL than NSISArray (below). Provides less out-of-the-box functionality but is faster and uses less memory. Supports any number of named dynamic arrays, indexed or hashed arrays, value getting, setting, insertion, removal, copying, joining and sorting (via quick sort algo.). DLL is only 6KB (ANSI & Unicode).

NsArray.zip (49 KB) by Afrow UK

NSISArray plug-in (deprecated)

The plug-in features full dynamic array support for NSIS, though not with native commands. The .dll file handles everything related to the arrays on runtime while the NSISArray script header adds friendly scripting syntax for working with arrays that masks the plug-in's function calls.

Please use the nsArray plug-in instead. It is faster and uses much less memory.

NSISArray.zip (99 KB) by Afrow UK

Stack plug-in

The Stack plug-in allows you to manipulate the NSIS run-time stack while also creating your own private stacks.

Stack.zip (70 KB) by Instructor

NSISList plug-in

The NSISList plug-in allows you to create, manage and manipulate several independent lists (dynamic arrays) and/or maps (associative arrays, aka dictionaries) in your NSIS installer. The plug-in provides a lot of functionality but at the cost of a fairly large DLL (~100KB).

NSISList-Plugin.zip (88 KB) by LoRd_MuldeR

Links