Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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!

like image 857
dfens Avatar asked Jan 08 '11 18:01

dfens


1 Answers

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>
like image 54
cgohlke Avatar answered Sep 23 '22 19:09

cgohlke