More 64-bit windows build progress

This commit is contained in:
Kovid Goyal 2012-11-22 16:39:44 +05:30
parent b6b2b39cf6
commit b2b640e24a
2 changed files with 37 additions and 15 deletions

View File

@ -420,16 +420,32 @@ Run::
Python Imaging Library Python Imaging Library
------------------------ ------------------------
For 32-bit:
Install as normal using installer at http://www.lfd.uci.edu/~gohlke/pythonlibs/ Install as normal using installer at http://www.lfd.uci.edu/~gohlke/pythonlibs/
For 64-bit:
Download from http://pypi.python.org/pypi/Pillow/
Edit setup.py setting the ROOT values, like this::
SW = r'C:\cygwin\home\kovid\sw'
JPEG_ROOT = ZLIB_ROOT = FREETYPE_ROOT = (SW+r'\lib', SW+r'\include')
Build and install with::
python setup.py build
python setup.py install
Note that the lcms module will not be built. PIL requires lcms-1.x but only
lcms-2.x can be compiled as a 64 bit library.
Test it on the target system with Test it on the target system with
calibre-debug -c "from PIL import _imaging, _imagingmath, _imagingft, _imagingcms" calibre-debug -c "from PIL import Image; import _imaging, _imagingmath, _imagingft"
kdewin32-msvc kdewin32-msvc
---------------- ----------------
I dont think this is needed any more, I've left it here just in case I'm wrong.
Get it from http://www.winkde.org/pub/kde/ports/win32/repository/kdesupport/ Get it from http://www.winkde.org/pub/kde/ports/win32/repository/kdesupport/
mkdir build mkdir build
Run cmake Run cmake
@ -448,29 +464,34 @@ cp build/kdewin32-msvc-0.3.9/include/*.h include/
poppler poppler
------------- -------------
In Cmake: disable GTK, Qt, OPenjpeg, cpp, lcms, gtk_tests, qt_tests. Enable qt4, jpeg, png and zlib mkdir build
NOTE: poppler must be built as a static library, unless you build the qt4 bindings Run the cmake GUI which will find the various dependencies automatically.
On 64 bit cmake might not let you choose Visual Studio 2008, in whcih case
leave the source field blank, click configure choose Visual Studio 2008 and
then enter the source field.
cp build/utils/Release/*.exe ../../bin/ In Cmake: disable GTK, Qt, OPenjpeg, cpp, lcms, gtk_tests, qt_tests. Enable
jpeg, png and zlib::
cp build/utils/Release/*.exe ../../bin/
podofo podofo
---------- ----------
Download from http://podofo.sourceforge.net/download.html
Add the following three lines near the top of CMakeLists.txt Add the following three lines near the top of CMakeLists.txt
SET(WANT_LIB64 FALSE) SET(WANT_LIB64 FALSE)
SET(PODOFO_BUILD_SHARED TRUE) SET(PODOFO_BUILD_SHARED TRUE)
SET(PODOFO_BUILD_STATIC FALSE) SET(PODOFO_BUILD_STATIC FALSE)
cp build/podofo-*/build/src/Release/podofo.dll bin/ Run::
cp build/podofo-*/build/src/Release/podofo.lib lib/ cp "`find . -name *.dll`" ~/sw/bin/
cp build/podofo-*/build/src/Release/podofo.exp lib/ cp "`find . -name *.lib`" ~/sw/lib/
mkdir ~/sw/include/podofo
cp build/podofo-*/build/podofo_config.h include/podofo/ cp build/podofo_config.h ~/sw/include/podofo
cp -r build/podofo-*/src/* include/podofo/ cp -r src/* ~/sw/include/podofo/
You have to use >=0.9.1
ImageMagick ImageMagick

View File

@ -74,8 +74,9 @@ def test_imaging():
print ('ImageMagick OK!') print ('ImageMagick OK!')
else: else:
raise RuntimeError('ImageMagick choked!') raise RuntimeError('ImageMagick choked!')
from PIL import Image, _imaging, _imagingmath, _imagingft, _imagingcms from PIL import Image
_imaging, _imagingmath, _imagingft, _imagingcms import _imaging, _imagingmath, _imagingft
_imaging, _imagingmath, _imagingft
i = Image.open(cStringIO.StringIO(data)) i = Image.open(cStringIO.StringIO(data))
if i.size < (20, 20): if i.size < (20, 20):
raise RuntimeError('PIL choked!') raise RuntimeError('PIL choked!')