mirror of https://github.com/OpenTTD/OpenTTD
(svn r2028) Added detection of SVN version (rev.c generation) for OS/2, updated readme, initial clipboard support (orudge)
parent
d2ae7dd186
commit
fe8313159a
|
@ -66,13 +66,14 @@ Compiler
|
||||||
|
|
||||||
Open Watcom 1.3 was used to build OpenTTD (earlier versions will
|
Open Watcom 1.3 was used to build OpenTTD (earlier versions will
|
||||||
NOT work). See http://www.openwatcom.org/ to download it. It may
|
NOT work). See http://www.openwatcom.org/ to download it. It may
|
||||||
also be possible to build OpenTTD under OS/2: I attempted this
|
also be possible to build OpenTTD with GCC: I attempted this
|
||||||
before using Open Watcom, but found the tools available for OS/2
|
before using Open Watcom, but found the tools available for OS/2
|
||||||
at the time to be a bit more tricky to get working.
|
at the time to be a bit more tricky to get working.
|
||||||
|
|
||||||
Due to complexities in my set-up, I actually used the Win32 version
|
Due to complexities in my set-up, I actually used the Win32 version
|
||||||
of Open Watcom to initially compile OpenTTD for OS/2. There should
|
of Open Watcom to initially compile OpenTTD for OS/2. There should
|
||||||
be no reason of course why the OS/2 version cannot be used.
|
be no reason of course why the OS/2 version cannot be used, and I
|
||||||
|
have subsequently built OpenTTD successfully this way.
|
||||||
|
|
||||||
Libraries Required
|
Libraries Required
|
||||||
------------------
|
------------------
|
||||||
|
@ -84,10 +85,10 @@ provided, they are not designed for Watcom (apart from SDL):
|
||||||
|
|
||||||
- zlib
|
- zlib
|
||||||
http://www.zlib.org/ - contains a makefile for OS/2, but is out
|
http://www.zlib.org/ - contains a makefile for OS/2, but is out
|
||||||
of date and uses EMX
|
of date and uses EMX, ignore this
|
||||||
|
|
||||||
- libpng
|
- libpng
|
||||||
http://www.libpng.org/ - contains an EMX/gcc makefile
|
http://www.libpng.org/ - contains an EMX/gcc makefile, ignore this
|
||||||
|
|
||||||
- SDL for OS/2
|
- SDL for OS/2
|
||||||
For 0.3.5, I used ftp://ftp.netlabs.org/pub/sdl/SDL-1.2.7-src-20040908a.zip -
|
For 0.3.5, I used ftp://ftp.netlabs.org/pub/sdl/SDL-1.2.7-src-20040908a.zip -
|
||||||
|
@ -98,6 +99,24 @@ If you do not wish to build the libraries yourself, pre-built versions
|
||||||
can be downloaded from the Files section at
|
can be downloaded from the Files section at
|
||||||
http://sourceforge.net/projects/openttd/ - see "os2-useful.zip".
|
http://sourceforge.net/projects/openttd/ - see "os2-useful.zip".
|
||||||
|
|
||||||
|
A Note About Subversion Revision Numbers
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
The project file uses a bit of a hack to find out the SVN revision number and
|
||||||
|
create an appropriate rev.c file. It does this using a batch file and a GNU
|
||||||
|
makefile, as well as the SVN tools (specifically, "svnversion"). For this to
|
||||||
|
work successfully, you'll need the SVN tools installed and in your path, as
|
||||||
|
well as some of the GNU tools (GNU make, and some tools from textutils,
|
||||||
|
possibly others too) - otherwise, a generic rev.c with the revision set to
|
||||||
|
"norev000" will be created. To specifically force a version number, set
|
||||||
|
the environment variable "RELEASE" to the number (eg, "0.3.6") -before-
|
||||||
|
starting the Open Watcom IDE (which must be launched from the same shell
|
||||||
|
session). Also, beware, as you WILL cause incompatibilities if you try to
|
||||||
|
play a multiplayer game with a different version.
|
||||||
|
|
||||||
|
Apologies for the complicated hack used here, but it's a bit of a pain to do,
|
||||||
|
as any Windows MSVC user will tell you. ;)
|
||||||
|
|
||||||
Compiling
|
Compiling
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -115,4 +134,4 @@ If you have any questions regarding OS/2 issues, please contact me
|
||||||
(owen@owenrudge.net) and I'll try to help you out. For general OpenTTD
|
(owen@owenrudge.net) and I'll try to help you out. For general OpenTTD
|
||||||
issues, see the Contacting section of readme.txt.
|
issues, see the Contacting section of readme.txt.
|
||||||
|
|
||||||
- Owen Rudge, 26th December 2004
|
- Owen Rudge
|
||||||
|
|
571
openttd.tgt
571
openttd.tgt
File diff suppressed because it is too large
Load Diff
|
@ -4,15 +4,16 @@ projectIdent
|
||||||
VpeMain
|
VpeMain
|
||||||
1
|
1
|
||||||
WRect
|
WRect
|
||||||
0
|
-32
|
||||||
40
|
-40
|
||||||
10320
|
10304
|
||||||
9920
|
10020
|
||||||
2
|
2
|
||||||
MProject
|
MProject
|
||||||
3
|
3
|
||||||
MCommand
|
MCommand
|
||||||
0
|
15
|
||||||
|
svn_version.cmd
|
||||||
4
|
4
|
||||||
MCommand
|
MCommand
|
||||||
0
|
0
|
||||||
|
@ -42,8 +43,8 @@ WRect
|
||||||
WFileName
|
WFileName
|
||||||
17
|
17
|
||||||
..\..\openttd.tgt
|
..\..\openttd.tgt
|
||||||
38
|
42
|
||||||
56
|
66
|
||||||
11
|
11
|
||||||
VComponent
|
VComponent
|
||||||
12
|
12
|
||||||
|
|
16
os2.c
16
os2.c
|
@ -15,6 +15,7 @@
|
||||||
#define INCL_DOS
|
#define INCL_DOS
|
||||||
#define INCL_OS2MM
|
#define INCL_OS2MM
|
||||||
#define INCL_WIN
|
#define INCL_WIN
|
||||||
|
#define INCL_WINCLIPBOARD
|
||||||
|
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#include <os2me.h>
|
#include <os2me.h>
|
||||||
|
@ -687,6 +688,21 @@ const HalMusicDriver _os2_music_driver = {
|
||||||
|
|
||||||
bool InsertTextBufferClipboard(Textbuf *tb)
|
bool InsertTextBufferClipboard(Textbuf *tb)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
HAB hab = 0; // anchor-block handle
|
||||||
|
PSZ pszClipText, pszLocalText;
|
||||||
|
|
||||||
|
if (WinOpenClipbrd(hab))
|
||||||
|
{
|
||||||
|
if (pszClipText = (PSZ) WinQueryClipbrdData(hab, CF_TEXT))
|
||||||
|
{
|
||||||
|
while (*pszLocalText++ = *pszClipText++);
|
||||||
|
}
|
||||||
|
WinCloseClipbrd(hab);
|
||||||
|
}
|
||||||
|
|
||||||
|
// text is now in pszLocalText, do something with it!
|
||||||
|
#endif
|
||||||
// TODO
|
// TODO
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue