Migration Mania

by Shirley Micallef and Stacey Miller

Migrating an application from one operating system platform to another is easier today than ever before. IBM continues to expand its arsenal of OS/2 Warp development tools to help application developers create software applications for today's diverse computing marketplace. This expansion includes several tools that are useful in migrating or converting a Windows 95 or Windows NT application to also run on OS/2 Warp, as well as supporting the capability of multiple platform and common code development.

What are these tools? The Source Migration Analysis Reporting Toolset (SMART), Hyperwise, and the Universal Resource Editor (URE) are three tools that have been delivered on The Developer Connection for OS/2 to help you with your migration efforts. The following sections describe these tools in greater detail.
 * SMART helps you migrate and convert 16-bit Windows and OS/2 programs to 32-bit OS/2 Warp.
 * Hyperwise helps you migrate your online information.
 * The Universal Resource Editor converts Windows resource files.

SMART
SMART, from One Up Corporation, was developed with the intent to assist developers with the Windows and OS/2 platforms. The Developer Connection has been delivering SMART ever since it was first introduced to you on the Volume 5 Special Edition in November, 1994.

As in previous releases, this innovative toolset has been significantly enhanced. In addition to migrating and converting Windows programs to the traditional OS/2 Warp APIs, SMART now provides functions to help you during your analysis and preparation of existing Windows applications to take advantage of the common code solution provided by IBM's Developer API Extensions. The Developer API Extensions are a set of over 750 APIs that provide compatibility for most core Windows functions. The SMART Resource Translator facility now has a checkbox on the dialog box that gives you a choice of string identifiers.

Also, to help you develop the best migration strategy, two new utilities in SMART identify all the keywords used in existing Win32 programs that are now equally supported on the OS/2 platform. These utilities are called DAPIE32.DCT and the Migration Export Library (MEL). In addition to the new functions and utilities provided to support development with the Developer API Extensions set, SMART has a new User-Defined Migration Database called ULTRA.DCT. This UDMD has been added to this release for evaluation purposes. It was created to augment the WIN31OS2 SMART table in order to provide even greater conversion assistance for migrating Windows 16-bit applications to traditional OS/2 Warp. Even though the ULTRA UDMD and its supporting files are considered "pre-release" level, this preliminary version offers significant information and educational examples that increase the level of guidance and help when porting a Windows 3.1 application to OS/2.
 * DAPIE32.DCT is a User-Defined Migration Database (UDMD) that has been added to the existing UDMD library in the \SMARTAUX directory. When you run this UDMD with the SMART analysis functions, you can identify those keywords in your Windows program that are directly supported by the Developer API Extensions as Category 0. Once the analysis is complete, you can examine the code to determine the portions of the program that can be implemented based on common code and platform-specific code.
 * The Migration Export Library (MEL) is a Windows static link library that helps assess a Windows-to-Developer API Extensions migration. This library and its supporting files must be copied from the \SMARTAUX\MEL subdirectory and executed in a Windows 32-bit operating system development environment as a Windows library. MEL is designed to assist the Windows developer in the early analysis phase of the porting process to help formulate a migration strategy by isolating those Win32 APIs that are not supported by the Developer API Extensions in their code base. Because MEL is actually a Windows library and will only execute in a Windows environment, you don't have to use a system that is running OS/2, any OS/2 development tools, or even SMART.
 * The SMART Resource Translator has been enhanced to support the output of quoted string identifiers for your resource names. You'll notice the addition of this function as a checkbox choice at the bottom of the Resource Translator dialog box. You select Support string ids when you want to use the appropriate Developer API Extensions to load your resources, instead of the traditional OS/2 native APIs that support integers only.

IBM knows that migrating applications from one platform to another is quite a technical challenge. With this in mind, the other addition you'll find in this release of SMART is a new migration handbook called OS/2 Migration Guide (look for it in the SMART folder). Also in a "preview" state, this guide offers general migration tips and techniques that might prove useful during any migration project. The purpose of this information is to give you comprehensive help to make the process of migrating applications to OS/2 easier and more effective. (Note: The OS/2 Migration Guide is a pre-release version and might be modified substantially before it becomes generally available; later versions will provide even more tips and techniques.)

In addition to the SMART Resource Translator, the Resource Compiler has been enhanced to support the Developer API Extensions method of loading your resources using string identifiers. Just as the SMART Resource Translator has the added function of outputting your resource files with quoted string names, the Resource Compiler has the added function to accept a quoted string identifier, in addition to integers, in the input script rather than issue an error message (as it did in the past). The string identifiers must be quoted because unquoted identifiers will be treated in the traditional manner (that is, interpreted as numerical identifiers). The Resource Compiler now interprets resource scripts with quoted string identifiers as legal resource definitions and will compile into the identical binary resources having formats as defined in the Presentation Manager Guide and Reference. If you have never used the Resource Compiler, it is one of the tools that is shipped in the IBM Developer's Toolkit for OS/2 Warp.

Hyperwise "Lite"
Hyperwise "Lite" is a new addition to the Hyperwise product family. This "lite" version was specifically released to support IBM's strategy of common source and multiple platform development. Even though Hyperwise "Lite" is a reduced-function version of the full retail product, it contains all of the basic function needed to migrate Windows help files to OS/2.

Hyperwise Lite provides the import capabilities for .HPT and .IPF formats and will export to .INF and .HLP formats. This capability lets you port your Windows help files, update text, add links, and more. After your help files are exactly the way you want them, you simply export them as online help or books that can be then viewed on the OS/2 or Windows platform. With the addition of Hyperwise as a tool offering on The Developer Connection, it augments the SMART Help Converter by providing an editor with the viewing and editing capability needed to exploit the advanced features of OS/2 help, such as animation, video, and sound.

Universal Resource Editor
Another tool you will want to consider using in your migration efforts is the Universal Resource Editor (URE) from Prominare, Inc. URE is a relatively new addition to the IBM Developer's Toolkit for OS/2 Warp and can be found in the "Try Me!" folder.

URE provides a graphical user interface where you can design dialogs, menus, and other OS/2 resources as binary resource files, resource scripts, and symbol definition files. Among the vast number of functions that can be performed by URE, the ability to assist in resource migration is somewhat unknown. While SMART does a good job of converting Windows resources to OS/2, there is no facility provided in SMART to view or modify the OS/2 converted output. URE can be used to provide this function. In addition to its editing functions, URE lets you import/export Windows 3.1 or Windows NT resources as compiled resource files (.RES), resource script files (.RC), or as extractions from .DLL or .EXE files. This import/export feature in URE provides an alternative choice to the SMART Resource Translator. URE can import a Windows resource in the formats previously described and output an OS/2 resource file.

Summary
This Special Edition of The Developer Connection brings you many exciting new technologies that support IBM's commitment to your cross-platform development efforts. You know that cross-platform development helps you maximize your profits and minimize your investment in time and resources. We are excited to provide you with these new technologies and the tools that allow you to unleash their power and give you even more software creativity, flexibility, and marketability.