README.Watcom
author Ozkan Sezer <sezeroz@gmail.com>
Sat, 14 Sep 2019 17:00:50 +0300
branchSDL-1.2
changeset 13077 cd46eb772bee
parent 12987 ad20a4424a57
permissions -rw-r--r--
make SDL_qsort.c to actually link (missing SDL_stdinc.h include)

also sync its comments with version 1.15 from mainstream
     1 
     2 Using SDL under Windows with the OpenWatcom compiler
     3 ====================================================
     4 
     5 Last updated on June 26, 2006.
     6 
     7 
     8 Prerequisites
     9 -------------
    10 
    11 I have done the port under Windows XP Home with SP2 installed. Windows
    12 2000 should also be working. I'm not so sure about ancient Windows NT,
    13 since only DirectX 3 is available there. Building should be possible,
    14 but running the compiled applications will probalbly fail with
    15 SDL_VIDEODRIVER=directx. The windib driver should work, though.
    16 
    17 To compile and use the SDL with Open Watcom you will need the following:
    18 - Open Watcom compiler. I used version 1.5. The environment variables
    19   PATH, WATCOM and INCLUDE need to be set appropriately - please consult
    20   the OpenWatcom documentation and instructions given during the
    21   installation of the compiler.
    22   My setup looks like this in owvars.bat:
    23     set WATCOM=C:\watcom
    24     set INCLUDE=%WATCOM%\h;%WATCOM%\h\nt
    25     set PATH=%PATH%;%WATCOM%\binnt;%WATCOM%\binw
    26 - A fairly recent DirectX SDK. The original unmodified DX8 SDK works, as
    27   well as the minimal DirectX 7 SDK from the Allegro download site
    28   (<http://alleg.sourceforge.net/files/dx70_min.zip>).
    29 - The SDL sources from Subversion
    30 - The file Watcom-Win32.zip (now available in Subversion)
    31 
    32 
    33 Building the Library
    34 --------------------
    35 
    36 1) In the SDL base directory extract the archive Watcom-Win32.zip. This
    37    creates a subdirectory named 'watcom'.
    38 2) The makefile expects the environment variable DXDIR to be set to the
    39    base directory of a DirectX SDK. I have tried a stock DX8 SDK from
    40    Microsoft as well as the minimal DirectX 7 SDK from the Allegro
    41    download site.
    42    You can also edit the makefile directly and hard code your path to
    43    the SDK on your system.
    44    I have this in my setup:
    45      set DXDIR=D:\devel\DX8_SDK
    46 3) Enter the watcom directory and run
    47      wmake sdl
    48 4) All tests from the test directory are working and can be built by
    49    running
    50      wmake tests
    51 
    52 Notes:
    53 
    54  The makefile offers some options to tweak the way the library is built.
    55  You have at your disposal the option to build a static (default)
    56  library, or a DLL (with tgt=dll). You can also choose whether to build
    57  a Release (default) or a Debug version (with build=debug) of the tests
    58  and library. Please consult the usage comment at the top of the
    59  makefile for usage instructions.
    60 
    61  If you specify a test target (i.e. 'wmake tests' for all tests, or
    62  selected targets like 'wmake testgl testvidinfo testoverlay2'), the
    63  tests are always freshly compiled and linked. This is done to
    64  minimise hassle when switching between library versions (static vs.
    65  DLL), because they require subtly different options.
    66  Also, the test executables are put directly into the test directory,
    67  so they can find their data files. The clean target of the makefile
    68  removes the test executables and the SDL.dll file from the test
    69  directory.
    70 
    71  To use the library in your own projects with Open Watcom, you can use
    72  the way the tests are built as base of your own build environment.
    73 
    74  The library can also be built with the stack calling convention of the
    75  compiler (-6s instead of -6r).
    76 
    77 
    78 Test applications
    79 -----------------
    80 
    81 I've tried to make all tests work. The following table gives an overview
    82 of the current status.
    83 
    84  Testname        Status
    85 ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86 checkkeys       +
    87 graywin         +
    88 loopwave        +
    89 testalpha       +
    90 testbitmap      +
    91 testdyngl       +
    92 testerror       +
    93 testfile        +
    94 testgamma       +
    95 testgl          +
    96 testhread       +
    97 testiconv       - (all failed)
    98 testkeys        +
    99 testlock        +
   100 testoverlay     + (needs 'set SDL_VIDEODRIVER=directx')
   101 testoverlay2    + (needs 'set SDL_VIDEODRIVER=directx')
   102 testpalette     +
   103 testplatform    +
   104 testsem         +
   105 testsprite      +
   106 testtimer       +
   107 testver         +
   108 testvidinfo     +
   109 testwin         ? (fading doesn't seem right)
   110 testwm          +
   111 torturethread   +
   112 testcdrom       +
   113 testjoystick    not tested
   114 threadwin       +
   115 testcursor      +
   116 
   117 
   118 TODO
   119 ----
   120 
   121 There is room for further improvement:
   122 - Test joystick functionality.
   123 - Investigate fading issue in 'testwin' test.
   124 - Fix the UTF-8 support.
   125 - Adapt the makefile/object file list to support more target systems
   126 - Use "#pragma aux" syntax for the CPU info functions.
   127 
   128 
   129 Questions and Comments
   130 ----------------------
   131 
   132 Please direct any questions or comments to me:  <mailto:macpete@gmx.de>
   133 
   134    Happy Coding!
   135 
   136    Marc Peter