4D v16.3

Automatic updating of server or single-user applications

Home

 
4D v16.3
Automatic updating of server or single-user applications

Automatic updating of server or single-user applications  


 

 

In principle, updating server applications or merged single-user applications required user intervention (or programming custom system routines): whenever a new version of the merged application is available, you have to exit the application in production and manually replace the old files with the new ones; then restart the application and select the current data file. 

You can automate this procedure to a large extent using the following language commands: SET UPDATE FOLDER, RESTART 4D, and also Get last update log path for monitoring operations. The idea is to implement a function in your 4D application triggering the automatic update sequence described below. It can be a menu command or a process running in the background and checking at regular intervals for the presence of an archive on the FTP server.

Here is the scenario for updating a server or merged single-user application:

  1. You transfer, for example using an FTP server, the new version of the server application or the merged single-user application onto the machine in production.
  2. In the application in production, you call the SET UPDATE FOLDER command: this command designates the location of the folder where the "pending" update of the current application is found.
    Optionally, you can recopy in this folder the custom elements of the version in production (user files).
  3. In the application in production, call the RESTART 4D command: this command triggers execution of a utility program named "updater" that exits the current application, replaces it using the "pending" update if one is specified, and restarts the application with the current data file. The former version is renamed.

Notes:

The installation procedure produces a log file detailing the update operations of merged applications (client, server or single-user) on the target machines. This file is useful for analyzing any errors that occur during the installation process. 

The update log is named YYYY-MM-DD_HH-MM-SS_log_<sequence>.txt, for example, 2013-08-25_14-23-00_log_1.txt for a file created on August 25, 2013 at 14:23. 

This file is created in the "Updater" application folder, i.e.:

  • under OS X:
    {userName}/Library/Appplication Support/{ProductName}/4D/Updater/
  • under Windows:
    \{userName}\AppData\Roaming\{ProductName}\4D\Updater\

You can find out the location of this file at any time using the Get last update log path command.

 
PROPERTIES 

Product: 4D
Theme: Finalizing and deploying final applications

 
HISTORY 

 
TAGS 

updater

 
ARTICLE USAGE

4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)