About the Facelifting How-To

By Tim Mecking‎

This document is about optical enhancement of OS/2 and eComStation. There may be a functional enhancements as side effect. But functional enhancements are not in the focus of this document.

In this release there is a bundled application called "Theme Creator". More applications may be contained in future releases.

There is only the Window Themes chapter completed, yet. Other chapters will follow.

Authors and Contributors
This document, the themecreator, and the radio button bitmap of the spflat theme is written/created by Tim Mecking ("facelift@mecking.net").

The dtaltair and the dtbbox theme are created by Dorothee Tops.

eComStation ThemeMrg Window Themes
This chapter shows how to build and install themes for eComstation ThemeMgr.



Requirements

 * eComStation 1.0 or eComStation 1.1.
 * ThemeMgr (*).
 * IconEdit (*) or any other pixel oriented graphic application supporting multi page os2 bitmaps.
 * ResMgr by Martin Lafaix (*)
 * Resource Compilter RC.EXE (*)
 * System Editor E.EXE (*), Extended Editor EPM.EXE (*) or any other ascii editor.

(*) included in eComStation 1.0 and eComStation 1.1

Working with Themes - Command line based
Here we discuss in detail the creation & installation of a new theme based on an existing one and how to uninstall schemes from Thememgr. If you are not interested in the details take a look at "Working With Themes - Theme Creator Based".

A Theme is created by creating the following 3 files:


 * .RES File
 * .BMP File
 * .IDX File

If you have created the files, you can install them to make them available in the Theme Manager.

You certainly can also uninstall themes from the Theme Manager.

Creating the .RES file
To create a new theme based on an existing one open a command prompt window, go to the ThemeMgr directory, create a new subdirectory and unzip the thmres.zip into it.

In eComStation 1.0:

[E:\]cd os2\thememgr [E:\os2\thememgr]md t [E:\os2\thememgr]cd t [E:\os2\thememgr\t]unzip ..\thmres.zip

In eComStation 1.1:

[E:\]cd ecs\system\thememgr [E:\ecs\system\thememgr]md t [E:\ecs\system\thememgr]cd t [E:\ecs\system\thememgr\t]unzip ..\thememgr.zip

Decompile the .res file you want to modify. If you only know the name of the theme as it shows in thememgr grep it from thememgr.idx.

[E:\ecs\system\thememgr\t]find /I "eComStation - Flat" ..\thememgr.idx -- ..\thememgr.idx eComStation - Flat             flat.dll     flat.bmp

To decompile the .res file (which name is equal to the name of the .dll listed in thememgr.idx) use the rdc command from resmgr.

[E:\ecs\system\thememgr\t]rdc flat.res

A lot of bitmap files will be created. Modify these files now. Don't change the size, the color palette and the number of pages. PMView can not be used, because it doesn't support multi page bitmaps and also changes the color palette under certain circumstances. I recommend the System's own Icon Editor.

If you are done, rename the .rc2 file to the short name of your new theme. The short name should not be more than 8 characters long (excluding the file extension) to prevent problems on systems installed on a FAT partition.

[E:\ecs\system\thememgr\t]ren flat.rc2 spFlat.rc2

Compile the .rc2 file using RC.EXE

[E:\ecs\system\thememgr\t]rc -r spFlat.rc2

Creating the .BMP File
Copy a bitmap from an existing theme and replace the buttons by the ones used in your theme. For this step I recommed the Icon Editor, too. (Open it twice and use the clipboard.)

[E:\ecs\system\thememgr\t]copy ..\flat.bmp spFlat.bmp

Creating the .IDX File
The last file to create is an .IDX file. Copy the thememgr.idx and name it like your .RES file, but leave the extension .IDX.

[E:\ecs\system\thememgr\t]copy ..\thememgr.idx spFlat.idx

Remove all lines except the last one. Remove the semicolon at the beginning of the line and enter the long name of your theme in the first colomn (use overwrite mode), the short name of your theme with the extension .DLL appended in the second column. In the third column enter the short name followed by the extension .BMP.

spTim - Flat                 spflat.dll     spflat.bmp

Installation of themes
Make shure the .IDX, the .BMP, and the .RES file of the theme to be installed are placed in the Theme Manager directory.

Open a command prompt window, go to the ThemeMgr directory, and start addtheme.

In eComStation 1.0:

[E:\]cd os2\thememgr [E:\os2\thememgr]addtheme spFlat

In eComStation 1.1:

[E:\]cd ecs\system\thememgr [E:\ecs\system\thememgr]addtheme spFlat

Deinstallation of themes
To uninstall a theme remove the correspondig line from thememgr.idx, located in the Theme Manager directory. You should also delete the úDLL file.

Open a command prompt window, go to the ThemeMgr directory, remove the line containing the theme definition from thememgr.idx, and delete the úDLL file.

[E:\]cd os2\thememgr [E:\os2\thememgr]copy thememgr.idx thememgr.bak [E:\os2\thememgr]find /V /I " spFlat.dll" thememgr.idx [E:\os2\thememgr]del thememgr.bak [E:\os2\thememgr]del spFlat.dll

In eComStation 1.1:

[E:\]cd ecs\system\thememgr [E:\ecs\system\thememgr]copy thememgr.idx thememgr.bak [E:\ecs\system\thememgr]find /V /I " spFlat.dll" thememgr.idx [E:\ecs\system\thememgr]del thememgr.bak [E:\ecs\system\thememgr]del spFlat.dll

Working With Themes - Theme Creator Based
Here we discuss how to use the Theme Creator. A GUI tool to unpack, pack, install, and uninstall themes.



Theme Creator is bundled with this How-To, thus you should already have this tool.

Creating A Theme

 * Start Theme Creator




 * Select the "Unpack" Button.


 * A new theme is created by modifying an existing one. Select the theme to be modified. You also have to specify the target directory. The directory doesn't need to exist, but if it exists, it must be empty.




 * A lot of bitmap files will be created. Modify these files now. Don't change the size, the color palette and the number of pages. PMView can not be used, because it doesn't support multi page bitmaps and also changes the color palette under certain circumstances. I recommend the System's own Icon Editor.


 * Select the "Pack" Button.


 * Make shure that the right directory is specified (the directory which contains the modified theme files). Enter a short name which is up to 8 characters long. Only FAT compatible names without extensions may be used. Also specify a long name. Click the "Pack" Button when done.


 * The theme is now created and moved into the thememgr directory. It consists of the following files:
 * .RES
 * .BMP
 * .IDX



Installing A Theme

 * Start Theme Creator




 * Select the "Install" Button.


 * The theme still has to be installed in thememgr. While installing, a .DLL is build and the theme is added to the THEMEMGR.IDX.


 * All themes found in the Theme Manager directory which are not currently installed will be listed. Select the one to be installed and click on the "Install" Button.




 * The new theme is ready for usage. Just start the Theme Manager, select your theme and reboot your machine.

Uninstalling A Theme

 * Start Theme Creator




 * Click the "Uninstall" Button.


 * A list of all installed themes is shown.


 * Select the theme to be uninstalled and click on the "Uninstall" button.



Chapters to be written
Depending on the feedback I'll receive, I plan to write some additional chapters and tools.

Right now the following topics are on my list:


 * Scheme Palettes
 * Styler/2 & eStylerLite
 * Icons & Icon Themes