| [325] | 1 | 
 | 
|---|
 | 2 | Customizing FM/2 Resources
 | 
|---|
 | 3 | 
 | 
|---|
 | 4 | Since FM/2 is a GPL application, anyone can build a private version of
 | 
|---|
 | 5 | FM/2 from source and modify the program as they choose.
 | 
|---|
 | 6 | 
 | 
|---|
 | 7 | However, if all one wants to do is replace icons, bitmaps and text strings,
 | 
|---|
 | 8 | this is not required.
 | 
|---|
 | 9 | 
 | 
|---|
 | 10 | The FM/2 build system provides support for replacing resources without
 | 
|---|
 | 11 | a full rebuild from source.
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | == Prerequistes ==
 | 
|---|
 | 14 | 
 | 
|---|
 | 15 | You will need
 | 
|---|
 | 16 | 
 | 
|---|
 | 17 |  - a copy of the current FM/2 sources
 | 
|---|
 | 18 |  - a copy of the FM/2 binary release
 | 
|---|
 | 19 |  - a copy of the resource compiler, RC.EXE
 | 
|---|
 | 20 |  - a copy of the help compiler, IPFC.EXE
 | 
|---|
 | 21 |  - a copy of the exe compression tool, LXLITE.EXE
 | 
|---|
 | 22 |  - a subset of the Warp4 toolkit #include files
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | RC.EXE, IPFC.EXE and the #include files are included in Warp4 Toolkit which comes
 | 
|---|
 | 25 | with eCS or MCP.
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | Not all versions of RC.EXE are created equal.  Currently, the best version to
 | 
|---|
 | 28 | use is:
 | 
|---|
 | 29 | 
 | 
|---|
 | 30 |  12-18-97   6:01         868,000           0  RC.EXE
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 | which reports itself as:
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 |  IBM RC (Resource Compiler) Version 5.00.002 Dec 18 1997
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 | and it is available at:
 | 
|---|
 | 37 | 
 | 
|---|
 | 38 |   <ftp://ftp.software.ibm.com/ps/products/warpzilla/os2tk40rc.zip>
 | 
|---|
 | 39 | 
 | 
|---|
 | 40 | You can get LXLITE.EXE at:
 | 
|---|
 | 41 | 
 | 
|---|
 | 42 |  <http://hobbes.nmsu.edu/cgi-bin/h-search?key=lxlite&pushbutton=Search>
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | It is recommended that you install the Warp4 toolkit.  However, if space is
 | 
|---|
 | 45 | tight, you only need to have RC.EXE, IPFC.EXE and the following include files
 | 
|---|
 | 46 | available:
 | 
|---|
 | 47 | 
 | 
|---|
 | 48 |   dirsize.h
 | 
|---|
 | 49 |   fm3dlg.h
 | 
|---|
 | 50 |   fm3dll.h
 | 
|---|
 | 51 |   fm3dll2.h
 | 
|---|
 | 52 | 
 | 
|---|
 | 53 | == What you can change ==
 | 
|---|
 | 54 | 
 | 
|---|
 | 55 | In general, you can change any of the bitmaps or icons and you can make
 | 
|---|
 | 56 | changes to the text strings in FM3DLL.STR, FM3RES.RC or FM3RES.DLG.
 | 
|---|
 | 57 | 
 | 
|---|
 | 58 | When making changes to text strings, translate the _text only_.  Do _not_
 | 
|---|
 | 59 | reorder, remove or create new lines in FM3DLL.STR. Do not modify the
 | 
|---|
 | 60 | odd-looking %%s, %%lu, etc. items in FM3DLL.STR. They are used by the
 | 
|---|
 | 61 | formatted print routines.
 | 
|---|
 | 62 | 
 | 
|---|
 | 63 | When replacing icons, make sure you provide an appropriate set of
 | 
|---|
 | 64 | resolutions.  When replacing bitmaps, make sure you to size the bitmap to fit
 | 
|---|
 | 65 | correctly in place of the original bitmap.
 | 
|---|
 | 66 | 
 | 
|---|
 | 67 | You need to limit icons to 256 colors and 40x40 pixels.
 | 
|---|
 | 68 | 
 | 
|---|
 | 69 | Do not alter any other files.  If you do not follow the above guidelines,
 | 
|---|
 | 70 | the resource update may fail or FM/2 may refuse to run correctly.
 | 
|---|
 | 71 | 
 | 
|---|
 | 72 | == Installation ==
 | 
|---|
 | 73 | 
 | 
|---|
 | 74 |  - Create a work directory.
 | 
|---|
 | 75 | 
 | 
|---|
 | 76 |  - Unzip the FM/2 sources to this directory preserving
 | 
|---|
 | 77 |    the directory structure.
 | 
|---|
 | 78 | 
 | 
|---|
 | 79 |    The resulting tree will look like
 | 
|---|
 | 80 | 
 | 
|---|
 | 81 |     ÃÄÄfm2.work
 | 
|---|
 | 82 |        ÃÄÄbitmaps
 | 
|---|
 | 83 |        ÃÄÄdll
 | 
|---|
 | 84 |        ³  ÃÄÄicons
 | 
|---|
 | 85 |        ³  ÃÄÄinternal
 | 
|---|
 | 86 |        ³  ÀÄÄipf
 | 
|---|
 | 87 |        ³     ÀÄÄbitmaps
 | 
|---|
 | 88 |        ÀÄÄicons
 | 
|---|
 | 89 | 
 | 
|---|
 | 90 |  - Unzip the FM/2 binaries to the work directory.
 | 
|---|
 | 91 | 
 | 
|---|
 | 92 |  - Copy the DLLs from the the work directory
 | 
|---|
 | 93 |    to the dll subdirectory
 | 
|---|
 | 94 | 
 | 
|---|
 | 95 |  - Copy FM2RES.STR from the the work directory
 | 
|---|
 | 96 |    to the dll subdirectory
 | 
|---|
 | 97 | 
 | 
|---|
 | 98 | Alternatively, you can use your installed FM/2 binaries.
 | 
|---|
 | 99 | 
 | 
|---|
 | 100 |  - Copy the FM/2 EXEs to the work directory
 | 
|---|
 | 101 | 
 | 
|---|
 | 102 |  - Copy the FM/2 DLLs to the dll subdirectory
 | 
|---|
 | 103 | 
 | 
|---|
 | 104 |  - Copy FM2RES.STR to the dll subdirectory
 | 
|---|
 | 105 | 
 | 
|---|
 | 106 | == Verification ==
 | 
|---|
 | 107 | 
 | 
|---|
 | 108 | To test your setup, run:
 | 
|---|
 | 109 | 
 | 
|---|
 | 110 |   nmake res
 | 
|---|
 | 111 | 
 | 
|---|
 | 112 | from the work directory.  The makefile should run to completion without
 | 
|---|
 | 113 | errors.
 | 
|---|
 | 114 | 
 | 
|---|
 | 115 | == Customizing ==
 | 
|---|
 | 116 | 
 | 
|---|
 | 117 | To customize your copy of FM/2
 | 
|---|
 | 118 | 
 | 
|---|
 | 119 |  - Edit the resources, bitmaps and icons, as needed.
 | 
|---|
 | 120 | 
 | 
|---|
 | 121 |  - Apply the updates to the EXEs and DLLs with
 | 
|---|
 | 122 | 
 | 
|---|
 | 123 |      nmake res
 | 
|---|
 | 124 | 
 | 
|---|
 | 125 |    This will compile the resources, decompress the the the EXEs and DLLs and
 | 
|---|
 | 126 |    apply the updated resources.  The output of this process will be updated 
 | 
|---|
 | 127 |    versions of one or more of the FM/2 EXEs, DLLs and FM3RES.STR.  The nmake 
 | 
|---|
 | 128 |    is efficient and only rebuilds the files with changed content.
 | 
|---|
 | 129 | 
 | 
|---|
 | 130 |  - Test your updates:
 | 
|---|
 | 131 | 
 | 
|---|
 | 132 |      set LIBPATHSTRICT=T
 | 
|---|
 | 133 |      cd dll
 | 
|---|
 | 134 |      ..\fm3
 | 
|---|
 | 135 | 
 | 
|---|
 | 136 | LIBPATHSTRICT allows you to test the new FM/2 version without shutting down 
 | 
|---|
 | 137 | the production version.
 | 
|---|
 | 138 | 
 | 
|---|
 | 139 | When you are satisfied with your changes, copy the updated executable files
 | 
|---|
| [463] | 140 | to your FM/2 program directory and restart FM/2.  Some of the files may be 
 | 
|---|
 | 141 | locked, so use the unlock.exe utility that comes with lxlite to allow these 
 | 
|---|
 | 142 | locked files to be overwritten.  The current command menu template includes 
 | 
|---|
 | 143 | unlock, so that it can be run from within FM/2. If you don't have it on your 
 | 
|---|
 | 144 | commands menu, I recommed you add it.
 | 
|---|
| [325] | 145 | 
 | 
|---|
 | 146 | == Trouble Shooting ==
 | 
|---|
 | 147 | 
 | 
|---|
 | 148 | -- nmake does not rebuild the target --
 | 
|---|
 | 149 | 
 | 
|---|
 | 150 | nmake depends on file timestamps to know what targets to rebuild.  If you 
 | 
|---|
 | 151 | replace a file with an older version nmake may not do what you want it to.
 | 
|---|
 | 152 | 
 | 
|---|
 | 153 | One workaround is to use one of the available touch utilities, to change the 
 | 
|---|
 | 154 | dependent file's timestamp.
 | 
|---|
 | 155 | 
 | 
|---|
 | 156 | If you do not want to change the file's timestamp, use
 | 
|---|
 | 157 | 
 | 
|---|
 | 158 |   nmake -a res
 | 
|---|
 | 159 | 
 | 
|---|
 | 160 | to force all targets to be rebuilt.
 | 
|---|
 | 161 | 
 | 
|---|
 | 162 | $Id: CustomizingResources.txt 554 2007-03-03 19:05:11Z gyoung $
 | 
|---|