开发者

Is it possible to build exe on Vista and deploy on XP using py2exe

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 开发者_StackOverflow中文版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!


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:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable/>
    <assemblyIdentity
        type="win32"
        name="Microsoft.VC90.CRT"
        version="9.0.21022.8"
        processorArchitecture="x86"
        publicKeyToken="1fc8b3b9a1e18e3b"
    />
    <file name="msvcr90.dll" />
    <file name="msvcp90.dll" />
    <file name="msvcm90.dll" />
</assembly>


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜