Changes between Version 16 and Version 17 of BuildingFm2


Ignore:
Timestamp:
Apr 16, 2010, 8:46:24 PM (14 years ago)
Author:
John Small
Comment:

Major update and reformat

Legend:

Unmodified
Added
Removed
Modified
  • BuildingFm2

    v16 v17  
    88The following tools are currently used to build the FM/2 binaries
    99
    10  * [http://www.openwatcom.org OpenWatcom] v1.6 or newer should work. There are no known special setup requirements.
    11    * We are now using wipfc.exe which is included in !OpenWatcom 1.8 or newer. If you have an earlier version of !OpenWatcom, then define and set and environment variable, SET USER_IPFC=1, to force the build to use ipfc.exe.
    12  * We have converted to using the !OpenWatcom OS/2 Toolkit. Ensure that your build environment has paths to the !OpenWatcom Toolkit ahead of those for IBM's Toolkit. (The IBM Toolkit is on your eComStation CD#2 and you may want a copy of the IBM Toolkit installed for the documentation included in it.)
    13  * We are now using wrc.exe as the resource compiler. It will be part of !OpenWatcom 1.8 or newer. If you have an earlier version of !OpenWatcom, the version you want is presently [http://svn.netlabs.org/fm2/attachment/ticket/131/wrc.zip?format=raw available here].
    14    * If you need to use RC.EXE instead of WRC.EXE (recommended) please use the following version:[[BR]]
    15      12-18-97   6:01         868,000           0  RC.EXE[[BR]]
    16      which reports itself as[[BR]]
    17      IBM RC (Resource Compiler) Version 5.00.002 Dec 18 1997[[BR]]
    18      and it is available from [ftp://ftp.software.ibm.com/ps/products/warpzilla/os2tk40rc.zip Toolkit update for Mozilla]
    19  * lxlite LX compressor. You can get LXLITE.EXE from [http://hobbes.nmsu.edu/h-search.php?key=lxlite&pushbutton=Search lxlite from Hobbes]
     10 * [http://www.openwatcom.org/index.php/Download OpenWatcom] v1.6 or newer can work. However !OpenWatcom v1.9 release candidate 3 or newer is recommended because it includes the versions of WIPFC.EXE and WRC.EXE currently used to build release-level versions of FM/2.
     11   * For release builds we are now using wipfc.exe which is included in !OpenWatcom v1.9 release candidate 3 or newer. Until !OpenWatcom v1.9 is released, you may download with version of WIPFC [http://home.earthlink.net/~steve53/OpenWatcom/wipfc-20100324.zip here.]
     12     * If you prefer not to use this version of WIPFC, you may use IPFC.EXE from the OS/2 Toolkit. However you will have to define and set an environment variable, SET USER_IPFC=1, to force the build to use ipfc.exe.
     13   * For release builds we are now using WRC.EXE as the resource compiler. It is included with !OpenWatcom 1.8 or newer. If you have an earlier version of !OpenWatcom, you may download the newer WRC [http://svn.netlabs.org/fm2/attachment/ticket/131/wrc.zip?format=raw available here].
     14     * If you need to use RC.EXE instead of WRC.EXE, please use the following version:[[BR]]
     15       12-18-97   6:01         868,000           0  RC.EXE[[BR]]
     16       which reports itself as[[BR]]
     17       IBM RC (Resource Compiler) Version 5.00.002 Dec 18 1997[[BR]]
     18       It is available from [ftp://ftp.software.ibm.com/ps/products/warpzilla/os2tk40rc.zip Toolkit update for Mozilla]
     19   * We have converted to using the !OpenWatcom OS/2 Toolkit. '''Ensure that your build environment has paths to the !OpenWatcom Toolkit ahead of those for IBM's Toolkit.''' If you allow the !OpenWatcom installation to modify your CONFIG.SYS, you may have to edit the changes to move the !OpenWatcom paths in front.
     20     * The IBM Toolkit is on eComStation CD!#2 and you may want a copy of the IBM Toolkit installed for the documentation included in it.
     21 * lxlite LX compressor. You can get [http://hobbes.nmsu.edu/h-search.php?key=lxlite&pushbutton=Search lxlite from Hobbes]
     22 * To build the symbol files included in the optional debug package of FM/2, Perl v5.8 or newer is required.
     23 * To build a Warpin installation file for FM/2, Warpin 0.9.20 or newer must be installed.
    2024
     25== Setting up the Toolchain ==
     26
     27After installing the tools listed above:
     28 * Ensure that in your build environment the following !OpenWatcom paths precede those of other tools like the OS/2 Toolkit, !VisualAge C++, GCC, etc.
     29  * PATH: <!OpenWatcomPath>\binp
     30  * LIBPATH or BEGINLIBPATH: <!OpenWatcomPath>\binp\dll
     31  * HELP: <!OpenWatcomPath>\binp\help
     32  * BOOKSHELF: <!OpenWatcomPath>\binp\help
     33 * Ensure that lxlite.exe is on the PATH
     34 * In order to build symbol files,
     35   * add <!PerlPath>\bin to the PATH
     36   * add <!PerlPath>\bin and <!PerlPath>\lib to the LIBPATH or BEGINLIBPATH
     37   * set up a proper PERLLIB environment variable
     38 * If you use IPFC instead of WIPFC: SET USE_IPFC=1 or use USE_IPFC=1 on the WMAKE command line
     39 * If you use RC instead of WRC: SET USE_RC=1 or use USE_RC=1 on the WMAKE command line
    2140
    2241== Building the Executables ==
    2342
    24 Use Subversion to pull a copy of the source code distribution into your
    25 client workspace.  See [wiki: Getting the Sources] for instructions.
     43Use Subversion to pull a copy of the source code distribution into your client workspace.  See [wiki:WikiStart#Gettingthesources Getting the sources] for instructions.
    2644
    27 The build commands must be run from top directory of your Subversion workspace.  The directory will contain the top level makefile.
     45FM/2 is built using WMAKE from !OpenWatcom. Build commands must be run from top directory of your Subversion workspace.  The directory will contain the top level makefile. To build FM/2, the WMAKE command will be of the form:[[BR]]
     46   WMAKE <macro-definitions> <build-target>
    2847
    29 Build the release version with
    30 {{{
    31   set HIMEM=
    32   set DEBUG=
    33   set FORTIFY=
    34   set USE_RC=
    35   wmake
    36 }}}
     48The macro definitions are optional. If used, they override any corresponding environment variable ''during the execution of that build''. The most commonly used macros are:
     49 * FM2_VER=-3-18-0 (Sets the version for FM/2. Use the format as seen here (with three hyphens).)
     50 * DEBUG=1 (for debug builds.)
     51 * FORTIFY=1 (for debug builds. This includes extra code for debugging memory management problems.)
     52 * WARNALL=1 (This cause the compiler to display all levels of warnings during the build. This is usually not needed and results in ''many'' warnings.)
     53 * USE_RC=1 (Forces the build to use RC.EXE instead of WRC.EXE. This should not be used for release builds.)
     54 * USE_IPFC=1 (Forces the build to use IPFC.EXE instead of WIPFC.EXE. This should not be used for release builds.)
    3755
    38 The set statements may be omitted if you have not defined the variables in the environment.
     56'''The build targets.''' For a complete list, see the makefiles. The build targets most often used are:
     57  all::
     58    This is the default target. It builds a fully functioning FM/2 (including help files and resources.
     59  dist::
     60    This is a complete, releaseable build of FM/2 from start to finish. It is a "shortcut" for all of following other targets:
     61    * all
     62    * lxlite
     63    * syms
     64    * wpi
     65  lxlite::
     66    This uses Lxlite to compress the executables. The "all" target should be built before building this target.
     67  syms::
     68    This builds the symbol files for the debug package included in the Warpin installation file. Again, the "all" target should be built before building this target.
     69  wpi::
     70    This builds the Warpin installation file. Again, the "all" target should be built before building this target.
     71  clean::
     72    This deletes files so that a subsequent "WMAKE all" or "WMAKE dist" will completely rebuild FM/2.
    3973
    40 Build the debug version with
    41 {{{
    42   wmake DEBUG=1
    43 }}}
    44 or
    45 {{{
    46   set DEBUG=1
    47   set FORTIFY=1
    48   wmake
    49 }}}
    50 
    51 When switching between debug and release builds, use the wmake -a switch to force all files to be rebuilt.  The current makefiles can not detect a change in the value of the DEBUG variable and will not regenerate files that depend on the DEBUG setting without some assistance.
    52 
    53 Once you are familiar with the build process, you can speed up the switch by deleting fm3dll.lrf and the .obj files that you want rebuilt.  This will give wmake enough information to do a proper rebuild without the -a switch.
     74The current makefiles can not detect a change in the value of the DEBUG variable and will not regenerate files that depend on the DEBUG setting without some assistance. So when switching between debug and release builds, use the "wmake clean" to force a subsequent build to build all files. 
    5475
    5576Build options such as DEBUG and FORTIFY may be specified either in the environment or on the command line.  Choose one method and use it consistently or you may get unexpected results.
    5677
    57 The build outputs are:
     78The outputs for "WMAKE all" are:
    5879
    5980 * av2.exe
     
    7596 * dll\fm3dll.dll
    7697 * dll\fm3res.dll
    77  * dll\fm3res.str
    7898 * dll\ipf\fm3.hlp
    7999
    80  *  internal\mkstr.exe
    81100
    82 == Compressing Dlls and Exes ==
    83 
    84 Lxlite.exe needs to be in a directory listed in the PATH statement of your config.sys or build enviroment cmd file.
    85 
    86 To compress the executables run
    87 {{{
    88 wmake lxlite
    89 }}}
    90 
    91 == Packaging a Release ==
    92 
    93 FM/2 is released as a WarpIN package.
    94 
    95 The basic process is
    96 {{{
    97   wmake wpi
    98 }}}
    99 See [wiki:WPIBuild] for more details.
    100 
    101 == Building, Compressing, and Packaging with a CMD Script ==
    102 
    103 Open a text editor and add the following lines
    104 {{{
    105 set debug=
    106 wmake all && wmake lxlite && wmake wpi
    107 }}}
    108 Save the file naming it possibly Build_FM2.cmd.  Copy the file to the root of your fm/2 workspace.  The script must be run from  this directory or it will not find the required files.  After the script finishes, open the warpin subdirectory and you should find the WarpIN file in this directory.
    109 
    110 == Build options ==
    111 
    112 === HIMEM ===
    113 
    114 If not defined, fm/2 will be built to use low memory only.
    115 If defined, fm/2 will use upper memory for both code and data.
     101== Summary of Build options ==
    116102
    117103=== DEBUG ===
     
    132118If defined FORTIFY support is enabled.
    133119FORTIFY added runtime heap corruption and leak checking.
    134 Be sure to use wmake -a when changing this option.
     120Be sure to use "wmake clean" when changing this option.
    135121
    136122=== USE_RC  ===