python - WIMP theme not found - only when bundling with PyInstaller (Windows) -


i have built simple application using glade , pygtk (on windows 7). python interpreter looks fine. however, after bundling pyinstaller, warning:

 gtkwarning: not find icon 'gtk-missing-image'. 'hicolor' theme not found either, perhaps need install it. 

and gui looks ugly...

here's screenshot of both runs.

screenshot

edit

i found 'hicolor' theme files in gtk installation. appears contain icons. therefore, it's not cause general look, different icons can seem in title bars.

solved problem, based on http://www.pyinstaller.org/ticket/14

however, solution didn't work me as-is, modified little.

add spec file:

a.datas += [('gtkrc', r'c:\python27\lib\site-packages\gtk-2.0\runtime\share\themes\ms-windows\gtk-2.0\gtkrc', 'data')] a.binaries += [(r'lib\gtk-2.0\2.10.0\engines\libwimp.dll', r'c:\python27\lib\site-packages\gtk-2.0\runtime\lib\gtk-2.0\2.10.0\engines\libwimp.dll', 'binary') ] 

and __init__:

gtk.rc_add_default_file(resource_path("gtkrc")) 

now looks good... (btw, didn't solve original warning regarding missing icon , 'hicolor' theme, of less importance.)


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -