如何修复省略所需 C 运行时库的 3rd 方库?
我正在为需要 PyOpenGL 包的项目编写 NSIS 安装程序,但是该包的安装失败,因为我的系统不包含 mscvr71.dll
(VS C 运行时库)。根据 KB326922,该库应该与 PyOpenGL 一起打包。
我的问题是,纠正此问题的最安全方法是什么,以便我可以在安装程序中安装 PyOpenGL dep?我当然不想在安装过程中将该文件放入 system32,并且我不知道任何包含该文件的更新(除了 VS 本身)。
编辑:
- 我无法轻松地重新打包 PyOpenGL 以包含丢失的 dll。我没有安装 VS,并且不确定如何重建软件包和安装程序。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以将该库放在与 PyOpenGL 安装程序相同的目录中,该目录位于 dll 搜索路径的第一个目录中。
mscvr71.dll
包含在其他应用程序中,例如 Java JRE,因此您可以在Program Files
目录中使用一个安全的副本(不要使用来自不受信任的 dll)来源)。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 yourProgram Files
directory (don't use dll's from untrusted sources).假设您的引用中有 mscvr71.dll,请右键单击 mscvr71.dll 文件,选择属性,然后将复制本地属性更改为
True< /代码>。
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
.请参阅 py2exe 教程,我去年对其进行了扩充,准确描述了不同版本的 Python 所需的 DLL 文件的哪个版本、从哪里获取它们以及如何包含它们(特别是对于棘手的较新版本,它们需要清单文件)等):
http://www.py2exe.org/index.cgi/Tutorial #步骤5
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