wiki:WPIBuild

Version 4 (modified by John Small, 17 years ago) (diff)

--

Building WarpIN (WPI) install files for FM/2

Prerequisites

  • A drive with long filename support
  • A functional FM/2 build environment. (See build instructions elsewhere for details.)
    • IBM VisualAge C++ version 3.65 with FP2 (Soon to be Open Watcom.)
    • OS/2 Develoeprs Toolkit v4.5 or newer
    • SVN
  • WarpIN, version 0.9.20 or later, installed
  • A functional version of SED installed

How-to

  1. Use SVN CHECKOUT and/or SVN UPDATE to ensure you have the latest source files.
  2. From the base of the source subtree, use NMAKE ALL to ensure you have the latest binaries.
  3. (Optional) Set environment variables to manage/customize the Warpin file creation. (See below for details.)
  4. If you do not disable the build of an FM2UTILS WPI file, then you should...
    1. create a FM2UTILS subdiretory of the WARPIN subdirectory of the FM/2 source subtree.
    2. obtain a copy of FM2UTILS.ZIP and unzip it into this directory.
  5. From the base of the source subtree, use NMAKE DIST which will compress the executables and build the WarpIN installation files.

NOTE: If repeated builds of WarpIN installation files from the same FM/2 binary files are needed/desired, then repeated compression of the executables is not needed. Use NMAKE WPI to skip the compression steps and just build the WarpIN files.

Customizing the WPI build through environment variables.

BUILD_FM2UTILS
By default, a WPI file is created for both FM/2 and the optional, separate FM/2 utilities package. To prevent the creation/update of the FM/2 Utilities WPI file, use SET BUILD_FM2UTILS=0.
FM2_VER
The WPI file for FM/2 is named FM2<version-string>.WPI. The <version-string> portion of the file name can be set through the FM2_VER environment variable. For example, SET FM2_VER=-3-5-9 will result in FM2-3-5-9.WPI being created/updated.
FM2UTILS_VER
The WPI file for FM/2 Utilities is named FM2UTILS<version-string>.WPI. The <version-string> portion of the file name can be set through the FM2UTILS_VER environment variable. For example, SET FM2UTILS_VER=-1-0-1 will result in FM2UTILS-1-0-1.WPI being created/updated.

Modifying the FM/2's WarpIN installation

Getting started

Before attempting to modify FM/2's WarpIN installation one should first read and understand the WarpIN Programmer's Guide and Reference. It will acquaint you with the general, technical details of creating WPI files. Then read and become familiar with FM/2's WarpIN script, FM2.WIS.IN, which is found in the WARPIN subdirectory of the FM/2 source subtree. This will acquaint you with the specifics of how the current WarpIN installation of FM/2 is implemented.

Overview

Basically a WPI file contains a script and one or more packages. Each package contains zero or more files. The files within a package may be organized into directories. Users select packages to install and the directories into which each package is to be installed. Any directories that may exist within the package become subdirectories of the user-specified installation directory.

Currently the directory structure (and the location of files therein) of the build subtree does not match the desired installation directory structure. Therefore the current build process for the WPI files includes the creation and population of "staging" directories from which the WPI file packages are created. So the "life cycle" of a file to be installed is:

  1. The FM/2 build process creates/updates the file within the build subtree
  2. The WPI portion of the build process copies these files from various locations within the build subtree into staging directories from which the files and subdirectories are then incorporated into packages within the WPI file(s)
  3. The files and subdirectories are installed into the user-selected installation directory during the installation of FM/2.

Changes to the FM/2 Warpin installation will fall into three general categories:

  • Changes that only require script changes. Examples of these changes are:
    • Changes in package names
    • Changes in default proposed installation directories
    • Changes in the objects created
    • Changes names of or parameters passed to programs run during installation or de-installation (EXECUTE/DEEXECUTE)
    • Changes to certain text displayed in WarpIN windows during installation
    • Changes in whether or not CONFIG.SYS is updated
    • Changes in if or how OS2.INI is modified
  • Internal changes to the various REXX programs run via EXECUTE and DEEXECUTE statements within the script. If these changes require different parameters, then the script will need changing, too.
  • Changes which require changes to the staging process (and, possibly, changes to the script). Examples of these changes are:
    • Changes in package numbers (requires script change, too)
    • Adding new files and/or directories to be installed
    • Removing files and/or directories
    • Changes to the location where files are built or staged.
    • Changes to the names of files
    • Changes to the package numbers to which files are assigned

How to modify the WarpIN installation

  • For script changes alter FM2.WIS.IN. Do NOT alter FM2.WIS!.
  • For internal changes to the REXX programs called via EXECUTE or DEEXECUTE, edit the appropriate file within the build subtree.
  • For changes which require changes to the staging process:
    1. Make appropriate changes, if any, to the build process. For example:
      • Cause new or renamed files and/or directories to be created.
      • Cause discontinued files to no longer be created.
    2. Alter BLD_FM2_WPIDIRS.TXT. This file is used to control which files from which build subtree directories are to be staged into which directories of which packages. BLD_FM2_WPIDIRS.TXT is self-documented. Read it to learn how to make changes to it.