Configuring the NexJ Studio installer
The NexJ Studio installer repository consists of a number of files that, when properly configured and placed on a website or file server, provide an installer and update site for NexJ Studio.
This section provides instructions on how to configure and deploy this installer to allow users to install NexJ Studio through a website. The users can update NexJ Studio through the Help → Check for Updates functionality.
Delivering the NexJ Studio installer on a file server or a local drive
The examples in this chapter all assume that you are delivering the installer over a web server.
However, you can adapt these instructions for use over a network, or even for use on a local drive. For example, you might use the following path declarations:
To deliver over a web server
http://example.com/installer
To deliver on a file serverfile://server-name/installer
To deliver from a named drivefile:///d:/installer
Note
If you want to create an installation DVD, you can configure the installer to work from a named drive. However, if you do this, then all users of the DVD must ensure that it appears on their system using the drive name that you used to configure the installer. That is, if you configured the installer with a path such as file:///d:/installer
, then all users must be sure that the disk appears as the D: drive on their system.
Setting update site information in the installer
Configure the default update site information in your NexJ Studio installer repository for each installation of NexJ Studio.
Ensure that you have been provided the p2site
repository folder, containing the build_script
, p2_customize
folders. Your installer is configured by reading the content.jar
file in your p2site repository folder. To customize your installer, you need to recreate the content.jar
file with your customized definitions. This is done by first editing the build_script/build.xml
file and the p2_customize/content.xml
file and then running the build.xml
file as an Ant script.
Since completing this task recreates the content.jar file that is delivered in the p2site
repository folder, make a backup of this file before proceeding.
To customize your installation to your specific needs:
- Open the
p2_customize/content.xml
file in a text editor.- Update the location URL in the
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository
entry to point to your update site location.
The original value ishttp${#58}//localhost
. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly install new versions of NexJ Studio. Update the location URL in the
org.eclipse.equinox.p2.touchpoint.eclipse.removeRepository
entry to point to your update site location.
The original value ishttp${#58}//localhost
. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly uninstall older versions of NexJ Studio during the upgrade process.Note
Any colons in the value that you specify must be replaced by
${#58}.
For example, you should express the URL http://example.com/installer ashttp${#58}//example.com/installer.
- Update the location URL in the
In the build_script folder, edit the
build.xml
file.Set the
target_p2_repo
entry to the filesystem path of thep2site
repository folder. Ensure that you can write to the folder.Set the
source_p2_repo
entry to the filesystem path top2_customize
folder. These steps ensure that your update site location defined in your content.xml file links to yourp2site
repository folder.
In the NexJ Studio Package Explorer, right-click the
build.xml
file and select Run As → 2 Ant Build....
The Edit Configuration dialog displays.In the JRE tab, ensure that the Run in the same JRE as workspace option is selected.
Click Run.
The Ant script reads the information contained in the content.xml
file and uses it to recreate the content.jar file contained in the p2site
repository folder. When this new JAR file is used for installation, it will automatically configure the update site information in the newly installed instance of NexJ Studio.
Configuring the NexJ Studio web install
The installation and update site files for NexJ Studio are contained in the p2site repository folder.
The files are initially configured for an update site being hosted at http://localhost.
If you want to run your install and update site from a different server, or from a folder on that server, you must reconfigure the files.
These steps all refer to the files stored in the p2site
repository directory and must be carried out before you deploy the files to your web server.
To configure the web installer file before deployment:
- Update the
installer.properties
file:- Set
eclipse.p2.metadata
to the update site URL. This is the site that will be housing the NexJ Studio files that you want to install. The initial value for this property is http://localhost. - Set
eclipse.p2.artifacts
to the same update site URL. Set
eclipse.p2.defaultInstallLocation
to the location that you want to install NexJ Studio by default on your users' computers.Info
Because of the way that Microsoft Windows handles the security of program file directories, we recommend setting this value to install NexJ Studio into its own folder, outside of both the Program Files and Program Files (x86) directories.
- Set
In the following files, update the
codebase
attribute of the root jnlp node to the URL of the update site that you are creating:features/org.eclipse.equinox.p2.installer.feature_4.5.jnlp
features/org.eclipse.equinox.p2.installer.feature_4.5_old
features/org.eclipse.equinox.p2.installer.feature_4.5A
features/org.eclipse.equinox.p2.installer.feature_4.5B
features/org.eclipse.equinox.p2.installer.custom_4.5.jnlp
- studio_install.jnlp
For example, if you are creating an update site at http://example.com/installer, then you should update the root node to:<jnlp spec="1.0+" codebase="http://example.com/installer">
- In the
studio_install.jnlp
file, set the value of the com.nexjsystems.installer.installDescription property to the fully qualified URL of theinstaller.properties
file. For example:<property name="com.nexjsystems.installer.installDescription" value="http://example.com/installer/installer.properties"/>
You can now deploy the contents of the p2site repository folder to your web server.
Info
Ensure that the following MIME types have been defined for your web server, to enable it to correctly identify and handle files required by the installer.
File extension | Handler type |
---|---|
.property | text/plain |
.jnlp | application/x-java-jnlp-file |
Numerical extensions from .000 to .999 | application/java-archive |
For more information about Microsoft Internet Information Services (IIS) and MIME types, see the "Configuring MIME Types in IIS 7" topic on the Microsoft web site at http://technet.microsoft.com/en-us/library/cc753281%28v=ws.10%29.aspx.
For more information about Apache HTTP Server and MIME types, see the mod_mime module description on the Apache web site at http://httpd.apache.org/docs/current/mod/mod_mime.html .
To install the product, you should provide users with a hyperlink to the studio_install.jnlp file, for example, http://example.com/installer/studio_install.jnlp.
Changing the installer name
If you want to change the name of the studio_install.jnlp
file, you must modify its contents as well as its file name.
To modify the file name of studio_install.jnlp
:
- Rename the
studio_install.jnlp
file. - Open the renamed file in a text editor.
In the root
jnlp
element, update thehref
attribute to the new name. For example, if you changed the file name fromstudio_install.jnlp
tostudio_custom_install.jnlp
, then you should update thehref
attribute to read:<jnlp spec="1.0+" codebase="http://example.com/installer" href="studio_custom_install.jnlp"
4. Save your changes.
Your installer name has been successfully changed.