Changeset - r7045:31669c6e99e1
[Not reviewed]
master
0 5 0
orudge - 17 years ago 2007-06-24 20:41:24
orudge@openttd.org
(svn r10310) -Fix: Trunk can now be built on OS/2 :)
5 files changed with 24 insertions and 9 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -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
docs/Readme_OS2.txt
Show inline comments
 
@@ -50,6 +50,10 @@ To enable music, start OpenTTD with the 
 
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 
 
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
 

	
 
   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 re
 

	
 
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
readme.txt
Show inline comments
 
@@ -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:
src/driver.cpp
Show inline comments
 
@@ -64,7 +64,7 @@ static const DriverDesc _music_driver_de
 
#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
src/os2.cpp
Show inline comments
 
@@ -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 diren
 
	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 
 
	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);
0 comments (0 inline, 0 general)