#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2009
    Location
    UK
    Posts
    1
    Rep Power
    0

    Py2exe, manifests and vc-redist dlls


    Hello. I've made a wxPython script which I want to distribute. I'm using py2exe which has worked for me.. kind of. The problem I'm having is with the manifest file and DLL dependancies. If I don't include the manifest everything is fine, though it has no XP theme.. If I include the manifest I get an error:
    This application has failed to start because MSVCR90.dll was not found. Re-installing the application may fix this problem.
    After installing that DLL (to the application directory) from Visual Studio 9.0/VC/redist/x86/Microsoft.VC90.CRT, I now get the following error when launching the main exe.
    Runtime Error
    R6034
    An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.
    I hope someone can help me with this. I have googled and not found any solutions, figured this would be the best place for help considering there isn't a py2exe forum and the IRC channel is dead.

    Some additional information.. (Note that I'm not including the manifest in the resources at the moment.. just adding the filename.exe.manifest file, copied from the sample. As I understand, it makes no difference, and also doesn't fix the problem).

    py2exe setup script, based of samples/simple/setup.py:
    python Code:
     
    from distutils.core import setup
    import py2exe
    class Target:
        def __init__(self, **kw):
            self.__dict__.update(kw)
            # for the versioninfo resources
            self.version = "1.0.0.0"
            self.company_name = ""
            self.copyright = ""
            self.name = ""
     
    test_wx = Target(
        description = "",
        script = "colourvtfc.py",
        #other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="test_wx"))],
        icon_resources = [(1, "icon1.ico")],
        dest_base = "colourvtfc")
     
    setup(
        version = "1.0.0.0",
        description = "",
        name = "ColourVTFC",
        windows = [test_wx]
        )


    Dependancies:
    Code:
       OLEAUT32.dll - C:\WINDOWS\system32\OLEAUT32.dll
       USER32.dll - C:\WINDOWS\system32\USER32.dll
       COMCTL32.dll - C:\WINDOWS\system32\COMCTL32.dll
       SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
       ole32.dll - C:\WINDOWS\system32\ole32.dll
       WINMM.dll - C:\WINDOWS\system32\WINMM.dll
       WSOCK32.dll - C:\WINDOWS\system32\WSOCK32.dll
       COMDLG32.dll - C:\WINDOWS\system32\COMDLG32.dll
       ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
       MSVCP90.dll - C:\py2exe\MSVCP90.dll
       MSVCRT.dll - C:\WINDOWS\system32\MSVCRT.dll
       GDI32.dll - C:\WINDOWS\system32\GDI32.dll
       KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll
       MSVCR80.dll - C:\py2exe\MSVCR80.dll
       gdiplus.dll - C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\gdiplus.dll
       RPCRT4.dll - C:\WINDOWS\system32\RPCRT4.dll
    Thanks in advance if anyone can help me!~
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0
    Exactly the same thing happening to me, I did exactly the same steps and got the same errors today.

    I think I've got p2exe 6.6 installed at home so I'm gonna give that a go. If I find a solution I'll post it here.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0
    After a little further investigation this evening, it looks like it's a bug

    The bugs listed as bug 4566

    There's a patch at the top of the bug page, I think it's written in c? But I'm not sure what to do with it, can anyone help out? I'd post the url But it says I not allowed
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    1
    Rep Power
    0
    I ran into the same exact problem. After removing "icon_resources" from the windows portion of setup(), I can now run my application without the runtime error.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    1
    Rep Power
    0
    Hey there
    i was having the same problem but i found that if i make a manifest file and copy the content of python.exe.manifest everything is working correctly

    Give it a try.

IMN logo majestic logo threadwatch logo seochat tools logo