Which version of MSVC?90.DLL's to distribute with Python 2.6 based Py2exe executables?

Ross Ridge rridge at csclub.uwaterloo.ca
Sat Dec 26 16:14:20 EST 2009


Jonathan Hartley  <tartley at tartley.com> wrote:
>Am I right to infer that if I want to distribute a py2exe'd
>application legally, and have half a chance of it working on a non-
>developer's machine, then I have to:
>
>a) Ask my users to run the Visual C++ redistributable installer, as
>well as download my program. This is really unfortunate, since one of
>the major disadvantages of coding something in Python as opposed to as
>a web application is the overhead of asking users to download and
>execute anything at all. Asking them to do it twice seems problematic.
>Most users would regard this as a deal-breaking hurdle, do you think?
>
>or
>
>b) Buy a copy of Visual Studio in order to acquire the rights to
>distribute msvcr.dll (etc.) along with my application.

If your users are paying to download your program then spending $1000 or
whatever it is to buy Visual C++ doesn't seem to be unreasonable expense
to make sure you're staying well within the right side of the law.
If you're giving it away for free, or aren't expecting to make enough
money to make spending $1000 worthwhile, then asking them to download
something sepeately doesn't seem to be unreasonable either.  I give
my py2exe wrapped application for free so I'm not losing sleep just
because a few people can't run it because they don't have 7.1 runtime
already installed.

That said, you might have couple of other options.  Microsoft's
documentation says that with the Express edition, "it is recommended to
redistribute Visual C++ libraries using the Visual C++ Redistributable
Package."  That suggests that you can redistribute the package with your
application and have your installer run it automatically.  My older copy
of the Windows SDK includes the Visual C++ 2005 compilers with the C/C++
runtime merge modules, so lastest version of the SDK might include 2008
merge modules.

Whatever you do, make sure you install the runtime correctly.  Part of
the reason for the restrictions on redistributing the runtime is so people
don't just bindly copy DLLs around.  That leads to older DLLs overriding
newer DLLs and makes it difficult for Micrsoft to make security fixes.
In particular they don't want a repeat of the GDI+ fiasco, where a buffer
overrun of the image processing routines resulted security vulnerabilities
in a lot of third party applications that couldn't be easily fixed by
deploying a patched DLL with Windows Update.

					Ross Ridge

-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge at csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //	  



More information about the Python-list mailing list