LiveUpdate mechanism

Top  Previous  Next

The DataPackURL link inside the products.xml points to a folder on a webserver of yours. From this folder, new files (products, layouts, templates, setup installers) are automatically distributed to your Publisher installations. If your webserver has PHP installed, you can use the Source\4all.EN\Sample DataPackURL (index).php from the SetupWizard as a base for defining which files to distribute. After you modify this file, rename it to index.php and place it in the folder at the DataPackURL location.

lightbulb_on

An example of the index.php can be seen here.

The DataPackURL on your server should host at least your products.xml file, which contains current prices, product options & descriptions. The files (incl. products.xml) at the DataPackURL are downloaded:

1.When the user selects a new product for which the layout & template files were not yet installed.
2.When an update interval has occurred (see AutoUpdateDays in the SetupWizard) and the MD5 checksum (or $version string) of a file has changed at the DataPackURL.
3.Whenever a document is validated, the products.xml is downloaded to insure that the selected options still exist and the price has not changed.

 

Update Triggers
The following 3 update triggers are available:

1. In order for the Publisher to update product and branding files automatically:

The files on the server must be newer than the ones on the PC (changed MD5 checksums).
AutoUpdateDays on the client must be a value higher than 0, and the last update date must have passed.
The Publisher must have internet access, and the user must allow a download.
The index.php (or likewise) at the DataPackURL must list the newest files AND the corresponding MD5 checksums.
Product files will also be downloaded, if DownloadLayouts was checked in the SetupWizard, and the product is not present or is outdated on the PC, when the user selects the product in the product wizard dialog of the application.

2. In order for the Publisher to update the program binary (i.e. itsself), the $version string of the branding\publisher-setup.exe inside the index.php must be modified to a higher number. For this file only, a different MD5 checksum is not sufficient! You can change version numbers up to a precisions of 3 - example: 3.8.2. Please read the chapter on version numbers for more info.

Unfortunately, you cannot force a user to install or update something. However, there's a subtle and a brute force mechanism to remind him that his version is outdated:

3. Update all products at the DatatPackURL, including the products.xml. Inside the products.xml, change the property compatible or ExpireDate in order to force an update. For instance, if you set compatible to 3.5, and put the changed products.xml into your DataPackURL folder, then the next regular download of the products.xml will cause all Publisher versions below 3.5 to become outdated, forcing the user to a software update. ExpireDate will force the user to connect to the internet, if he has not updated his installation and products for a while.

Using compatible is the brutal way. Usually the AutoUpdateDays value from the SetupWizard should be set to around 3 days, causing a gradual update process within your user base. Make sure to also update the version number in the index.php file inside your DataPackURL folder, so the user sees what he is downloading.
 
Setting compatible, the Publisher closes after this message:

 _img21

 
Setting ExpireDate, the Publisher continues with this message (also during ordering):

 _img22

2015 © 3P Photobook Publisher