From: Warren L. DeLano <warren@su...> - 2002-04-28 16:22:15
On Sun, 28 Apr 2002, Trevor Kramer wrote:
> I would like to build pymol for win32 from the source but I
> cannot find instructions to do so in cvs. Is this possible? Thanks.
Yes, of course it is possible, but my current approach is a mess.
At present (April 2002):
I use a combination of cygwin and VC++ to update, build, and test the
windows version. It involves a collection of project directories
with binary project files, and I end up hard-linking in components which
really shouldn't be hard-linked in (numpy, pyopengl, etc.). Plus, I end
up embedding the Python interpretor on Windows instead of building PyMOL
into a DLL module (as on Unix). In fact, there is a complete different
launch sequence for PyMOL under Windows than under Unix [though users
shouldn't notice any difference : )]
In summary, the current win32 build is complex, fragile, and not-Python
like. It should not be the example for others to follow, and that's
why I don't distribute it (plus, we're talking >100 megabytes to
faithfully reproduce the build environment). What the PyMOL project
needs is help from someone who is a more Win32-savvy, and who can take the
lead in developing a robust Windows build that is consistent with the
approach taken by other Python-based projects.
Specifically, I am thinking about command-line-based build, python-like
module DLLs, and a unix-like launch sequence -- without changing the
the user-experience (command line from DOS or cygin, or double-click
launch, in that case with a visible standard-output window). If anyone
can pull that off, then I'll gladly make their version into the
"standard" win32 build...
Any volunteers? If not, then this will remain just one more entry on
my long list of things to do.
Although I don't have much advice to offer, here are the build options I
current use under VC++ with a Python-embedded build (in this example,
using Python22) Also note that PYTHON_PATH should be defined in the
environment before PyMOL is launched.
/nologo /ML /W2 /GX /O2 /I "." /I "layer0" /I "layer1" /I "layer2" /I
"layer3" /I "layer4" /I "layer5" /I "c:\python22\include" /I
"contrib/modules" /I "contrib/sglite" /D "WIN32" /D "NDEBUG" /D
"_CONSOLE" /D "_MBCS" /D "HAVE_NUMERIC_ARRAYOBJECT_H" /D "_PYMOL_NUMPY" /D
"_HAVE_LIBPNG" /D "_PYMOL_MONOLITHIC" /D
"PythonTypes" /Fp"PyMOL___Win32_Release_Python221/PyMOL.pch" /YX
/Fo"PyMOL___Win32_Release_Python221/" /Fd"PyMOL___Win32_Release_Python221/" /FD
The source-code in CVS is Win32-competent -- all you need is to compile it
and then link against the following libraries (some which can be found on
the internet). zlib and libpng are straight off the internet.
zlib.lib libpng.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
uuid.lib odbc32.lib odbccp32.lib "c:\python22\libs\python22.lib" /nologo
/pdb:"PyMOL___Win32_Release_Python221/PyMOL.pdb" /debug /machine:I386