NSIS Installer for IRIS 5.5
From ICISWiki
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
Screenshots of simplified workflow (fresh installation)
1. Select language
- English
- Spanish
- Danish
2. Confirmation to proceed
3. Welcome screen
4. GNU Public License
5. Select Installation Directory
6. Prompt for name of local database or project
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
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
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.
- 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
11. Create Shortcut?
12. Run Program Now?
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])
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
2.1 Welcome screen
Click "Next" to proceed.
2.2 Application Information
Specify the following:
- Application name
- Version
- Application publisher
- Application website
2.3 Setup Options
Don't change anything. Click "Next" to proceed.
2.4 Application directory and license
Dont' change anything. Click "Next" to proceed.
2.5 Application files
- Clear first the "File" listbox by selecting existing items and clicking the "X" button.
- Click the "Add Directory Tree" button [above, encircled].
Select the directory (in the "Installer" folder) containing items for inclusion in the installer. Click "OK".
Click "Next" to proceed.
2.6 Application Icons
- Click on "$ICONS_GROUP..." shortcut item.
- Click "Edit shortcut".
- Select "$INSTDIR\Exes\LAUNCHER.exe" as the Destination.
- Click "OK".
- Click on the "$DESKTOP..." shortcut item.
- Click "Edit Shortcut".
- Select "$INSTDIR\Exes\LAUNCHER.exe" as the Destination.
- Click "OK".
2.7 Execute after setup
Don't change anything. Click "Next" to proceed.
2.8 Create uninstaller
Don't change anything. Click "Next" to proceed.
2.9 Finished
- Select "Save Script"
- Select "Convert file paths to relative paths"
- Click "Finish".
2.10 Save NSIS script
Save file as "nsis_iris_skeleton", for example. Save the file in the "Installer" folder.
2.11 NSIS "Wizard Script" generated
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
- 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.

