[Distutils] bdist_innoinst ?!

Tim Peters tim.one@home.com
Wed Jul 25 14:35:08 2001


[MAL]
> ... customized installs, add auxiliary package installs such as
> MDAC or ship MSVC DLLs etc.

[Thomas Heller]
> I have the impression that in these times (file system protection
> in win2000) it is even more complicated to get it right, or maybe
> even impossible to replace/update system dlls. I remember having
> looked (some time ago, win95 was current at that time) into the
> WISE supplied ODBC install script, IIRC it didn't really look so easy.

After the ancient Wise 5.0a installer PythonLabs still uses kept me up all
night desperately trying to build a 2.2a1 Windows installer that worked,
over the rest of that week I poked away at building an Inno installer for
Python.  The result is in CVS, under PCbuild/python.iss.  It gets most of
the job done, but not all.

I hit a brick wall with Inno when it came to distributing the MSVC runtime,
and with writing to HKLM *or* HKCU (depending on the combo of whether the
user needs admin privs to write to HKLM and whether the user *has* admin
privs).  Inno doesn't appear up to these tasks:  it has no way to query
whether the user is an admin, and no conditionals even if it did.  You can
tell Inno to *require* admin privs, but then the script stops with an error
msg if the user doesn't have them.  All MSVC runtime DLLs must be installed
with Inno's "restartreplace" flag, and that requires admin privs on W2K
boxes.  See

    http://www.jrsoftware.org/ishowto.phtml?a=vc

for the full Inno story here.

I'm not sure how Wise 5.0a gets away with this.  It could be that nobody has
tried to install Python on a W2K box that didn't already have an up-to-date
msvcrt.dll + msvcirt.dll.  Or it could be that Wise tries to overwrite them
and simply ignores the "you can't do that" code that comes back from
MoveFileEx + MOVEFILE_DELAY_UNTIL_REBOOT.  Whatever, it is indeed much
harder than it used to be to redistribute MS runtime components, and Inno
doesn't have a usable handle on it.

> ...
> (IMO creating an inno setup script would be very useful for
> py2exe, but this is probably a different issue...)

In Inno's favor, it's extremely easy to do straightfoward tasks with it, and
its dead-simple script file format seems ideally suited for generating by
program.