views:

31

answers:

3

I'm writing an NSIS installer for a project that requires the PyOpenGL package, however installation of this package fails because my system doesn't contain mscvr71.dll (VS C runtime lib). According to KB326922, this library should have been packaged with PyOpenGL.

My question is, what is the safest way to correct this so I can install the PyOpenGL dep within my installer? I certainly don't want to have to drop the file into system32 during installation, and I'm not aware of any update that includes this file (other than VS itself).

EDIT:

  • I can't easily re-package PyOpenGL to include the missing dll. I don't have VS installed and am unsure how to rebuild the package and installer.
+1  A: 

Assuming that you have mscvr71.dll in your References, right-click on the mscvr71.dll file, select Properties, and change the Copy Local property to True.

Robert Harvey
I don't actually have VS installed, and would rather not have to re-package pyopengl myself. I'll update my question to be more clear.
Dana the Sane
Justin is probably correct, you can include the file in the same directory as the application, and it should work.
Robert Harvey
My XP SP2 box that I'm using for testing doesn't, so that won't be a problem.
Dana the Sane
+1  A: 

You can put the library in the same directory as the installer for PyOpenGL, which is first in the dll search path. mscvr71.dll is included with other applications, like the Java JRE, so you may have a safe copy to use in your Program Files directory (don't use dll's from untrusted sources).

Justin
+1  A: 

See the py2exe tutorial, which I augmented last year to describe exactly which version of which DLL files you need for different versions of Python, where to get them from, and how to include them (especially for the tricky newer versions, which require manifest files and the like):

http://www.py2exe.org/index.cgi/Tutorial#Step5

Tartley