File: README

package info (click to toggle)
mah-jong 1.8-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,384 kB
  • ctags: 2,186
  • sloc: ansic: 26,312; perl: 393; makefile: 272; sh: 122
file content (240 lines) | stat: -rw-r--r-- 8,765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
$Header: /home/jcb/newmj/RCS/README,v 11.6 2006/02/14 23:13:02 jcb Exp $

This is the README file for the Unix mah-jong programs by J. C. Bradfield.


NOTICES:
--------
Please see the file LICENCE for terms and conditions of these
programs.

Source distribution only:
-------------------------
The code in the  tiles-v1/  directory was not written by me; see 
tiles-v1/README  for information and licensing.
The file MANIFEST contains a description of all the files you 
should find in this distribution.

Binary distributions only:
--------------------------
In the distribution directory, you will find the following files:
mj-server   the controller program. ( mj-server.exe in Windows )
mj-player   a computer player.      ( mj-player.exe in Windows )
xmj         a graphical client.     ( xmj.exe in Windows )
README      this file
LICENCE     the licence
rules.txt   the rules as implemented by the programs
use.txt     documentation on how to use the programs
CHANGES     summary of changes between releases
xmj.1       man page (not in Windows)
mj-player.1 man page (not in Windows)
mj-server.1 man page (not in Windows)
tiles-numbered   an alternative tileset with some arabic numbers
tiles-small a set of smaller (3/4 size) tiles


DESCRIPTION:
------------
These programs allow the user of a Unix (or Windows) computer to play
Mah-Jong, in the Chinese Classical style, against other users (locally
or over the Internet), against programmed players, or both.


OBTAINING:
----------
Latest releases should be available from:
 http://www.stevens-bradfield.com/MahJong/


CONTACTING:
-----------
If you need to contact me about these programs, please mail me at
mahjong@stevens-bradfield.com .


INSTALLATION - BUILDING FROM SOURCE:
------------------------------------

Systems:
--------
These programs should, in theory, compile on any reasonably modern
32-bit Unix with an ANSI C compiler and the X Window System.
They are known to compile (and run) under GNU/Linux, recent Solaris (on Sparc),
and recent Irix (on Silicon Graphics workstations).
They also compile and run on MacOS 10 with Fink and X11.
If you try to compile on any "reasonably modern" system, and have a
problem, do please tell me.
In addition, they should compile and run under Win32 systems with
GNU compilers and utilities; they are known to work under NT 4.0 with
the mingw compiler (you must use the version with the MSVCRT dll).
Adam Kao <mahjong@ideogram.com>  got a pre-release version to compile
with Microsoft Visual C and nmake, but as I don't have these I don't
support them. If you wish to try to do this, the file  makefile.msvc.old
is the makefile Adam used; however, it has not been updated to match the
current release, and is now extremely old.

Prerequisites:
--------------
On Unix you need version 1.2 (later versions may work, depending on what
changes) of the GTK+ toolkit.  (This is included with modern Linux
distributions. To check your installation, do
 gtk-config --version
If you do not have GTK+, obtain it from www.gtk.org or mirrors.
Alternatively, if you are running Linux-x86, a binary distribution
with the GTK+ libraries linked-in is available from the sites above.
On Windows, you need a recent (2004) version 1.3 of the gtk+ Windows port.

To compile the program, you need Perl, version 5 (version 4 is almost
certainly OK, but I haven't checked). Perl should be installed on any
decent system. You do not need any Perl modules.

You need the GNU make utility. If you do not have this, you will need
to remove the GNU-specific features from the Makefile, as directed therein.
(Windows: see also note above about makefile.msvc.old)

Installing:
-----------
Unpack the distribution, and cd into the distribution directory.

Edit the Makefile, and change as directed by the comments.

Then
 make

You should not see any warnings or errors. If you do get any warning
or error, please complain to me (unless you've switched on lots of
superfluous message via the C debug flags, in which case you know what 
you're doing, so don't complain to me!).

Then (Unix only) su to an appropriate user if you need this for
installation, and 
 make install
will install the binaries in the place you chose. Alternatively,
just copy the three binaries
 mj-server
 mj-player
 xmj
into your chosen directory.

make install.man  (Unix only)
will install the man pages into the appropriate directory.

You may also wish to put the pre-formatted text files  use.txt
and rules.txt (which are basically the two halves of the man page)
somewhere.


INSTALLATION - UNIX BINARY DISTRIBUTIONS:
-----------------------------------------

Unpack the distribution, and cd into the distribution directory.

Just copy the three binaries
 mj-server
 mj-player
 xmj
into your chosen directory. If you don't have GTK+, then see above.

The user documentation is  use.txt  and  rules.txt ; put these in
an appropriate place. 

Alternatively, or as well, copy the man pages  xmj.1, mj-server.1,
mj-player.1  to the appropriate man directory (e.g. /usr/local/man/man1).

Make sure that the binary directory is in your PATH; in particular,
if you run from the source directory, you need to have it in your 
PATH either explicitly or as . .

Problems:
---------
The most likely problem is: you appear to have GTK+ installed, but
when you try to run  xmj  you get a message about missing libgtk .
This means your GTK+ libraries are not in the same place mine are, and are
not in the default search path. If this happens, the following may work:
rename  xmj  to  xmj.exe , and make  xmj  the following two line script:
#!/bin/sh
LD_LIBRARY_PATH="`gtk-config --prefix`/lib:$LD_LIBRARY_PATH" xmj.exe "$@"

If that doesn't work, then you're probably on a system weird enough that
you know what to do anyway, because you've had to do it before.
Alternatively, use the static version of  xmj .


INSTALLATION - WINDOWS BINARY DISTRIBUTION:
-------------------------------------------

Unpack the distribution. 
Put the three *.exe files into an appropriate directory.
Creating menu items and shortcuts is up to you...

You must have the DLLs for the GTK+ libraries, as specified above.
For your convenience, these can be found in the file  gtkdlls1.zip
in the xmj download directory. Put the DLLs in the same directory as
the xmj binaries.
Beware that at release 1.7 a new version (gtkdlls1.zip) of the GTK+ libraries
was used. The old version (gtkdlls.zip) will not work with releases 1.7
and later, and the new version will not work with 1.6.

Put the documentation  use.txt  and  rules.txt  somewhere sensible.


RUNNING:
--------
Please see the file  use.txt  in the distribution for usage
information. The file  rules.txt  describes the rules applied by
the programs. (Or see the man page.)


PAYMENT & REGISTRATION:
-----------------------
What payment? What registration? These programs are free. However, if
you would like to encourage me to continue development, or thank me
for what I have already done, you can
(a) make a donation to your local branch of Amnesty International
    (please send me a note if you do); or,
(b) send me a donation, either via PayPal, or by credit card by
    the link on the xmj home page.
If you want to be informed when new versions are released, etc.,
then send me a note (to the addresses above), and I'll add you
to a mailing list.


WINDOWS:
--------
The Windows port exists thanks to the efforts of Adam Kao
<mahjong@ideogram.com>, who ported the pre-release version, and thus
showed me what to do.
Only Win32 is catered for.
I do not have a proper development environment for
Windows, so Windows-specific bugs will not have a high priority.


SUGGESTIONS:
------------
Please send me your suggestions/requests for improvements. I've gone
to a lot of trouble to make it fairly painless to add variations in
rules, scoring, etc.; so I need some requests to make the trouble
worthwhile!


BUGS:
-----
Please report any bugs, or anything that might be a bug.
There are probably lots, although I have obviously eliminated all I've 
seen so far.

Known problems:
---------------
GTK+ has some subtle and elusive bugs. In particular, you may
occasionally see labels (such as the "Pung!" announcements, or the
name of the discarded tile) appearing blank instead of with text. I've
tried and failed to track this one down, and am not willing to spend
any more time on it. So don't bother to report this one!
On Windows, if the server is running on the same machine as the
graphical client, and is forcibly killed, the graphical client
generates an application exception.
This is probably some subtle bug deep inside the Windows port of gtk+,
so I'm not going to investigate it.
There are other gtk+ bugs on Windows; mangled text windows have been
reported.