Windows distribution suggestions?

Bernhard Holzmayer Holzmayer.Bernhard at deadspam.com
Tue May 17 03:30:58 EDT 2005


Paul Rubin wrote:

> As what must be penance for something or other, I'm needing to release
> a Python app for use under Windows XP.  Please be gentle with me since
> I'm a Un*x weenie and the only thing I've had much practice with under
> Windows is rebooting it.

I can feel your unhappiness, and I share it. Hi Paul!
Here are some hints...

> My app contains three different programs (say alice.py, bob.py, and
> carol.py) that need to be independently launchable, and a dozen or so
> other .py files that get imported into those first three.  What I'd
> really really like is to make a single installer called (say)
> "app.exe".  Launching app.exe should completely install Python, unpack
> all the necessary modules, and make three icons (alice, bob, carol) on
> the desktop.

Since your installer needs to run before Python is installed, you need
something else. Go to http://www.wisesolutions.com
You'll find a Windows installer program, with a demo-version (30days
license). Try this, it would be my best recommendation.
> 
> I know there's various ways of building Windows distros like that, but
> am not sure what's currently preferred.  Gordon McMillan's site
> www.mcmillan-inc.com has had its domain expire (he really should renew
> it before some squatter grabs it!) and the mirror that I've found
> indicates that it was last updated for Python 2.3.  I wrote my app
> under 2.4 and while I don't think I depend heavily on any 2.4
> features, I'd rather not have to downgrade just to make this exe
> installer.  

You'll have to test your application on Windows, in any case. 
I've built lots of applications which run in both worlds (Linux/Windows).
Usually this works, but occasionally you'll have to deal with strange
things. One is, if you use ODBC. There's good chance that you'll have to
deal with access restrictions in the %SYSTEM% directory, unless you require
an administrator's account for your application.

If you test your app on a Windows machine, you can easily install Python 2.3
and Python 2.4 on the same machine without conflicts. Just try out, if your
app works with either. If it works with both, why not use 2.3?


> There's also py2exe--is that as good? 
Depends on your application, if that is acceptable. 
I have no experiences with that.
> 
> Also, what's the preferred way of releasing updates?  That is, let's
> say I want to update my .py files and release a new version fairly
> frequently--should I just make a new .exe every time?   

Providing an installation program called Setup.exe or Install.exe which does
everything (guided by a sequence of dialog boxes where the user presses
only the return key to get through the successful installation), is
state-of-the-art. Usually, one of the Wise or InstallShield installers, are
used. Or simple WinZip-Packages.

> Would launching the new one cleanly overwrite or uninstall the old one? 

If you've done it in the proper way with the proper tool, yes.

> Total coolness would be a way to ship an "update.py" along with the app,
> that syncs the app up to a Subversion repository, but that may be
> asking a bit much.

Who are your customer's (the recipients of your program releases)?
Usually, you cannot rely that they have online access to your repository.
Then, they are potentionally interested in security issues and/or stability
of the program. I'd not like a program which is said to require frequent
updates - I'd guess that there's not much quality inside...

If your application has a GUI, a menu entry might fetch your update files
and place them wherever they must reside. your update.py might feed that
menu entry. Quite easy. 
If you have command line apps, why not provide an additional update.py 
and then, if you provide updates, just install them using your installed
update.py. The only thing: How do you keep track of path/desktop/file
information and how do you deal with user rights etc.?
Are you aware of how this is done under WindowsXP? It's quite different from
older Windows platforms! Therefore it might be easier, to leave this to
professional installation tools.

> 
> I do have Visual C++ installed on the development machine, if that helps.

Isn't Visual C++ still coming with a restricted version of InstallShield?
If so, check if you can use that. It might give your release a sort of
professional shine...

You'll certainly find out, that managing the registry/desktop file system
will cost most energy, if you want to release your apps to WindowsXP.
Once Python is running your apps, the rest is peanuts.

Bernhard



More information about the Python-list mailing list