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