<PCK>
tag accepts so-called macros. These are used to insert variable data which is
unknown at the time that you create the install script.
The list below shows the macros which are currently defined. Note that macros are only resolved for the tags/attributes where this documentation explicitly states that macros can be used (i.e. links to this page).
WarpIN resolves macros in the order of this list.
Note that the quotes are not part of the macro definition.
"?:\"
: if this is found, the "?" character
will be replaced with the letter of the
OS/2 boot drive.
This is useful if you need to put files in the OS/2 system directories.
Example:
<PCK ... TARGET="?:\OS2\DLL" FIXED>
This specifies the \OS2\DLL
directory as the target path for
a package, which cannot be changed.
"$(i)"
"$(/i)"
i
being a package index):
this will be replaced with the target path of the package which has
the index i
.
If the first character is a forward slash ("/"
), the resulting
path will be converted to the UNIX convention, i.e. all backslashes will be
converted to forward slashes. This is useful if you need paths in UNIX style,
e.g. for environment variables and EMX ports (V0.9.6).
Example:
<PCK ... CREATEOBJECT="WPProgram|SuperWord|<WP_DESKTOP>|EXENAME=$(1)\bin\suprword.exe;OBJECTID=<SUPERWORD>" >creates a program object on the Desktop for the executable residing in the
bin
subdirectory of the install path of package 1.
"$(vendor\application\package)"
"$(/vendor\application\package)"
REQUIRES
attribute to
the PCK
tag so that a proper error message can be displayed if this
package is not installed.
If the first character is a forward slash ("/"
), the resulting
path will be converted to the UNIX convention, i.e. all backslashes will be
converted to forward slashes. This is useful if you need paths in UNIX style,
e.g. for environment variables and EMX ports (V0.9.6).
This can only be used to reference packages which have previously been installed, not to reference packages in the same archive. Use the decimal index instead, as described above.
$(env)
(with env
being an
environment variable):
this will be replaced with the value of the environment variable "env".
Note that whenever WarpIN encounters a "$(xxx
)" string in a place where macro
resolution is allowed, and if "xxx" is not decimal (as above) and contains no
backslash (\
), it is assumed to be an environment variable.
If the environment variable cannot be resolved, WarpIN prompts the user
for entering a value. It is recommended to declare such environment variables
in the HEAD
block also using the
VARPROMPT
tag.
WarpIN predefines a number of environment variables which can safely be used from install scripts. See "Script variables" for details.
Example:
<PCK ... TARGET="$(MMBASE)\DLL" FIXED>specifies the
DLL
subdirectory of the MMPM/2 system directory
as the target path for a package. This variable is normally specified
in CONFIG.SYS
if MMPM/2 is installed.