Thank you for your donations!   Download the book!   Public source code repository   Join the group!

Compiling a book

3rd edition of a book is in the writing, and since it's actually a complete rewrite, you might want to peek into it. To do so you need to compile it yourself, and to do that you'll have to either download zipped repository or clone it, from my GitHub project: https://github.com/mmlacak/crochess. Let's assume you've just downloaded zip file, and unpacked it in some folder. Now what?

Compiling this book is two stage process, first you have to run Python script to generate all the images used in the book. For this convenience script gfx.sh is provided, if you're on Linux, that is. If you're on Windows, change your current folder to ./book/py, and run
python main_gfx.py -n -a
. Don't run gfx.sh found in that folder, it's convenience variant which generates just recently changed staged scene images, not all of the lot.

For all of this to work, you'll have to have Python 2.7 installed, and PyGTK, which depends on GTK+ 2 itself. On any modern Linux distro it's just a matter of clicking on components in your repository manager if they aren't installed already. On Windows, good luck :P

I haven't had Windows for almost a decade now, so best I can do is to try google what seems to be working. PyGTK lists 32-bit Python installer for Windows, but it seems to me that info is dated. Anyway, Python 2.7 can be downloaded here: https://www.python.org/downloads/windows/. GTK+ 2 for Windows can be found here: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer, just be sure to chose version 2, and not 3, latest at the moment of writing this is 2.24. Finally, PyGTK for Windows can be found here: http://www.pygtk.org/downloads.html.

In the next installment, second stage aka. actually compiling the book into a pdf file.

No comments:

Post a Comment