Wrench value from your Creo Investments Home Measure the benefits Simple Automation can bring Why
A personal way to do PDM Peer to Peer
3D Drawings Model Based
Smooth out unwanted sharp edges Other
www.proetoolbox.co.uk - Simple Automation made Simple

NSIS for Application Deployment

;NSIS 3.0 brings a new very simple UI configuration
;method called Modern UI 2
!include MUI2.nsh

; The name of the installer
Name "Scite4WL"

; The file to write
OutFile "Scite4WL.exe"

; The default installation directory (push onto desktop)
InstallDir $DESKTOP\Scite4WL

;Request application privileges for Windows Vista
RequestExecutionLevel user
;These definitions setup various peices of the Modern UI
!define MUI_WELCOMEPAGE_TITLE "Welcome to the \
  Scite for Pro/Web.Link Editor Installer"
!define MUI_HEADERIMAGE true
!define MUI_HEADERIMAGE_BITMAP "proetoolbox.bmp"
!define MUI_WELCOMEPAGE_TEXT "This installer will \
 guide you through the installation of Scite$\r$\ncomplete \
 with customized API files to produce a more efficient \
 Pro/Web.Link Application building experience.$\r$\n$\r$\nI \
 hope you enjoy it!.$\r$\n$\r$\nPress Next to continue."
!define MUI_PAGE_HEADER_TEXT "License Agreement" 

;The resources allow you to configure an installer just by
;calling up the series of pages you wish to run
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE  "license.txt"
!insertmacro MUI_LANGUAGE "English"

;These are the sections (components) that users can install
Section "Scite4WL" Section1
  SetOutPath $INSTDIR
  CreateDirectory "$INSTDIR\"
  ;This single line tells the installer compiler to grab all the
  ;files from the directory (recursively!) 
  File /r "D:\User Profiles\clewis\Scite4WL\deploy\*.*"

Section "Scite4WL Shortcut" Section2
  ;This line makes a shortcut on the Desktop to our app
  CreateShortcut "$DESKTOP\Scite4WL.lnk" \

;These strings define what the text would be for the
;Components descriptions (only bothering with English)
LangString DESC_Section1 ${LANG_ENGLISH} 
 "The Scite Program and API's."
LangString DESC_Section2 ${LANG_ENGLISH} 
 "A Shortcut to Scite 4 Pro/Web.Link."

!insertmacro MUI_DESCRIPTION_TEXT ${Section1} \
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} \

When building out my personal Scite for Pro/Web.Link configuration, I realized that I wanted to make it easy for others to re-use that configuration. Although it would be easy enough to just zip up the folder and suggest that folks just 'unzip', I came across Nullsoft Scriptable Install System. A wonderfull peice of Open Source code and after only a couple of hours of hacking, a professional looking installer was the result. While there are undoubtably many other better websites and examples for this wonderfull tool, I thought it would make sense to show how it was used to provide the Installer package for Scite for Pro/Web.Link.

The Choices

In many ways the choice I made to use NSIS was pre-ordained because the tool was free and looked easy to use. I'm sure that what I have acheived with it is equally possible with other installer solutions, but it took only a few hours to setup and learn which I think is important for us in keeping with the vision of Simple Automation.

Download and Learn NSIS from NSIS @ Sourceforge.

Code to Result Relationship


As NSIS says itself "An installer is the first experience of a user with your application. Slow or unsuccessful software installations are the most irritating computer problems. A quick and user friendly installer is therefore an essential part of your software product.". I think the few hours required to make a professional installer around the Scite for Pro/Web.Link configuration was well worth it. Owners of the 'A Pro/ENGINEERS Guide to Pro/Web.Link' book can download this customised editor from Bonus Applications.