win XP + wxPython + py2exe

O

Olivier Thiery

Hello,

I've ported a software I've developped from win 2k to win xp and something I
wouldn't have expected happened.

If I simply run the py files, the software uses the current xp skin
looknfeel, but if I compile it using py2exe it looks like any ugly standard
grey win2k app.

Does anybody know why and how it can be fixed ?

Thanks a lot,

Olivier
 
P

Peter Hansen

Olivier said:
I've ported a software I've developped from win 2k to win xp and something I
wouldn't have expected happened.

If I simply run the py files, the software uses the current xp skin
looknfeel, but if I compile it using py2exe it looks like any ugly standard
grey win2k app.

Does anybody know why and how it can be fixed ?

This has been discussed in the group and groups.google.com can
certainly dig up the reference for you, if Jaco's advice doesn't
get you all the way there.

-Peter
 
S

simo

Olivier Thiery said:
I've ported a software I've developped from win 2k to win xp and something I
wouldn't have expected happened.

If I simply run the py files, the software uses the current xp skin
looknfeel, but if I compile it using py2exe it looks like any ugly standard
grey win2k app.

Does anybody know why and how it can be fixed ?

You need to include and XP manifest file. You can either just copy
(and rename to match your .exe) the python.exe.manifest file from
c:\python23 or I prefer to embed it into my setup.py for py2exe (just
change "myprogram" to your program name) I think this is in the py2exe
Wiki:


from distutils.core import setup
import py2exe

manifest = """
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
version="0.64.1.0"
processorArchitecture="x86"
name="Controls"
type="win32"
/>
<description>myProgram</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
"""

"""
installs manifest and icon into the .exe
but icon is still needed as we open it
for the window icon (not just the .exe)
changelog and logo are included in dist
"""

setup(
windows = [
{
"script": "myprogram.py",
"icon_resources": [(1, "myprogram.ico")],
"other_resources": [(24,1,manifest)]
}
],
data_files=["logo.gif",
"myprogram.ico",
"ChangeLog.txt"],
)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top