Nullsoft Scriptable Install System
Encyclopedia
Nullsoft Scriptable Install System (NSIS) is a script-driven Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 installation system with minimal overhead backed by Nullsoft
Nullsoft
Nullsoft, Inc. is a software house founded in Sedona, Arizona in 1997 by Justin Frankel. Its most known products include the Winamp media player and the SHOUTcast MP3 streaming media server. In recent years, their open source installer system, NSIS, has also risen in popularity as a widely used...

, the creators of Winamp
Winamp
Winamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...

. NSIS has risen to popularity as a widely used alternative to commercial and proprietary
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...

 products like InstallShield
InstallShield
InstallShield is a software tool for creating installers or software packages. InstallShield is primarily used for installing software for Microsoft Windows desktop and server platforms, but it can also be used to manage software applications and packages on a variety of handheld and mobile devices...

.

NSIS is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 released under a combination of free software licenses, primarily the zlib license
Zlib License
The zlib License is a permissive free software license which defines the terms under which the zlib and libpng software libraries can be distributed. It is also used by other free software packages....

.

History

NSIS was created to distribute Winamp
Winamp
Winamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...

. It is based on a previous Nullsoft
Nullsoft
Nullsoft, Inc. is a software house founded in Sedona, Arizona in 1997 by Justin Frankel. Its most known products include the Winamp media player and the SHOUTcast MP3 streaming media server. In recent years, their open source installer system, NSIS, has also risen in popularity as a widely used...

 product, PiMP (plugin Mini Packager), and is also known as SuperPiMP. After version 2.0a0, the project was moved to SourceForge
SourceForge
SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...

 where developers outside of Nullsoft
Nullsoft
Nullsoft, Inc. is a software house founded in Sedona, Arizona in 1997 by Justin Frankel. Its most known products include the Winamp media player and the SHOUTcast MP3 streaming media server. In recent years, their open source installer system, NSIS, has also risen in popularity as a widely used...

 started working on it on a regular basis. NSIS 2.0 was released approximately two years later.

NSIS version 1 is in many ways similar to the classic Windows Installer
Windows Installer
The Windows Installer is a software component used for the installation, maintenance, and removal of software on modern Microsoft Windows systems...

, but it is easier to script and supports more compression formats. NSIS version 2 features a new streamlined graphical user interface
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 and supports LZMA
LZMA
The Lempel–Ziv–Markov chain algorithm is an algorithm used to perform data compression. It has been under development since 1998 and was first used in the 7z format of the 7-Zip archiver...

 compression, multiple languages, and an easy to use plugin system.

Script

The NSIS compiler program makensis compiles scripts like the following example into executable installation programs. Each line in the script contains a single command.
# Example script
Name "Example1"
OutFile "example1.exe"
InstallDir "$PROGRAMFILES\Example1"
Page Directory
Page InstFiles
Section
SetOutPath $INSTDIR
File ..\makensis.exe
SectionEnd

Modern user interface

Version 2.0 introduced a new optional streamlined graphical user interface
Gui
Gui or guee is a generic term to refer to grilled dishes in Korean cuisine. These most commonly have meat or fish as their primary ingredient, but may in some cases also comprise grilled vegetables or other vegetarian ingredients. The term derives from the verb, "gupda" in Korean, which literally...

 called Modern UI (MUI). The MUI has a wizard-like interface. It supports a welcome page, finish page, language selection dialog, description area for components, and greater customization options than the old user interface.
# Modern UI example script
!include MUI.nsh
Name "Example 2"
OutFile "Example2.exe"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.rtf"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "French"
Section "Extract makensis"
SetOutPath $INSTDIR
File ..\makensis.exe
SectionEnd
Since NSIS version 2.30 (Released on August 25th, 2007) there is new version (beta) of this UI accessible: Modern UI 2 (MUI2) which is an enhancement to Modern UI. Unlike the old MUI this version is based on nsDialogs instead of old-fashioned InstallOptions .ini files.

From version 2.34 (Released on December 24th, 2007) this MUI2 is ready for mass consumption and it is included in all NSIS packages. Also all examples had been switched to it.
Modern UI 2 documentation.

Plugins

NSIS can be extended with plugins that can communicate with the installer. Plugins can be written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

, C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

, and Delphi, and can be used to perform installation tasks or extend the installer interface. A plugin can be called with a single line of NSIS code.

Several plugins come with the NSIS package that permit the installer to display a splash screen, display a custom page, display an image on the background, download files from a website, perform mathematical operations, patch files and more.

Other plugins are available online, including ZipDLL, and a Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 plugin.

Features

NSIS supports the following features:
  • Very small overhead
    Computational overhead
    In computer science, overhead is generally considered any combination of excess or indirect computation time, memory, bandwidth, or other resources that are required to attain a particular goal...

     (34 KB)
  • zlib
    Zlib
    zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. Zlib is also a crucial component of many software platforms including Linux, Mac OS X,...

    , bzip2
    Bzip2
    bzip2 is a free and open source implementation of the Burrows–Wheeler algorithm. It is developed and maintained by Julian Seward. Seward made the first public release of bzip2, version 0.15, in July 1996.-Compression efficiency:...

    , and LZMA
    LZMA
    The Lempel–Ziv–Markov chain algorithm is an algorithm used to perform data compression. It has been under development since 1998 and was first used in the 7z format of the 7-Zip archiver...

     compression
  • Script-based
  • Multilingual
  • Plugin support
  • Script preprocessor
    Preprocessor
    In computer science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers...


Graphical interfaces

NSIS projects can be configured by simply editing text files (with .nsi extension). However, several third parties provide editing software:
  • EclipseNSIS is a module for the Eclipse
    Eclipse (software)
    Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

     platform. It allows NSIS scripts to be edited, compiled and validated.
  • HM NIS Edit (freeware) probably the best NSIS editor with support of custom C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

    /Delphi
    Delphi
    Delphi is both an archaeological site and a modern town in Greece on the south-western spur of Mount Parnassus in the valley of Phocis.In Greek mythology, Delphi was the site of the Delphic oracle, the most important oracle in the classical Greek world, and a major site for the worship of the god...

     plug-ins.
  • Venis (freeware) editor with lot of functions.

Installer interfaces

Several projects that extend or replace the Modern UI have started in the past few years. Interfaces such as the ExperienceUI and UltraModernUI completely change the style of the installer by skinning it to look like the InstallShield
InstallShield
InstallShield is a software tool for creating installers or software packages. InstallShield is primarily used for installing software for Microsoft Windows desktop and server platforms, but it can also be used to manage software applications and packages on a variety of handheld and mobile devices...

 interface. Other interfaces like InstallSpiderUI aim for a more minimalistic approach on the visual side of things while maintaining the same level of functionality as the Modern UI.

Generated installer

The generated installer is a Portable Executable
Portable Executable
The Portable Executable format is a file format for executables, object code and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture...

, with the installation files archived within the installer, a 34 KB overhead for the NSIS installer, and the installation script compiled into executable code. As the installation script is compiled, the script can not be obtained from the delivered executable without reverse-engineering the binary.

The archive may be unpacked using either 7-Zip
7-Zip
7-Zip is an open source file archiver. 7-Zip operates with the 7z archive format, but can read and write several other archive formats. The program can be used from a command line interface, graphical user interface, or with Microsoft Windows shell integration. 7-Zip began in 1999 and is actively...

, the Total Commander
Total Commander
Total Commander is an Orthodox File Manager software for Windows, Windows CE, and Windows Mobile. Some features include a built-in FTP client, file compare, archive file navigation, and a versatile multi-rename tool with regular expression support....

 plugin "InstallExplorer", or the predecessor by the same name for the FAR Manager
FAR Manager
FAR Manager is an orthodox file manager for Microsoft Windows and a clone of Norton Commander...

.

The archive contains several folders:
  • $PLUGINSDIR : installation routine plugins
  • $INSTDIR : files used during the installation
  • $_OUTDIR : files to be installed.

Unicode support

The official release of NSIS does not support Unicode but only a means to convert some files to different encodings via a plugin. However, a variant of NSIS that has full Unicode support is available. Notable projects using this variant are:
  • Google
    Google
    Google Inc. is an American multinational public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program...

     (Picasa
    Picasa
    Picasa is an image organizer and image viewer for organizing and editing digital photos, plus an integrated photo-sharing website, originally created by Idealab in 2002 and owned by Google since 2004. "Picasa" is a blend of the name of Spanish painter Pablo Picasso, the phrase mi casa for "my...

    )
  • OpenOffice.org
    OpenOffice.org
    OpenOffice.org, commonly known as OOo or OpenOffice, is an open-source application suite whose main components are for word processing, spreadsheets, presentations, graphics, and databases. OpenOffice is available for a number of different computer operating systems, is distributed as free software...

     for Windows
  • Mozilla
    Mozilla
    Mozilla is a term used in a number of ways in relation to the Mozilla.org project and the Mozilla Foundation, their defunct commercial predecessor Netscape Communications Corporation, and their related application software....

     (Firefox, Mozilla Thunderbird
    Mozilla Thunderbird
    Mozilla Thunderbird is a free, open source, cross-platform e-mail and news client developed by the Mozilla Foundation. The project strategy is modeled after Mozilla Firefox, a project aimed at creating a web browser...

    )
  • FileZilla
    FileZilla
    FileZilla is free, open source, cross-platform FTP software, consisting of FileZilla Client and FileZilla Server. Binaries are available for Windows, Linux, and Mac OS X. It supports FTP, SFTP, and FTPS . As of 18 April 2011, FileZilla Client was the 7th most popular download of all time from...

  • Winamp
    Winamp
    Winamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...

  • Flickr
    Flickr
    Flickr is an image hosting and video hosting website, web services suite, and online community that was created by Ludicorp in 2004 and acquired by Yahoo! in 2005. In addition to being a popular website for users to share and embed personal photographs, the service is widely used by bloggers to...

  • PortableApps.com
    PortableApps.com
    PortableApps.com is a site offering portable software for Windows.The site was founded by John T. Haller and includes contributions from over 100 people, including developers, designers and translators.-History:...


Unrelated NSIS Media malware

A widespread malware
Malware
Malware, short for malicious software, consists of programming that is designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, or gain unauthorized access to system resources, or that otherwise exhibits abusive behavior...

 company named itself NSIS Media. NSIS Media and NSIS are not related by anything but name. A few users incorrectly allege that every installer built with NSIS contains this malware. Choosing a reliable download source, as with everything downloaded from the Internet, should be done to avoid this malware.

Several antivirus companies have labeled plugins such as NSISdl, which provides HTTP downloading functionality, as trojans. This is also incorrect. While NSIS is a scriptable system and thus could be used to create malware, that is not its primary purpose and this condition in fact applies to all programming languages
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...

.

See also


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK