Wednesday, July 2, 2014

NetBeans RCP installer version upgrade

So every other installation package I've ever used, allows you to upgrade your application, by changing its version number.

Not so with the NetBeans packager.

The NetBeans platform installer uses common code located in {nbdir}\harness\nbi\stub
Customizing these files and sources allows you to brand you installer, which is all nice, but you would not expect to have to customize these files in order to get your program to upgrade.

Product version is controlled in two files, both which need to be changed.
  1. product.version in {nbdir}\harness\nbi\stub\ext\infra\build\products\helloworld\build.properties
  2. version attribute in create-bundle > component in {nbdir}\harness\nbi\stub\build.xml 
These values must be changed, in order for the installer to allow the installation.

Stupid, but there you have it. Some day, when I have time, I'll try and automate it all.