Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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

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

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943380]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2017-04-28 03:28 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (517 votes). Check out past polls.