Changeset - r1524:1fcae7f9f80e
[Not reviewed]
master
0 4 0
celestar - 20 years ago 2005-03-19 22:36:13
celestar@openttd.org
(svn r2028) Added detection of SVN version (rev.c generation) for OS/2, updated readme, initial clipboard support (orudge)
4 files changed with 252 insertions and 189 deletions:
0 comments (0 inline, 0 general)
docs/Readme_OS2.txt
Show inline comments
 
@@ -66,13 +66,14 @@ Compiler
 

	
 
Open Watcom 1.3 was used to build OpenTTD (earlier versions will
 
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
 
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
 
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
 
------------------
 
@@ -84,10 +85,10 @@ provided, they are not designed for Watc
 

	
 
- zlib
 
  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
 
  http://www.libpng.org/ - contains an EMX/gcc makefile
 
  http://www.libpng.org/ - contains an EMX/gcc makefile, ignore this
 

	
 
- SDL for OS/2
 
  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 librarie
 
can be downloaded from the Files section at
 
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
 
---------
 

	
 
@@ -115,4 +134,4 @@ If you have any questions regarding OS/2
 
(owen@owenrudge.net) and I'll try to help you out. For general OpenTTD
 
issues, see the Contacting section of readme.txt.
 

	
 
- Owen Rudge, 26th December 2004
 
- Owen Rudge
openttd.tgt
Show inline comments
 
@@ -194,7 +194,7 @@ 1
 
0
 
51
 
WPickList
 
103
 
104
 
52
 
MItem
 
3
 
@@ -339,8 +339,8 @@ 23
 
0
 
88
 
WString
 
50
 
ENABLE_NETWORK=1 WITH_ZLIB=1 WITH_PNG=1 WITH_SDL=1
 
61
 
ENABLE_NETWORK=1 WITH_ZLIB=1 WITH_PNG=1 WITH_SDL=1 WITH_REV=1
 
0
 
89
 
MCState
 
@@ -1545,8 +1545,8 @@ 1
 
0
 
357
 
MItem
 
10
 
road_cmd.c
 
5
 
rev.c
 
358
 
WString
 
4
 
@@ -1556,689 +1556,716 @@ WVList
 
0
 
360
 
WVList
 
0
 
52
 
1
 
1
 
0
 
361
 
MItem
 
10
 
road_gui.c
 
ActionStates
 
362
 
WString
 
4
 
COBJ
 
5
 
&Make
 
363
 
WVList
 
0
 
364
 
WVList
 
0
 
52
 
1
 
1
 
0
 
365
 
364
 
MItem
 
13
 
roadveh_cmd.c
 
366
 
10
 
road_cmd.c
 
365
 
WString
 
4
 
COBJ
 
367
 
366
 
WVList
 
0
 
368
 
367
 
WVList
 
0
 
52
 
1
 
1
 
0
 
369
 
368
 
MItem
 
13
 
roadveh_gui.c
 
370
 
10
 
road_gui.c
 
369
 
WString
 
4
 
COBJ
 
370
 
WVList
 
0
 
371
 
WVList
 
0
 
52
 
1
 
1
 
0
 
372
 
MItem
 
13
 
roadveh_cmd.c
 
373
 
WString
 
4
 
COBJ
 
374
 
WVList
 
0
 
375
 
WVList
 
0
 
52
 
1
 
1
 
0
 
373
 
376
 
MItem
 
10
 
saveload.c
 
374
 
13
 
roadveh_gui.c
 
377
 
WString
 
4
 
COBJ
 
375
 
378
 
WVList
 
0
 
376
 
379
 
WVList
 
0
 
52
 
1
 
1
 
0
 
377
 
380
 
MItem
 
12
 
screenshot.c
 
378
 
10
 
saveload.c
 
381
 
WString
 
4
 
COBJ
 
379
 
382
 
WVList
 
0
 
380
 
383
 
WVList
 
0
 
52
 
1
 
1
 
0
 
381
 
384
 
MItem
 
5
 
sdl.c
 
382
 
12
 
screenshot.c
 
385
 
WString
 
4
 
COBJ
 
383
 
386
 
WVList
 
0
 
384
 
387
 
WVList
 
0
 
52
 
1
 
1
 
0
 
385
 
388
 
MItem
 
10
 
settings.c
 
386
 
5
 
sdl.c
 
389
 
WString
 
4
 
COBJ
 
387
 
390
 
WVList
 
0
 
388
 
391
 
WVList
 
0
 
52
 
1
 
1
 
0
 
389
 
392
 
MItem
 
14
 
settings_gui.c
 
390
 
10
 
settings.c
 
393
 
WString
 
4
 
COBJ
 
391
 
394
 
WVList
 
0
 
392
 
395
 
WVList
 
0
 
52
 
1
 
1
 
0
 
393
 
396
 
MItem
 
14
 
settings_gui.c
 
397
 
WString
 
4
 
COBJ
 
398
 
WVList
 
0
 
399
 
WVList
 
0
 
52
 
1
 
1
 
0
 
400
 
MItem
 
10
 
ship_cmd.c
 
394
 
401
 
WString
 
4
 
COBJ
 
395
 
402
 
WVList
 
0
 
396
 
403
 
WVList
 
0
 
52
 
1
 
1
 
0
 
397
 
404
 
MItem
 
10
 
ship_gui.c
 
398
 
405
 
WString
 
4
 
COBJ
 
399
 
406
 
WVList
 
0
 
400
 
407
 
WVList
 
0
 
52
 
1
 
1
 
0
 
401
 
408
 
MItem
 
7
 
signs.c
 
402
 
409
 
WString
 
4
 
COBJ
 
403
 
410
 
WVList
 
0
 
404
 
411
 
WVList
 
0
 
52
 
1
 
1
 
0
 
405
 
412
 
MItem
 
14
 
smallmap_gui.c
 
406
 
413
 
WString
 
4
 
COBJ
 
407
 
414
 
WVList
 
0
 
408
 
415
 
WVList
 
0
 
52
 
1
 
1
 
0
 
409
 
416
 
MItem
 
7
 
sound.c
 
410
 
417
 
WString
 
4
 
COBJ
 
411
 
418
 
WVList
 
0
 
412
 
419
 
WVList
 
0
 
52
 
1
 
1
 
0
 
413
 
420
 
MItem
 
8
 
sprite.c
 
414
 
421
 
WString
 
4
 
COBJ
 
415
 
422
 
WVList
 
0
 
416
 
423
 
WVList
 
0
 
52
 
1
 
1
 
0
 
417
 
424
 
MItem
 
13
 
spritecache.c
 
418
 
425
 
WString
 
4
 
COBJ
 
419
 
426
 
WVList
 
0
 
420
 
427
 
WVList
 
0
 
52
 
1
 
1
 
0
 
421
 
428
 
MItem
 
13
 
station_cmd.c
 
422
 
429
 
WString
 
4
 
COBJ
 
423
 
430
 
WVList
 
0
 
424
 
431
 
WVList
 
0
 
52
 
1
 
1
 
0
 
425
 
432
 
MItem
 
13
 
station_gui.c
 
426
 
433
 
WString
 
4
 
COBJ
 
427
 
434
 
WVList
 
0
 
428
 
435
 
WVList
 
0
 
52
 
1
 
1
 
0
 
429
 
436
 
MItem
 
8
 
StdAfx.c
 
430
 
437
 
WString
 
4
 
COBJ
 
431
 
438
 
WVList
 
0
 
432
 
439
 
WVList
 
0
 
52
 
1
 
1
 
0
 
433
 
440
 
MItem
 
8
 
string.c
 
434
 
441
 
WString
 
4
 
COBJ
 
435
 
442
 
WVList
 
0
 
436
 
443
 
WVList
 
0
 
52
 
1
 
1
 
0
 
437
 
444
 
MItem
 
9
 
strings.c
 
438
 
445
 
WString
 
4
 
COBJ
 
439
 
446
 
WVList
 
0
 
440
 
447
 
WVList
 
0
 
52
 
1
 
1
 
0
 
441
 
448
 
MItem
 
13
 
subsidy_gui.c
 
442
 
449
 
WString
 
4
 
COBJ
 
443
 
450
 
WVList
 
0
 
444
 
451
 
WVList
 
0
 
52
 
1
 
1
 
0
 
445
 
452
 
MItem
 
15
 
terraform_gui.c
 
446
 
453
 
WString
 
4
 
COBJ
 
447
 
454
 
WVList
 
0
 
448
 
455
 
WVList
 
0
 
52
 
1
 
1
 
0
 
449
 
456
 
MItem
 
9
 
texteff.c
 
450
 
457
 
WString
 
4
 
COBJ
 
451
 
458
 
WVList
 
0
 
452
 
459
 
WVList
 
0
 
52
 
1
 
1
 
0
 
453
 
460
 
MItem
 
6
 
tile.c
 
454
 
461
 
WString
 
4
 
COBJ
 
455
 
462
 
WVList
 
0
 
456
 
463
 
WVList
 
0
 
52
 
1
 
1
 
0
 
457
 
464
 
MItem
 
10
 
town_cmd.c
 
458
 
465
 
WString
 
4
 
COBJ
 
459
 
466
 
WVList
 
0
 
460
 
467
 
WVList
 
0
 
52
 
1
 
1
 
0
 
461
 
468
 
MItem
 
10
 
town_gui.c
 
462
 
469
 
WString
 
4
 
COBJ
 
463
 
470
 
WVList
 
0
 
464
 
471
 
WVList
 
0
 
52
 
1
 
1
 
0
 
465
 
472
 
MItem
 
11
 
train_cmd.c
 
466
 
473
 
WString
 
4
 
COBJ
 
467
 
474
 
WVList
 
0
 
468
 
475
 
WVList
 
0
 
52
 
1
 
1
 
0
 
469
 
476
 
MItem
 
11
 
train_gui.c
 
470
 
477
 
WString
 
4
 
COBJ
 
471
 
478
 
WVList
 
0
 
472
 
479
 
WVList
 
0
 
52
 
1
 
1
 
0
 
473
 
480
 
MItem
 
10
 
tree_cmd.c
 
474
 
481
 
WString
 
4
 
COBJ
 
475
 
482
 
WVList
 
0
 
476
 
483
 
WVList
 
0
 
52
 
1
 
1
 
0
 
477
 
484
 
MItem
 
5
 
ttd.c
 
478
 
485
 
WString
 
4
 
COBJ
 
479
 
486
 
WVList
 
0
 
480
 
487
 
WVList
 
0
 
52
 
1
 
1
 
0
 
481
 
488
 
MItem
 
18
 
tunnelbridge_cmd.c
 
482
 
489
 
WString
 
4
 
COBJ
 
483
 
490
 
WVList
 
0
 
484
 
491
 
WVList
 
0
 
52
 
1
 
1
 
0
 
485
 
492
 
MItem
 
15
 
unmovable_cmd.c
 
486
 
493
 
WString
 
4
 
COBJ
 
487
 
494
 
WVList
 
0
 
488
 
495
 
WVList
 
0
 
52
 
1
 
1
 
0
 
489
 
496
 
MItem
 
9
 
vehicle.c
 
490
 
497
 
WString
 
4
 
COBJ
 
491
 
498
 
WVList
 
0
 
492
 
499
 
WVList
 
0
 
52
 
1
 
1
 
0
 
493
 
500
 
MItem
 
13
 
vehicle_gui.c
 
494
 
501
 
WString
 
4
 
COBJ
 
495
 
502
 
WVList
 
0
 
496
 
503
 
WVList
 
0
 
52
 
1
 
1
 
0
 
497
 
504
 
MItem
 
10
 
viewport.c
 
498
 
505
 
WString
 
4
 
COBJ
 
499
 
506
 
WVList
 
0
 
500
 
507
 
WVList
 
0
 
52
 
1
 
1
 
0
 
501
 
508
 
MItem
 
11
 
water_cmd.c
 
502
 
509
 
WString
 
4
 
COBJ
 
503
 
510
 
WVList
 
0
 
504
 
511
 
WVList
 
0
 
52
 
1
 
1
 
0
 
505
 
512
 
MItem
 
8
 
widget.c
 
506
 
513
 
WString
 
4
 
COBJ
 
507
 
514
 
WVList
 
0
 
508
 
515
 
WVList
 
0
 
52
 
1
 
1
 
0
 
509
 
516
 
MItem
 
8
 
window.c
 
510
 
517
 
WString
 
4
 
COBJ
 
511
 
518
 
WVList
 
0
 
512
 
519
 
WVList
 
0
 
52
os/os2/openttd.wpj
Show inline comments
 
@@ -4,15 +4,16 @@ 0
 
VpeMain
 
1
 
WRect
 
0
 
40
 
10320
 
9920
 
-32
 
-40
 
10304
 
10020
 
2
 
MProject
 
3
 
MCommand
 
0
 
15
 
svn_version.cmd
 
4
 
MCommand
 
0
 
@@ -42,8 +43,8 @@ 10
 
WFileName
 
17
 
..\..\openttd.tgt
 
38
 
56
 
42
 
66
 
11
 
VComponent
 
12
os2.c
Show inline comments
 
@@ -15,6 +15,7 @@
 
#define INCL_DOS
 
#define INCL_OS2MM
 
#define INCL_WIN
 
#define INCL_WINCLIPBOARD
 

	
 
#include <os2.h>
 
#include <os2me.h>
 
@@ -687,6 +688,21 @@ const HalMusicDriver _os2_music_driver =
 

	
 
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
 
	return false;
 
}
0 comments (0 inline, 0 general)