Robert,

Thanks for getting back to me.  I'll try the sample code you've provided as
soon as my schedule allows..!

Just so I understand: is the solution likely to be found in how I am using
PAR/pp, or is the issue more related to my script's ability to find the text
files and executibles I am adding to the resulting .exe..?

Currently, my release process has me making the .exe with pp, and then
adding it, along with the folder and CLI executible to a .zip file or an iso
image, for distribution; this works fine, however, the CLI executibles are
not part of the OSes we support, and we would like to control their release
by hiding them in the .exe .. it also makes sense that the text files I am
using should be controlled and versioned, as part of an official release,
and I think it makes sense to physically include them and and logically
reference them in the .exe so that they cannot be easily modified and used
with the script.
Many thanks for all your help..!

Thomas
On Wed, Feb 25, 2009 at 6:26 AM, Robert Davis <robert.da...@infor.com>wrote:

> 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:thomas.w.geo...@gmail.com]
> > Sent: 2009-02-24 19:50
> > To: par@perl.org
> > 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
> > <thomas.w.geo...@gmail.com>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 <
> > > thomas.w.geo...@gmail.com> 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,
> > >
> > >
> > >
>

Reply via email to