[Python-Dev] MSI Documentation

"Martin v. Löwis" martin at v.loewis.de
Thu Jul 29 21:01:30 CEST 2004


Mark Hammond wrote:
> That looks nice (even though I misread your email and thought I would be
> looking at documentation on *building* the MSI.)  Your document on *using*
> the MSI has a much wider audience.
> 
> Out of interest, why can't we "advertise"?

To advertise, we would need the Extension table, and the Verb table for
extensions. I have tried to fill them out, and couldn't get it to work:
- The extension table associates (conceptually) a single binary with
   the extension. That binary is specified through the Component_ field
   of the Extension record, and is the keyfile of the component.
   So we would associate:
   .pyw: pythonw.exe
   .pyc: python.exe
   .py: python.exe
- The verb table then only adds *additional* command line arguments;
   the executable is always the same. Unfortunately, "Edit with IDLE"
   always invokes pythonw.exe, even for .py files.
Just not advertising "Edit with IDLE" might have been an option, but
I did not try to implement that approach. Currently, extensions are
authored directly into the Registry table.

To advertise short-cuts, there is already code in msi.py which works
mostly correctly. Unfortunately, after a fresh install, the icons are
not displayed - you have to activate the shortcut once to make the
icon show up. I *believe* this is because we use the wrong form of
icon: In the description of the Icon table, it says

"However, Icon files that are associated with shortcuts must be in the 
EXE binary format and must be named such that their extension matches 
the extension of the target."

I don't know how to generate the EXE binary format from the ICO format
that we currently have - feel free to experiment with that if you are
curious.

The other issue with advertised shortcuts is, of course, that installer
invokes a repair installation if the key file goes away - which may
or may not be a good thing.

Regards,
Martin




More information about the Python-Dev mailing list