Automatic Updates Component

From user's Wiki!
Jump to: navigation, search

You can update the version of any plugin or the GIMIAS kernel libraries. These fetaure allows to update the users with new version of your plugins.

Check for updates

When GIMIAS starts, it will check if new updates are available. You can modify the settings in the Preferences dialog.

Update preferences

When new updates are available, you will see a message:

New updates are available

You can click on the toolbar icon and a new window will be shown that allows you to select the desired packages.

Toolbar icon
Update dialog

You can see brief information about each package and select or deselect these. Once you have finished, you can download and install.

Download and Install

When the user clicks "Download + install", GIMIAS will be closed and the WebUpdate application will download and install the selected packages. Once it's finished, GIMIAS will be restarted again.

Advanced options

There are some advanced options:

Update advanced options

These are the advanced options:

  • You can choose the temporal folder where to download the selected packages
  • When your computer is inside a private network and you are using a proxy to access Internet, you need to configure the proxy settings
  • For specific GIMIAS package servers, you can specify the authentication settings
  • You can add more update sites. For example, you can configure your own server to update the users with new package updates

Web Updater

Automatic updates feature is based on a wxWidgets component called wxWebUpdate. You can find more information here: http://wxcode.sourceforge.net/docs/webupdate/index.html. The application has been extended for GIMIAS. One of the important extended features are:

  • Added compiler tag for package update
  • Allow to add multiple update sites
  • Avoid to use an xrc file for dialog and use wxGlade files converted to C++

You can find the application WebUpdate in the library TpExtLib. The application depends on two libraries: tpExtLibWxhttpEngine and tpExtLibWxWebUpdate.

Configuration files

There are two configuration files used by WebUpdate. The local configuration contains information about the local verion of each package. The remote XML script contains information about the new package version and what actions to take once it is downloaded.

Local Configuration file

You will find an example of local configuration file in the SVN: src\Apps\Gimias\resource\local.xml. This file contains the local version number of each plugin.

<?xml version="1.0" encoding="UTF-8"?>
<webupdate version="1.0">
  <appname>GIMIAS</appname>
  <appfile>gimias</appfile>
  <restart>0</restart>
  <savelog>1</savelog>
  <remoteuri>http://www.gimias.org/update/GIMIAS_1_4/UpdateServerScript.xml</remoteuri>
  <keywords></keywords>
  <local-package id="Core">
    <version>1.4.0</version>
  </local-package>
  <local-package id="CardioToolsPlugin">
    <version>1.4.0</version>
  </local-package>
</webupdate>

You can find the description of all tags here: [1]

Remote XML Script

You will find an example of remote XML script in the SVN: src\Apps\Gimias\resource\UpdateServerScript.xml. This file contains the information for each update for each package. This file should be stored in the server.

<?xml version="1.0"?>
<!DOCTYPE webupdate PUBLIC "-//WebUpdate//DTD WebUpdater 1.0//EN" "http://www.gimias.org/update/remote.dtd">

<webupdate version="1.0">

  <msg-update-available>Some updates for "$(appname)" are available</msg-update-available>
  <msg-update-notavailable>You have the most updated version of "$(appname)"...</msg-update-notavailable>
 
  <package id="DicomPlugin">
      <latest-version importance="high">1.4.1</latest-version>

      <latest-download>

        <uri>http://www.gimias.org/update/GIMIAS_1_4/DicomPlugin-$(latest-version).zip</uri>
        <md5>AD6AFC1583E0503C29BFF47393C0B83F</md5>
        <platform name="msw" arch="32" compiler="VS2010"/>

        <actions>
          <extract file="$(thisfile)" where="$(programdir)"/>
        </actions>

      </latest-download>

      <description>The package containing the binaries for DICOM Plugin in debug mode </description>
  </package>

</webupdate>

Description:

  • The field md5 is a security field that will be verified when the package is downloaded in the local computer. In Windows, you can generate a MD5 value for a zip package using this tool: File Checksum Integrity Verifier utility
fciv DicomPlugin-1.4.1.zip
  • platform: is used to specify the compatible platform for this package. This settings should match the platform of the local GIMIAS application.
  • actions: actions to perform on the downloaded package.

You can find the description of all tags here: [2]

Go back to GIMIAS Architecture