diff options
-rw-r--r-- | config.lib | 2 | ||||
-rw-r--r-- | docs/Readme_OS2.txt | 16 | ||||
-rw-r--r-- | readme.txt | 4 | ||||
-rw-r--r-- | src/driver.cpp | 2 | ||||
-rw-r--r-- | src/os2.cpp | 9 |
5 files changed, 24 insertions, 9 deletions
diff --git a/config.lib b/config.lib index b41306d32..321e7aacd 100644 --- a/config.lib +++ b/config.lib @@ -829,7 +829,7 @@ make_cflags_and_ldflags() { fi fi - if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ]; then + if [ "$os" != "CYGWIN" ] && [ "$os" != "FREEBSD" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "WINCE" ] && [ "$os" != "PSP" ] && [ "$os" != "OS2" ]; then LIBS="$LIBS -lpthread" LIBS="$LIBS -lrt" fi diff --git a/docs/Readme_OS2.txt b/docs/Readme_OS2.txt index d5641f9e4..84fa6ec7e 100644 --- a/docs/Readme_OS2.txt +++ b/docs/Readme_OS2.txt @@ -50,6 +50,10 @@ To enable music, start OpenTTD with the command line: If I hear enough responses that both music and sound work together (it might just be my system), I'll have the defaults changed. +Please note also that the GCC version does not currently support the MCI MIDI +system. + + A NOTE ABOUT DEDICATED MULTIPLAYER SERVERS ------------------------------------------ @@ -60,6 +64,8 @@ directly will result in the console not being displayed. You may still pass any other parameters ('-D' is already passed) to dedicated.cmd. +You can find the dedicated.cmd file in the os/os2 directory. + ========================= BUILDING THE OS/2 VERSION ========================= @@ -74,9 +80,17 @@ may help to set one up (although some of the links from that page are broken): http://www.mozilla.org/ports/os2/gccsetup.html +Alternatively, Paul Smedley's ready-to-go GCC build environment has been known to +successfully build the game: + + http://www.smedley.info/os2ports/index.php?page=build-environment + To build, you should, if your environment is set up well enough, be able to just type `./configure' (or `sh configure' if you're using the OS/2 shell) and `make'. +You may have to manually specify `--os OS2' on the configure command line, as +configure cannot always detect OS/2 correctly. + A note on Open Watcom --------------------- @@ -122,4 +136,4 @@ issues, see the Contacting section of readme.txt. Thanks to Paul Smedley for his help with getting OpenTTD to compile under GCC on OS/2. -- Owen Rudge, 8th January 2007 +- Owen Rudge, 24th June 2007 diff --git a/readme.txt b/readme.txt index 5cc23c5d4..678521d23 100644 --- a/readme.txt +++ b/readme.txt @@ -186,8 +186,8 @@ MorphOS: libpng and freetype2 developer files. OS/2: - Open Watcom C/C++ 1.3 or later is required to build the OS/2 version. See the - docs/Readme_OS2.txt file for more information. + A comprehensive GNU build environment is required to build the OS/2 version. + See the docs/Readme_OS2.txt file for more information. 8.0) Translating: diff --git a/src/driver.cpp b/src/driver.cpp index c134fe903..76516af6a 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -64,7 +64,7 @@ static const DriverDesc _music_driver_descs[] = { #if defined(LIBTIMIDITY) M("libtimidity", "LibTimidity MIDI Driver", &_libtimidity_music_driver), #endif /* LIBTIMIDITY */ -#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(PSP) +#if !defined(__MORPHOS__) && !defined(__AMIGA__) && !defined(__OS2__) && !defined(PSP) M("extmidi", "External MIDI Driver", &_extmidi_music_driver), #endif #endif diff --git a/src/os2.cpp b/src/os2.cpp index 1772f0136..6f7da9a41 100644 --- a/src/os2.cpp +++ b/src/os2.cpp @@ -12,6 +12,7 @@ #include "functions.h" #include "macros.h" #include "fileio.h" +#include "fios.h" // opendir/readdir/closedir #include <dirent.h> #include <unistd.h> @@ -124,7 +125,7 @@ bool FiosIsHiddenFile(const struct dirent *ent) return ent->d_name[0] == '.'; } -void ShowInfo(const unsigned char *str) +void ShowInfo(const char *str) { HAB hab; HMQ hmq; @@ -134,14 +135,14 @@ void ShowInfo(const unsigned char *str) hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); // display the box - rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, str, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION); + rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)str, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_INFORMATION); // terminate PM env. WinDestroyMsgQueue(hmq); WinTerminate(hab); } -void ShowOSErrorBox(const unsigned char *buf) +void ShowOSErrorBox(const char *buf) { HAB hab; HMQ hmq; @@ -151,7 +152,7 @@ void ShowOSErrorBox(const unsigned char *buf) hmq = WinCreateMsgQueue((hab = WinInitialize(0)), 0); // display the box - rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, buf, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_ERROR); + rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, (const unsigned char *)buf, (const unsigned char *)"OpenTTD", 0, MB_OK | MB_MOVEABLE | MB_ERROR); // terminate PM env. WinDestroyMsgQueue(hmq); |