Notes on freezing rml2pdf using python-2.1.1 and ms vc 6.1

You need the python source tree and you need to build python using
vc 6.1 as per instructions there.

I) FREEZE

Make sure you remove any RML2PDFLicense.py from the python path.

Work in a new temporary directory such as /tmp/rml2pdf.

Copy the rml2pdf directory to /tmp/rml2pdf

Copy the python-2.1.1/tools/freeze directory to /tmp/rml2pdf

Open an msdos window.

msdos: cd /tmp/rml2pdf
msdos: Mkdir Build

(for some reason you need to create the Build directory.)
Now do the freeze:

msdos: python freeze.py -p c:\pythonsrc\python-2.1.1\ rml2pdf.py

...These messages indicate which DLLs/PYDs have not been frozen in
(except that the reference to tkinter seems to be bogus):

No definition of module _imaging in any specified map file.
No definition of module _imagingtk in any specified map file.
No definition of module _rl_accel in any specified map file.
No definition of module _socket in any specified map file.
No definition of module _sre in any specified map file.
No definition of module _tkinter in any specified map file.
No definition of module _winreg in any specified map file.
No definition of module pyRXP in any specified map file.
No definition of module select in any specified map file.
No definition of module win32api in any specified map file.
No definition of module zlib in any specified map file.

II) BUILD THE FROZEN EXECUTABLE

Go into visual studio/VC++.

VS: file / import workspace

   Go to the /tmp/rml2pdf directory and open (all files) Makefile

   You will be prompted to create a dsp.

VS: Build --> Build Makefile1 (or whatever you named it)

For me it worked creating rml2pdf.exe

III) CREATE A ZIP FILE FOR DELIVERY

Now create a zip (winzip) file containing rml2pdf.exe and 

1) include all the needed dlls and pyds, 

2) include rml*.dtd,

3) include python21.dll (from the source PCBuild directory) 

4) for testing also put in snow.rml or some other valid rml file.

The easiest way to zip in the extension dlls is to zip in all dlls in your
python installations and then delete out the larger ones that
are not relevant (like tk/tcl and unicode).

Unpack the zip file onto a fresh machine with no python installation
and make sure you can do a test run.

> rml2pdf snow.rml





   

