Has anyone looked into creating a bdist command for the free Inno Setup 2 Windows installer ? http://www.jrsoftware.org/isdl.htm Since it provides a command line interface and compiles script files into setup.exe files, distutils should be able to interface to it quite easily. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
Thomas Heller wrote:
Has anyone looked into creating a bdist command for the free Inno Setup 2 Windows installer ?
I was thinking about a bdist_wise in these old days, but I gave up after bdist_wininst was implemented.
What are you missing?
I am very satisfied with the existing bdist_wininst, the only reason for heading into the inno setup direction is that it would allow more flexible setups, e.g. the user has more options to choose from, you can wrap packages which contain optional subpackages, do full, standard and customized installs, add auxiliary package installs such as MDAC or ship MSVC DLLs etc. bdist_wininst is perfect for pure Python packages and probably most binary extensions too, but there are a small number of instances which do require more functionality and since Inno Setup is free, I thought it would be a good idea to add support for it to distutils. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
-->"Marc-Andre" == M -A Lemburg <mal@lemburg.com> writes: Marc-Andre> I am very satisfied with the existing bdist_wininst, the Marc-Andre> only reason for heading into the inno setup direction is Marc-Andre> that it would allow more flexible setups, e.g. the user Marc-Andre> has more options to choose from, you can wrap packages Marc-Andre> which contain optional subpackages, do full, standard Marc-Andre> and customized installs, add auxiliary package installs Marc-Andre> such as MDAC or ship MSVC DLLs etc. we use the Inno Setup (and the Inno Setup Extensions) for our windows stuff, and it's been very good there (far better than WISE, which we used to use, on most features). Marc-Andre> bdist_wininst is perfect for pure Python packages and Marc-Andre> probably most binary extensions too, but there are a Marc-Andre> small number of instances which do require more Marc-Andre> functionality and since Inno Setup is free, I thought it Marc-Andre> would be a good idea to add support for it to distutils. one feature i would dearly like (and it might even be provided by the current installer?) is the ability to run unattended installs from the scheduler. we do automated nightly build/test stuff, and at the moment, my Python packages are not tested on windows because i can't find a way to get the installer to run unattended. does anyone know if the current bdist_wininst can do this? i'd be interested in helping to add it, either via Inno or otherwise. d
From: "David Arnold" <arnold@dstc.monash.edu.au>
-->"Marc-Andre" == M -A Lemburg <mal@lemburg.com> writes: Marc-Andre> bdist_wininst is perfect for pure Python packages and Marc-Andre> probably most binary extensions too, but there are a Marc-Andre> small number of instances which do require more Marc-Andre> functionality and since Inno Setup is free, I thought it Marc-Andre> would be a good idea to add support for it to distutils.
one feature i would dearly like (and it might even be provided by the current installer?) is the ability to run unattended installs from the scheduler.
we do automated nightly build/test stuff, and at the moment, my Python packages are not tested on windows because i can't find a way to get the installer to run unattended.
does anyone know if the current bdist_wininst can do this? i'd be interested in helping to add it, either via Inno or otherwise. No, it cannot. But it would probably be a useful feature...
Another possibility is the following: bdist_wininst created exe-Files are also zip-Files, and can be opened by Winzip and probably also Info-Zip's unzip program. So you _could_ write a batch file which unzips the distribution into a certain place. (That reminds me that I have promised to write more docs for bdist_wininst. Later, as usual.) Thomas
From: "M.-A. Lemburg" <mal@lemburg.com>
... customized installs, add auxiliary package installs such as MDAC or ship MSVC DLLs etc.
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. Creating an bdist_inno would probably be more or less trivial, on the other hand distutils would have to be extended to allow specifying these DLLs.
bdist_wininst is perfect for pure Python packages and probably most binary extensions too, but there are a small number of instances which do require more functionality and since Inno Setup is free, I thought it would be a good idea to add support for it to distutils.
Are you more heading towards installing python extensions together with their binary dependecies, or towards installing Python applications (the 'scripts=...' part)? (IMO creating an inno setup script would be very useful for py2exe, but this is probably a different issue...) Thomas
Thomas Heller wrote:
From: "M.-A. Lemburg" <mal@lemburg.com>
... customized installs, add auxiliary package installs such as MDAC or ship MSVC DLLs etc.
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.
True, but all of these installers do try to handle system DLLs which is way beyond the scope of wininst. I'd say better keep wininst nice and simple (well, at least the frontend ;-) and let the big installer packages handle the rest of the scoop.
Creating an bdist_inno would probably be more or less trivial, on the other hand distutils would have to be extended to allow specifying these DLLs.
Sure, but that wouldn't be much of a problem: you can add as many options to bdist_inno as you want (and then store the less often used ones in your setup.cfg file).
bdist_wininst is perfect for pure Python packages and probably most binary extensions too, but there are a small number of instances which do require more functionality and since Inno Setup is free, I thought it would be a good idea to add support for it to distutils.
Are you more heading towards installing python extensions together with their binary dependecies, or towards installing Python applications (the 'scripts=...' part)?
Both; I'd like to ship py2exe style programs using an installer (which also includes the VC DLLs and maybe MDAC as option) and complete packages with options for the various subpackages + the DLLs, EXEs, LIBs etc. they depend on. Inno Setup should let me do both of these.
(IMO creating an inno setup script would be very useful for py2exe, but this is probably a different issue...)
It's a different scope, but not unrelated ;-) -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
[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.
[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.
From: "Tim Peters" <tim.one@home.com>
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,
What did change in 2.2a1 compared to 2.1, 2.0, or 1.5.2 (which all seem to use Wise5.0)? The version of MSVCRT.DLL and MSVCIRT.DLL? I deinstall and reinstall all of these more or less regularly in Win2k Prof (probably SP1) with admin rights without any problems. This is from my recent 2.2a1 installation log: Version: Following file not copied. File Copy: C:\WINNT\System32\MSVCIRT.DLL File Copy: C:\WINNT\System32\MSVCRT.DLL Does this mean that wise overwrote MSVCRT.DLL, but did _not_ overwrite MSVCIRT.DLL? Note that I never had to reboot after a Python installation. Thomas
[Thomas Heller]
What did change in 2.2a1 compared to 2.1, 2.0, or 1.5.2 (which all seem to use Wise5.0)?
Every Python Windows installer ever released used Wise 5.0a. I never did figure out "what changed" in 2.2a1, although it *appeared* to be related to one of {total number of files, total size of files}; e.g., if I left the docs out, the installer worked fine. Else it died instantly upon launch with a GPF in GLBSSTUB.EXE (a Wise file), and Dr Watson always froze solid while trying to make an after-fault snapshot. After hours and hours of thrashing at random, it eventually fixed itself for no identifiable reason (the last thing I did before it started working again was nuke my entire PCbuild directory, refetch everything from SourceForge, and rebuild everything from scratch; best *guess* is that I somehow got a corrupted .wsm file). However, since Win2K was released, I've seen a sharp increase in the frequency of install failure reports. It still only amounts to a few dozen total, but the trend is clear, and so is that we have no real handle on most of the new breed of failures.
The version of MSVCRT.DLL and MSVCIRT.DLL?
No; I believe they're the same as in 2.1.
I deinstall and reinstall all of these more or less regularly in Win2k Prof (probably SP1) with admin rights without any problems.
Same here. We appear to be the norm, but others aren't so lucky.
This is from my recent 2.2a1 installation log:
Version: Following file not copied. File Copy: C:\WINNT\System32\MSVCIRT.DLL File Copy: C:\WINNT\System32\MSVCRT.DLL
Does this mean that wise overwrote MSVCRT.DLL, but did _not_ overwrite MSVCIRT.DLL?
Your understanding of undocumented English matches mine <wink>: it thought your msvcirt.dll was at least as new as the one shipped, but not your msvcrt.dll.
Note that I never had to reboot after a Python installation.
My understanding at one point (this stuff is, as I bet you know all too well, damned hard to track down with confidence!) is that if you tried to replace any of the DLLs MS cares about, it wouldn't complain on Win2K, but silently undo it. Life would sure be simpler if Python installed the MS DLLs it needs under its own directory. I'm not enough of a Windows-head to know why that's impossible, though <wink>.
Tim Peters wrote:
[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've just skimmed the Inno docs, but it seems that you can work around these issues by providing a custom little EXE which does all the tricks you want (according to the docs you just have to place it into the [Run] section). http://www.jrsoftware.org/ishowto.phtml?a=custom You might even be able to place a call to vcredist.exe into that section (I just don't know how to stop the .exe from giving me the reboot box). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Company & Consulting: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
[MAL]
I've just skimmed the Inno docs, but it seems that you can work around these issues by providing a custom little EXE which does all the tricks you want (according to the docs you just have to place it into the [Run] section).
http://www.jrsoftware.org/ishowto.phtml?a=custom
You might even be able to place a call to vcredist.exe into that section (I just don't know how to stop the .exe from giving me the reboot box).
http://support.microsoft.com/support/kb/articles/Q259/4/03.ASP [vcrdist.exe]] is not a recommended redistribution method for the preceding files. This package does not communicate error messages back to the program or user that is starting Vcredist.exe. Therefore, Microsoft highly recommends that programs starting Vcredist.exe first check for available disk space (approximately 10 MB), read-only system files, administrator privileges, and a valid TEMP directory. The absence of any of these prerequisites can cause this package to incorrectly install some of the files onto the target system. IOW, it doesn't solve the problem, although it may be a step on the way. Would also add another ~2Mb to the download -- it ships stuff Python has no use for (especiall the large MFC DLLs).
Tim Peters wrote:
[MAL]
I've just skimmed the Inno docs, but it seems that you can work around these issues by providing a custom little EXE which does all the tricks you want (according to the docs you just have to place it into the [Run] section).
http://www.jrsoftware.org/ishowto.phtml?a=custom
You might even be able to place a call to vcredist.exe into that section (I just don't know how to stop the .exe from giving me the reboot box).
http://support.microsoft.com/support/kb/articles/Q259/4/03.ASP
[vcrdist.exe]] is not a recommended redistribution method for the preceding files. This package does not communicate error messages back to the program or user that is starting Vcredist.exe. Therefore, Microsoft highly recommends that programs starting Vcredist.exe first check for available disk space (approximately 10 MB), read-only system files, administrator privileges, and a valid TEMP directory. The absence of any of these prerequisites can cause this package to incorrectly install some of the files onto the target system.
Zzhhhh. No idea why MS ships vcredist.exe in the first place then... IMHO, the best way to upgrade Windows still is installing the latest IE version (and then uninstalling it again)... would cost an extra 15MB, though, but who cares ;-)
IOW, it doesn't solve the problem, although it may be a step on the way. Would also add another ~2Mb to the download -- it ships stuff Python has no use for (especiall the large MFC DLLs).
Well, what I wanted to say was that Inno does allow you to tweak it into doing stuff which it wasn't built for by providing your own little EXE which implements the needed black magic and mamba voodoo. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
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 get conditionals and other scripting capabilites with the InnoSetup Extensions available at http://www.wintax.nl/isx/. I use it a tiny bit in the wxPython installer, but I've heard that it can do a whole lot more. -- Robin Dunn Software Craftsman robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
[Robin Dunn]
You can get conditionals and other scripting capabilites with the InnoSetup Extensions available at http://www.wintax.nl/isx/. I use it a tiny bit in the wxPython installer, but I've heard that it can do a whole lot more.
Ya, I looked at that. That's what Python needs: to ship an installer with an embedded Pascal interpreter <wink>. Wise kindly offered to let PythonLabs use InstallerMaster 8, and I just got the box from UPS today. So my strong bet is that's the future for the PythonLabs Windows installer. All you other suckers are on your own <wink>. Seriously, I hope *someone* picks up python.iss and finishes an Inno installer for Python, Pascal-driven or not. BTW, I tried MS's Visual Installer (currently free, no idea whether that will last) MSI authoring tool, and limped away screaming in terror. If that's the future of Windows installer technology, I'm glad I still have a few friends left in the Linux world ...
Maybe I'm naif, but how does the Null Soft Install System (http://www.nullsoft.com/free/nsis/) compare with Inno? I use NSIS to distribute QuantLib (http://quantlib.org), and bdist_wininst to distribute QuantLib-Python ciao -- Nando
Ferdinando Ametrano wrote:
Maybe I'm naif, but how does the Null Soft Install System (http://www.nullsoft.com/free/nsis/) compare with Inno?
No idea, to tell you the truth... bdist_nsis anyone ? (I wouldn't mind having a whole set of supported installers in distutils, Tim might even come up with a bdist_Wise_InstallMaster8 installer ;-)
I use NSIS to distribute QuantLib (http://quantlib.org), and bdist_wininst to distribute QuantLib-Python
-- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
Tim Peters wrote:
[Robin Dunn]
You can get conditionals and other scripting capabilites with the InnoSetup Extensions available at http://www.wintax.nl/isx/. I use it a tiny bit in the wxPython installer, but I've heard that it can do a whole lot more.
Ya, I looked at that. That's what Python needs: to ship an installer with an embedded Pascal interpreter <wink>.
Since Inno is written in Delphi and there is a really nice Delphi-Python gateway out there, why not add an embedded Python interpreter to Inno ?! Would be sort of cool ... you install Python by using a Python script to tweak a Delphi program into doing the right thing. Python will then finally learn to boot itself ;-)
Wise kindly offered to let PythonLabs use InstallerMaster 8, and I just got the box from UPS today. So my strong bet is that's the future for the PythonLabs Windows installer. All you other suckers are on your own <wink>.
I wonder why you guys didn't pick up a new release from Wise earlier... the many hours you spent on getting Wise5 to work without GPF would certainly have paid up for the new version.
Seriously, I hope *someone* picks up python.iss and finishes an Inno installer for Python, Pascal-driven or not.
BTW, I tried MS's Visual Installer (currently free, no idea whether that will last) MSI authoring tool, and limped away screaming in terror. If that's the future of Windows installer technology, I'm glad I still have a few friends left in the Linux world ...
-- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/
[MAL]
Since Inno is written in Delphi and there is a really nice Delphi- Python gateway out there, why not add an embedded Python interpreter to Inno ?!
I've got no time for that, but it's a fine idea.
... I wonder why you guys didn't pick up a new release from Wise earlier... the many hours you spent on getting Wise5 to work without GPF would certainly have paid up for the new version.
The version of Wise they just sent is US$800 retail, and street price doesn't seem to be significantly lower. That's a hard sell without Windows revenue to offset it (and Open Source management is even more delusional than commercial-shop mgmt about the economics of throwing programmer-months at problems for which top-tier solutions *could* be purchased at once <wink>). Wise was happy to accommodate once I reached the right person, but achieving the latter stretched over months.
M.-A. Lemburg:
Tim Peters wrote:
[Robin Dunn]
You can get conditionals and other scripting capabilites with the InnoSetup Extensions available at http://www.wintax.nl/isx/. I use it a tiny bit in the wxPython installer, but I've heard that it can do a whole lot more.
Ya, I looked at that. That's what Python needs: to ship an installer with an embedded Pascal interpreter <wink>.
Since Inno is written in Delphi and there is a really nice Delphi-Python gateway out there, why not add an embedded Python interpreter to Inno ?!
Would be sort of cool ... you install Python by using a Python script to tweak a Delphi program into doing the right thing. Python will then finally learn to boot itself ;-)
Using Python to install the DLLs it needs to run ;-? In this case maybe it would easier to use bdist_wininst, it already _has_ Python embedded, and it could export win32api functions needed to Python. Thomas
participants (7)
-
David Arnold
-
Ferdinando Ametrano
-
M.-A. Lemburg
-
Robin Dunn
-
Thomas Heller
-
Tim Peters
-
Tim Peters