root/04/bugfix/doc/install.txt

Revision 21, 8.0 kB (checked in by ug, 5 years ago)

Import release 0.4d

Line 
1Installation of Kombilo 0.4
2
3Contents:
4Installing Python
5Installing Kombilo 0.4
6Installing the C++ search function
7Systemwide installation under Unix/Linux
8
9The program is written in Python, a high-level interpreted programming
10language. That means that you need to install Python before you
11can run Kombilo. Any version better than 2.0 should do; I tested
12the program with Python 2.0, 2.1 and 2.2. If you have to install
13Python, you should get the current version 2.2.
14The current version definitely does not work with version 1.5.2.
15
16--- Installing Python
17
18If you do not have python installed yet, here is what you have to do:
19You can get everything you need, including further explanation,
20at http://www.python.org/
21If you are using Windows, just download the installer and run it; that
22should be very easy.
23If you are running Linux, it is likely that Python is already included
24in your distribution. It is also easy to build it yourself from the
25sources from the Python website.
26Python is also available for the Apple Macintosh (and numerous
27other platforms, actually), but unfortunately I cannot give you
28any further information about the installation there. You should
29find everything you need on the website mentioned above, though.
30
31--- Installing Kombilo
32
33Once you have Python working, just download and unpack the
34Kombilo file (kombilo04.tar.gz, kombilo04win.zip or kombilo04.zip).
35It will create  a subdirectory called kombilo04 in the directory where
36you unzip it, and all files needed for Kombilo will be placed in that
37subdirectory. Then just start kombilo.py (or kombilo.pyw on Windows):
38On a Linux box, just change into the corresponding directory,
39and type 'python kombilo.py'. (You can also make 'kombilo.py'
40executable, possibly adapt the path in its first line to
41point to your Python installation, and run it as 'kombilo.py'.)
42Under Windows, double-clicking on 'kombilo.pyw' should be enough.
43You also can run it from a MS-DOS prompt, by
44'c:\python22\pythonw kombilo.pyw' (of course you might have to
45adjust the path of your Python installation).
46
47If you also had installed the first version of Kombilo,
48you should nevertheless install Kombilo 0.4 as explained above,
49in a directory kombilo04. You can just delete the kombilo04
50directory. The sgf databases have to be added and processed anew.
51(If this doesn't work, try to delete the files namelist.db, finalpos.db
52and lists.db from the directories with SGF files.)
53
54The Kombilo subdirectory should contain the following files:
55
56kombilo.py, v.py, board1.py, sgfparser.py, sgfparserC.cc, matchC.cc,
57kombilo.app, v.app, menus.def,
58unixinst.py (Unix only)
59doc/ kombilo.doc, license.txt, install.txt, readme.txt
60     tutorial.html, *.jpg, onepixel.gif
61gifs/ logok.gif, board.gif,
62      bw.gif, wb.gif, b.gif, w.gif,
63      fwd.gif, bwd.gif, ffwd.gif, fbwd.gif, start.gif, end.gif
64      pass.gif, ab.gif, info.gif,
65      back.gif, reset.gif,
66      psearch.gif, isearch.gif, ssearch.gif
67
68After the installation, just start Kombilo, add a database to
69the database list (File-Edit DB list), enter a search pattern and
70a search-relevant region (right mouse key) and press the 'pattern search'
71button!
72 
73Most things should be self-explanatory. More information can be found
74in the file kombilo.doc, which is also available from the Help menu
75('Documentation'). In addition you might want to look at Kombilo's
76web site at http://www.g0ertz.de/kombilo/ . There you will find
77a more detailed tutorial with
78some screenshots where many of Kombilo's features are explained.
79
80--- Installing the C++ search function
81
82Because the C++ search function is much faster than the Python one,
83it is desirable to install it, too. You can either compile it
84yourself, or (for Linux (i386) or Windows) use the appropriate
85binary from the Kombilo web site.
86
87- Linux:
88
89The source code comes with the basic Kombilo package, in the
90file matchC.cc, and since the GNU C++ compiler gcc is almost
91certainly installed on your system, you should be able to
92compile it yourself with the following commands:
93
94gcc matchC.cc -O2 -I/usr/include/python -fpic -shared -o matchC.so
95gcc sgfparserC.cc -O2 -I/usr/include/python -fpic -shared -o sgfparserC.so
96
97The only thing you might have to change is the path of the
98python include files (after the -I). On some systems, this
99is /usr/local/include/python, or might even be something else.
100
101Alternatively, you can use the compiled version from the
102Kombilo web site.
103
104- Windows:
105
106The C++ search function is already included in the
107stand-alone Kombilo installer. If you use the kombilo04win.zip
108package, proceed as follows.
109
110The source code is in the files matchC.cc and sgfparserC.cc, so if you
111have a C++ compiler (for example the free MinGW32 package, based
112on the GNU C/C++ Compiler gcc, see http://www.mingw-org/ )
113installed, you can compile it yourself. (See below for more
114details).
115
116If you don't want to compile the file yourself, you can try
117to download the compiled, binary file from the Kombilo
118web site. These were compiled with the Borland compiler
119on my Windows 2000 box. I think they should work in general,
120but since I am no Windows expert at all, I cannot promise
121anything. In any case, it is important that you download the
122file which corresponds to the Python version you have
123installed! The file depends on which version you use.
124
125Here are some basic instructions on how to compile
126the source code with MinGW. First of all, you need the
127MinGW package, which you can get from http://www.mingw.org/ .
128
129Then everything is very simple. Make sure that the programs
130from MinGW are in your path. Create a setup-ext.py file
131like the following (and place it in the Kombilo directory):
132
133------ setup-ext.py -------
134import sys
135from distutils.core import setup, Extension
136
137matchCext = Extension('matchC', sources=['matchC.cc'])
138sgfparserCext = Extension('sgfparserC', sources=['sgfparserC.cc']
139                         
140setup(name = 'matchC', ext_modules = [ matchCext ])
141setup(name = 'sgfparserC', ext_modules = [sgfparserCext])
142---------------------------
143
144The rest will be done for you by the Python distutils package:
145you can simply compile the extension modules by
146
147python setup-ext.py build --compiler=mingw32
148
149With Microsoft's compiler it should be just as easy. (I think
150that you can just omit the --compiler option. Read more on
151these things in the Python documentation.)
152
153- Macintosh
154
155I'm pretty sure that for someone who has a C++ compiler
156on a Mac and maybe some basic experience writing Python
157extensions in C++, it is easy to compile the C++ search
158routine on a Macintosh, but since I don't have access to
159a Mac, I cannot give any advice about this. If someone
160succeeded to make this work on a Mac, I would like to hear
161about it, and I will gladly put the resulting binary file on my
162web page.
163
164--- Systemwide installation under Unix/Linux
165
166To install Kombilo system-wide (in /usr/local/share, for instance),
167proceed as follows:
168
169Put the Kombilo files in /usr/local/share/kombilo04 (if you put them
170somewhere else, you have to adapt the unixinst.py script accordingly).
171
172Carefully read, and -if/where necessary- edit the script unixinst.py .
173(I think that you probably will not want to change much.)
174Basically, the unixinst.py script writes a 'global' kombilo.def
175file (in the kombilo04 directory) which tells Kombilo to look
176for individual .def files (in $HOME/.kombilo ) when it is
177started. So for every user who uses Kombilo, a subdirectory
178called .kombilo will be created in the user's home directory.
179In this directory, the individual .def file (which stores
180mainly the database list, and some additional information
181about paths etc.) and the .opt file (which stored the saved
182options), and the .dat files are stored.
183
184Furthermore the unixinst.py script creates a link
185in /usr/local/bin, pointing to kombilo.py.
186
187After you edited the unixinst.py script, execute it with
188'python unixinst.py'. The only other thing you might have
189to do (if your python interpreter is not in /usr/bin),
190is to change the very first line of the files kombilo.py,
191(and v.py if you want to use the viewer separately, too)
192which must contain the location of the python interpreter,
193so that kombilo can be started by 'kombilo.py'.
194
195
196
197
Note: See TracBrowser for help on using the browser.