WindX Auto-Download |
|
PxPlus offers two auto-download features on WindX:
|
Used to ensure images and utility programs are accessible on the workstation and in sync with the host copies. | |
|
Automatically downloads directories to the workstation whenever the user connects to the system. |
This facility is designed to be compatible with most of the recent WindX versions. See Compatibility.
Since WindX can be used by multiple applications, it is strongly recommended that you review and adhere to the Download Guidelines.
The dynamic auto-download feature of WindX is designed to simplify the distribution and access to images and programs. This feature solves the problem of maintaining current information and programs on WindX connected clients. It avoids having to make common directories accessible across the network. It offers the following capabilities:
The auto-download system includes automatic version checking to make sure that the program and/or images residing on the workstation are the same version as the copies on the host. If the host version has a different last date modified, the host version will be re-downloaded onto the workstation. This guarantees all the images and programs at the workstation will be the most current at all times.
You can control the auto-download feature through the '+U' system parameter.
Clearing Temporary Download Directory
Files downloaded to the temporary download directory ("*plus/wdx/tmp") are automatically removed from the workstation if not accessed for 30 days. If desired, you can remove more recent files by calling:
CALL "[WDX]*plus/wdx/util;Clear_tmp", number_of_days
Where:
number_of_days contains how many days of images you wish to be left on the workstation. Specifying zero results in all files in the temporary download directory being removed.
The static download facility allows the developer to define a series of directories on the host that will be downloaded to the workstation during the connect sequence.
When the workstation connects, the system will determine if the host static directories have changed and, if so, it will prompt the user to accept the changes. If the user accepts the upload request, all files changed on the host will be downloaded into their appropriate directory on the workstation.
If a file is busy, the current file will be renamed .BAK to allow the update to proceed. This allows the .EXE to be replaced
Static Download Configuration File
The definition of the static directories is controlled by the file "*plus/wdx/usr/sync.conf" on the host. This file contains a series of statements that define the various configuration parameters for the automatic synchronization of files between the host and a WindX workstation.
The logical target directories that are supported in the configuration file are:
|
[EXEC] |
Workstation directory where the .EXE and .DLL files exist. |
|
[LIB] |
Workstation directory where the library exists. |
|
[WINDX] |
Workstation directory where WindX and its file exist. |
Example:
/pxplus/wndxupd=[EXEC]
/pxplus/wndxupd/windx=[WINDX]
A ;Restart option can be added at the end of the line, which, if any files were copied, will force the user to exit WindX.
Example:
/pxplus/wndxupd=[EXEC];restart
In addition, the +RESTART= directive allows you to define the message text to display when the user is forced to exit/restart WindX. This message can be created in any language you choose.
Whenever you change the configuration file or make any changes to the files that are to be updated, you need to run "*plus/wdx/reload". This program will re-examine all the host directories and record the version information (date modified) for all files it finds. This version information will be compared to the version information kept on the workstation in a ".plusvers" file in each directory in order to determine which files need to be updated.
Defining Directories to Download
The configuration file specifies the names of the directories on the host that you want to transfer to the workstation. Each directory to transfer should be followed by an = (equals sign) and the target directory on the workstation. Each host directory must have a target directory assigned on the workstation. The format of the lines is:
hostpath=windxpath
The system will send all files from the host directory to the directory specified on the workstation. The target directory on the WindX client will be automatically created, if required. Only files that do not start with a period are downloaded. Sub-directories within a host directory are not processed. They should be defined individually.
Example:
/myapp/helpfiles=*user/helpfiles
This would cause the system to download all files found in /myapp/helpfiles to the workstation directory *user/helpfiles. The system will automatically create the target directories as needed.
One of the most common directories to be synced is the application "*bmp" directory, which would be specified as follows:
*bmp=*bmp
In addition to directory definitions, the configuration file can also contain various parameters. All parameters start with a + (plus sign).
Parameter |
Description |
+FORCE |
This parameter, if present, indicates that the user must accept the updates in order to proceed. Without this parameter, the user is given the choice of YES to update, NO to not update, or CANCEL to quit WindX. Adding this parameter to the configuration file restricts the user to OK to update or CANCEL to quit. |
+TITLE |
This parameter is used to define the title bar for all the windows that will be displayed during the auto-update. Example: +TITLE=Jones and Smith Application update |
+PROMPT |
This parameter can be used to define the message text to display to the user when the system detects that the workstation needs to be updated. Example: +PROMPT=Do you want to allow your workstation to be updated\n with files from the host? |
This parameter can be used to define the message text to display to the user when the system has to restart the connection due to an update. Example: +RESTART=Connection must be restarted | |
+SYNCFILE |
This parameter allows you to override the default file name that will be used on the workstation to record the current download version information. The file will be created in *plus/wdx, and the name of the file should contain a unique application identifier with a suffix of ".sync". See Download Guidelines. If omitted, a default of "windx.sync" is used. Example: +SYNCFILE=easyapp.sync This example would create a file "*plus/wdx/easyapp.sync" on the user's workstation, which will contain the version information for the last update. |
+ONERR=x |
You can control how errors are handled by adding a '+ONERR=x' option to your configuration. If 'x' is set to "A", then the upload will abort. For any other value or no setting (or if +ONERR= is set to "R" and initial retry failed), the error will be displayed with the user being presented with the option to Abort, Retry or Ignore. |
You may include "\n" within the +PROMPT or +RESTART value to indicate a new line is to be inserted, "\r" to insert a carriage return or "\t" to insert a tab character. If desired, you can also specify +PROMPT= (or +RESTART=) to append to the prompt, allowing you to define the message text on multiple lines in the configuration file.
Comment Lines
Any line starting with an ! (exclamation point), ; (semi-colon) or # (pound sign) is considered a comment in the configuration file.
The auto-download capability is designed as such that most current versions of WindX on the workstation do not need to be updated to support this capability.
Since WindX can be used by a variety of applications and can be installed in a variety of locations on a workstation, it is strongly recommended that you adhere to the following guidelines:
|
1. |
Only download to locations relative to the system library; that is, all target directories should start with an * (asterisk). | ||||||||||
|
2. |
Avoid the use of relative pathnames as your target directory on the workstation. You cannot guarantee from what directory WindX is running. | ||||||||||
|
3. |
While programs can be included within a Static Download, the suggestion is to use the Dynamic Download facility for programs. This will make it easier to correct problems in the field rather than forcing all the users to log off and back on in order to get corrected programs. | ||||||||||
|
4. |
Since it is possible that the copy of WindX installed on the workstation will be used by multiple applications, always prefix your target download directories with an application identifier.
|
The auto-download capability includes two special calls that provide on-the-fly upload and download capabilities for WindX clients. These are:
To send a file to the workstation:
CALL "*plus/wdx/util;Send_to_wdx", host_file$, windx_file$, asciiflg
To retrieve a file from the workstation:
CALL "*plus/wdx/util;Get_from_wdx", windx_file$, host_file$, asciiflg
Where:
host_file$ |
This contains the pathname of the file on the host to send or target host file to receive the workstation file. |
windx_file$ |
This contains the pathname of the file on the workstation to receive the file or the file to be retrieved. When sending a file to the workstation all intervening directories will be created as required. (This file must contain a full directory name, which has at least one subdirectory this is to minimize security risks around accessing files.) |
asciiflg |
Option numeric flag to indicate if the file contains ASCII text lines. If set to one (1), then the standard Windows $0d0a$ will be converted if required to the end of line character for the current host operating system. Default is 0 - the file is not ASCII text. |
To stop the auto update from updating client workstations, rename the host.sync file in *plus/wdx.