You can find most of my "Open Source" Perl software in my CPAN directory [cpan.org].
In my journal entry from December 22, 2006, I said I'd used a few hacks to package parinstallppdgui into an executable binary using PAR::Packer. I'll explore that further here:
parinstallppdgui is mostly a GUI front-end to parinstallppd. It doesn't use PAR::Dist::InstallPPD internally, but uses the system to run parinstallppd so if the child process bombs out, the GUI process can show a friendly warning to the user (comprised of the STDERR and STDOUT of the child process) instead of crashing. That's all very simple if you have perl on your system, of course.
Now, if you want to package parinstallppdgui or any other Perl script that uses another Perl script into an
So I took a slightly better, yet more complicated route. The process is as follows:
if (defined $ENV{PAR_TEMP}) {
require Config;
require File::Spec;
$ENV{PATH} .= (defined $ENV{PATH} ? $Config::Config{path_sep} : '')
. File::Spec->catdir($ENV{PAR_TEMP}, 'inc');
$ENV{PAR_GLOBAL_TEMP} = $ENV{PAR_TEMP};
}
pp -o parinstallppdgui.exe parinstallppdguipp -o parinstallppd.exe -l expat parinstallppdpare -u parinstallppdgui.exe parinstallppd.exepp -o parinstallppdgui.exe -a parinstallppd.exe -l expat parinstallppdguiCheers,
Steffen
P.S.: A third and even better solution might be to package both of the scripts into the same binary and symlink or copy that binary to parinstallppd.exe and parinstallppdgui.exe and let PAR figure out what to run. This is cool if you have symlinks and sucks if you don't.
Evil PAR tricks, issue 0: Binary including a binary 0 Comments More | Login | Reply /