= Building !FileManager/2 (FM/2) = This document explains how to build FM/2 from source. == Getting the Toolchain == The following tools are currently used to build the FM/2 binaries * [http://www.openwatcom.org OpenWatcom] * We are now using wrc.exe as the resource compiler. The version you want is presently [http://svn.netlabs.org/fm2/attachment/ticket/131/wrc.zip?format=raw available here]. It will be part of !OpenWatcom 1.8 * lxlite LX compressor [http://www.openwatcom.org OpenWatcom] v1.6 or newer should work. There are no known special setup requirements. We have converted to using the !OpenWatcom OS/2 Toolkit. Older versions of the IBM Toolkit may work but will probably require some additional includes. The IBM Toolkit is on your eComStation CD#2. You will want a copy of the IBM Toolkit installed for the documentation included in it. If you need to use RC.EXE instead of WRC.EXE (recommended) please use the following version: Not all versions of RC.EXE are created equal. Currently, the best version to use is 12-18-97 6:01 868,000 0 RC.EXE which reports itself as IBM RC (Resource Compiler) Version 5.00.002 Dec 18 1997 and it is available from [ftp://ftp.software.ibm.com/ps/products/warpzilla/os2tk40rc.zip Toolkit update for Mozilla] You can get LXLITE.EXE from [http://hobbes.nmsu.edu/cgi-bin/h-search?key=lxlite&pushbutton=Search lxlite from Hobbes] == Building the Executables == Use subversion to pull a copy of the source code distribution into your client workspace. See [wiki: Getting the Sources] for instructions. Run the build commands must be run from top directory of your Subversion workspace. The directory will contain the top level makefile. Build the release version with {{{ set HIMEM= set DEBUG= set FORTIFY= set USE_RC= wmake }}} The set statements may be omitted if you have not defined the variables in the environment. Build the debug version with {{{ wmake DEBUG=1 }}} or {{{ set DEBUG=1 set FORTIFY=1 wmake }}} 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. 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. Build 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. The build outputs are: * av2.exe * databar.exe * dirsize.exe * eas.exe * fm3.exe * fm4.exe * global.exe * ini.exe * killproc.exe * sysinfo.exe * undel.exe * vcollect.exe * vdir.exe * viewinfs.exe * vtree.exe * dll\fm3dll.dll * dll\fm3res.dll * dll\fm3res.str * dll\ipf\fm3.hlp * internal\mkstr.exe == Compressing Dlls and Exes == Lxlite.exe needs to be in a directory listed in the PATH statement of your config.sys or build enviroment cmd file. To compress the executables run {{{ wmake lxlite }}} == Packaging a Release == FM/2 is released as a WarpIN package. The basic process is {{{ wmake wpi }}} See [wiki:WPIBuild] for more details. == Building, Compressing, and Packaging with a CMD Script == Open a text editor and add the following lines {{{ set debug= wmake all && wmake lxlite && wmake wpi }}} 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. == Build options == === HIMEM === If not defined, fm/2 will be built to use low memory only. If defined, fm/2 will use upper memory for both code and data. === DEBUG === If not defined, a release build will be built. If defined a debug build with be built. Debug builds include support for symbolic debugging. === WARNALL === If not defined, do default compile-time error checking. If defined, do more compile-time error checking. Errors reported by WARNALL are rarely a problem, but it is recommend that WARNALL be used before releasing a production binary. === FORTIFY === If not defined FORTIFY support is omitted. If defined FORTIFY support is enabled. FORTIFY added runtime heap corruption and leak checking. Be sure to use wmake -a when changing this option. === USE_RC === If not defined, build with wrc.exe. If defined, build with rc.exe. wrc.rc is the preferred resource compiler.