Virtual OS/2 International Consumer Education
VOICE Home Page: http://www.os2voice.org
November 2001

[Newsletter Index]
[Previous Page] [Next Page]
[Feature Index]

editor@os2voice.org


Manual Installation of Win32-applications using Odin - Part 3

By Herwig Bauernfeind © November 2001, Translation: Cornelis Bockemühl

After the intermezzo last time, we will continue now the announced series about the manual installation of Win32 programs with Odin.

3. Unpacked - how to get everything in the right place?

One important note in advance: Windows is able to read and write long filenames on FAT16 media. OS/2 doesn't. So with OS/2, you should always use a file system that allows long filenames, i.e. HPFS, HPFS386, JFS or FAT32 by Henk Kelder. Otherwise a high percentage of installation efforts will fail only because of the filenames.

If you have now the entire content of a manually unpacked installation package in front of you, the question comes up where does all this stuff go?

You have to know a few basic things about Windows in order to proceed successfully. It won't do any harm either if you first installed the program on a real Windows system and have a look at where the files are going there. This is not so difficult to find out for the program itself; normally the installer will ask for a program directory. Subdirectories will be created there in some cases and filled with stuff. This isn't much different from how it works with OS/2.

This directory tree must be cloned to the OS/2 system by hand. I can only warn to not blindly copy the whole directory tree from Windows to OS/2+Odin because many programs on their first start will create files containing references to drives etc. If these are copied as well, the application believes that it has been running under Odin already. If now drives and/or directories under Odin are different, your efforts will be terminated sooner or later simply because things are not found where they are expected.

A problem not usually found in our OS/2 world is the fact that most programs are creating files also in other places on the system.

1. Program files in the Windows System Directory:

While it happens only rarely that an OS/2 program copies one or more DLLs into x:\OS2\DLL, it is common practice that Windows programs copy quite a few such files into x:\Windows\System or x:\WinNT\System32, which is the so called Windows system directory.

A simple way to find out which files in the Windows system directory are added: Use the attrib command, also known under OS/2, and reset all archive bits of all files in the Windows system directory with

attrib -a *.*

If you now install the program, all new or replaced files in the system directory will have the archive bit set and you can copy them all with

xcopy *.* /A
to a safe place (not yet into the Odin system directory x:\ODIN\SYSTEM32 ).

Be careful! It is common practice with Windows (I mentioned it already) that programs are replacing parts of the operating system. Before copying all the saved files blindly to x:\ODIN\SYSTEM32 , you must sort out those that are already coming with Odin. Only after having sorted out such rotten eggs you can copy the rest to the Odin system directory.

2. The directory C:\Program Files\Common Files

The purpose of this directory tree (which normally cannot be changed by the Windows user) is to hold files that are shared by several programs, so needing only one central copy on the system. This is a standardized organization that has (sorry to say) no counterpart with OS/2 (just go and count how many copies of  VROBJ.DLL you have on your system in different places!).

Also here you can use the trick with attrib, but in this case you must type

attrib -a *.* /S

from the C:\Program Files\Common Files directory, because now also all subdirectories must be taken into account. After that you can again copy all new or changed files to a safe place by typing
xcopy *.* /A /S

(together with the whole directory structure this time).

On installation Odin creates a corresponding directory on OS/2. It's always named x:\Program Files\Common Files; there are obviously no different language versions with Odin. The saved directory tree from Windows has to be copied into exactly this directory.

Theoretically all files that are coming with a program should be moved to the right places for Odin now:

It cannot be generally excluded that certain programs will throw files in other places still, but most cases should be covered with this.

But what if no Windows is available for a test installation? To tell the truth, chances are not bright for a manual installation in that case.

You can only find clues in the installation script, which is only generally available for Installshield packages in the file Setup.INS. Together with the unpackers, I presented also a script decompiler in the first part of this series already, isdcc21 . It's use is quite simple:

pec isdcc21 Setup.Ins > Script
My experience is that pec can also be used if Win32K.SYS is installed, but this is not recommended by Team Odin. Once you have run the above command you have the script in a plain text format, but this will easily be thousands of lines in size.

The scripting language is some kind of BASIC derivative, like most scripting languages in the Windows world. You can get basically all the information you need from it, but more specifically finding out the distribution of files is extremely tedious.

I went very far in order to find a Windows system for a test installation before I would dig into the script, because there are no utilities for that job with OS/2. If I had to do it anyway, I would use the text version of good old HyperView (HV.EXE, mentioned in the first part of the series).

The script is a rather weak means to find out information about the files, because a selective search is almost impossible (search for what? For filenames? Yes, but which ones? ...). We will be dealing with these scripts once more in the next part when the registry will be treated.

Overall and if you are dealing with large program packages, I would consider the manual installation without a real Windows system at hand possible in principle, but impossible in reality.

Once you have all files in place (with or without Windows), you can try a first start now, in particular with smaller programs. Not so much because you expect them to run already, but in order to have a look at the error messages.

The next part will deal with the registry and discuss ways to find out the right entries and how to migrate them from Windows to OS/2/Odin.

References:

The Netlabs Odin Project - http://odin.netlabs.org/
Weekly Odin Builds - ftp://ftp.os2.org/odin/Weekly//
Daily Odin Builds - ftp://ftp.os2.org/odin/daily//
Odin Mailing List for End Users (Yahoo!) - http://groups.yahoo.com/group/odinusers


[Feature Index]
editor@os2voice.org
[Previous Page] [Newsletter Index] [Next Page]
VOICE Home Page: http://www.os2voice.org