I made a small test pgm
Copy a text file to a dir/file: parinctest/test.txt
Compile with:
pp -o testpp.exe -a parinctest testpp.pl
and the result should be the gui version of the vim editor will popup.
------------------------ testpp.pl
#!/usr/bin/perl -w
use warnings;
use File::stat;
use strict;
my $file = "test.txt";
my $cyg = PAR::read_file("parinctest/$file");
open (TMP, ">$file") or print STDERR "cant open output $file $!\n";
binmode(TMP);
print TMP $cyg;
close TMP;
PrtStat($file);
system("gvim.exe $file");
sub PrtStat {
my ($file) = @_;
my $sb = stat($file);
if ($sb) {
printf
"%s:size=%s:perm=%04o:uid=%d:guid=%d:mtime=%s:atime=%s:ctime=%s\n",
$file, $sb->size, $sb->mode & 07777,
$sb->uid, $sb->gid,
scalar localtime $sb->mtime,
scalar localtime $sb->atime,
scalar localtime $sb->ctime;
} else {
printf "%s:not found\n", $file,
}
}
-----------------------
> -----Original Message-----
> From: Thomas George [mailto:[email protected]]
> Sent: 2009-02-24 19:50
> To: [email protected]
> Subject: Re: PAR/pp with folders
>
> Still striking out on this... I thought I have a working solution,
however
> this dosn't work the way I thought it would.
>
> I need to keep a set of txt files, as well as CLI executibles in the
> executible created by pp, however the files in the folder 'txt' are
not
> accessible, nor is the CLI .exe I'd like to add to the executible I'm
> creating.
>
> This is what I'd like:
> pp file.pl command.exe -a txt -o file.exe
> .
> ..
> file.pl (PERL Script)
> command.exe (DOS CLI executible)
> txt (folder)
> |
> file1.txt (text file)
> file2.txt (text file)
> file3.txt (text file)
> file4.txt (text file)
>
> Q: Is this a function that is currently supported by PAR/pp, and do I
just
> not knowhow to use it..?
>
> My thanks,
>
> Thomas
>
> On Wed, Feb 18, 2009 at 10:11 PM, Thomas George
> <[email protected]>wrote:
>
> > Nevermind, I got it..
> >
> > pp file.pl -a folder -o file.exe
> >
> > Thomas
> >
> > On Wed, Feb 18, 2009 at 5:04 PM, Thomas George <
> > [email protected]> wrote:
> >
> >> I'm not sure if this is just outside the functionality of PAR/pp,
but I've
> >> been able to find documentation on how to do this and would
appreciate some
> >> insight.
> >>
> >> What I would like to do is include one or more folders along with
various
> >> other files in a single executible.
> >>
> >> The error I am getting is:
> >> Cannot open txt: Permission denied at
C:/Perl/site/lib/Module/ScanDeps.pm
> >>
> >> Is there a switch I need to use to identify this 'txt' as a
folder..?
> >>
> >> Many thanks,
> >
> >
> >