NSIS Installer for IRIS 5.5

From ICISWiki

Revision as of 06:31, 23 June 2010 by Mhabito (Talk | contribs)
Jump to: navigation, search

Contents

Background

NSIS Scripting for the IRIS installer is a continuation of Jesper Norgaard's work for IWIS3 installers.

http://www.cropinfo.org/icis/images/4/44/UseOfNSIS_installations_inICIS.pdf

Downloads

To download the Installer (executable) and the NSIS Script, go to ICIS ftp site

Process workflow

Click to enlarge

Screenshots of simplified workflow (fresh installation)

1. Select language

  • English
  • Spanish
  • Danish

Image:Iris installer language.JPG

2. Confirmation to proceed

Image:Iris installer proceed.JPG

3. Welcome screen

Image:Iris installer welcome.JPG

4. GNU Public License

Image:Iris installer license.JPG

5. Select Installation Directory

Image:Iris installer directory.JPG

6. Prompt for name of local database or project

Image:Iris installer askproject.JPG

A new record in the local INSTLN table is automatically added.

The name of the local database or project will be included in the Installation Description (IDESC) in the local INSTLN table.

7. Prompt for User Name

Image:Iris installer askusername.JPG

This user is automatically added in the local USERS table, and automatically defined as Local Administrator (UTYPE=422) so that the user can make edits to the local database immediately.

See Cropforge Feature Request #2121

8. Prompt for User's Password

Image:Iris installer askpassword.JPG

9. Select Components to Install

Pre-selected options: copy the IRIS central databases to the user's PC/machine, and install a clean local database.

Image:Iris installer components.JPG

  • ICIS software applications are installed by default.
  • ICIS documentation, Help files, IRIS Breeders' Training Course materials are installed by default.
  • IRIS Breeders' Training Course training databases are installed by default.


10. Wait for Installation to Complete

Image:Iris installer progress.JPG

Image:Iris installer setupcomplete.JPG

11. Create Shortcut?

Image:Iris installer askcreateshortcut.JPG


12. Run Program Now?

Image:Iris installer askrunnowJPG.JPG

Yes - Run program

Connect to training database or local database?...just select the Configuration (.INI file) of your choice.      

      Want some practice first? Select "Training.ini"

Switch from training database to clean local database (and vice-versa) easily! (via "Connect to an ICIS database" [below, encircled])

Image:Iris installer selectINI.JPG

No - Don't run program

Exit installer.

How To Create a New Installer Using NSIS

Getting Started: Download an NSIS Editor/ID.

              HM NIS Edit is highly recommended as an NSIS editor. Download here: http://hmne.sourceforge.net/

Step 1. Prepare installation files

  • Gather all installation files and save into a folder named "ICIS". Then save the ICIS folder into a folder called "Installer".
  • Edit/Customize the ICIS.INI (in folder Installer\...ICIS\Database\Template\Central\ according to your users' needs.

Step 2. Generate an initial/skeleton NSIS script using the Script Wizard

Image:Nsis scriptwizard.JPG

2.1 Welcome screen

Image:Nsis wizard welcome.JPG

Click "Next" to proceed.

2.2 Application Information

Image:Nsis wizard appinfo.JPG

Specify the following:

  • Application name
  • Version
  • Application publisher
  • Application website

2.3 Setup Options

Image:Nsis wizard setupoptions.JPG

Don't change anything. Click "Next" to proceed.

2.4 Application directory and license

Image:Nsis wizard directory and license.JPG

Dont' change anything. Click "Next" to proceed.

2.5 Application files

Image:Nsis wizard clearappfiles.JPG

  • Clear first the "File" listbox by selecting existing items and clicking the "X" button.
  • Click the "Add Directory Tree" button [above, encircled].


Image:Nsis wizard appfiles.JPG

Select the directory (in the "Installer" folder) containing items for inclusion in the installer. Click "OK".



Image:Nsis wizard appfilesdone.JPG

Click "Next" to proceed.

2.6 Application Icons

Image:Nsis wizard edit iconsgroup shortcut.JPG

  • Click on "$ICONS_GROUP..." shortcut item.
  • Click "Edit shortcut".
  • Select "$INSTDIR\Exes\LAUNCHER.exe" as the Destination.
  • Click "OK".



Image:Nsis wizard edit desktop shortcut.JPG

  • Click on the "$DESKTOP..." shortcut item.
  • Click "Edit Shortcut".
  • Select "$INSTDIR\Exes\LAUNCHER.exe" as the Destination.
  • Click "OK".


2.7 Execute after setup

Image:Nsis wizard executeaftersetup.JPG

Don't change anything. Click "Next" to proceed.

2.8 Create uninstaller

Image:Nsis wizard uninstaller.JPG

Don't change anything. Click "Next" to proceed.

2.9 Finished

Image:Nsis wizard finished.JPG

  • Select "Save Script"
  • Select "Convert file paths to relative paths"
  • Click "Finish".

2.10 Save NSIS script

Image:Nsis wizard savensisscript.JPG

Save file as "nsis_iris_skeleton", for example. Save the file in the "Installer" folder.

2.11 NSIS "Wizard Script" generated

Image:Nsis wizard scriptgenerated.JPG

Step 3. Download the existing NSIS Script for IRIS (and "GetSizeDB.nsi", a supplementary NSIS script)

  • Download here.
  • Extract this zipped file into the "Installer" folder.

Step 4. Combine contents of the "Wizard Script" with the existing NSIS script for IRIS

4.1 Use the existing NSIS script for IRIS as your template

  • Save existing NSIS script for IRIS under a different file name ("renamed Template"). Example:
InstallIRIS-YYYY-MM-DD-vX.X.nsi


4.2 Make manual edits to the renamed Template

  • COPY contents of the "MainSection" section (from Wizard Script) and PASTE into the "InstDefault" section of renamed Template. Please note the START PASTE HERE, and END PASTE HERE areas.
  • COPY contents of the "Uninstall" section (from Wizard Script) and PASTE into the "Uninstall" section of renamed Template. Please note the START PASTE HERE, and END PASTE HERE areas.
  • Replace all instances of "IRIS" with the crop abbreviation applicable to you.

Step 5. Compile and run the "GetSizeDB" NSIS script to get the database file sizes

Image:Nsis wizard getdbsize.JPG

  • Open "GetSizeDB.nsi".
  • Edit/update the paths pointing to the locations of the databases.
  • Go to the "NSIS" menu, then click "Compile and Run".
  • An executable "GetSizeDB.EXE" will be generated. This is required by the renamed Template for creating the installer.

Step 6. Compile the renamed Template to generate the Executable Installer

Image:Nsis wizard compilescript.JPG