Preparing your Space for distribution
From Digital Spaces
This guide focuses on taking a finished space and packaging it into a installer using NSIS ( http://nsis.sourceforge.net/) for distribution.
Required tools:
- A text editor such as notepad.
- NSIS (NSIS version 2.07 was used when creating this guide). – available from http://nsis.sourceforge.net/download/.
- A working space (A sample is provided).
The first step is to extract the attatched zip file to your hard drive.
After extraction you should find 3 directories labelled:
- SampleSpace (The Space used in this guide)
- Header (An NSIS script common to all space installer scripts)
- Output (The directory where the installer package will be placed in this guide)
Installing NSIS
Open the file NSIS installer. The default options for installation should be sufficient. On the last screen of the installer unselect the “Run NSIS” option.
NSIS Installer
NSIS Installer
NSIS Installer
NSIS Installer – Ensure the Run NSIS option is not selected. With NSIS installed we are now ready to go onto packaging the space.
Creating an installerThe script that tells NSIS how you want the installer to operate is mainly containted within the Header\Default.nsh header file. The settings we need to change are contained within the .nsi file. The first step is to make a copy of the file Example.nsi? and rename it to match our space. Copy and paste “Example.nsi” and rename the file from “Copy of Example.nsi" to “Sample Space.nsi" Open the file “Sample Space.nsi" in your favourite text editor. You should have the following in your text editor: !define NAME "Name" ; Example: "Sample Space" - Define the name of the space - This is seen in the title of the installer and if you add this space to bookmarks, it is seen in the bookmark list within dss.
- define OUTPUT ".\Output\Name-Env.exe" ; Example: ".\Output\SampleSpace-Env.exe" - Define the name of the output file.
- define SRC ".\Directory\*.*" ; Example: ".\SampleSpace\*.*" - Define the source directory, ie where the files for the space are to come from - This directory should contain the environment.xml file.
- include ".\Header\Default.nsh"
In order to create a script for a space you simple have to change 3 definitions.
1) The name of your space.
2) Where to put the installer and what to call it.
3) Where the files will come from. This is usually the root directory of your space, and usually where environment.xml is.
Let's change these definitons for Sample Space which is kept in the directory “.\Sample Space\" (relative to Sample Space.nsi).
After making these changes you should have the following in your Sample Scene.nsi:
- define NAME "Sample Space" ; Example: "Sample Space" - Define the name of the space - This is seen in the title of the installer and if you add this space to bookmarks, it is seen in the bookmark list within dss.
- define OUTPUT ".\Output\SampleSpace-Env.exe" ; Example: ".\Output\SampleSpace-Env.exe" - Define the name of the output file.
- define SRC ".\SampleSpace\*.*" ; Example: ".\SampleSpace\*.*" - Define the source directory, ie where the files for the space are to come from - This directory should contain the environment.xml file.
- include ".\Header\Default.nsh"
Save and close Sample Space.nsi.
The final step to creating an installer is to right click Sample Space.nsi and click “Compile NSIS Script”
Compile NSIS Script
After the NSIS Script Compiler is finished, it should look like this:






