PCK
block describes a single package
in the current or an external archive.
This can only be specified at the root level in the script, i.e. in the
WARPIN
block. The only exception
is that PCK
elements can appear within
GROUP
elements to group packages
together.
See the "Installation Scripts"
page for an overview where this element should be placed.
See "Minimum script for one package"
for a sample script with a simple PCK
element.
You must specify at least one PCK
block in the script, but
you can specify more than one. The PCK
blocks in the
script must match the physical packages in the archive file (the WPI file
created with WIC.EXE
).
Syntax:
<PCK INDEX="x" PACKAGEID="vendor\application\package\major\minor[\revision]" TITLE="title" [SELECT="{YES|NO|NODESELECT}"] TARGET="path" [BASEPATH="{YES|NO}"] [FIXEDPATH="{YES|NO}"] [EXTERNAL="archive"] [REQUIRED="{YES|NO}"] > <DESCRIPTION> ... </DESCRIPTION> [<CLEARPROFILE ... />] [<CONFIGSYS ... />] [<CREATEOBJECT ... />] [<EXECUTE ... />] [<KILLPROCESS ... />] [<REGISTERCLASS ... />] [<REPLACECLASS ... />] [<REQUIRES> ... </REQUIRES>] [<WRITEPROFILE ... />] </PCK>In between the
<PCK>
and </PCK>
tags,
you must specify a DESCRIPTION
element. All the other elements are optional.
Attributes:
INDEX="i"
This must be 1 or greater; an index of 0 is not supported. Specify the same
package number here as on the WIC.EXE
command line when creating the archive.
Note that this index only has to be unique for the archive to which the script
belongs. It is not stored in the global database and only used while the archive is
opened by WarpIN. To identify the package after installation, WarpIN will use the
PACKAGEID
attribute (below).
PACKAGEID="vendor\application\package\major\minor[\revision]"
See "Package IDs" for details.
TITLE="title"
PACKAGEID
attribute.
This is also stored in the global database and re-displayed during
de-installation. However, this is purely informational and not used to
identify the package. In the above example, you would probably specify
TITLE="Spelling dictionary"
.
SELECT="{YES|NO|NODESELECT}"
SELECT="YES"
initially selects the package for installation.
SELECT="NO"
does not initially select the package. This is
the default.
SELECT="NODESELECT"
initially selects the package. In addition,
the package cannot be deselected. Useful for "base" packages on which other
packages depend.
Note: This does not store dependencies in the database.
For more complicated dependencies,
you should use the REQUIRES
element.
TARGET="path"
"C:\TEST"
)
which WarpIN will initially propose to the user as the installation path
for the package. Normally, the user can then change this target path,
unless you also specify the FIXEDPATH="YES"
attribute (below).
This attribute supports macro resolution.
Note: In order to save the user from having to change the target path
for every package that is installed, WarpIN supports two predefined environment
variables called WARPIN_DEFAULTAPPSPATH
and
WARPIN_DEFAULTTOOLSPATH
. It is strongly recommended for archive
creators to use one of these two variables in the TARGET
attribute.
See "Script variables" for details.
Example:
TARGET="$(WARPIN_DEFAULTAPPSPATH)\SuperWord" TARGET="$(WARPIN_DEFAULTTOOLSPATH)\SuperUtility" TARGET="?:\OS2\DLL" TARGET="$(MMBASE)\DLL"
BASEPATH="{YES|NO}"
BASEPATH="YES"
,
the package's path is considered a path
on which the paths of other packages depend. That is, if the user changes the path
of this package on WarpIN's container page, WarpIN goes through the paths of the
other packages and automatically updates them too if it finds the old base path
in the paths of other packages.
The default is BASEPATH="NO"
.
Example:
<PCK INDEX="1" ... TARGET="C:\TEST" BASEPATH="YES">Package 1</PCK> <PCK INDEX="2" ... TARGET="C:\TEST\SUBDIR">Package 2</PCK> <PCK INDEX="3" ... TARGET="D:\OTHER">Package 3</PCK>If the user changes the path of the base package (index 1) to
"D:\TEST2"
,
the path of package 2 will automatically be changed to "D:\TEST2\SUBDIR"
.
However, package 3 will not be changed since it does not contain the
"C:\TEST"
substring.
FIXEDPATH="{YES|NO}"
FIXEDPATH="YES"
,
the path of this package specified by
the TARGET
attribute cannot be changed by the user.
This is useful for files which must be written to the OS/2 system directories.
Otherwise (FIXEDPATH="NO"
), the user may change this on WarpIN's
container page. This is the default.
EXTERNAL="archive.wpi"
archive.wpi
instead.
WarpIN only searches for archives in one directory, the directory where the original archive (the one WarpIN was started with, whose script is used) resides.
If the archive is not found, WarpIN's behavior is determined by the
REQUIRED
attribute (below).
The script in the external archive
does not get parsed; WarpIN will simply check archive
for
whether it contains a package with the index that was specified with this
PCK
tag. You may use the same external archive
for multiple packages (with different indices, of course).
In other words, if you use external archives, package indices must be unique
among all archives.
REQUIRED="{YES|NO}"
This mostly makes sense in conjunction with the EXTERNAL
attribute.
If an external archive is not found and REQUIRED="YES"
is specified,
WarpIN will display an error message. Otherwise (REQUIRED="NO"
, which
is the default), WarpIN will simply not display the package on the "Container"
page and continue.