NetBeans IDE + JDK Bundle 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
NetBeans IDE + JDK Bundle Installer installs NetBeans IDE and Sun JDK and public
Sun JRE on Windows. (On Windows JDK and public JRE are installed separately.)
During installation uninstaller is created to uninstall NetBeans IDE. JDK/JRE
must be uninstalled separately. 32bit JDK is bundled for all supported platforms.
Installer also bundle Sun JRE 1.4.2_07 which is used to run installer.
Installer supports following platforms:
- Solaris on Sparc platform
- Solaris on X86 platform
- 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 Solaris/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 'jdkbundle' of CVS module 'installer'. It depends
on subcomponent 'lib'. It is free form NetBeans IDE project.
Directory /cvs/installer/jdkbundle 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.
-
linux.xml solaris-sparc.xml, solaris-sparc.xml, windows.xml are InstallShield project XML files
for corresponding platforms. Projects are in separate files to avoid complex XSL transformation
from one project template.
- 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.
- scripts directory contains script templates used to run JDK/JRE installer.
- src directory contains Java sources of installer.
3 Building installer
NetBeans IDE 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
-
Bundled JVM in form required by InstallShield (zipped JRE with unzip stub ie. executable
zip file, zip must also contain text file 'jvm' with JRE description). Sun JRE 1.4.2_07
is now used. Windows JRE must contain support for non european languages.
(Windows JRE has optional features. Non Windows JREs has this support automatically.)
- Sun JDK installers
Following build targets are provided in build.xml:
- 'build-linux',' build English installer for Linux
- 'build-solaris-sparc',' build English installer for Solaris Sparc
- 'build-solaris-x86',' build English installer for Solaris x86
- 'build-windows',' build English installer for Windows
-
'build-linux-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installer for Linux
-
'build-solaris-sparc-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installer for Solaris Sparc
-
'build-solaris-x86-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installer for Solaris x86
-
'build-windows-ml' build ML (English - en, Japanese - ja, Simplified Chinese -zh) installer for Windows
- 'clean' delete build and clean directory and also call clean for shared library at ../lib
Build script uses NetBeans IDE uncompressed build, storage builder jar and some other data file
as input for building installers. File ProgrammingNotes.txt contains description how to set
these input files.
4 InstallShield project description
Product tree consists of 4 elements:
- Root node 'beanProduct'. It defines whole product and is parent of all nodes in product tree.
- NetBeans IDE component 'beanCoreIDE'.
- NetBeans IDE files and file 'netbeans.desktop' used as template to
create desktop icon in Gnome Window Manager (Linux/Solaris)
- PostInstallFixup action performs tasks after installation/uninstallation.
- Desktop Icon creates/removes desktop icon on Windows.
- Programs Menu creates/removes items in Programs menu on Windows.
- J2SE component 'beanJ2SE'.
- J2SE files: JDK installer and script templates used to run JDK installer
-
Install J2sdk Action action runs JDK (and public JRE installer on Windows for JDK 5.0
and greater version) in silent mode.
Installer waits till script finishes. Progress bar is also updated according to storage
builder progress. Estimation is computed from disk usage used by files installed
by JDK installer to JDK install directory.
- Storage Builder component 'beanStorageBuilder'.
- Storage Builder files
-
Storage Builder action runs storage builder during installation. Storage
builder is run as separate process. Shell script (Linux/Solaris) or batch file (Windows)
is started from installer. Script starts Java process which runs storage builder.
Installer waits till script finishes. Progress bar is also updated according to storage
builder progress. Estimation is computed from disk usage used by temporary files
generated by storage builder.
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. It also disable storage builder component (ie. storage builder
will not run during installation) on Windows 95, Windows 98 and Windows ME. (It is done to avoid
problems with running batch file on these OS versions.) It also looks for installed JDK/JRE on Windows
in registry. If the same JDK/JRE is already installed it will not be installed again.
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 for NetBeans IDE and JDK. 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 Install Location Panel
In this panel user can select NetBeans IDE and JDK install location. Default install
location is at user home dir. On Windows install location of public JRE cannot be set.
Public JRE is installed to default location which is
"<System Disk>\Program Files\Java\<JRE dir> eg.:
"C:\Program Files\Java\jre1.5.0_02".
User can either directly edit install location in edit
box or press Browse button to invoke file chooser dialog to select install location.
Validation of selected install locations is performed when user presses Next button.
5.5 Invalid Install Location
Install location is checked if it is valid. If not panel with error message is displayed and
installation will not continue. User can either return back to previous panel and enter valid
install location or user can cancel installation.
There is ValidInstallLocationCondition to check validity of install location.
5.6 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.7 Pre-install Summary
It shows information about what product will be installed where it will be installed
and how much disk space it will take.
5.8 Install
Install action performs actual installation. It shows panel with progress bar.
5.9 Post-install Summary
It informs user what and where was installed. It also shows how to run and
uninstall Netbeans IDE, how to uninstall JDK/public JRE.
6 Uninstaller sequence
Uninstaller sequence defines wizard panels/actions which are shown/performed
during uninstallation. Only NetBeans IDE is uninstalled JDK and public JRE
must be uninstalled separately. 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. It also shows info about user dir which is not removed by uninstaller.
7 JVM resolution
Installer uses its own bundled JRE to run itself. Bundled JRE is unzipped to
temporary directory and then installer is started.
8 Platform specific settings
8.1 Linux/Solaris
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 XP L&F on Windows XP and Classic L&F
on Windows 2000 and older.