Welcome to Dream.In.Code
Getting Help is Easy!

Join 135,957 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,634 people online right now. Registration is fast and FREE... Join Now!




Creating a simple NSIS installer script

 
Reply to this topicStart new topic

Creating a simple NSIS installer script

thor78
20 May, 2008 - 08:28 PM
Post #1

D.I.C Head
Group Icon

Joined: 6 May, 2008
Posts: 106


Dream Kudos: 50
My Contributions
CODE

; The name of the installer
; You have to be extra careful when typing the name of you installer because if you put unnecessary characters as; they would be reflected in the user interface (UI). e.g Name "HelloWorld." Notice the extra period? Yep, it would
; show up in the UI

Name "HelloWorld"

; The file to write
; This is the setup file itself - thor78
OutFile "HelloWorld.exe"

; The default installation directory
; This NSIS complier automatically determines the location of your C:\Program Files
; using the reserved word $PROGRAMFILES
InstallDir $PROGRAMFILES\HelloWorld

;--------------------------------

; Pages
; This are the pages you will see in the UI when you execute the installer,
; The first page would allows you to browse where you want your program installed,
; This also sets the $INSTDIR property. The second page shows you the progress of the installation

Page directory
Page instfiles

;--------------------------------

; The stuff to install
; This the "Main" component that does where we group all the necessary things to do by the compiler,
; when we make functions, we can call them in this section
; Since this is a basic example, we can omit the section name
Section "";No components page, name is not important

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
; This is the list where the compiler gets the files to include to the setup file

File HelloWorld.nsi
;You this is where you place your .exe files e.g.:
;File HelloWorld.exe

SectionEnd; end the section

================================================== ======
Save the file as "filename.nsi", right-click the file and select compile NSIS script. If no errors are detected, you can test your example afterwards.
================================================== ======

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 09:18AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month