Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Par Packer - gui option problems

by Anonymous Monk
on Dec 13, 2011 at 16:04 UTC ( #943380=note: print w/ replies, xml ) Need Help??


in reply to Par Packer - gui option problems

What do you suggest for a way to find the error?

post code, not nothing


Comment on Re: Par Packer - gui option problems
Replies are listed 'Best First'.
Re^2: Par Packer - gui option problems
by Dirk80 (Monk) on Dec 14, 2011 at 09:19 UTC

    You are right. Code helps more. So I wrote a small script which can reproduce the behaviour.

    use strict; use warnings; use Tk; use Capture::Tiny qw(:all); use Cwd; use Data::Dumper; # BUG or unknown feature in pp: dll files are not extracted # Workaround: # --> renamed dll files in "./PDIMLink" to txt files # --> at start dll files are renamed back to dll my $dll_path = "$ENV{'PAR_TEMP'}/inc/PDIMlink/host/x86-win32"; rename("$dll_path/bin/cygwin1.txt", "$dll_path/bin/cygwin1.dll"); rename("$dll_path/bin/tcl.txt", "$dll_path/bin/tcl.dll"); rename("$dll_path/lib/cpluslib.txt","$dll_path/lib/cpluslib.dll"); my $mw = MainWindow->new; $mw->geometry("220x150+100+120"); $mw->title("Test - PP with --gui option"); $mw->Button( -text => "Start", -command => sub { my ($stdout, $stderr, @result); open( my $fh1, ">", "V:/log1.txt" ); print $fh1 Dumper(\%ENV); close( $fh1 ); ($stdout, $stderr, @result) = capture { my $cwd = getcwd; chdir("$ENV{'PAR_TEMP'}/inc/PDIMlink"); `pdim_link.bat "1.elf"`; chdir($cwd); }; # this file is NOT created if --gui option is active open( my $fh2, ">", "V:/log2.txt" ); print $fh2 "STDOUT: $stdout\n"; print $fh2 "STDERR: $stderr\n"; print $fh2 "Result: @result\n"; print $fh2 "$ENV{'PAR_TEMP'}/inc/PDIMlink\n"; print $fh2 Dumper(\%ENV); close( $fh2 ); } )->pack; MainLoop;

    The "pdim_link.bat" file I'm not allowed to publish. But I'll try to reproduce the same behaviour with a bat file which I can publish to you.

    Now to the code: If I pack it with the --gui option, i.e. pp --gui -a "./PDIMlink" -o test.exe test.pl then "pdim_link.bat" does NOT work and the file "log2.txt" is NOT created.

    If I pack the code without the --gui option, i.e. pp -a "./PDIMlink" -o test.exe test.pl then both files (log1.txt and log2.txt) are created and "pdim_link.bat" works as expected.

    The file "log1.txt" which contains the Dump of the environment variables is not different (apart from the cryptical path e.g. .../cache-94cdd0fc50fcdc36d7cd4972d0f2afa676e0b848/.. ) with or without using the gui option.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2015-07-08 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls