## How to make an unofficial national Warp 4 fixpak?

1. Introduction
Is your version of Warp 4 not supported by the newest base OS/2 fixpaks, like fixpak 15? Is your language not supported by IBM's Convenience Pack or eCS (the upcoming new OS/2 client)? Did you know that you can create your own national fixpak from the latest US fixpak? Did you know that you can use UpdCD to create your own Warp 4.5 installation CD in your own language? No? Read on! I have used this recipe to create a Hungarian fixpak 15!

2. Working principle
A base OS/2 fixpak consist of DOS, Windows, and OS/2 programs. Most Windows and OS/2 programs contain resources, and these resources can define dialog windows, menu structures or message boxes. They can be extracted from the executables using the right tools. Once these resources are extracted, the English text they contain can be translated. Once all the resources are available (have been extracted) they can be compiled and linked again to the executables to create a national language version of those files. Quite a few OS/2 programs store their resources in message (*.MSG) files. These files also need to be decompiled, translated and compiled again. If there is an older fixpak for your language, you can quite often reuse the resources contained in those old fixpak files. Unfortunately, DOS programs do not contain resources and they can only be changed with a binary editor. The same applies to help (*.HLP) files, because there is no decompiler available for this type of files at this time.

3. Prerequisites
You will need the following products to create your own fixpak:

- Any version of OS/2 (Warp is preferred) installed on a PC which has a big enough HPFS partition to hold 40-50MB of fixpak files
- The latest version of the US fixpak (fixpak 15)
- The latest version of the national fixpak (I have used fixpak 12 for Hungarian)
- The national installation CD-ROM
- Resource compiler for OS/2 (RC.EXE), 16-bit version is included with OS/2 Warp, the 32-bit version can be found in the latest Warp Toolkit (version 4.5). The 32-bit RC.EXE should contain the string RC32 and it has an LX-header, not an NE header, like 16-bit executables.
- Resource compiler for Windows
- Resource editor for Windows programs (Borland Resource Workshop for resource extraction and RLINK.EXE for binding to prevent special characters from corruption)
- Resource manager (RESMGR.CMD)
- Resource decompiler (UNRC.EXE, RDC.CMD), get these tools from here.
- Message file compiler (MKMSGF.EXE), get it from here.
- Message file decompiler (MSG2TXT.EXE), get it from here. Please note, that this tool does not support long filenames and deep directories at this time.
- Dialog Editor (DLGEDIT.EXE), you can get it from the Warp Toolkit, Visual Age C++, Borland C++ for OS/2 (WORKSHOP.EXE), etc.
- Utility for text file comparison (GFC, PMDIFF, etc.)
- Utility for visual binary file comparison (VBinDiff)
- Utility for directory comparison by file names only and by file contents (ZTreeBold, FC/2, etc.)
- Utility for disk image unpacking (DSKXTRCT.EXE)
- Binary viewer/editor, preferably with disassembler mode (Hiew, Biew, PView)
- UnPack utility (UNPACK.EXE), included with OS/2 Warp
- Pack utility (PACK2.EXE), included with UpdCD
- CheckSum utility (CHECKSUM.EXE), get it from here.

4. Naming convention
In this document the following naming convention is used:

- New file: a file from the current US fixpak (like fixpak 15, XR_M015) which is going to be used to create the new national fixpak.
- Previous file: the older version of the new file from a previous US fixpak (like fixpak 12, XR_M012) or from original US installation CD-ROM if it is not in the previous fixpak.
- Old file: the national file corresponding to the previous file, from previous national fixpak (like XRYM012) or national installation CD-ROM.

5. The procedure

Step 1
Unpack the US fixpak to a directory using DSKXTRCT. Do not overwrite CSF_DISK of the first disk. Example for unpacking disk image 1 (XR_M015.1DK) to the current directory:

    DSKXTRCT /S:XR_M015.1DK /T:.

Step 2
Replace all occurrences of "XR_" in CSF_DISK with the code of the national fixpak (XRY for Hungarian) using a binary editor.

Step 3
Change to the FIX\OS2.1 directory of the new fixpak. All files of our interest are here. Compare directory listing with listing of the same directory from the previous fixpak and select unique files, that were not present before. Move the selected files to a separate directory, let us call it TODO.

Step 4
Unpack the files in the TODO directory and check if they contain resources. I have used RDC2 for this purpose. If RDC2 produces a RES file with a size of 0 byte the input file does not contain resources. Return the files without resources to the FIX\OS2.1 directory. Example for unpacking WPCONMRI.DL_ to the current directory:

    UNPACK WPCONMRI.DL_ .

To automatically unpack all compressed files in a directory I wrote a small REXX script called PRPFP.CMD. To use this script UNPACK.EXE should be in the PATH. Example:

    PRPFP.CMD C:\fpk\todo

Step 5
Select all the files in the FIX\OS2.1 directory which are listed in FILES.TXT and move them to the TODO directory. Unpack all files.

Step 6
Get old files for all new files in TODO and copy them to a directory called OLD. Get previous files for all new files in TODO and copy them to a directory called PREV. Unpack all packed files. If you need a file which is not contained in the old or previous fixpak, use CDLIST.CMD to generate a list of the files which are contained on the CD. This will help you to identify the location of the needed files.

Step 7
The files APPEND.EXE, ASSIGN.COM, DOSKEY.COM, GRAFTABL.COM, JOIN.EXE, MEM.EXE and SUBST.EXE are DOS programs. Compare them with previous files. If they have the same size, change the corresponding bytes in the old files using a binary editor. If sizes are different, simply find hex sequence 28,14 and replace it with 2D,14. This is called version check: (usually cmp ax, const) 28h,14h = 20.40, 2Dh,14h = 20.45. There are no any other significant changes.
There is only one exception: COMMAND.COM. It is too different compared to the original one. You can leave it untranslated, or patch the old one for OS version check and revision report. It has no sense to translate EDLIN.COM and DEBUG.COM. Move the changed DOS files to a separate directory, let us call it DONE.

Step 8
Move the old TEDIT.EXE, UCDFS.DLL and the old HLP files to the DONE directory. Unfortunately, there is no decompiler for HLP files available at this time. Yuri Proniakin has a HELP decompiler in a frozen state, send him an email if you want him to finish it.

Step 9
Decompile all MSG files, new, previous and old. Compare new and previous TXT files with tool for visual comparison. Make necessary changes in the old TXT files and compile them using the generated CMD files. Move compiled files to DONE. For example, to decompile the message file OSO001.MSG use the following command:

    MSG2TXT OSO001.MSG OSO001.TXT

To compile the translated OSO001.TXT run OSO001.CMD (MKMSGF.EXE should be in the PATH).

Step 10
CARDINFO.DAT and CONTROL.PM are text files. Translate them if you want and move them to the DONE directory.

Step 11
Translate SETDEFV.CMD if you wish and move it to the DONE directory.

Step 12
Replace all occurrences of "XR_" in SYSLEVEL.FPK with the string of the national fixpak (XRY for Hungarian) using a binary editor. Move the file to the DONE directory.

Step 13
GDI.EXE, MAIN.CPL, PROGMAN.EXE, USER.EXE, WINFILE.EXE and WINSHELD.EXE are Win-OS2 (16-bit Windows) files. Extract their resources to text files using Borland Resource Workshop for Windows. Compare new and previous script files with tool for visual comparison. Make necessary changes in the old script files, compile and bind them to the new executables using resource compiler for Windows. Move processed files to DONE.

Step 14
Now only PM programs rest in the directory TODO. Extract resources from all files into RES files. Use RDC2 for this job. Compare new and previous RES files and find files which has unchanged resources. Bind for these files the corresponding old resources to the new files with resource compiler. Move processed files to DONE. Example for extracting the resource (RES) file from PMSHLTKT.DLL:

    RDC2 PMSHLTKT.DLL PMSHLTKT.RES

Binding of the old resources can be done with the following command:

    RC PMSHLTKT.RES PMSHLTKT.DLL

Step 15
Decompile any remaining new, previous and old RES files. Compare new and previous resources with tool for binary directory comparison. Usually only script (*.RC) files are different, but not binary resources. If you find different binary resources, use new binary resources when building the translated RES file. Compare new and previous script files with tool for visual comparison. Make necessary changes in the old script files, compile it and bind it to the new file using resource compiler. Move processed file to DONE. To decompile PMSHLTKT.RES use the following command:

    UNRC PMSHLTKT.RES PMSHLTKT.RC

To rebuild it from the translated RC file issue:

    RC -r PMSHLTKT.RC PMSHLTKT.RES

For RC.EXE to work correctly it is needed, that some header files are present in a directory listed in the INCLUDE PATH.

Step 16
Set date and time for all files in DONE according to date and time of the original new files in the US fixpak. Pack all files. I have written for this purpose a REXX script called DATEPACK.CMD which relies on TOUCH.EXE to change the time stamp. The script also packs the files using PACK2.EXE (both utilities should be in the PATH). Example:

    DATEPACK c:\fpk\done c:\fpk\todo

You may also use DateCopy.EXE, which copies the date and time from the source file to the destionation file (DateCopy SrcFile DstFile).

Step 17
Move the new FIX\OS2.1\SRV_PROD.OS2 file to DONE. Change the first four occurrences of "XR_" with the national language string (XRY for Hungarian) using a binary editor. Change all occurrences if a national version of WorkSpace On Demand exists.

Step 18
Copy CHECKSUM.EXE to DONE and run it for checksum correction. Example:

    CheckSum SRV_PROD.OS2

Step 19
Move all packed files and the corrected SRV_PROD.OS2 from DONE to the new FIX\OS2.1 directory. Get some bier, coffee, etc. You are ready!!!

6. Miscellaneous information
Although UNRC does not contain serious bugs, it is recommended to backup every new resource file (RES) and to compare it to the created one. Since the resource compiler includes resources during compilation of RES files in an unpredictable order, you need to bind the RES file to the excutable and extract it again before comparing. This way you will get the correct ordening of resources in the created RES file. Although this procedure seems to be quite complicated, it has to be done, because the resource compiler (RC.EXE) does not properly handle all resource options. If you find differences you should correct the appropriate bytes in the translated RES file manually with a binary editor (Hiew).
It is recommended to check dialogs after compilation of new script with Dialog Editor for the correct size of the text elements. It is better to manually adjust them (if necessary) in the script file rather than using Dialog Editor.
DSPIMRI.RES and RSPIMRI.RES are identical. You need to translate only one of them.
WPCONMRI.RES contains the resource number 5000 of type 9 (RCDATA). This particular binary resource is a set of zero-terminated strings with two zeroes at the end. You may change its size and freely edit it for translation. UNRC does not extract resources of this type to external files (because of a bug in the 16-bit RC.EXE), but converts them into escape sequences in the main script file instead. The only way to extract this particular resource is with Resource Manager (RESMGR). Decompile it with RDC.CMD, change main script produced by UNRC accordingly and after all necessary procedures, compile this script with the 32-bit RC.EXE that does not contain the mentioned bug.
There is very particular resource in WPCONMRI.DLL: dialog number 2000. It contains more elements than it is designated in it's internal structure. Extract it with Resource Manager into a separate file, change the byte at offset 1Ch from 09 to 13h, decompile it and after translation and compilation, change the byte back to 09.
The US fixpak version of PMSPL.DLL seems to be corrupted in some way. When one attempts to add resources to it with the 16-bit RC.EXE an error message will be generated. Just ignore the message and use the generated PMSPL.DLL. Do not use the 32-bit version of RC.EXE, it will crash and leave a PMSPL.$$$ file behind.
There is another bug in the 32-bit RC.EXE with escape sequences in string resources. When you have an escape sequence with hex codes in the string resource (usually \0x0D\0x0A) followed by an ordinary text beginning with digits or letters A-F, RC.EXE will treat all this characters, up to first out of this set, as a solid hexadecimal number.
There is a minor bug in UNRC. When you call it you must specify a second command line parameter, otherwise it will trap.
Since fixpak 13 there is a new file called PMMRGRES.DLL. It contains resources which were previously found in PMMERGE.DLL. Reuse the translated resources from the old PMMERGE.DLL.
If you make changes during translation to hot key definitions, do not use the same hot key more than once within the same dialog. Do not link hot keys to non-English characters. A hot key is marked with a ~ sign in OS/2 and with & in Windows.
During the translation of resources you will see C-style formatting characters, like %c, %s, %1, etc. These characters represent data which are inserted run-time. You also have to incorporate these special characters in the translated text.
If you decide to translate DOS executables, you can safely ignore differencies between new, previous and old files at byte 12 and 13. They are only checksums in the MZ header.
If you do not want to recreate the DSK files using SAVEDSKF.EXE from the newly created fixpak files, you can use this small REXX file INSTALL.CMD to install the fixpak from the hard disk. Copy INSTALL.CMD and the extracted files of CSF 1.43 to the root of the fixpak and start INSTALL.CMD if you want to install.
You may use the unofficial fixpak 15 with Device Driver fixpak to create a national Warp 4.5 CD-ROM using UpdCD.

7. Acknowledgement
This procedure was developed by Yuri Proniakin. He used it to create a Russian Warp 4 fixpak from the American one. Yuri also used the same method to create a Russian PEER fixpak and the newest version of Netscape Communicator. Since then a Korean and a Hungarian fixpak 15 have been created using the same recipe. Now it is your turn...

Last updated on 05.27.2001 by Z. Kadar

[Back to my main OS/2 page]