ActivePatch Developer's Guide - Command-Line Utilities - Build

Create or modify a patch package.

Usage Message
Usage: Build operation files [ <options> ]
Operations:      -h This message (all other arguments ignored)
-c Create package
-d filename Delete filename from package, regardless of path
-m Modify package
-v detail Show package file information
   0=name,   1=name,method,type,   2=verbose
Files: -r oldfile Reference files specification
-n newfile Update files specification
-i installpath      Installation directory for package
-x exclude Specification of files to be excluded
-p pkgfile Package file
Options: -e expires Number of days from creation that patch may be applied
   0 means no expiration (default)
-w password Password (default none)
-o flags One or more package options (no spaces in list):
a      Ignore file attributes
b Backup files on target
f Use path rules to find files on target platform
m Multiple versions
n Ignore missing (non-existent) files
o Overwrite files
r Ignore readonly flag
s Ignore signature
t Ignore file times
v Ignore file versions
-u flags One or more update options (no spaces in list):
r recursive
p      partial
a always replace
-t platform One occurrence of -t for each platform or platform group:
platforms:      95, 98, ME, NT40, 2000, XP
groups: 32, 9X, NT, ALL
default ALL
Description

The command-line utility build can be used to create or modify update packages.

It can also be used to display information about a package.

The utility prints progress messages to standard output while it is creating or modifying a package.

The parameters for this utility are divided into three categories: operations, files, and options. Each parameter consists of a dashed letter, some of which must be immediately followed by an additional, un-dashed parameter. The dashed parameters may be given in any order.

The operations are:

-c      Create package
-d Delete from package
-m Modify package
-v Show package information
-h Show usage message

The file parameters are:

-r      Reference file specification
-n Update file specification
-i Installation directory (If this parameter is missing, the files will be installed in the default installation directory on the target system.)
-x Specification of files to be excluded when building or updating the package
-p Package file

The reference and update file specifications are typically two directories, below which are two versions of a set of files. In general, the reference files are older and the update files are newer, although the time distinction is not enforced. The package file describes the changes that exist from the reference files to the update files.)

  • If -h (show usage message) is specified, then all other parameters will be ignored.
  • -c (create package file) and -m (apply package file) may not both be specified.
  • -v (show information) may be specified with either –c or –m, or by itself.
  • If either –c or -m is specified, then all of -r (reference files), -n (update file), and -p (package file) must be specified.
  • The names of the reference file specification, update file specification, and package file must be distinct.
  • If –v is specified, then the patch file must be specified.

The optional parameter -d (delete file) specifies a single file name, and may be used with either –c or –m or neither. If –d is specified, then the patch file must be specified. It results in the deletion of all occurrences of the file from the package. This is useful for eliminating files such as file transfer logs (e.g. WS_FTP.log) or source control marker files (e.g. vssver.scc) that may be meaningful in configuration control in a vendor’s environment, but are not intended for redistribution. The file parameter –x may also be used for the same purpose. The differences are that:

  • -d is used to specify a single file name, while –x can be used to specify a set of files (i.e., wild-carding is supported, and multiple files may be specified by separating them with a semi-colon).
  • -d can be used after a package has been built or updated, while –x is applied while the package is being built or updated.

Each of the options has a default value that is used if an option is not explicitly specified. The default values of the options are given in the usage message. The options are:

-e Number of days until expiration of the patch file (defaults to 0, meaning "no expiration")
-w      Password (defaults to "no password")
-o Package options
These options govern whether certain policy rules will be followed when the patch is applied. The options are:
a Ignore file attributes
Ignore the updated file attributes when the patch is applied on the target system and use default attributes instead.
e Ignore existing files
b Backup files on target
Create a backup of the file on the target system before applying the patch. If this flag is not specified, the file is modified in-place without any backup file being created.
f Use path rules to find files on target platform
When the patch package is applied to the target system, search for files using the standard Windows pathing rules.
m       Multiple versions
Multiple versions of the same file may be included in the package. If this option is not specified, a file with the same name will overwrite a previous file in the package.
n Ignore missing (non-existent) files
When the patch package is applied to the target system, ignore any missing files. That is, files for which there are patches in the package, but do not have old versions on the target system, will not generate errors.
o Overwrite files
When the patch package is applied to the target system, overwrite all files even if the file is not expected to exist. This option must be specified if one or more of the target files will have the read-only attribute set, otherwise the application process will fail with an error.
r Ignore readonly flag
Ignore the read-only file attribute when applying the patch. If the updated file has this attribute set, it will be cleared.
s Ignore signature
Ignore any digital signature that may be present. If the updated file has been digitally signed using AuthentiCode, the signature will be authenticated at the time that the patch is applied. If this flag is specified, no attempt is made to authenticate the signature. This flag has no effect on files that are not digitally signed.
t Ignore file times
Ignore any differences between the file modification times of the file on the target system and those of the reference file at the time that the patch was created.
v Ignore file versions
Ignore any differences between the version of the file on the target system and the version of the reference file at the time that the patch was created.
-u Update options
These options determine how updated files are added to the patch package. The options are:
r       Recursive
The reference and update directories should be recursively scanned for new, modified and deleted files. If this update option is not used, only those files in the specified directory will be included in the package.
p Partial
This is a partial update, therefore files missing from the update file directory should not be marked for removal from the target system.
a Always replace
Always replace changed files instead of creating a patch. The file on the target system will always be overwritten, regardless of its previous version.
-t Platform options
-t can appear multiple times in a command. All platforms indicated will be permissible for application of the package.

Package options, update options, and platform options that are specified at creation time are retained with the package. A package option that is specified at creation time will be used at application time, unless it is overridden at application time.

Examples

build –c –r olddir –n newdir –p package –u r
build –p package -d vssver.scc
build –m –r anotherolddir –n anothernewdir -o nrt -u rp –p package –v 1