freeDelivery

How-To

Please also read freeDelivery's built-in help for details on using the program.

  1. Writing TCL scripts that execute after the installation process.

  2. Substituting environment variables into the installation paths at install time.

Writing TCL scripts that execute after the installation process

With freeDelivery, a TCL script can be executed after all files are copied but before the program exits. The TCL script is run within a slave TCL interpreter created by the distribution program.

In addition to the normal TCL commands, some special commands provided by freeWrap are also available to the TCL script. These commands can be helpful under Windows to create shortcuts, place icons on the Desktop and add items to the Start Menu.

The following array variables are provided to the after-installation script.

Variable Description
pkgDefault Each array index consists of the name of one package contained in the distribution.

The value of the array item is either 1 (True) or 0 (False). A value of 1 indicates that the package was installed. A value of 0 indicates it was not.
pkgDefDir Each array index consists of the name of one package contained in the distribution.

If the value of the corresponding pkgDefault array item is True, the value of the pkgDefDir array item reflects the final directory into which the package was installed.

The script will be embedded into the distribution program when it is built. If the script is one of the installed files, the script will be executed from the after-installation location. The embedded copy of the script will be executed only it its name does not match one of the installation files.

Substituting environment variables into the installation paths at install time.

The value of environment variables can now be substituted into installation paths at installation time. Any environment variable that exists at the time of running the installation package may be substituted at the start of an installation path. The name of any % sign delimited environment variable will be replaced by the variable's actual run-time value at installation.

For example.

  1. Assume that the target computer has an environment variable, named windir, which specifies the location of the Windows system directory.

  2. Assume the value of this environment variable is C:\WINNT40.

  3. Assume the default directory for a package has been specified as %windir%/myApp/bin

  4. At installation time on the target computer, the default installation directory presented to the user will be C:/WINNT40/myApp/bin.

On Windows systems, the environment variable ProgramFilesDir will be provided by freeDelivery if not already defined on the target machine. The value of this variable will consist of the default program installation path for the computer. Therefore, %ProgramFilesDir%/myApp/bin could be replaced by C:/Program Files/myApp/bin on the target machine.


 Send comments to freewrapmgr@users.sourceforge.net