From: Morgan V. <ve...@gm...> - 2009-02-13 17:37:06
|
Hi All, I've got an odd little bug. When I run from source, the gauge component works fine. I'm packaging up my application with py2exe: "python setup.py py2exe" When I run the resulting application, the gauge component no longer renders correctly. Instead of showing it's usual orange progress boxes, it's whitish and turns transparent as the gauge fills -- in my case you just see the background color filling up the gauge. Py2exe doesn't throw any build errors, and the gauge component is included in the setup.py file below. Is it possible I need to import something else explicitly in my source to make this work? I already import PythonCard.components as well as "model" and "dialog" Here's my setup.py: from distutils.core import setup import py2exe import os # find pythoncard resources, to add as 'data_files' pycard_resources=[] for filename in os.listdir('.'): if filename.find('.rsrc.')>-1: pycard_resources+=[filename] # includes for py2exe includes=[] for comp in ['button','image','staticbox',\ 'statictext','textarea','textfield','multicolumnlist','bitmapcanvas','gauge']: includes += ['PythonCard.components.'+comp] print 'includes',includes opts = { 'py2exe': { 'includes':includes } } print 'opts',opts # end of py2exe stuff setup(name='pySprintsMainMini', version='0.1', url='about:none', author='morgan venable', author_email='root@127.0.0.1', package_dir={'pySprintsMainMini':'.'}, packages=['pySprintsMainMini'], data_files=[('.',pycard_resources)], console=['pySprintsMainMini.py'], options=opts ) thanks! morgan |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-02-15 17:06:21
|
On Fri, 13 Feb 2009 09:37:00 -0800 Morgan Venable <ve...@gm...> wrote: > When I run the resulting application, the gauge component no longer > renders correctly. > > Instead of showing it's usual orange progress boxes, it's whitish and > turns transparent as the gauge fills -- in my case you just see the > background color filling up the gauge. Well, I have to confess to still using the old McMillan utility, so I'm probably not going to be much help. What OS and version of wxPython is this? -- XXXXXXXXXXX |
From: Morgan V. <ve...@gm...> - 2009-02-16 16:59:59
|
Ah, right. Windows XP wxPython 2.8 On Sun, Feb 15, 2009 at 8:36 AM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX wrote: > On Fri, 13 Feb 2009 09:37:00 -0800 Morgan Venable <ve...@gm...> > wrote: > >> When I run the resulting application, the gauge component no longer >> renders correctly. >> >> Instead of showing its usual orange progress boxes, it's whitish and >> turns transparent as the gauge fills -- in my case you just see the >> background color filling up the gauge. > > Well, I have to confess to still using the old McMillan utility, so I'm > probably not going to be much help. What OS and version of wxPython is > this? > > -- > XXXXXXXXXXX > |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-03-09 22:07:54
|
Did you manage to sort this problem out? I tried it here and I see something similar, in that the gauge (in fact any component) looks different when baked into an executable by py2exe. I don't get the weird transparency and my gauge is green when run as a script, not orange. In my case, it's down to the version of the Windows common controls DLL being used, but I'll wait to see if you've already fixed it before throwing any more theories out. -- XXXXXXXXXXX |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2009-03-10 09:17:20
|
On Mon, 9 Mar 2009 15:28:19 -0700 Morgan Venable <ve...@gm...> wrote: > Unfortunately no, this has been on the back burner for me :) > > Hopefully I'll get back to it soon... > > On Mon, Mar 9, 2009 at 3:06 PM, XXXXXXXXXXX > XXXXXXXXXXXXXXXXXXXXXXXXXX wrote: > > Did you manage to sort this problem out? It sounds like a common controls DLL/manifest issue. By default XP applications look like Windows 2000 and don't use the newer XP theme (Luna?) unless you build a manifest into them or load an external manifest at runtime with the instructions to use the new v6 common controls. If the gauge looks OK when you run it as a script, it's probably because of the python.exe.manifest/pythonw.exe.manifest files that wxPython places in the Python runtime directory, e.g. C:\Python25. The manifest gets loaded when python.exe/pythonw.exe is run and the GUI gains the new look. When you run an application built with py2exe, python.exe/pythonw.exe are not used so the application reverts to the Windows 2000 look. It sounds like that's what you're seeing, with some weird transparency issues due to the old controls. Two things to try: 1) move python.exe.manifest/pythonw.exe.manifest out of the Python directory (if they're there) and see what happens when you run your script from the codeEditor/command line. It should revert to the 'old' look. Oh...don't forget to copy the files back; 2) copy python.exe.manifest into your py2exe dist folder containing the EXE you have build, and rename it to match the executable name, e.g. wibble.exe.manifest. When you double click to run the application, does it gain the proper XP look? -- XXXXXXXXXXX |