leplatrem/folder-theater — Issue #6: Running script under Windows
Author: Czarek007
Created: 2011-11-11 00:20:09+00:00
State: open

I've been struggling to run the script under Windows.
Some instructions for Windows users would be appreciated in the README file.

The problem are the dependencies, under Linux they are installed automatically,
but under windows you have to install them manually.

I've managed to install all the libraries and run the script, but it took me about
an hour, I'll try to describe the steps that are required to make it, I'm not sure
whether I remember it all, as I was doing it a few days ago.

# Jinja2

This library was easy to install, steps:
1. Download the sources:
http://pypi.python.org/pypi/Jinja2#downloads => Jinja2-2.6.tar.gz => Extract
2. Inside jinja2 directory type this command: "python setup.py install"

# IMDbPy

These are instructions for Python 2.6 - this is version installed on my windows machine.
LXML library seems to be compatible up to Python 2.7 - so if you have this version it
should also work.

Download latest version of IMDbPy:
http://imdbpy.sourceforge.net/downloads.html

We are not yet installing it, read on...

# lxml

This imdb library requires installing additional library called lxml, which in turn requires installing
another libraries: libxml, libxslt, so let's install them first.

To install these xml libraries you need a C compiler. It is quite automatic provided that you have
Visual Studio installed. I had installed Visual Studio 2008 and the setup scripts automatically
detected the compiler and run it without me even knowing it.

I was using instructions from here "Static linking on windows":
http://lxml.de/build.html#static-linking-on-windows

From here download:
ftp://ftp.zlatkovic.com/pub/libxml/oldreleases/

iconv-1.9.1.win32.zip
libxml2-2.7.7.win32.zip
libxslt-1.1.9.win32.zip
zlib-1.2.3.win32.zip

Extract files.

Download lxml 2.3.1:
http://lxml.de/files/lxml-2.3.1.tgz

Extract it.

Go to "lxml" directory and edit 2 variables:

STATIC_INCLUDE_DIRS = [
"..\\iconv-1.9.1.win32\\include",
"..\\libxml2-2.7.7.win32\\include",
"..\\libxslt-1.1.9.win32\\include",
"..\\zlib-1.2.3.win32\\include"
]
STATIC_LIBRARY_DIRS = [
"..\\iconv-1.9.1.win32\\lib",
"..\\libxml2-2.7.7.win32\\lib",
"..\\libxslt-1.1.9.win32\\lib",
"..\\zlib-1.2.3.win32\\lib"
]

Now, in lxml dir, type from command: "python setup.py bdist_wininst --static".

Next, type: "python setup.py install".

Now we go back to IMDbPy library. Go to IMDbPy directory and type: "python setup.py install".

That should be all. Now you can run Folder-Theater script. Good Luck.

Czarek.