wiki:WikiStart

The Odin Project

About Odin

Odin is the name of the project and software that allows users to run Win32 applications in eComStation (OS/2) operating system natively, almost as if they were intended to be OS/2 applications in the first place. It also makes porting from Win32 to OS/2 easier by providing a Win32 API implementation in OS/2: the Odin32 API.

Binary compatibility is achieved by converting Windows EXE and DLL files (applications are made of those) into the format that OS/2 uses. Conversion can be permanent, or it can be done transparently at runtime, when an application is started. Conversion and loading of Win32 programs, basicaly, consists of:

  • Converting PE (Portable Executable - Win32 binaries) objects in OS/2's LX (Linear eXecutable) format.
  • Reassembling them in memory in the way OS/2 applications are supposed to be assembled.

The program that will permanently convert binaries (EXE and DLL files) is called PE2LX.EXE. However, it's much more flexible to use dynamic, on-the-fly conversion (via PE.EXE loader) because in that case executable modules on disk are not changed, and you can use your Win32 programs in both Windows and eCS (OS/2) from the same space on disk. Both methods can be automated and made absolutely transparent to users with the use of the WIN32K.SYS driver that allows OS/2 processes (WPS, command prompt...) to launch Win32 binaries as any other OS/2 applications, providing automatic conversion/loading at startup time. NOTE: The WIN32K.SYS approach is not building anymore with Odin 0.8 and up. WIN32K.SYS from prior to 0.8 seem to work at this time (0.8.5)

Converted/loaded program will look and behave as any other eCS (OS/2) application. There is no emulation layer, no Windows "sessions" or virtual machines like it was the case with Win-OS/2 that IBM has provided for running Windows 3.1 applications: the code is executed directly by CPU with all rights, privileges and limitations of normal 32-bit eCS (OS/2) programs. In order for program to operate, it must have access to the same API functions as in Windows operating system(s). Those functions are called Win32 API (Application Programming Interface) and Odin provides them, as well. It's the second part of the project which aims at: Providing runtime libraries that replicate Win32 API functions and that are used by loaded and running programs. Runtime libraries are supplied as a number of DLL files with the same names as the ones what are supplied with Windows because Win32 applications expect to find them under those names. Any name conflicts (DLLs with same names shipped with eCS (OS/2)) are resolved during the conversion/loading process. Odin32 DLLs are pure native eCS (OS/2) binaries which operate in the same way as their Windows counterparts. The set of API functions that are implemented for Project Odin is called Odin32.

The Odin32 API can also be used (and is used) for native eCS (OS/2) development, as for porting software from Windows. Since it replicates the functionality of the Win32 API closely, a porter can much easier match the basic functionality and then add eCS (OS/2) specific improvements.

A very good example of an application which is using this technology is OpenJDK6 for OS/2. It is compiled using Odin32 API and eCS (OS/2) specific behavior was added as well.

The final goal of the first part of the project is to make every Windows program load and operate properly, and the goal of the second part of the project is to create complete eCS (OS/2) implementation of Win32 API, which means that every single API function should be implemented or mapped to equivalent eCS (OS/2) API function via Odin32. Whether those goals will be ever achieved remains to be seen, but this project gives good results even now, since no Windows program uses all API functions and very few use even majority of them.

Odin Versions History

Latest Version

The latest version is 0.9.0 released on 2017-07-28. The list of changes can be found in the ChangeLog file.

Starting from version 0.7.1, the primary way to distribute and install official builds of Odin is RPM. This means that all Odin components are provided as RPM packages which may be installed from either the netlabs RPM repositories using the YUM command or directly using the RPM command (the GUI frontend is on the way). In order to install RPM packages on your machine, you need to install the RPM bootstrap package (once) which contains the RPM installer. The installation of RPM is described here in detail. Once you have RPM installed, you may issue one of following commands to install various parts of Odin:

yum install libodin Installs the basic Odin runtime needed for Odin-based and Odin-ized applications
yum install odin-exe-tools Installs the Odin tools (PE.EXE, PEC.EXE and others)
yum install odin-doc Installs the Odin user's manual
yum list *odin* Lists all available Odin packages with short desctiptions
yum update libodin Updates an already installed Odin to the latest version

Note that the first command is not normally needed -- if you install an Odin-based application from the RPM repository, it will install all required Odin components automatically. This command is only necessary if you have an Odin-based application distributed as a ZIP archive or in some other (non-RPM) form.

We also provide a Zip package of Odin (see below) for your convenience, if you cannot use RPM for some reason. Older ZIP and WPI packages are available here and here.

A small note on the OdinApp Package: This package is only needed for Win32 apps not built with the Odin SDK. We provide a Zip package of it (see below) for your convenience.

Prerequisites

This is a list of prerequisites for the Odin ZIP packages. Note that if you use the RPM packages, these prerequisites, except xsystray, will be installed automatically. Xsystray are not in RPM repositories yet so you will need to install them from WPI in either case.

kLIBC 0.6.5 Runtime LibraryWPIkLIBC runtime libraries needed for all Odin installations (required).
GCC 4 Runtime LibrariesWPIGCC 4 runtime libraries needed for all Odin installations (required).
xsystray widgetWPIExtended system tray widget for xCenter/eCenter for system tray support In Odin (optional).

Odin ZIP Packages

Odin Runtime LibrariesZIPOdin runtime necessary to run Win32 based applications.
OdinApp PackageZIPThe OdinApp package is only needed for Win32 apps not built with the Odin SDK.


Developer Notes

There exists a project clone at:
https://rousseaux.github.io/netlabs.odin32
That project is *not* a fork of the original Netlabs project.
It is a *clone* done with git-svn with the purpose to be extend
Odin with functionality to enable porting of SWT to OS/2.
The bi-directional mapping is:
github:project~master <-> netlabs:project~branches/swt

Wiki & Mailinglist

There is a (rather outdated) page in the netlabs.org Wiki about Odin, feel free to contribute to it! Also we have a mailing list at netlabs.org, you can read it at gmane.org, or you can subscribe by mail. The name of the list is odin-user@….

Reporting Bugs

Reporting bugs and requesting new features is done through the ticket system. You can view existing tickets, add comments to them and create new tickets using the corresponding buttons at the top of every page. If you want to submit a new bug or request a feature, please use the Search function first to make sure there is no ticket for this task already created.
We review the tickets regulary and leave comments if we need more info. So please revisit the Feedback analysis as often as possible. If we leave comment and don't get feedback from the ticket creator, we will close the ticket after some weeks.

Anonymous access to the ticket system has been restricted due to multiple attacks of stupid spammers we've been suffering from lately. In order to create a new ticket or comment the existing one, you need to login with your Netlabs login id. If you do not have a login id, you can request one at http://www.netlabs.org/en/site/member/member.xml. We are sorry for inconvenience, but at the present time this is the only way to avoid extremely annoying spam.

About Trac&Subversion, code guidelines

To allow proper coding and usage of Trac&Subversion features, it is suggested to follow some guidelines.

First, all commits must belong to a ticket; tickets can be created by project manager or by developers for defect fixing, code enhancements or other tasks.

Tickets will be used to tell other people about problems, and allow discussion of patches or new code added. Subversion commits needs to link their ticket in commit message. This can be done using the following syntax:

   svn commit -m "Here are my changes. ticket:1." *.*

Trac timeline will automagically convert 'ticket:1' into the URL of the ticket.

At the same time, the changeset number should be added to the ticket using the following syntax:

   (changeset:145) Here are my changes. 

This allows following ticket life without looking at timeline changes every time. While the commit message is usually short, developers can add more detailed informations in ticket record. Remember, other developers could not know what you are doing, or understand what has been changed simply looking at code.

Also we need to track changes to avoid regressions as much as possible: exhaustive descriptions makes life much easier when regressions or typos must be fixed.

Pulling the Odin repository

For the primary environment:
svn co http://svn.netlabs.org/repos/odin32/trunk Odin
To get it built you need the GCC 4.4.6 compiler, the OS/2 Toolkit 4.5 and the kBuild utility
The easiest way is to install GCC and kBuild from the RPM repository. The Toolkit isn't available as RPM right now

Credits

  • Silvan Scherrer (management)
  • Dmitriy Kuminov (development)
  • Mensys BV (funding)
  • OS/2 Voice (funding)
  • Innotek (pre version 0.8 development)
  • all the individuals providing sourcecode to the version before 0.8
  • netlabs.org (hosting & support)

Screenshots

Last modified 5 years ago Last modified on Aug 26, 2019, 3:03:40 PM

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.