Edvin has posted 8 posts at DZone. View Full User Profile

Multiplatform Installer for NetBeans Platform Applications

09.20.2010
| 9361 views |
  • submit to reddit

Even with recent advances in NetBeans, getting your NetBeans Platform application out to the public could be a lot simpler. First of all, having to build separate installers per platform is both time consuming and unnecessary, and adds to the build time and deployment time of every iteration of your application.

That’s why I created Wusher (WebStart Usher) – a specialized installer for NetBeans Platform applications. Your build script already creates a zip distribution either from Ant, Maven or directly in your IDE. Coupled with Wusher, that’s all you need to install a first class application on Windows, Mac and Linux.

Quick overview

As stated, you only need a single deliverable, not a separate build per target platform. Wusher will still do platform specific operations like adding icon to the dock and creating a first class app on the Mac, adding to the Start menu on Windows and adding to the Gnome/KDE menu on Linux. Also, you don’t need to merge your build with the installer, you just upload your zip distribution to any URL resolvable location and link to it from your installer.

You configure all builtin options directly in the jnlp file, you only need to write code if you would like to perform custom pre/post processing steps, like adding more wizard panels or adding options to existing panels.

The download screen on Linux

Try it directly by installing the Paint Demo from the NetBeans samples:

You can take a look at the jnlp file used to configure the above installer or browse the source code for the installer.

Here are some more screenshots:

The welcome screen on MacOS

The Accept License screen on Windows XP

The Finish screen on MacOS

Features

  • No need to build the installer into your deliverable, just link to the zip distribution via URL and configure the jnlp file
  • Optional license step, link directly to your license via URL
  • Configure header logo and icons (per platform)
  • Configure messages/i18n – easily translate or adapt all text in the installer by referencing a custom messages.properties via URL
  • Optional pre/post processing steps, like adding more options to the Finish screen, doing arbitrary work before/after the installation, adding new wizard panels.
  • Native look and feel, resembles the NetBeans installer slightly
  • Install multiple applications from same installer (only 250k), just supply different jnlp-files.
  • WebStartable, but keep the NetBeans module system intact

Installation

Just build your zip and configure the jnlp, optionally sign your own version of the installer jar and put on your webpage. The installation options are documented and rather self explanatory directly in the jnlp file.

Status

The product should be considered alpha quality, though there are no known bugs. If there is any interest, I could add stuff like jnlp creation wizards etc. I would love to get your feedback!

Published at DZone with permission of its author, Edvin Syse.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Edvin Syse replied on Wed, 2010/09/22 - 1:18pm

The installer will now also run as an applet, check it out here:

http://blog.syse.no/edvin/assets/paintit-applet.html

Javier Ortiz replied on Thu, 2010/09/30 - 8:37am

This is just amazing! I demand a configuration tutorial! Can it be deployed to a local server in case FW prevent you from using the provided one? I was missing the uninstallation part. Feature Request? A wizard to create your configuration straight from the IDE would be a great +.

Edvin Syse replied on Sun, 2010/10/03 - 12:19pm

Hi Javier,

I'll add uninstallation and a wizard to create the configuration/download/sign the installer jar, WebStartable as well. Just need to finish my current project (a Swing databinding framework), and then I'll get back to you :)

Matt Coleman replied on Tue, 2012/10/23 - 1:30am

this is just super.an NB multiplatform-installer

buffalo freelance web designer 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.