Git Product home page Git Product logo

anonymerniklasistanonym / nsiwindowsinstallerexamples Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 5.0 905 KB

A list of examples on how to create a Windows installer for a Windows program using a NSIS script with dialogs, components, license, Windows shortcuts and more

License: MIT License

NSIS 87.14% PowerShell 12.68% C++ 0.18%
nsis-installer nsis nsi templates windows-installer cross-platform windows

nsiwindowsinstallerexamples's Introduction

NsiWindowsInstallerExamples

In this repository you will find some NSIS scripts with which you can create installers for Windows programs.

There are multiple features of NSIS like:

  • adding a license
  • providing an uninstaller
  • supporting multiple languages
  • customizing the install directory
  • providing multiple components that can be enabled/disabled
  • setting environment variables

What is NSIS?

NSIS can create Windows installers that are capable of installing, uninstalling, setting system settings, extracting files, etc. Because NSIS is based on script files, you can create both simple and advanced installers.

https://nsis.sourceforge.io/Features

How to create an installer.exe?

Setup NSIS

First you need to download the newest version of the Nullsoft Scriptable Install System program/compiler:

  • You can find a binary release here: http://nsis.sourceforge.net/Download
  • Or you can install it via winget: winget install NSIS.NSIS
  • Or if you are on Linux you can install it via a package manager:
    • Ubuntu/apt: apt install nsis
    • Arch/yay: yay -S nsis

If you want to use it via a command line interface make sure that the binary directory has an entry in your environment variable PATH (the default should be C:\Program Files (x86)\NSIS\Bin) - make sure to restart your terminal after adding it so it will be recognized.


For some installers you need NSIS plugins which means you need to download a NSIS plugin and extract it to the NSIS directory which should per default be located in C:\Program Files (x86)\NSIS on Windows and in /usr/share/nsis on Linux. It depends on the Plugin but the only plugin that was used in this directory has extracted a Contrib and Plugins directory which is why you need to extract it in the top level directory, for other plugins your mileage may vary and you can extract it directly into the Plugins directory.


All scripts were tested on Windows and Linux (via WSL) so they should work cross-platform.

GUI

  1. Start NSIS
  2. Click under the section Compiler the entry Compile NSI scripts
  3. On the new window click File in the menu bar and click Load Script
  4. Select your written script and click Open
  5. The installer.exe (or however you named it) will be created
  6. Over the button Test Installer you can even test it without leaving the window

CLI

  1. Run makensis script.nsi

Further examples, Documentation?

The official documentation can be found here:

nsiwindowsinstallerexamples's People

Contributors

anonymerniklasistanonym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.