~ubuntu-branches/debian/sid/freeciv/sid

« back to all changes in this revision

Viewing changes to amiga/ReadMe.developer

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2010-02-23 22:09:02 UTC
  • mfrom: (7.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100223220902-s3spqi1x4e190y0t
[ Karl Goetz ]
* Remove civserver files in /etc/ggzd/ (Closes: 523772, 517787)
* Adding ${misc:Depends} to all binary packages (lintian warnings)

[ Clint Adams ]
* New upstream version.
  - Drop data_dsc_use_bindir.diff (binary pathnames have changed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Requirements to compile Freeciv
2
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
 
Currently the native version of freeciv is tested with SAS C only.
4
 
Anyway the code should be much more portable than previous versions.
5
 
 
6
 
Furthermore you need the AmiTCP SDK or Miami SDK, MUI, NList and Guigfx
7
 
includes to be on your machine.
8
 
 
9
 
How to compile?
10
 
~~~~~~~~~~~~~~~
11
 
If all is ready, simply cd into this directory and enter
12
 
 
13
 
 'smake'
14
 
 
15
 
Maybe modify below settings before. 'smake install' will probably not work.
16
 
This is because there are currently no icons in the cvs. And the ilbm
17
 
pictures aren't there as well.
18
 
 
19
 
There are some settings you may change in the smakefile:
20
 
 DESTDIR     set to the directory, where install should copy files to
21
 
 CPU_MATH    set the CPU and math type you want including the math library
22
 
             for linker.
23
 
 TCPSDK      Choose one of the two possible lines
24
 
 OPTFLAGS    Set optimization flags, default are none.
25
 
 INCDIRS     Allows to include additional include directories. Normally
26
 
             this will be the Miami or AmiTCP SDK directory or empty.
27
 
 
28
 
To make the server call 'smake dirs civserver' (dirs creates directories).
29
 
To make the client call 'smake dirs civclient' (dirs creates directories).
30
 
To transform the locale files call 'smake dirs locale' (dirs creates
31
 
directories)
32
 
You need not add the dirs always, when they have been created already.
33
 
 
34
 
What to know about compiling process?
35
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
 
The files server/civserver.c and client/civclient.c contain the main()
37
 
functions for civserver and civclient. On the Amiga we need to do some
38
 
special stuff (e.g. library opening) before these main()'s are called. So
39
 
a special handling is needed:
40
 
 
41
 
The two files need to be compiled with DEFINE main=civ_main (redefine the
42
 
name main to civ_main). The files amigaserver.c and amigaclient.c contain
43
 
the real main() functions, which call civ_main() afterwards.
44
 
The main() in amigaserver.c and amigaclient.c expect normal C style
45
 
arguments argc and argv. If called from Workbench, argc is 0 and argv the
46
 
pointer to WBStartup message. If your compiler does not support that
47
 
behaviour, add another preparser and call the main function from it.
48
 
 
49
 
Example:
50
 
 
51
 
Add following before main() in amigaserver.c and amigaclient.c.
52
 
 
53
 
#ifdef __MY_COMPILER_NAME__
54
 
int main(int argc, char *argv)
55
 
{
56
 
  if(WBenchMsg) /* the hell knows, how your compiler handles this :-) */
57
 
    return main2(0, (char **) WBenchMsg);
58
 
  else
59
 
    return main2(argc, argv);
60
 
}
61
 
#define main main2 /* redefine main to avoid conflicts */
62
 
#endif
63
 
 
64
 
The free process is handled with atexit(), so the libraries are freed on
65
 
abnormal program abortion also.
66
 
 
67
 
The gettext.c and libintl.h files.
68
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
69
 
These two files allow support of NLS. This is not a complete gettext
70
 
implementation, but enough for freeciv port.
71
 
The environment variable "LANG" or "LANGUAGE" must contain the language
72
 
string (e.g. >de< for german locale). The function also tries to convert
73
 
the system language to the form used in freeciv distribution. If this
74
 
does not work add a new conversion entry to LocaleConvTab in gettext.c.
75
 
 
76
 
The language files are stored in locale directory in form xx.mo. Where
77
 
xx is the language identifier as used im po directory of source tree.
78
 
 
79
 
The vsnprintf.c file.
80
 
~~~~~~~~~~~~~~~~~~~~~
81
 
The current Amiga development systems (especially SAS and VBCC) do not
82
 
support argument reordering in their printf-style functions. So the
83
 
sprintf function must be added to the project. And as freeciv needs
84
 
vsnprintf (which has better error checking) instead of sprintf we also
85
 
removed the need to use the internal workaround of freeciv.
86
 
 
87
 
How to make with VBCC (at least 0.8)?
88
 
~~~~~~~~~~~~~~~~~~~~~~
89
 
- Get a make program.
90
 
- Get fd2pragma (Aminet/dev/misc/fd2pragma.lha) and create prototype files
91
 
  as well as usergroup.lib and guigfx.lib.
92
 
- Start make and fix all the other problems, which may have been added in
93
 
  between releases (example: make -f vmakefile). Ignore warnings.
94
 
 
95
 
Problems:
96
 
- Starting server from WB is nearly useless as it misses the input and
97
 
  output dialog.
98
 
- Starting client from WB misses the output dialog (client uses no input).