Skip to content

Developers: Updating and Releasing a New Version

kalden edited this page Mar 18, 2013 · 7 revisions

This page is only relevant to those developing iDynomics who are responsible for releasing a new stable version of the software.#

We have made iDynoMiCS available in two ways:

  1. The github - making the 'bleeding edge' code available
  2. Via 'stable releases' - packages that we release every so often containing fixes and improvements that had already been uploaded to github.

This page focuses on how the update procedure, and how a new stable release should be introduced.

When a new stable release is required.

  • Log in to Github, and navigate to the iDynoMiCS repository. On the top left there is a 'zip' button. Press that to compress the repository into a new stable release.

  • The simulator checks whether it is the latest version of the software by comparing the current version number (specified in Idynomics.java, parameter version_number) against a version number in a html file in the online repository. This check is performed using methods in the Check_Release_Status class within the soft_update package. The file containing the version number of the latest release is called version.html. and is on the Kreft group website in the iDynomics folder. This contains a line in the format: [version]version_num[/version]. The first step is to increment this version number, and reupload the version.html file.

  • Once the simulator has checked this version number against its own and found it is not the current version, the simulator will display a Java Swing window, detailing the new additions and fixes in the new version. Again this is using methods in the Check_Release_Status to download a file containing details of the update. These details are also within a html file in the iDynomics folder, named history.html. Again this is in the format: [history]text[/history]. Document your changes within the two history tags. You can use html tags within the two square bracket tags. Upload the updated history.html document. PS: It may be an idea to keep the old history.html document for reference - maybe save the old one with its associated version number.

  • If the user clicks Update, then the simulation itself will close after launching the Java program within Update_iDynomics.jar. This needs to be the case such that all classes can be updated - if they are currently running the file may not be able to be changed. Although this runs as a separate entity, the class Update_IDynomics can be found in the main iDynomics repository, in the soft_update package. The jar is created from this class, and stored within a directory named updater within the iDynomics simulation package. This jar file must be shipped with the iDynomics repository for this update to work, and must reside within a directory called updater

  • This jar file refers to one more html file in the iDynomics repository that will need to be altered for each update - a file named url.html. This file, again of the format [url]web address[/url] is a web link to the new update file. This must be in the format of a zip archive containing the files that need to be updated in the simulation, in the directory structure that is identical to the simulation. Thus if an update was required for ActiveAgent.class, that is within the simulator.agent packages, this file would be within the folder structure src/simulator/agent as is the case for the simulation. Update this file and upload to the iDynomics repository.