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

I've never tried to build a GUI library before. I know that when Active State does this, they add extra heuristics to perlApp that makes it "smarter". This is how it can find and force additional modules into the .exe that aren't explicitly "used" (via a use xxx; statement) - there are probably other things that they do of which I am unaware. It may be that you are stuck with some kludgy stuff. I think the "bound file" idea will work and I think I've done it before, but its been awhile. Sorry that I can't help further.

Update: I've used Taskinfo before. It can show files that a process currently has open, I don't know of there is a way to figure out what files were accessed (but are in the steady state closed: i.e. were opened read, but are now closed). The author has continuously updated this app since I first used it- speculation: maybe there is now some kind of "trace" option - I don't know.

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

Replies are listed 'Best First'.
Re^4: ActiveState PerlApp + Gtk and themes
by Ralesk (Pilgrim) on Jan 20, 2012 at 16:56 UTC

    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).

      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...