Standalone Win32 wxPython apps?

Grant Edwards grante at visi.com
Sun Mar 10 00:52:35 EST 2002


In article <3C8AEE09.5B2431FD at engcorp.com>, Peter Hansen wrote:

>> That's kind of sad, but I figured as much.  The only real
>> stand-alone Win32 app I've seen in a long while is puTTY. Are
>> statically linked apps just not possible under Win32, or just
>> not practical?
> 
> Just as possible and practical as under Linux, really.  

But under Linux, there's generally the option to distribute
source, thus allowing the user to generate a binary that is
linked with the "right" libraries.

> Which is to say not highly desirable in many cases, at least
> for serious (read, largish) applications.  For smaller utility
> type programs, definitely possible but, unfortunately, less of
> an option in your case trying to do it with Python tools. But
> you really don't want to statically link an 800K interpreter
> and a 2MB windowing framework into your little utility, do
> you? :)

Hmm, I don't really see the difference in practice between
statically linking and installing a bunch of "private" DLLs
that are only used by my app.  In one case they're all in one
file, in the other case they're in a bunch of files that have
to be linked at run-time. In both cases none of the stuff is
being shared with anybody else, so it's not like putting things
in DLLs is saving any system resources -- though it perhaps
make the packaging simpler.

>> > Use py2exe and you'll get a directory with the Python DLL, the
>> > wxPython DLL, your EXE, and a few other DLLs as needed (e.g.
>> > the native regular expression stuff if you use it).
>> 
>> I don't know diddly about DLLs, so pardon the ignorant
>> question: Can my DLLs be put in a private directory where my
>> EXE can find them?  I'd rather not put anything in any public
>> system directories.
> 
> Yes, definitely.  Not entirely advisable if you're delivering
> more than one program in the same manner,

Right now I don't exect to.  If I did, couldn't I make all of
"my" apps look in the same place for "my" DLLs? I really hate
the idea of my app putting things in "system" directories.

That's just plain evil.  [Though that does appear to be SOP
under Windows.]

> since you'd be duplicating piles of files, but you can do it.

If I am duplicating files, then that means that some other app
is using the same DLLs. One of us is going to have to either
overwrite what's already there or use what's already there. My
limited experience is that neither option works very well.

AFAICT, there doesn't appear to be a practical way to have
multiple versions of DLLs installed, so if you've got two apps
that require different versions of DLLs, then one of the apps
is screwed.

> And I suppose there's the fact you'd be avoiding much of the
> grief caused by dynamically linked apps and "DLL version hell"
> by doing that, if you can spare the hard drive space (and most
> users probably can these days).

Windows users... worried about drive space... ROTFL!

-- 
Grant Edwards                   grante             Yow!  Let's all show human
                                  at               CONCERN for REVERAND MOON's
                               visi.com            legal difficulties!!



More information about the Python-list mailing list