[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: using Python distutils bdist_msi to create installer for large complicated package

Martin v. Loewis

3/21/2010 11:01:00 PM

> I've been re-thinking the UpLib Windows installer technology, and it
> occurred to me to wonder why I can't just use the nice bdist_msi module
> in Python to build my packages. I took a look, and it seems almost
> doable. Presumably you wrote it?

Correct.

> UpLib is a big package, with lots of Python and Java and C programs, and
> for Windows I package it with lots of other programs like those from
> xpdf. All of this is installed in C:\Program Files\UpLib\VERSION\, in
> bin, lib, share, and so forth subdirectories. If I autogenerated a
> setup.py file which described everything as "data_files", it should be
> simple to package everything up in a Cab, and bdist_msi apparently also
> provides the ability to add pre- and post-install scripts. Everything
> I need, really.
>
> There are a couple of Python-specific options in the code: the "Product
> Name" is prefixed with the python version, and in the GUI, the default
> location is the location of a Python distro. If the package had a
> "--non-python" option which would defeat these, and perhaps also set
> "no-target-optimize" and "no-target-compile" to True, it would be a
> simple but pretty general-purpose packager module.

I'd rather recommend to base this off msilib directly, instead of trying
to subvert bdist_msi to do what you want. There is actually quite a lot
python-specifics in bdist_msi. If you find this too tedious to use,
please propose *base classes* that could become part of msilib, rather
than trying to create *subclasses* of the bdist_msi classes.

Regards,
Martin