World Library  
Flag as Inappropriate
Email this Article

Nullsoft Scriptable Install System

 

Nullsoft Scriptable Install System

Nullsoft Scriptable Install System
NSIS Installer
Developer(s) Nullsoft
Stable release 2.46 / 6 December 2009 (2009-12-06)
Preview release 3.0b2 / 4 August 2015 (2015-08-04)
Written in C, C++
Operating system Windows, POSIX
Type Software development tools
License zlib license
Website .net.sourceforgensis

Nullsoft Scriptable Install System (NSIS) is a script-driven installation system for Microsoft Windows with minimal overhead backed by Nullsoft, the creators of Winamp. NSIS has become a widely used alternative to commercial and proprietary products like InstallShield, with users including Amazon, Dropbox, Ubisoft, BitTorrent, and McAfee.[1]

NSIS is free software released under a combination of free software licenses, primarily the zlib license.[2]

Contents

  • History 1
  • Concepts 2
    • Script 2.1
    • Modern user interface 2.2
      • Graphical interfaces 2.2.1
      • Installer interfaces 2.2.2
    • Plugins 2.3
  • Features 3
  • Generated installer 4
  • Unicode support 5
  • See also 6
  • References 7
  • External links 8

History

NSIS was created to distribute Nullsoft 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, but it is easier to script and supports more compression formats. NSIS version 2 features a new streamlined graphical user interface and supports LZMA compression, multiple languages, and an easy-to-use plugin system.

Concepts

NSIS 1.98

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 "jubaowu.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 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 25 August 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 24 December 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.

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 platform. It allows NSIS scripts to be edited, compiled and validated.
  • HM NIS Edit (freeware) editor with support of custom C++/Delphi plug-ins.
  • Venis (freeware) editor.
  • Visual & Installer (Add-in which integrates NSIS with Microsoft Visual Studio IDE and allows to create and build NSIS projects right within it)

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 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 ASD.

Plugins

NSIS can be extended with plugins that can communicate with the installer. Plugins can be written in any managed programming language capable of building a dynamic-link library, and they 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 plugin.

Features

NSIS supports the following features:[3]

Generated installer

The generated installer is a Portable Executable, with the installation files archived within the installer, a 34 KB overhead for the NSIS installer,[4] and the installation script compiled into executable code. As the installation script is compiled, the script cannot be obtained from the delivered executable without reverse-engineering the binary.

The archive may be unpacked using either 7-Zip, the Total Commander plugin "InstallExplorer", or the predecessor by the same name for the FAR Manager.

The archive contains several folders:

  • $PLUGINSDIR : installation routine plugins
  • $INSTDIR : files used during the installation
  • $_OUTDIR : files to be installed.

Unicode support

Versions of NSIS before 3.0 did not support Unicode, but only a means to convert some files to different encodings via a plugin.[5] However, a variant of NSIS that has full Unicode support is available.[6] Notable projects using this variant are:[7]

With the release of version 3.0 of NSIS, Unicode support can be implemented using the compiler directive "Unicode true". This gives full Unicode support with no further code changes, but the installer will not run under Windows 95/98/Me.[8]

See also

References

  1. ^ "Users - NSIS". 
  2. ^ "NSIS licence page". 
  3. ^ "Features - NSIS". 
  4. ^ "Features". NSIS. 
  5. ^ "Unicode plug-in". NSIS. 
  6. ^ "Unicode NSIS Project Page". 
  7. ^ "Unicode NSIS Project Users". 
  8. ^ "NSIS Users Manual Chapter 1". NSIS. Retrieved 26 May 2015. 

External links

  • NSIS home page
  • NSIS SourceForge project page
  • SourceForge.net Project of the Month in January 2006
  • OpenCandy Installer Platform Comparison June 2011
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.