![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,791
Rep Power: 5
![]() |
Gah! When compiling wxPython with py2exe, everything gets all screwed up.
The styles of the widgets turn into what they look like when I tested it on a windows98. The buttons go square, the StaticBoxes turn black and square. The images lose their alpha layer. Etc... How can I fix this? As well, compiling the .pyw didn't keep it running without a console window. How do I prevent the console window from showing (on Windows only)? I swear I had it working previously by using .pyw ... |
|
|
|
|
|
#22 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4
![]() |
On my machine, Py2exe installed a samples directory at C:/Python24/Lib/site-packages/py2exe/samples. Look in the advanced samples subdirectory, and you'll find a setup.py used for compiling wxPython applications. In this file, there's a rather telling section of code:
################################################################
# A program using wxPython
# The manifest will be inserted as resource into test_wx.exe. This
# gives the controls the Windows XP appearance (if run on XP ;-)
#
# Another option would be to store it in a file named
# test_wx.exe.manifest, and copy it with the data_files option into
# the dist-dir.
#
manifest_template = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="5.0.0.0"
processorArchitecture="x86"
name="%(prog)s"
type="win32"
/>
<description>%(prog)s Program</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
'''
RT_MANIFEST = 24 |
|
|
|
|
|
#23 | |
|
Programmer
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4
![]() |
You might know this already, but in py2exe if use something like:
setup(console=["script.py"]) you'll get the console. but, if on the py2exe there is this: Quote:
![]()
__________________
Tetris is so unrealistic |
|
|
|
|
|
|
#24 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#25 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,791
Rep Power: 5
![]() |
Thanks Megamind and Arevos, those were precisely the things I needed.
And Cerulean, the controls are actually quite intricite. I won't get in to it though. I'll be posting a thread in the Job Offers forum about this in the next few hours. |
|
|
|
|
|
#26 |
|
Programmer
Join Date: Dec 2004
Location: UK
Posts: 53
Rep Power: 4
![]() |
Glad to be of help
![]()
__________________
Tetris is so unrealistic |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|