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