Is this new updates feature meant only for JWS users, or also windows installers?
Actually it's more for the other kind of distribution, because in many cases, the Java Web Start will update the program automatically! [;)]
As I thought the updates feature could interest people who program plug-ins and derived versions of Sweet Home 3D, I programmed it in such a way it could be adapted to these versions too. It requires an XML file that uses the DTD described in
HomeController.UpdatesHandler class. The place where this XML file is stores comes from the
com.eteks.sweethome3d.updatesUrl System property, or from the
HomeController.updatesUrl property written in
com/eteks/sweethome3d/viewcontroller/package.properties resource file (equal by default to
http://www.sweethome3d.com/SweetHome3DUpdates.xml).
Each
update XML element describes the update of an identified resource, either the program itself or a SH3F, SH3T, SH3L or SH3P file. The id of the program is retrieved with the
HomeApplication#getId method (
overridden in SweetHome3D class to return the value of the
com.eteks.sweethome3d.applicationId System property or
SweetHome3D.applicationId resource property) and the id of the libraries comes from the new
id property they can now define in the properties file they include. For Sweet Home 3D, the default id is
SweetHome3D#ExecutableJar (since an Executable Jar file should be able to run alone with no additional arguments), the id for installers is
SweetHome3D#Installer (see for exemple the
Windows exe Launch4j file), the id for the portable version is
SweetHome3D#Portable (see
here) and for Java Web Start, it's
SweetHome3D#JavaWebStart. The different ids will generate
customized user agent during HTTP requests for the XML update file, and will help me to gather statistics on program use. Of course, this will concern only
online users who kept the
Check updates at program launch option
selected but still it should be interesting to get this information. For people who fear some spyware feature, don't worry : the user agent gives the same kind of information as would browsers: the id of the program, its version, the OS name and architecture, and the user's language and country. Nothing more, nothing less.
Hope this will help. [:)]
Don't hesitate to suggest any improvement before the final release, in case I could have forgotten something.