Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^10: ActiveState PerlApp + Gtk and themes

by Ralesk (Pilgrim)
on Jan 23, 2012 at 13:44 UTC ( [id://949408]=note: print w/replies, xml ) Need Help??


in reply to Re^9: ActiveState PerlApp + Gtk and themes
in thread ActiveState PerlApp + Gtk and themes

So, here are the bound files in the perlapp project file:

Bind: lib/gtk-2.0/2.10.0/engines/libwimp.dll[file=C:\uhu\gtk\lib\gtk-2.0\2.10.0\engines\libwimp.dll,extract,mode=666]
Bind: lib/gtk-2.0/2.10.0/engines/libpixmap.dll[file=C:\uhu\gtk\lib\gtk-2.0\2.10.0\engines\libpixmap.dll,extract,mode=666]
Bind: share/themes/MS-Windows/gtk-2.0/gtkrc[file=C:\uhu\gtk\share\themes\MS-Windows\gtk-2.0\gtkrc,text,extract,mode=666]
Bind: share/locale/hu/LC_MESSAGES/gtk20.mo[file=C:\uhu\gtk\share\locale\hu\LC_MESSAGES\gtk20.mo,extract,mode=666]
Bind: share/locale/hu/LC_MESSAGES/gdk-pixbuf.mo[file=C:\uhu\gtk\share\locale\hu\LC_MESSAGES\gdk-pixbuf.mo,extract,mode=666]
Bind: share/locale/hu/LC_MESSAGES/atk10.mo[file=C:\uhu\gtk\share\locale\hu\LC_MESSAGES\atk10.mo,extract,mode=666]
Bind: share/locale/hu/LC_MESSAGES/glib20.mo[file=C:\uhu\gtk\share\locale\hu\LC_MESSAGES\glib20.mo,extract,mode=666]
Bind: share/locale/hu/LC_MESSAGES/gtk20-properties.mo[file=C:\uhu\gtk\share\locale\hu\LC_MESSAGES\gtk20-properties.mo,extract,mode=666]

This will have those files unpacked to %TEMP%\pdk-%USERNAME%-$$\{lib,share}\.... The libwimp.dll and the MS-Windows gtkrc file seem to be crucial in getting the UI look right. Libraries are found with help from the GTK_EXE_PREFIX environment variable, and shared stuff are found via the GTK_DATA_PREFIX envvar. Locale is supposedly controlled by XDG, but XDG_DATA_DIRS did not have any effect and it is still searched in %TEMP%\pdk-%USERNAME%\<Gtk2 hashdir>\.

The Perl code thus needed the following “hack” so GTK+ knows where to look:

if ($windows) { ## $windows as set up earlier in the code = TRUE if ( +$^O eq 'MSWin32' or $^O eq 'MSWin64'); $ENV{GTK_EXE_PREFIX} = "$ENV{TEMP}\\pdk-$ENV{USERNAME}-$$"; $ENV{GTK_DATA_PREFIX} = "$ENV{TEMP}\\pdk-$ENV{USERNAME}-$$"; $ENV{XDG_DATA_DIRS} = "$ENV{TEMP}\\pdk-$ENV{USERNAME}-$$"; ## Has + no effect, see above. }

Now all I need is bundle that other binary I mentioned earlier and possibly figure out how to change the locale lookup dir somehow, and I’m done.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://949408]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-16 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found