FeaturesPluginsDocs & SupportCommunityPartners

Mobility Pack Installer

Author: Marek Slama, Sun Microsystems/NetBeans

Abstract:
This document describes installers distributed for NetBeans release 4.2.

Document History:
04/29/2005 : 0.1 : First preliminary version of the document
Contents:

1 Introduction

Mobility Pack installer installs Mobility Pack Add On to existing NetBeans IDE installation. During installation uninstaller is created to uninstall product. Mobility Pack cluster is installed to 'mobility7.1' directory in NetBeans IDE install directory.

Installer supports following platforms:

  • Microsoft Windows
  • Linux

Exact version of OS/hardware on which installer is supported/tested depends on NetBeans IDE system requirements. Exact list of tested platforms is provided by QA.

Installers/uninstallers run only in GUI (Swing mode). Silent or console modes are not supported. On Linux Metal L&F is used. On Windows native L&F is used.


2 CVS project structure

Installer is in O/S CVS as subcomponent 'mobility' of CVS module 'installer'. It depends on subcomponent 'lib'. It is free form NetBeans IDE project. Directory /cvs/installer/mobility contains following files/directories:

  • build directory is created when installers are built. It contains temporary files, class files, ...
  • build.properties file contains IDE project properties.
  • build.xml is ant build script.
  • mobility.xml is InstallShield project XML file.
  • dist directory is created when installers are built. It contains installers.
  • nbproject directory contains IDE project files.
  • ProgrammingNotes.txt contains description of ant build script, build targets, properties.
  • resources directory contains resource files for installer like license files.
  • src directory contains Java sources of installer.
  • unix.xsl, win32.xsl XSLT stylesheet used to modify some InstallShield project properties according to target platform.


3 Building installer

Mobility Pack installer is based on InstallShield MP 5 SP3. Following prerequisites must be fulfilled to build installer:

  • Linux or Solaris OS
  • InstallShield MP 5 SP3
  • Apache Ant 1.6.2
  • JDK 1.4.2_X
Following build targets are provided in build-xml:
  • 'build-unix' build English installer for Linux
  • 'build-windows' build English installer for Windows
  • 'build-unix-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installers for Linux
  • 'build-windows-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installers for Windows
  • 'clean' delete build and clean directory and also call clean for shared library at ../lib
Build script uses uncompressed content for Mobility cluster directory as input for building installers. File ProgrammingNotes.txt contains description how to set these input files.


4 InstallShield project description

Product tree consists of 2 elements:

  • Root node 'beanProduct'. It defines whole product and is parent of all nodes in product tree.
  • Mobility Pack component 'beanMobilityCluster'.
    • Mobility cluster files
    • PostInstallFixup action performs tasks after installation/uninstallation.


5 Installer sequence

Installer sequence defines wizard panels/actions which are shown/performed during installation.

5.1 Set System Properties Action

This action sets/resolves version dependent product bean properties. It is done to keep all version dependent properties at one place.

5.2 Welcome Panel

Welcome panel informs user about product and its version which is going to be installed.

5.3 License Panel

License panel shows Software License Agreement. User must agree with SLA to continue with installation. There is radio button which must be selected by user. When it is done Next button is enabled.

5.4 Nb Dir Chooser Panel

In this panel user can select location of right version NetBeans IDE where Mobility Pack will be installed. Installer tries to locate NetBeans IDE installation with correct version and if it finds NetBeans IDE it fills its location as hint into edit box. On Linux installer searches for NetBeans IDE in user home directory. On Windows installers checks registry for installed NetBeans IDE. User can also directly edit install location in edit box or press Browse button to invoke file chooser dialog to select install location. Validation of selected install location is performed when user presses Next button.

5.5 Install Check

It performs standard InstallShield checks on target machine like free disk space check. It displays panel with error message when any of check fails. If checks pass installation continues with next panel.

5.6 Pre-install Summary

It shows information about what product will be installed where it will be installer and how much disk space it will take.

5.7 Install

Install action performs actual installation. It shows panel with progress bar.

5.8 Post-install Summary

It informs user what and where was installed.


6 Uninstaller sequence

Uninstaller sequence defines wizard panels/actions which are shown/performed during uninstallation. Uninstaller should remove all files/directories created during installation.

6.1 Welcome Panel

It informs user what will be done during uninstallation.

6.2 Pre-uninstall Summary

It informs user what and from where it will be uninstalled.

6.3 Uninstall

It informs user about uninstallation in progress. No progress bar is shown.

6.4 Post-uninstall Summary

It informs user what was done and eventually shows errors/warnings which occurred during uninstallation.


7 JVM resolution

Installers are built as binary executable files. Native launcher for corresponding platform is used to start installer. Native launcher also look for JDK to run installer on. Required JDK is the same as JDK required by IDE. JRE is not accepted as JRE is not enough to run IDE. Rules for JVM resolution are set using InstallShield text jvm files. JDK versions are searched in following order (applies to Sun JDK as currently no other vendor provides JDK version > 1.4.2, though we do not require any specific vendor in JVM search instructions):

  • JDK 1.5.0_X
  • JDK 1.4.2_X
  • JDK 1.6.0_X
Following JDKs (in alphabetical order) are accepted
  • Linux
    • Blackdown JDK 1.4.2
    • IBM JDK 1.4.2
    • Sun JDK 1.4.2_X
    • Sun JDK 1.5.0_X
    • Sun JDK 1.6.0_X
  • Windows
    • IBM JDK 1.4.2
    • Sun JDK 1.4.2_X
    • Sun JDK 1.5.0_X
    • Sun JDK 1.6.0_X
Search instructions contain some generic and some platform specific hints to locate JDK installed in system. Generic hint is list of typical (default) locations of JDK called path hint. Platform specific hints are:
  • Value of environment variables JDK_HOME, JDKHOME, JAVA_PATH, JAVA_HOME on Linux
  • Registry entries specific for Sun/IBM JDK on Windows
Search instruction files are shared among installer projects and are located at /cvs/installer/lib/resources and have suffix 'jvm'.


8 Platform specific settings

8.1 Linux

Default L&F is set to Metal L&F. Also panel background color is set to [230,230,230] because default panel background color on JDK 1.5.0 is too dark.

8.2 Windows

Default L&F is native. It means Windows XP L&F on Windows XP and Windows Classic L&F on Windows 2000 and older.

Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by