Re: perltk menu in pp executable
by marto (Cardinal) on Mar 30, 2011 at 09:55 UTC
|
Hi, perhaps a module you use isn't being detected by pp (or Module::ScanDeps). Could you post (note the formatting advice dispayed on the page) a short example script which reproduces the problem, and how you're using pp to generate the executable? Do you see any errors/warnins if you call the exe you generated via the command line?
| [reply] |
Re: perltk menu in pp executable
by Anonymous Monk on Mar 30, 2011 at 10:07 UTC
|
Any idea what i might make wrong or what i should do?
Provide version numbers, ex
$ pmvers pp PAR PAR::Packer Tk
pp: 1.009
PAR: 1.002
PAR::Packer: 1.009
Tk: 804.029
Provide small program that demonstrates the problem, ex Deleting Menu Item from Menu
Provide commands you used to pack it, I used
$ pp -n -x pm739542.pl
and as expected, nothing is different from running perl pm739542.pl
For more packing tips, see
| [reply] [d/l] [select] |
Re: perltk menu in pp executable
by zentara (Cardinal) on Mar 30, 2011 at 22:54 UTC
|
You might try the Cava packager. Good luck has been reported with it. :-)
| [reply] |
|
|
| [reply] [d/l] |
Re: perltk menu in pp executable
by vkon (Curate) on Mar 30, 2011 at 11:43 UTC
|
For Tk, there are lot of standard widgets that autodetected, but they actually lie in their own package, i.e. Menu widget lies in Tk::Menu
if you place this:
use Tk;
use Tk::Menu;
then probably packaging with PAR will be better.
I consider this is a bug, but anyway it is a way to go. | [reply] [d/l] [select] |
|
|
I've come across this many times. When I write the code I now, just as a matter of habit, put a "use" statement in every time that I start using a new type of widget. This will apply to anything that is auto loaded at run time. Testing one of the pp exe files is important as occasionally it will "blow up" when some code is encountered that needs something that is not there.
Since the Op is on Active State, I would consider buying a copy of their dev kit which will contain the PerlApp program. Active State has included some heuristics for common libraries like Tk. PerlApp scans the source code looking for extra things that need to be forced into the .exe. In the Op's case it would have automatically included Tk::Menu into the resulting .exe without him having to put a use statement in the source code.
The disadvantage is that PerlApp will set you back a couple hundred dollars. If you are doing this code for a company, that is the best way to go as this program can do all sorts of other little zoomy touches (include an icon, put in the Microsoft version info in for the file, etc). A few hundred bucks is typically not a problem compared with the time and hassle that this will save the Op.
It is also possible to add command line args that "force" modules into the final .exe, but in my opinion adding a "use" statement in the source code is a far superior solution.
| [reply] |
|
|
Thanks for all your postings!
I tried the whole thing on a different machine (with obviously a slightly different perl environment) and it worked.
I believe it is now up to me to check where the differences are.
Thanks again for your fast replies!
-ged
| [reply] |
|
|
|
|
$ pmvers pp PAR PAR::Packer Tk
pp: 1.009
PAR: 1.002
PAR::Packer: 1.009
Tk: 804.029
| [reply] [d/l] |
|
|
My point is - "placing 'use Tk::Menu;' could solve the problem"
I can not see how your answer answers my message.
| [reply] |