source: trunk/doc/Readme.txt@ 22010

Last change on this file since 22010 was 21973, checked in by Silvan Scherrer, 14 years ago

adjusted the readme

File size: 24.2 KB
Line 
1
2 O D I N Version 0.8
3 ~~~~~~~~~~~~~~~~~~~~
4
5WANTED: We are still looking for talented developers that want to
6 contribute! Please take a look at the last section!
7
8NOTE: LICENSE.TXT describes the Project Odin Software License.
9
10
11Project Odin Information
12========================
13
14
151.0 Introduction
16----------------
17
18This readme is intended for end users that have downloaded the
19latest public release and want to give it a try. For more
20information, be sure to regularly check http://svn.netlabs.org/odin32/.
21
22
231.1 Purpose
24-----------
25
26Odin is a free Open Source project with the goal to eventually
27provide a fully working Win32 (Win 95/98/NT/2000) runtime environment,
28making it possible to run your favorite Windows programs under OS/2,
29as if they were native OS/2 programs. The second goal of Odin is to
30provide the full Win32 application programming interface (API) so
31that it is possible to build OS/2 programs using Windows source
32code. This is also refered to as Odin32 whereas Odin is the name
33of the Win32 binary emulator.
34
35
361.2 Current Status
37------------------
38
39Odin is still in the early state so that it is very far from
40being finished. With version 0.8 we reached the goal, that Flash 11
41and OpenJDK6 runs.
42
43
441.3 Changes and additions
45-------------------------
46
47Please refer to the ChangeLog file where you will find a brief description
48of changes from release to release.
49
50
512.0 Installing Odin (UPDATED)
52-----------------------------
53
54Builds of Odin are available at ftp://ftp.netlabs.org/pub/odin/.
55For people that do not have a suitable development setup for ODIN,
56we provide the latest binary code that way.
57
58Odin builds are now also distributed as RPM packages beside the ZIP archives.
59
60Requirements for installing Odin:
61- You must install Odin on a partition that supports long filenames (e.g.
62 HPFS/JFS). Odin will not work on FAT!
63- OS/2 Warp 4, eComStation or Warp Server for e-Business (WSeB)
64 When using Warp 4, we recommend you apply fixpack 13 or higher.
65 * Warp 3 is not officially supported, but is reported to work by using
66 Warp 4 open32 dlls and patching them.
67- kLIBC runtime v0.6.4 (ftp://ftp.netlabs.org/pub/gcc/libc-0.6.4-csd4.zip).
68- GCC runtime v4.4.6 (ftp://ftp.netlabs.org/pub/gcc/gcc4core-1_2_1.wpi).
69For the latest requirements always see http://svn.netlabs.org/odin32
70
71In order to use system tray (notification/indicator area) support, you will
72need to install XWP/eWPS and the Extended System Tray widget for XCenter/eCenter
73available at ftp://ftp.netlabs.org/pub/qt4/xsystray/ (version 0.1.1 and above).
74
75Manual installation without RPM is not recommended. If you don't use RPM,
76then you *must* execute odininst.exe in the Odin system32 directory. (the first
77time Odin is installed or when the ChangeLog mentions fixes/changes in the
78installer)
79
80NOTE: You must install Odin on a partition that supports long filenames (e.g.
81 HPFS/JFS). Odin will not work on FAT!
82
83To install Odin, run YUM install libodin
84
85If you don't like RPM the use the ZIP and do the following:
86 - unzip Odin to a directory of your choice but preserve the structure in the ZIP
87 - run odininst.exe from the x:\odin\system32 directory
88 - add x:\odin\system32 to the path and libpath settings in your config.sys
89
90To run DirectDraw games or Quake 2 in Voodoo mode, you must install Holger
91Veit's XFree86/2 support driver (XF86SUP.SYS).
92Visit http://ais.gmd.de/~veit/os2/xf86sup.html to download it.
93
94NOTE: The Glide and 3Dfx Opengl dll are no longer part of the basic Odin
95 installation package. It's available as opengl3dfx.zip on ftp.os2.org.
96
97
982.0.1 Log files
99---------------
100The binaries can generate logfiles to show what a win32 application is doing.
101This can be very useful to determine why certain applications don't run correctly.
102
103The major disadvantage of loggging is the overhead. Therefor it has been
104disabled by default in the release builds.
105To enable logging set the environment variable WIN32LOG_ENABLED:
106 SET WIN32LOG_ENABLED=1
107
108To disable logging again, you must clear this variable:
109 SET WIN32LOG_ENABLED=
110
111
1122.1 Using Odin to run your Windows applications
113-----------------------------------------------
114
115Odin still has several ways to execute Win32 programs.
116
117
1182.2 The Ring3 Win32 Loader (PE.EXE)
119----------------------------------
120
121This is the new and also recommended method for loading programs.
122Unlike with the previous alphas, it is not required to convert or
123anyhow change the original files. Installing a device driver is
124also not necessary. Be sure to put the Odin binary directory into
125both the PATH and LIBPATH (alternatively you can use a batch file
126with SET PATH=C:\Odin;%PATH% and SET BEGINLIBPATH=C:\Odin;)
127and then call pe.exe winprog.exe param1 param2 ... If you wanted
128to start the Windows calculator, you would type
129
130pe calc
131
132The PE (Portable Executable, the Win32 executable format) loader
133will now try to load the application into memory and execute it.
134This will either work or fail with a loader message. If you get
135such a loader message, it is very likely that a required DLL is
136missing. To correct that problem, take a look at pe_0.log (or
137pe_1.log for the second program running at this time and so on).
138At the bottom of the file you will see the DLLs and the functions
139that the loader imports. It will tell you if it couldn't find a
140DLL and you can correct the problem and try it again.
141
142
1432.2.1 PE loader issues
144----------------------
145
146As the PE loader will create the process and load the program,
147a process utility such as pstat will always show PE.EXE as the
148executable file.
149It is also possible that a certain Win32 application becomes
150a zombie (that is when it does certain things the OS/2 kernel
151cannot recover such as die when waiting on a semaphore). Then
152it will not be possible to kill the application - only a system
153restart will help.
154Certain programs do use fixed memory addresses where they need
155to be loaded (i.e. they won't use fixups). You can notice this
156at the top of the loader log file (pe_0.log). If the fixed address
157is above the 512MB barrier present in Warp 4 and Warp 3, the
158program can not be run under these system. On Aurora (Warp Server
159for e-business) this limitation has been removed. Programs known
160to fall under this category are Microsoft Office (also the
161Office viewers) and other mainly Microsoft programs.
162
163
1642.3 Win32k.sys - native OS/2 PE-loader
165--------------------------------------
166
167NOTE: This driver is not working anymore!! So the complete chapter 2.3 stays
168 for historical reasons. If the driver will ever work again is not decided
169 yet.
170
171The win32k.sys driver makes PE (Win32) executables equal to native OS/2
172executables by implementing a Ring 0 on-the-fly loader / converter.
173
174You may wonder how you may run a Win32 program using a device driver. You
175don't have to worry about that, simply treat the Win32 program just as an
176another OS/2 program. OS/2 can't tell the difference!
177No conversion of dlls or running programs thru Pe.EXE.
178
179For example, if you fancy playing windows solitaire.
180 1) Make sure the necessary DLLs (MSVCRT.DLL and CARDS.DLL) are in you
181 PATH, current dir, SOL.EXE dir, Odin32 System32 dir, Odin32 System dir,
182 Odin32 dir, or LIBPATHs; and that you have SOL.EXE somewhere.
183
184 2) Then start SOL.EXE by simply typing SOL.EXE (with path if necessary).
185 It's also possible to start SOL.EXE from the desktop if you like.
186 Simply find the SOL.EXE icon (or create it) and double click on it!
187
188
1892.3.1 WARNING
190-------------
191
192The Win32k.sys is quite alpha software and any bugs which haven't been found
193yet may crash and/or corrupt you entire system! Make sure you have backed up
194important stuff first!
195
196We are not responsible for ANYTHING AT ALL! See Odin32 disclaimer...
197
198Before you install Win32k.sys make sure that you have a backdoor to your system
199which works. For example try to boot your system using the Alt+F1 during bootup
200and choose Commandline boot (F2). Make sure you have an textmode editor which
201works; for example TEDIT.EXE.
202
203
2042.3.2 Requirements
205------------------
206
207Win32k should at least work on OS/2 Warp 3 and above, but I don't get too
208surprised if it worked on 2.11 too. DBCS are not supported yet AFAIK.
209
210It no longer requires a kernel file for retail kernels (if you don't know what
211kernel you have, you have a retail kernel). Win32k does now contain a
212"database" for the most recent retail kernels. Currently this is:
213 Warp 4 fp#1 -> fp#14
214 Aurora GA, FP1, preFP2
215 Warp 3 fp#32-> fp#42
216
217If the running kernel is not found in the "database" or is a debug kernel
218wink32.sys will look for symbolfiles as it allways did.
219If you use the -s:<symfile> argument the given symbol file will be
220investigated before the database is searched.
221
222NOTE! It hasn't been fully verified that all the different national fixpaks
223have the same symbols as the us-english ones. Feedback on this issue is
224appreciated.
225
226NOTE! A piece of advice for those playing with debug-kernels: Make sure that
227c:\OS2KRNL.SYM is matching the running kernel.
228
2292.3.2.1 Warp 3
230--------------
231
232Win32k is not tested with Warp 3. It is _supposed_ to work with Warp 3
233provided you are running fixpack 32 or later.
234(Fixpack 32 + y2kclock.exe is required for Y2K readyness anyway so...)
235
236
2372.3.3 Installation
238------------------
239
240To use Win32k.sys you have to add the following line into your config.sys:
241 device=<d:\path\system32>win32k.sys
242
243Where <d:\path\system32> is the path to the win32k.sys, i.e. usually the odin32
244system32 directory.
245
246After doing this, you'll have to reboot your machine to load the driver. During
247the boot process you will on a successful installation see some lines of
248technical info and finally a line saying:
249Win32k - Odin32 support driver.
250 Build: 14046 - v20.45
251 Found symbolfile: Win32k Symbol Database
252Win32k.sys succesfully initiated!
253
254If you don't see the last line something is wrong, and some error info will be
255shown. In the case of error the 'rc=<value>' is important to remember.
256
257
2582.3.4 Win32k parameters
259-----------------------
260
261The Capitalized letters are the one which is tested for when identifying the
262argument.
263
264There are some useful parameters for Win32k:
265-Quited Quiet driver initiation.
266 Default: disabled (ie. -V)
267
268-Verbose Verbose driver initiation.
269 Default: enabled
270
271-S:<filename> Full path to the current OS/2 kernel symbol file.
272 When this is specified the given
273 Default: symbol "database" and default locations are searched.
274
275
276Loader parameters:
277-SCript:<Y|N> Enable / disable UNIX script support.
278 Default: Enabled.
279
280-REXX:<Y|N> Enable / disable pure REXX script support.
281 Default: Enabled.
282
283-Java:<Y|N> Enable / disable JAVA loading.
284
285-Pe:<MIXED|PE2LX|PE|NOT>
286 Enabled / disable and set mode of the PE loading.
287 MIXED: Mix of Pe2Lx and Pe.exe. It uses Pe2Lx when
288 possible and backs out to pe.exe if the executables
289 aren't supported by the converter.
290 PE2LX: Pe2Lx loader only.
291 PE: Pe.exe only. The program is started using Pe.exe,
292 and the process name will be pe.exe.
293 NOT: Disable PE loading.
294
295
296Logging parameters:
297-L<:E|:D> Enables/Disables logging.
298 Default: disabled.
299
300-Com:<1|2|3|4>
301or
302-C<1|2|3|4> Which com-port to log to.
303 Default: -C2
304
305-Warning:<1|2|3|4>
306or
307-W<1|2|3|4> Warning/info level for PE loader. (This is warnings and info
308 which is published thru the com-port as logging information.)
309 Default: -W0
310
311
312Heap parameters:
313-HEAPMax: Maximum swappable heap size in bytes.
314 Default: 512KB
315
316-Heapinit: Initial heapsize in bytes.
317 Default: 16MB
318
319-RESHEAPMax: Maximum resident heap size in bytes.
320 Default: 256KB
321
322-Resheapinit: Initial resident in bytes.
323 Default: 16MB
324
325
326OS/2 Loader parameter:
327-Dllfixes<:E|:D>
328 Enables or Disables the long DLL name and non .DLL
329 extention fixes. OS/2 DLLs have been limited to 8 chars
330 names since version 2.<something>. This is a very bad
331 limitation. Also OS/2 forces all DLL loaded to loadtime
332 to have the extention '.DLL'.
333 Both these retritions are removed if this option is
334 enabled.
335 For DLL with non .DLL extention the internal name must
336 have to the extention included. (If you the experiences
337 problems with IMPLIB.EXE, enclose the internal name
338 in double-quotes.)
339 You should not make a DLL with a name starting with
340 DOSCALLS, DOSCALLS1, IBMVGA32, IBMDEV32 or IBMXGA32.
341 Current state for this feature is EXPERIMENTAL.
342 Default: Enabled
343
344
345Obsolete:
346-K:<filename> Ignored. Win32k scans the kernel image in memory!
347
348
3492.3.5 PE Loading
350----------------
351
352Win32k.sys are able to do PE loading in two different ways.
353
3542.3.5.1 PE2LX
355-------------
356The first one is called PE2LX and hence uses the original Win32k.sys method
357which is similar to Pe2Lx. This only requires that KERNEL32.DLL (ie. Odin32
358System32 directory) is present somewhere in the PATH or LIBPATHs. The DLL
359search order of PE2LX is now conforming with the Win32 order:
360 1. The directory of the executable (.EXE).
361 2. The current directory.
362 3. The Odin32 System32 directory. (Kernel32.dll directory)
363 4. The Odin32 System directory. (sibling of system32)
364 5. The Odin32 directory. (parent of system32)
365 6. The PATH environment variable. (TODO: quotes are not currently supported)
366 7. The BEGINLIBPATH.
367 8. The LIBPATH.
368 9. The ENDLIBPATH.
369(Note that the OS/2 DLLs in the _Odin32_ process are also found using this
370search order. This shouldn't matter much as nearly all of the OS/2 DLL are
371allready loaded. But if this proves a problem it could be changed.)
372
3732.3.5.2 PE
374----------
375The second one is called PE and invokes the Pe.EXE to execute the PE (Win32)
376programs. This of course requies that PE.EXE is found in the PATH.
377
3782.3.5.3 Modes
379--------------
380Win32k.sys have three (or four) different ways of combining these two methods,
381called modes:
382 PE2LX only
383 PE only
384 PE2LX with fallback on PE.
385 (fourth: NOT load any PE executables at all)
386
387The last one is the default one and is probably the best one currently.
388
389
3902.3.6 UNIX Shell Script Loader
391------------------------------
392
393The UNIX Shell Script Loader makes OS/2 able to run UNIX shell scripts as
394native executables, just as UNIX does. A unix shell script is a text file
395which has a starting line which specifies the interpreter for the script.
396
397For example a perl script:
398#!/bin/perl5 -Sx
399
400Or the most common one:
401#! /bin/sh
402
403Since Most OS/2 systems don't have a /bin directory or a /usr/bin directory
404the executable specified are looked for in these ways:
405 1. The exact filename specified.
406 2. The filename specified with .EXE extention.
407 3. Search the PATH for the filename (with out path of course).
408 4. Search the PATH for the filename with .EXE extention (and with out path of course).
409
410So, you could now execute UNIX shell script in OS/2 without even modify the
411path of the interpreter!
412
413The UNIX Shell Script Loader is enabled by default.
414
415
4162.3.6 Pure REXX Loader
417----------------------
418
419The Pure REXX Loader is a win32k.sys feature which enables REXX script with
420the extentions .RX and .REX to run as native OS/2 executables. These REXX
421scripts are executed using kRX.EXE which is found in the Odin32 System32
422directory.
423
424When we say "Pure REXX" scripts, that means no use of command line should
425occure in the script.
426
427The Pure REXX Loader is enabled by default.
428
429
4302.3.7 Java Loader/Invoker
431-------------------------
432
433Just for fun, I've added some code which detects JAVA class binaries and
434executes the class using JAVA.EXE. I first thougth this should be easy, but
435it turned out to have several problems.
436So please note the following:
437 - The classname is case sensitive, you have to write the exact class
438 name (with .class extention or what ever extention the file have)
439 when trying to execute a class. This could cause some throuble making
440 WPS program objects for the classes....
441 - To support executing of .class-files which are not in the current
442 directory win32k.sys send the directory of the .class-file in to
443 java.exe as a '-classpath' option. This option I soon found out had the
444 sideeffect of making JAVA.exe ignore the other CLASSPATH and not use
445 it's default class path. So now the contents of the CLASSPATH env. var.
446 or a generated default classpath is also sent in with the '-classpath'
447 option.
448 - The CLASSPATH environment variable should not be longer than 639 chars.
449
450When you have successfully installed Win32k.sys try type this at the
451commandline:
452c:\java11\demo\hello\hello.class
453
454This is then printed at my screen:
455Hello, Warped world!
456
457The JAVA Loader/Invoker is enabled by default.
458
459
4602.3.8 Rings - Ring 0 / Ring 3
461-----------------------------
462
463FYI. Ring 0 is the most priveleged level of execution in OS/2. The OS/2 kernel
464and device drivers execute at this level, while user applications execute in
465Ring 3, the least priveleged executing level.
466
467
4682.3.9 Win32k Control Center
469---------------------------
470
471In your Odin32 System32 directory there is a program called Win32kCC.exe,
472this is the Win32k Control Center (Win32kCC). Win32kCC is as the name says
473a program controlling Win32k.sys.
474
475Win32kCC allows you to enable, disable and change behaviour of different
476parts in Win32k.sys.
477
478For example: You could disable PE loading, or change it from MIXED mode (see
4792.3.4, -PE) to PE2LX mode. Or change it from PE2LX mode to PE mode to see
480if PE.EXE does a better job loading an executable.
481
482Note that the changes would not effect allready loaded executables.
483
484
485Win32kCC also displays status info on the running Win32k.sys and OS/2 kernel:
486 -Win32k.sys version number
487 -Win32k build time/date
488 -Path of the symbol file which was used (or Win32k Symbol Database).
489 -OS/2 kernel build number fixpack (guess)
490 -OS/2 kernel type as win32k has detected it
491 -Number of Pe2Lx currently loaded modules
492 -Win32k resident and swappable heap stats.
493
494PS. Beside the "PE Loader" area there is an "Elf Loader" area this is for a
495future Elf2Lx loader.
496
497
498
4992.4 The Ring3 conversion utility (Xx2Lx.exe)
500--------------------------------------------
501
502Xx2Lx.exe was the first method of running Win32 programs under
503OS/2. It is still provided and also functional but it has been
504deprecated. Using it is only sensible for debugging certain
505problems as it requires all DLLs and EXEs to be converted into
506another file format thus changing the original Win32 files.
507(It's only future use will be to convert Win32 executable with
508debuginfo to LX with HLL (IPMD/ICSDEBUG) debuginfo for
509sourcelevel debugging of Win32 executables under Odin32. This
510is not yet implemented but is being worked on.)
511
512Note. The name changed from Pe2Lx to Xx2Lx. It is in prepare for Elf2Lx.
513
514
5153.0 Applications known to be working
516------------------------------------
517
518- Flash 11
519- OpenJDK6
520
521Note that many other applications load and/or partly work.
522
523
5244.0 Reporting Problems and Successes
525------------------------------------
526
527Bug reports can be filed in the ticket system at http://svn.netlabs.org/odin32/.
528
529
5305.0 Project Odin Source Code Notes
531----------------------------------
532
5335.1.0 Introduction
534------------------
535
536This chapter is intended for people more familiar with ODIN. It describes
537the various aspects of the project such as accessing the latest sources via
538svn, building the binaries, running win32 applications, how to identify and
539report problems and bugs, as well as how to participate in this very
540promising project.
541
542
5435.1.1 Prerequisites:
544--------------------
545
546Required compilers/tools:
547 - GCC 4.4.6 (available as RPM)
548 - OS/2 Toolkit 4.5
549 - kBuild utility (available as RPM)
550
551Changes from last source code release:
552 - Uses Wine headers and a stripped down version of os2win.h (Open32
553 header)
554 - All Open32 apis have the 'O32_' prefix.
555 - All Open32 declarations are appended with '_O32' (mostly due to
556 calling convention differences)
557 - kmk BUILD_TYPE=debug builds the debug version
558 kmk builds the release version
559 - Several dlls (i.e. USER32, KERNEL32, ADVAPI32) contain extra .def
560 files that are used to create libraries that contain the api names
561 as required by the linker when you use them. (_apiname@nrparameterbytes)
562
563Wine header notes:
564 - Several header files have been changed to make them usable for GCC
565 - Several header files contain bugfixes (mostly parameter type changes)
566 - Several header files include additional declarations
567 - At this time we don't intend to have our changes included in the
568 Wine codebase as header files are not likely to change often.
569
570Coding conventions:
571 - Do NOT directly call the Open32 apis unless you're writing
572 a wrapper for it.
573 - Do NOT include os2.h directly. Use os2wrap.h instead.
574 os2wrap.h contains all the OS/2 apis with a wrapper around it to save
575 and restore the selector in FS. (some OS/2 apis set it back to the
576 default value (150b))
577 - Use the correct Win32 api when there are two version (ascii & unicode)
578 Calling the standard one (SendMessage) causes a error during
579 compilation.
580 Use SendMessageA instead.
581
582
5835.2.0 Accessing ODIN source code via SVN
584----------------------------------------
585
586Please check out http://svn.netlabs.org/odin32/.
587
588
5895.3.0 Building the binaries
590---------------------------
591
592The first time you want to build Odin, you must copy the LocalConfig.kmk.tpl
593to LocalConfig.kmk and adjust it to your environment.
594
595If your system setup meets above stated requirements, everything you
596need to do next for a binary build is:
597
598 kmk BUILD_TYPE=debug
599
600or alternatively
601
602 kmk
603
604As the current state of the project is still in early stage, one should
605expect some functions not to work properly. Therefore, we recommend the use of
606the debug-version which creates long logfiles for problem determination purpose
607and to allow active debugging with debuggers such as IPMD, ICAT, KDB, etc.
608
609Please note if you do not want to suffer from the performance loss of writing
610logfiles, you can disable logging even with the debug binaries of ODIN by
611setting:
612
613 SET NOWIN32LOG=YES
614
615To enable logging again, clear this environment variable by typing:
616
617 SET NOWIN32LOG=
618
619Logging is enabled by default in the debug build, but disabled by default
620in the nodebuginfo build and not present in the release build.
621
622
6235.3.1 Build problems
624--------------------
625
626ODIN is moving at a fast pace. Sometimes side effects of source dependencies may
627require you to do a full rebuild of the binaries instead of an incremental build.
628
629However, rarely it also happens the sources contained in the SVN repository do
630not build completely due to erroneous source code. Usually, this is fixed within
631two days at maximum.
632In such event, one can normally stick with the previous version of the particular
633module to further test win32 applications on ODIN.
634
635Please report such build problems through the appropriate channel.
636
637
6385.3.2 Downloading daily binaries
639--------------------------------
640
641We do not provide any daily binaries anymore.
642
643
6445.4.0 Project participation
645---------------------------
646
647As ODIN became an open source project, everybody is kindly invited to
648contribute his/her share to the progress of the project. May it be
649active coding, fixing bugs or just providing detailed information about
650examined problems.
651
652We suggest you subscribe to odin-user@netlabs.org.
653In case you are interested in participating, every member of the project will
654be happy to give you direction to the right places and to give a personal
655introduction to further development of the particular modules.
656
657
6586.0 Warranty
659------------
660
661EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED
662WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES OF ANY KIND, INCLUDING
663BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF FITNESS FOR A
664PARTICULAR PURPOSE, MERCHANTABILITY OR TITLE. EXCEPT AS
665OTHERWISE PROVIDED BY LAW, NO AUTHOR, COPYRIGHT HOLDER OR
666LICENSOR SHALL BE LIABLE TO YOU FOR DAMAGES OF ANY KIND, EVEN IF
667THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Note: See TracBrowser for help on using the repository browser.