Arrays in NSIS: Difference between revisions
Line 7: | Line 7: | ||
== nsArray plug-in == | == 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, value getting, setting, insertion, removal, copying, joining and sorting (via quick sort algo.). DLL is only 4KB (ANSI & Unicode). | 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 4KB (ANSI & Unicode). | ||
<attach>NsArray.zip</attach> ''by Afrow UK'' | <attach>NsArray.zip</attach> ''by Afrow UK'' |
Revision as of 11:33, 11 October 2011
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 4KB (ANSI & Unicode).
NsArray.zip (49 KB) by Afrow UK
NSISArray plug-in
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.
NSISArray.zip (99 KB) by Afrow UK
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 plugin allows you to create, manage and manipulate several independent lists/maps in your NSIS installer. The plug-in provides a lot of functionality but at the cost of a fairly large DLL (~100KB).
NSISList plug-in page
NSISList-Plugin.zip (88 KB) by LoRd_MuldeR