WIC.EXE
's usage,
type wic -ha
on the command
line.
This page will show you how to use the advanced command line options of
WIC.EXE
, whose usage might not be obvious.
Assume that you wish to create an archive containing two packages, one for
the language-independent stuff (called "Program") and one for the National
Language Support (called "NLS", containing resources and documentation).
Further assume that your program is called PROGRAM.EXE
and loads
an NLS DLL at startup, which holds language-dependent PM resources.
The easiest way to achieve this is to create two temporary directories on your
disk, one for each package, called, say, PROGRAM
and NLS
.
Into each directory, place the files as they would later be unpacked onto the
user's hard disk (even if the target directories for both packages will later be
the same). Example:
TEMP +-- PROGRAM (language-independent package, index 1) | +-- BIN (Files: PROGRAM.EXE) | +-- CONFIG (Files: PROGRAM.CFG, config text file) | +-- NLS (National Language Support package, index 2) | (Files: README.TXT) +-- BIN (Files: PROG001.DLL -- PM NLS resources) +-- HELP (Files: PROG001.INF, PROG001.HELP)Now place your installation script (called, say,
PROGRAM.WIS
) into
the parent TEMP
directory. To create an archive called
PROGRAM.WPI
, change to the TEMP
directory and type:
wic program.wpi 1 -cprogram -r * 2 -cnls -r * -s program.wis
This will create the two packages in PROGRAM.WPI
, changing to
PROGRAM
and NLS
before packing the files, respectively,
and recursing into the subdirectories. In the script, you should specify the
same target directory for the two packages and set the BASE
attribute
with the PCK
tag, so that both packages
will always be in the same target directory. The user will then get three subdirectories
in the target path, called BIN
, CONFIG
and HELP
,
and the README.TXT
file would be in the target directory itself.
This is basically how I create the XWorkplace archive myself, for example. To
automate this process, I have created a few batch files which automatically create
those temporary directories, copy the files which have been rebuilt to the proper
locations, and call WIC.EXE
,
so I won't accidentally forget a file in the archive.