in reply to Par Packer - gui option problems

Exactly how do you call the external batch file?

Could you post a minimal, working example? Maybe it has the same behaviour even without using Tk? Try that and post that minimal (but complete in the sense of "you can run it") code as example.

Since there are quite a lot of ways to call an external program or batch file on window, at this point we can't even take a guess on the exact nature of the problem.

BREW /very/strong/coffee HTTP/1.1
Host: goodmorning.example.com

418 I'm a teapot

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

    Here a code snippet without using Tk.

    use strict; use warnings; 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"); open( my $fh1, ">", "V:/log1.txt" ); print $fh1 Dumper(\%ENV); close( $fh1 ); my ($stdout, $stderr, @result); ($stdout, $stderr, @result) = capture { my $cwd = getcwd; chdir("$ENV{'PAR_TEMP'}/inc/PDIMlink"); `pdim_link.bat "1.elf"`; chdir($cwd); }; 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 );

    But it is exactly the same behaviour as in the Tk version ( see http://www.perlmonks.org/?node_id=943505). So I know the problem has nothing to do with Tk.