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

Thanks for your help so far, I've just stumbled upon Process Monitor by SysInternals, and it seems to be of great help tracing down file opens and such. I've already found where I should be putting GTK's locale files with it. I'll take a look at the bound file stuff eventually, maybe I'll need it too (seems like it, with the additional binary I'm trying to ship with our app).

  • Comment on Re^4: ActiveState PerlApp + Gtk and themes

Replies are listed 'Best First'.
Re^5: ActiveState PerlApp + Gtk and themes
by Marshall (Canon) on Jan 20, 2012 at 17:11 UTC
    I think Process Monitor does most of what TaskInfo does and I think that one is free (Igor will want some money for his shareware - but I doubt that a modest sum is a problem for your organization). I've corresponded with Igor before and if you have a special requirement, he'll listen to what you have to say and actually reply!. For disclosure: I have no pecuniary interest in this - so this is not a ad for Igor.

    I do think that this "bound file" idea has a very high probability of working. From the help:

    Bound Files Container To include additional files in the output executable (accessed via the PerlApp::get_bound_file() and PerlApp::extract_bound_file() functions), use the Bound files container. The Bound files container corresponds to the --bind file command-line option.

    Extract Configure whether the bound file should be automatically extracted when the application is run, or if invoking PerlApp::get_bound_file() or PerlApp::extract_bound_file() is needed to obtain the file. This setting corresponds to the --bind command's extract argument.

      Bound files, when their name is set to eg. some/path/file.dat will be expanded to %TEMP%\pdk-%USERNAME%-%PID%\some\path\file.dat. This seems incredibly useful, albeit ever so slightly uncomfortable due to the PIDded folder. At least it is full well possible to specify non-flat paths. Good!

      As far as GTK+ is concerned (and Pango, and the others looking for their files), the files are expected as if the DLLs' place in the file system were the UNIX /usr/local or a /opt/$something, so the etc, lib or share stuff go into, for example auto/lib/Gtk2/{etc,lib,share}. This is, however, a completely different directory than the one where we autoextract bound files: the libs live in %TEMP%\pdk-%USERNAME%\$sha1something\, and don't seem to support expanding more than just the specified folder — so in particular, the subdirectories never exist in them and GTK+ won't find the needed libraries/config files/locales/whatever.

      (I'm not sure if I've mentioned, the theming and the locale files are found by the non-packed script now, but as the packed one is missing the carefully placed files, a different method is now needed.)

      So now I'm trying to figure out how to make good ol' GTK+ look for its resources in %TEMP%\pdk-%USERNAME%-%PID%, but for that, Running GTK+ Applications might be of good help. Had that page open in my browser all day, no luck yet, but it might come to me any time...

        Sounds like you have made further huge progress!

        The bound files will be in a directory underneath "." (the current directory that Perl executes in). The absolute path to %TEMP%\pdk-%USERNAME%-%PID% directory should make no difference.

        I hope that wiser Monks than me can weigh in here and explain how to set the @INC or whatever path or environment variables that GTK+ needs for it to run. It sounds to me like you are very, very close to getting this working!