Updating the base NetBeans Platform for my application

"jhuber" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Peter Hansson wrote:
> @Johannes: When you update a deployed application using the Update Center method all that really gets updated are modules in a writable user-specific directory. On Windows that would typically be in %APPDATA% somewhere. 
> 
> However, the core of your application doesn't get updated ... because it can't. Again using Windows as example the core of your deployed NetBeans Platform application lives in %ProgramFiles%.  So whatever you do there will always be a core left of your deployed application which is tied to NB version you originally released your version on.
> 


I have been experimenting with updating platform modules, and I found somewhat different behavior than what you describe.  Whether or not the "core" platform gets updated seems to depend on where the application is installed.

To make a long story short, I have tweaked the Auto Update Services and Auto Update UI modules.  I updated the Specification Version number for my patched modules by adding a ".1" to the end of the existing number.  In the IDE, by opening the Plugins window and navigating to the Settings tab, you can find the update center xml file for the NetBeans Distribution, open it up, and get the xml fragments necessary to update the patched platform modules.  You can add these xml fragments to you own update center xml file, modify the fragments as necessary, dump the NBMs into your update center, and the platform modules will be updated.  

I have two installations of my platform application for testing.  One is Windows 7 where the app is installed in the normal Program Files location using a Windows Installer.  The other one is installed on a Windows 2012 R2 server on a data drive that is open to all users.  For this one, I made a zip distribution and just dumped it on the drive.

For the Win7 app, it is as you describe above, where the platform in Program Files is not touched (can be verified by looking at the creation date of the modules in the platform folder).  The patched platform modules are found in c:\users\username\AppData\Roaming\.myapp\dev\modules, and are apparently loaded from there, because the log shows that my version of the two patched platform modules are being loaded.

However, on the server, c:\users\username\AppData\Roaming\.myapp\dev\modules is not created.  And looking in the platform folder for the application, the creation date of the two patched modules is the date I created them, while all the other modules have their original creation date.  So in this case, it appears that the modules in the "core" platform are being updated.

So, perhaps if the application is installed to a location that not protected by the Windows operating system, the "core" platform would be patched???  My next test will be to create a Windows installer that creates and installs to a folder directly on c:\, and avoids the Program Files folders.

This also raises an issue for applications installed on a server where multiple users access the application.  If one is using an update center for a NetBeans platform app, and the app is installed "normally" in the system-protected Program Files location, it seems that each user would have to individually install updates from the update center.  This is probably not an ideal situation, since it does not allow for application updates to be applied by the server administrator.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.