--- a/config.lib Sun Jun 24 20:17:39 2007 +0000
+++ b/config.lib Sun Jun 24 20:41:24 2007 +0000
@@ -829,7 +829,7 @@
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
--- a/docs/Readme_OS2.txt Sun Jun 24 20:17:39 2007 +0000
+++ b/docs/Readme_OS2.txt Sun Jun 24 20:41:24 2007 +0000
@@ -50,6 +50,10 @@
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 @@
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 @@
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 @@
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
--- a/readme.txt Sun Jun 24 20:17:39 2007 +0000
+++ b/readme.txt Sun Jun 24 20:41:24 2007 +0000
@@ -186,8 +186,8 @@
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:
--- a/src/driver.cpp Sun Jun 24 20:17:39 2007 +0000
+++ b/src/driver.cpp Sun Jun 24 20:41:24 2007 +0000
@@ -64,7 +64,7 @@
#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
--- a/src/os2.cpp Sun Jun 24 20:17:39 2007 +0000
+++ b/src/os2.cpp Sun Jun 24 20:41:24 2007 +0000
@@ -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 @@
return ent->d_name[0] == '.';
}
-void ShowInfo(const unsigned char *str)
+void ShowInfo(const char *str)
{
HAB hab;
HMQ hmq;
@@ -134,14 +135,14 @@
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 @@
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);