是否可以在 Vista 上构建 exe 并使用 py2exe 在 XP 上部署
我在 Windows Vista 上使用 python 创建了一些程序。但我想将它部署在 Windows XP 上。是否有必要在Windows XP上进行新的构建?或者是否有可能构建在这两个系统上都可以运行的版本?
编辑(编辑2 - 非常简单的程序也不起作用): 我的设置:
from distutils.core import setup
import py2exe
setup(console=['orderer.py'])
使用依赖项资源管理器检查依赖项是:
msvcr90.dll
kernel32.dll
+ntdll.dll
几乎解决了:
我发现安装:http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang =en 做到了。但我之前尝试手动提供msvrc90.dll,但没有成功,有什么办法可以自动重新分发它吗?或者我必须向他提供这个安装文件。
最后一个也是主要问题
现在我遇到了 msvcrt.dll 的问题。 Windows XP 上出现的消息:
过程入口点wcsscpy_s 无法在动态中找到 链接库msvcrt.dll
在 vista 上我有版本 7.0.6001.18000
但在 XP 7.0.2600.5512
有没有办法解决这个问题?
看来我没有排除一些 dll...愚蠢的错误:
$ grep -lir msvcrt.dll .
./buildout
./buildtest.py
./dist/ACTIVEDS.dll
./dist/adsldpc.dll
./dist/ATL.DLL
./dist/credui.dll
./dist/DSOUND.dll
./dist/MAPI32.dll
./dist/PROPSYS.dll
./dist/WLDAP32.dll
现在它可以工作了!
I have created some program using python on Windows Vista. But I want to deploy it on Windows XP. Is it necessary to make new build on windows XP? Or there is possibility to make build that will work on both of these systems?
EDIT (EDIT 2 - very simple program does not work also):
My setup:
from distutils.core import setup
import py2exe
setup(console=['orderer.py'])
Using dependency explorer i checked that dependencies are:
msvcr90.dll
kernel32.dll
+ntdll.dll
Almost solved:
I figured out that installing: http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en does the thing. But i tried to provide msvrc90.dll manually before and it did not work, is there any way to redistribute it automatically? Or I must provide this install file to him.
Last and the main problem
Now i have problem with msvcrt.dll. Message that occured on windows xp:
The procedure entry point wcsscpy_s
could not be located in the dynamic
link library msvcrt.dll
On vista i have version 7.0.6001.18000
But on XP 7.0.2600.5512
Is there a way to fix this?
Seems that i did not exclude few dll's... silly mistake:
$ grep -lir msvcrt.dll .
./buildout
./buildtest.py
./dist/ACTIVEDS.dll
./dist/adsldpc.dll
./dist/ATL.DLL
./dist/credui.dll
./dist/DSOUND.dll
./dist/MAPI32.dll
./dist/PROPSYS.dll
./dist/WLDAP32.dll
now it works!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 py2exe 创建的可执行文件以及 msvcr90.dll、msvcp90.dll 和 msvcm90.dll 文件旁边创建一个名为“Microsoft.VC90.CRT.manifest”的文件,其中包含以下内容:
Create a file named "Microsoft.VC90.CRT.manifest" with the following content next to the executable created by py2exe and the msvcr90.dll, msvcp90.dll, and msvcm90.dll files:
如果你的 vista 系统上有 32 位 python 并使用 py2exe 创建 exe,它也应该在 XP 上运行。
你遇到什么问题了吗?如果有,它们是什么?
if you have 32-bit python on your vista system and use py2exe to create an exe, it should run on XP also.
have you run into any problems? if so, what are they?