You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-dev@perl.apache.org by Per Einar Ellefsen <pe...@skynet.be> on 2002/03/29 22:04:34 UTC
[PATCH] DocSet on Win32
Hello everyone,
Well, I got DocSet ported to Win32. It wasn't such a big task afterwards.
What was changed:
- replaced call to `which` with a portable which function in DocSet::Util
(taken from Apache::Build in modperl-2.0 and made to use the PATHEXT env
variable on WinNT: I can re-submit this one into the modperl-2.0 tree if
you think that'll be useful, it finds the specified file terminated by
.exe, .bat, etc..
- use perl %ENV instead of `env` to set PERL5LIB whenh calling docset_build
- had to replace all regexes that used a directory/file path, and use
quotemeta() there, because the backslahes created illegal escape sequences.
- changed some things before calling URI in DocSet::Doc; it not, the
directory name would be considered part of the host name and thus not tried
to be opened. So I replaced \ with /, as that'll open the file correctly.
I think that's it.
For bin/build to work correctly, there must also be .bat versions of build
and docset_build. I'm not sure about how to handle this in a general way,
maybe the bat files should be integrated into CVS or something? I need some
tips on that.
Furthermore, there was a problem with html2ps: it begins with a line saying
: # Use Perl
When converting it to .bat (as it is when it's installed into perl/bin),
that colon is a problem. It should be removed.
For the PDF version, it all seems to have been build correctly, but after a
loong wait (it takes a long time, even on a pretty decent computer here,
but I guess that's normal), I get the following errors:
Invalid Parameter - \svs..ppm
Output file write error --- out of disk space?
Invalid Parameter - \sds..ppm
Output file write error --- out of disk space?
Invalid Parameter - \sr0..ppm
Invalid Parameter - \sr0..ppm
Invalid Parameter - \sr0..ppm
Invalid Parameter - \sr0..ppm
Invalid Parameter - \su0..ppm
Invalid Parameter - \su0..ppm
Invalid Parameter - \su0..ppm
Invalid Parameter - \su0..ppm
Does anyone know where this is coming from? I don't have the guts to try
and debug it now. Please tell me if you know where it's coming from (DocSet
or Ghostscript?)
The patches to DocSet are against the modperl-docs repository. I guess this
might be a problem. If it is, please tell me and I'll resubmit the patch.
Patch is below the sig.
--
Per Einar Ellefsen
per.einar@skynet.be
Index: bin/build
===================================================================
RCS file: /home/cvspublic/modperl-docs/bin/build,v
retrieving revision 1.2
diff -u -r1.2 build
--- bin/build 5 Jan 2002 19:38:51 -0000 1.2
+++ bin/build 29 Mar 2002 20:44:37 -0000
@@ -12,7 +12,11 @@
my $perl5lib = $ENV{PERL5LIB} || $ENV{PERLLIB};
my $lib = join ":", grep defined($_), "$Bin/../lib", $perl5lib;
+# Add PERl5LIB to environment for docset_build to pick up on local DocSet
+# modules
+$ENV{PERL5LIB} = $lib;
+
# forward the @ARGV
-my $command = "env PERL5LIB=$lib $Bin/docset_build @ARGV $Bin/..
src/config.cfg";
+my $command = "$Bin/docset_build @ARGV $Bin/.. src/config.cfg";
#print $command;
system $command;
Index: lib/DocSet/Doc.pm
===================================================================
RCS file: /home/cvspublic/modperl-docs/lib/DocSet/Doc.pm,v
retrieving revision 1.5
diff -u -r1.5 Doc.pm
--- lib/DocSet/Doc.pm 22 Mar 2002 07:00:29 -0000 1.5
+++ lib/DocSet/Doc.pm 29 Mar 2002 20:44:38 -0000
@@ -71,7 +71,11 @@
my($self) = @_;
# META: at this moment everything is a file path
- my $src_uri = "file://" . $self->{src_path};
+ my $src_path = $self->{src_path};
+ $src_path =~ s|\\|/|g; # need this for Win32, if not part of the path
+ # becomes the hostname (\ or / don't matter
+ # when opening files on Win32)
+ my $src_uri = "file://" . $src_path;
my $u = URI->new($src_uri);
my $scheme = $u->scheme;
Index: lib/DocSet/DocSet.pm
===================================================================
RCS file: /home/cvspublic/modperl-docs/lib/DocSet/DocSet.pm,v
retrieving revision 1.5
diff -u -r1.5 DocSet.pm
--- lib/DocSet/DocSet.pm 22 Mar 2002 02:01:51 -0000 1.5
+++ lib/DocSet/DocSet.pm 29 Mar 2002 20:44:39 -0000
@@ -73,7 +73,8 @@
# cache the location of the parent node cache
if (my $parent_o = $self->get('parent_o')) {
my $parent_src_root = $parent_o->get_dir('src_root');
- (my $rel2parent_src_root = $src_root) =~ s|$parent_src_root||;
+ my $parent_src_root_regex = quotemeta($parent_src_root);
+ (my $rel2parent_src_root = $src_root) =~ s|$parent_src_root_regex||;
my $rel_dir = join '/', ("..") x ($rel2parent_src_root =~ tr|/|/|);
my $parent_cache_path = "$parent_src_root/cache.$mode.dat";
$cache->parent_node($parent_cache_path,
@@ -279,7 +280,8 @@
# # some OSs's File::Find returns files with no dir prefix root
# # (that's what ()* is for
# $dst_path =~ s/(?:$src_root)*/$dst_root/;
- $dst_path =~ s/$src_root/$dst_root/;
+ my $src_root_regex = quotemeta($src_root);
+ $dst_path =~ s/$src_root_regex/$dst_root/;
# to rebuild or not to rebuild
my($should_update, $reason) =
Index: lib/DocSet/RunTime.pm
===================================================================
RCS file: /home/cvspublic/modperl-docs/lib/DocSet/RunTime.pm,v
retrieving revision 1.3
diff -u -r1.3 RunTime.pm
--- lib/DocSet/RunTime.pm 22 Mar 2002 07:00:30 -0000 1.3
+++ lib/DocSet/RunTime.pm 29 Mar 2002 20:44:40 -0000
@@ -53,7 +53,9 @@
return HAS_STORABLE;
}
-my $html2ps_exec = `which html2ps` || '';
+# check for existence of html2ps and ps2pdf
+
+my $html2ps_exec = which('html2ps') || '';
chomp $html2ps_exec;
sub can_create_ps {
# ps2html is bundled, so we can always create PS
@@ -63,7 +65,7 @@
# can_create_pdf()
}
-my $ps2pdf_exec = `which ps2pdf` || '';
+my $ps2pdf_exec = which('ps2pdf') || '';
chomp $ps2pdf_exec;
sub can_create_pdf {
# check whether ps2pdf exists
@@ -93,9 +95,10 @@
my $rsub_skip_seen =
build_matchmany_sub(\@seen_pattern);
+ my $full_path_regex = quotemeta($full_path);
$src_docs{$rel_path} = {
map { $_ => 1 }
- map {s|$full_path/||; $_}
+ map {s|$full_path_regex/||; $_}
grep $rsub_keep_ext->($_), # get files with wanted exts
grep !$rsub_skip_seen->($_), # skip seen base dirs
@{ expand_dir($full_path) }
Index: lib/DocSet/Util.pm
===================================================================
RCS file: /home/cvspublic/modperl-docs/lib/DocSet/Util.pm,v
retrieving revision 1.6
diff -u -r1.6 Util.pm
--- lib/DocSet/Util.pm 22 Mar 2002 07:01:25 -0000 1.6
+++ lib/DocSet/Util.pm 29 Mar 2002 20:44:40 -0000
@@ -15,13 +15,15 @@
require DocSet::RunTime; # interdependency with DocSet::Util
+use constant is_win32 => $^O eq 'MSWin32';
+
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(read_file read_file_paras copy_file gzip_file write_file
create_dir filename filename_ext require_package dumper
sub_trace note get_date get_timestamp proc_tmpl
build_matchmany_sub banner should_update confess cluck
- carp format_bytes expand_dir);
+ carp format_bytes expand_dir which);
# copy_file($src_path, $dst_path);
# copy a file at $src_path to $dst_path,
@@ -272,6 +274,27 @@
return \@files;
}
+# which($short_exec_name)
+# Portable which
+# gotten from modperl-2.0/lib/Apache/Build.pm
+# and modified to take into account Win32 PATHEXT
+########################
+
+my @path_ext = ();
+if(is_win32 and $ENV{PATHEXT}) {
+ @path_ext = split ';', $ENV{PATHEXT};
+}
+
+sub which {
+ foreach (map { catfile($_, $_[0]) } path()) {
+ return $_ if -x;
+ if(is_win32 and @path_ext) { # AFAIK, Win9x doesn't have PATHEXT
+ foreach my $ext (@path_ext) {
+ return $_.$ext if -x $_.$ext;
+ }
+ }
+ }
+}
sub dumper {
print Dumper @_;
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 22:48 03.04.2002, Randy Kobes wrote:
>
>> On Wed, 3 Apr 2002, Per Einar Ellefsen wrote:
>>
>> > At 20:21 03.04.2002, Randy Kobes wrote:
>>
>> > >On Win32, for packages built using ExtUtils::MakeMaker, any file
>> > >designated as an executable script gets 'pl2bat' called on it,
>> > >which creates a .bat version.
>> >
>> > But then it gets placed into Perl\bin, right? We don't want that for
>> our
>> > bin\build, because it's just a local project convenence script...
>> Any way
>> > to circumvent placing it into Perl\bin ?
>>
>> I assume this is for the eventual CPAN distribution? Within
>> Makefile.PL, you can specify INSTALLSCRIPT (and lots of other
>> INSTALL*s) to control the locations where you want things
>> installed - see 'perldoc ExtUtils::MakeMaker' for a full listing.
>> But in overriding these defaults one should really ask the user
>> where she/he wants to put things ...
>
>
> I don't know whether Stas was talking about an eventual CPAN
> distribution; it would be surprising as I don't really see us
> distributing the site on CPAN (DocSet yes, but that's ok already).
> Anyway, your tips about INSTALL* are just what I was wonderning about.
> Thanks a lot.
The DocSet will be distributed on CPAN and it already does the right
thing with its executables.
bin/build is actually a one liner which I extended to handle the local
non-standard location of the perl libs on apache.org, so feel free to
adjust it any way you want. Documenting this issue would be just fine.
the same goes for bin/makeindex.
Per Einar, can you please send me the patch for the doc explaining how
to adjust the convenience scripts on WinFU?
BTW, once you adjust these you don't have to do it again, since cvs
won't wipe out your new files which are not under cvs control.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> I don't know whether Stas was talking about an eventual CPAN
> distribution; it would be surprising as I don't really see us
> distributing the site on CPAN
We actually may do that. The guide is currently distributed on CPAN. If
we do that we will supply Makefile.PL which will do that.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 22:48 03.04.2002, Randy Kobes wrote:
>On Wed, 3 Apr 2002, Per Einar Ellefsen wrote:
>
> > At 20:21 03.04.2002, Randy Kobes wrote:
>
> > >On Win32, for packages built using ExtUtils::MakeMaker, any file
> > >designated as an executable script gets 'pl2bat' called on it,
> > >which creates a .bat version.
> >
> > But then it gets placed into Perl\bin, right? We don't want that for our
> > bin\build, because it's just a local project convenence script... Any way
> > to circumvent placing it into Perl\bin ?
>
>I assume this is for the eventual CPAN distribution? Within
>Makefile.PL, you can specify INSTALLSCRIPT (and lots of other
>INSTALL*s) to control the locations where you want things
>installed - see 'perldoc ExtUtils::MakeMaker' for a full listing.
>But in overriding these defaults one should really ask the user
>where she/he wants to put things ...
I don't know whether Stas was talking about an eventual CPAN distribution;
it would be surprising as I don't really see us distributing the site on
CPAN (DocSet yes, but that's ok already).
Anyway, your tips about INSTALL* are just what I was wonderning about.
Thanks a lot.
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 3 Apr 2002, Per Einar Ellefsen wrote:
> At 20:21 03.04.2002, Randy Kobes wrote:
> >On Win32, for packages built using ExtUtils::MakeMaker, any file
> >designated as an executable script gets 'pl2bat' called on it,
> >which creates a .bat version.
>
> But then it gets placed into Perl\bin, right? We don't want that for our
> bin\build, because it's just a local project convenence script... Any way
> to circumvent placing it into Perl\bin ?
I assume this is for the eventual CPAN distribution? Within
Makefile.PL, you can specify INSTALLSCRIPT (and lots of other
INSTALL*s) to control the locations where you want things
installed - see 'perldoc ExtUtils::MakeMaker' for a full listing.
But in overriding these defaults one should really ask the user
where she/he wants to put things ...
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 20:21 03.04.2002, Randy Kobes wrote:
>On Wed, 3 Apr 2002, Stas Bekman wrote:
>
> > Per Einar Ellefsen wrote:
>[ .. ]
> >
> > > I think that's it.
> > > For bin/build to work correctly, there must also be .bat versions of
> > > build and docset_build. I'm not sure about how to handle this in a
> > > general way, maybe the bat files should be integrated into CVS or
> > > something? I need some tips on that.
> >
> > How other cross-platform packages that install binaries handle this?
>
>On Win32, for packages built using ExtUtils::MakeMaker, any file
>designated as an executable script gets 'pl2bat' called on it,
>which creates a .bat version.
But then it gets placed into Perl\bin, right? We don't want that for our
bin\build, because it's just a local project convenence script... Any way
to circumvent placing it into Perl\bin ?
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Wed, 3 Apr 2002, Stas Bekman wrote:
> Per Einar Ellefsen wrote:
[ .. ]
>
> > I think that's it.
> > For bin/build to work correctly, there must also be .bat versions of
> > build and docset_build. I'm not sure about how to handle this in a
> > general way, maybe the bat files should be integrated into CVS or
> > something? I need some tips on that.
>
> How other cross-platform packages that install binaries handle this?
On Win32, for packages built using ExtUtils::MakeMaker, any file
designated as an executable script gets 'pl2bat' called on it,
which creates a .bat version.
best regards,
randy kobes
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 19:19 04.04.2002, Stas Bekman wrote:
>>Looking at the -v output, it seems to be getting this error when
>>generating the netcraft page. So it has something to do with images
>>(that's what I was thinking: ppm is an image format). I have the netpbm
>>package installed, which I suppose html2ps calls when converting images
>>for use with the PS version.
>
>yes, that's probably it. Feel free to report the problem to the author of
>html2ps :)
And who is that ?
# This package was last seen at http://www.tdb.uu.se/~jan/html2ps.html.
# The software wasn't developed anymore, none of my patches were accepted
# therefore I've forked it and add all the patches to this version.
I guess I've come to the right place :)
(seems that W3C use a patched version too)
>>So... now I just need to find the reason for this error. Maybe sometime
>>after my vacation. In the meantime, it's not a problem, as a PDF version
>>of the Netcraft stats isn't that important.
>
>Good. But in the future I hope that we will have more images and graphs in
>our docs, so eventually it should work.
Sure..
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 14:26 03.04.2002, Stas Bekman wrote:
>
>> Per Einar Ellefsen wrote:
>>
>>>> > For the PDF version, it all seems to have been build correctly, but
>>>> > after a loong wait (it takes a long time, even on a pretty decent
>>>> > computer here, but I guess that's normal), I get the following
>>>> errors:
>>>> > Invalid Parameter - \svs..ppm
>>>> > Output file write error --- out of disk space?
>>>> > Invalid Parameter - \sds..ppm
>>>> > Output file write error --- out of disk space?
>>>> > Invalid Parameter - \sr0..ppm
>>>> > Invalid Parameter - \sr0..ppm
>>>> > Invalid Parameter - \sr0..ppm
>>>> > Invalid Parameter - \sr0..ppm
>>>> > Invalid Parameter - \su0..ppm
>>>> > Invalid Parameter - \su0..ppm
>>>> > Invalid Parameter - \su0..ppm
>>>> > Invalid Parameter - \su0..ppm
>>>> >
>>>> > Does anyone know where this is coming from? I don't have the guts
>>>> to try
>>>> > and debug it now. Please tell me if you know where it's coming from
>>>> > (DocSet or Ghostscript?)
>>>>
>>>> what's ppm? is it the perl package manager?
>>>>
>>>> what operations do you get these errors from? you should see it by
>>>> building in the verbose more (-v)
>>>
>>>
>>> No, the Perl Package Manager shouldn't be involved here. This is
>>> during the PDF generation.
>>> I'll try to look up where the error is coming from, but the problem
>>> is that the build takes an aweful lot of time, and has a tendency of
>>> crashing my computer if I don't follow slosely on what it's doing.
>>
>>
>> there are two stages in creating a pdf. html => ps => pdf. Which stage
>> does it fail at?
>>
>> You don't have to rebuild the whole thing just to test something.
>> Simly adjust the timestamp of the file and then rebuild without -f. I
>> always something like this:
>>
>> % touch src/download/binaries.pod && bin/build
>>
>> or if I want the pdf, I add the -f flag
>
>
> Looking at the -v output, it seems to be getting this error when
> generating the netcraft page. So it has something to do with images
> (that's what I was thinking: ppm is an image format). I have the netpbm
> package installed, which I suppose html2ps calls when converting images
> for use with the PS version.
yes, that's probably it. Feel free to report the problem to the author
of html2ps :)
> So... now I just need to find the reason for this error. Maybe sometime
> after my vacation. In the meantime, it's not a problem, as a PDF
> version of the Netcraft stats isn't that important.
Good. But in the future I hope that we will have more images and graphs
in our docs, so eventually it should work.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 14:26 03.04.2002, Stas Bekman wrote:
>Per Einar Ellefsen wrote:
>>> > For the PDF version, it all seems to have been build correctly, but
>>> > after a loong wait (it takes a long time, even on a pretty decent
>>> > computer here, but I guess that's normal), I get the following errors:
>>> > Invalid Parameter - \svs..ppm
>>> > Output file write error --- out of disk space?
>>> > Invalid Parameter - \sds..ppm
>>> > Output file write error --- out of disk space?
>>> > Invalid Parameter - \sr0..ppm
>>> > Invalid Parameter - \sr0..ppm
>>> > Invalid Parameter - \sr0..ppm
>>> > Invalid Parameter - \sr0..ppm
>>> > Invalid Parameter - \su0..ppm
>>> > Invalid Parameter - \su0..ppm
>>> > Invalid Parameter - \su0..ppm
>>> > Invalid Parameter - \su0..ppm
>>> >
>>> > Does anyone know where this is coming from? I don't have the guts to try
>>> > and debug it now. Please tell me if you know where it's coming from
>>> > (DocSet or Ghostscript?)
>>>
>>>what's ppm? is it the perl package manager?
>>>
>>>what operations do you get these errors from? you should see it by
>>>building in the verbose more (-v)
>>
>>No, the Perl Package Manager shouldn't be involved here. This is during
>>the PDF generation.
>>I'll try to look up where the error is coming from, but the problem is
>>that the build takes an aweful lot of time, and has a tendency of
>>crashing my computer if I don't follow slosely on what it's doing.
>
>there are two stages in creating a pdf. html => ps => pdf. Which stage
>does it fail at?
>
>You don't have to rebuild the whole thing just to test something.
>Simly adjust the timestamp of the file and then rebuild without -f. I
>always something like this:
>
>% touch src/download/binaries.pod && bin/build
>
>or if I want the pdf, I add the -f flag
Looking at the -v output, it seems to be getting this error when generating
the netcraft page. So it has something to do with images (that's what I
was thinking: ppm is an image format). I have the netpbm package installed,
which I suppose html2ps calls when converting images for use with the PS
version.
So... now I just need to find the reason for this error. Maybe sometime
after my vacation. In the meantime, it's not a problem, as a PDF version
of the Netcraft stats isn't that important.
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 09:23 03.04.2002, Stas Bekman wrote:
>
>> Per Einar Ellefsen wrote:
>> > - replaced call to `which` with a portable which function in
>> > DocSet::Util (taken from Apache::Build in modperl-2.0 and made to use
>> > the PATHEXT env variable on WinNT: I can re-submit this one into the
>> > modperl-2.0 tree if you think that'll be useful, it finds the
>> specified
>> > file terminated by .exe, .bat, etc..
>>
>> Better yet release it on CPAN. I'm sure other people will find this very
>> useful.
>
>
> Yes, I was thinking about that. I'll package it up. Any idea on how to
> get a CPAN ID quickly?
I don't think it takes long, just follow the steps in the PAUSE CPAN doc
Also check that somebody hasn't already implemented this.
Me thinking that this may belong to the core functionality so you may
want to run this through p5p as well.
>> > - changed some things before calling URI in DocSet::Doc; it not, the
>> > directory name would be considered part of the host name and thus not
>> > tried to be opened. So I replaced \ with /, as that'll open the file
>> > correctly.
>>
>> Well, I may scratch the use of URI altogether. I've simply planned to be
>> able to handle any URI as a source, but currently only file paths are
>> used. For now your patch is fine.
>
>
> URI might be useful if someone thinks my idea of adding Apache module
> documentation might be useful :) We could then fecth pod sources
> remotely from.... (fill the blank, I'm not so sure)
True, we may do this in the future. Need to have a reliable source
though. For now I've added a link to perldoc.com.
>> > I think that's it.
>> > For bin/build to work correctly, there must also be .bat versions of
>> > build and docset_build. I'm not sure about how to handle this in a
>> > general way, maybe the bat files should be integrated into CVS or
>> > something? I need some tips on that.
>>
>> How other cross-platform packages that install binaries handle this?
>
>
> Well, the scripts from the DocSet distribution, html2ps and
> docset_build, get installed correctly into the Perl binary dir when make
> install is run.
> However, no makefile is run when extracting the site repository from
> CVS, so we can't automate it. I think the best thing to do would be to
> simply add a line to the Readme:
>
> To be able to run bin/build and bin/docset_build under Win32, you'll
> have to go through the following steps (being placed in the modperl-docs
> base directory):
> cd bin
> pl2bat build
> pl2bat docset_build
>
> Now, being placed in your base directory, you can execute "bin\build"
> with any normal options. Make sure to redo the above steps if build or
> docset_build are changed in CVS.
or we can add a Makefile.PL to do the work for the users. The question
is where make install should install things.
For now I think an INSTALL doc will do, later if we use Makefile.PL for
other things we may integrate this too.
After all bin/build is already a convenience script
> (is makeindex used? If so you need to add makeindex each time).
yes, it's used to create an index for the search.
>> > For the PDF version, it all seems to have been build correctly, but
>> > after a loong wait (it takes a long time, even on a pretty decent
>> > computer here, but I guess that's normal), I get the following
>> errors:
>> > Invalid Parameter - \svs..ppm
>> > Output file write error --- out of disk space?
>> > Invalid Parameter - \sds..ppm
>> > Output file write error --- out of disk space?
>> > Invalid Parameter - \sr0..ppm
>> > Invalid Parameter - \sr0..ppm
>> > Invalid Parameter - \sr0..ppm
>> > Invalid Parameter - \sr0..ppm
>> > Invalid Parameter - \su0..ppm
>> > Invalid Parameter - \su0..ppm
>> > Invalid Parameter - \su0..ppm
>> > Invalid Parameter - \su0..ppm
>> >
>> > Does anyone know where this is coming from? I don't have the guts
>> to try
>> > and debug it now. Please tell me if you know where it's coming from
>> > (DocSet or Ghostscript?)
>>
>> what's ppm? is it the perl package manager?
>>
>> what operations do you get these errors from? you should see it by
>> building in the verbose more (-v)
>
>
> No, the Perl Package Manager shouldn't be involved here. This is during
> the PDF generation.
> I'll try to look up where the error is coming from, but the problem is
> that the build takes an aweful lot of time, and has a tendency of
> crashing my computer if I don't follow slosely on what it's doing.
there are two stages in creating a pdf. html => ps => pdf. Which stage
does it fail at?
You don't have to rebuild the whole thing just to test something.
Simly adjust the timestamp of the file and then rebuild without -f. I
always something like this:
% touch src/download/binaries.pod && bin/build
or if I want the pdf, I add the -f flag
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 09:23 03.04.2002, Stas Bekman wrote:
>Per Einar Ellefsen wrote:
> > - replaced call to `which` with a portable which function in
> > DocSet::Util (taken from Apache::Build in modperl-2.0 and made to use
> > the PATHEXT env variable on WinNT: I can re-submit this one into the
> > modperl-2.0 tree if you think that'll be useful, it finds the specified
> > file terminated by .exe, .bat, etc..
>
>Better yet release it on CPAN. I'm sure other people will find this very
>useful.
Yes, I was thinking about that. I'll package it up. Any idea on how to get
a CPAN ID quickly?
>simply adding \Q to the beginning of a regex is just fine, unless it has
>to be run in the big loop, where doing quotemeta once is faster.
I of course noticed that *after* having added them all.
> > - changed some things before calling URI in DocSet::Doc; it not, the
> > directory name would be considered part of the host name and thus not
> > tried to be opened. So I replaced \ with /, as that'll open the file
> > correctly.
>
>Well, I may scratch the use of URI altogether. I've simply planned to be
>able to handle any URI as a source, but currently only file paths are
>used. For now your patch is fine.
URI might be useful if someone thinks my idea of adding Apache module
documentation might be useful :) We could then fecth pod sources remotely
from.... (fill the blank, I'm not so sure)
> > I think that's it.
> > For bin/build to work correctly, there must also be .bat versions of
> > build and docset_build. I'm not sure about how to handle this in a
> > general way, maybe the bat files should be integrated into CVS or
> > something? I need some tips on that.
>
>How other cross-platform packages that install binaries handle this?
Well, the scripts from the DocSet distribution, html2ps and docset_build,
get installed correctly into the Perl binary dir when make install is run.
However, no makefile is run when extracting the site repository from CVS,
so we can't automate it. I think the best thing to do would be to simply
add a line to the Readme:
To be able to run bin/build and bin/docset_build under Win32, you'll have
to go through the following steps (being placed in the modperl-docs base
directory):
cd bin
pl2bat build
pl2bat docset_build
Now, being placed in your base directory, you can execute "bin\build" with
any normal options. Make sure to redo the above steps if build or
docset_build are changed in CVS.
(is makeindex used? If so you need to add makeindex each time).
> > Furthermore, there was a problem with html2ps: it begins with a line
>saying
> > : # Use Perl
> > When converting it to .bat (as it is when it's installed into perl/bin),
> > that colon is a problem. It should be removed.
>
>is this ok?
>
>#!perl
>eval 'exec perl -S $0 "$@"'
> if $running_under_some_shell;
No problem. It never gets interpreted by the Win32 shell anyway, and Perl
ignores it. So it can stay.
> > For the PDF version, it all seems to have been build correctly, but
> > after a loong wait (it takes a long time, even on a pretty decent
> > computer here, but I guess that's normal), I get the following errors:
> > Invalid Parameter - \svs..ppm
> > Output file write error --- out of disk space?
> > Invalid Parameter - \sds..ppm
> > Output file write error --- out of disk space?
> > Invalid Parameter - \sr0..ppm
> > Invalid Parameter - \sr0..ppm
> > Invalid Parameter - \sr0..ppm
> > Invalid Parameter - \sr0..ppm
> > Invalid Parameter - \su0..ppm
> > Invalid Parameter - \su0..ppm
> > Invalid Parameter - \su0..ppm
> > Invalid Parameter - \su0..ppm
> >
> > Does anyone know where this is coming from? I don't have the guts to try
> > and debug it now. Please tell me if you know where it's coming from
> > (DocSet or Ghostscript?)
>
>what's ppm? is it the perl package manager?
>
>what operations do you get these errors from? you should see it by
>building in the verbose more (-v)
No, the Perl Package Manager shouldn't be involved here. This is during the
PDF generation.
I'll try to look up where the error is coming from, but the problem is that
the build takes an aweful lot of time, and has a tendency of crashing my
computer if I don't follow slosely on what it's doing.
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [PATCH] DocSet on Win32
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
>
> Hello everyone,
>
> Well, I got DocSet ported to Win32. It wasn't such a big task
> afterwards.
:)
What was changed:
> - replaced call to `which` with a portable which function in
> DocSet::Util (taken from Apache::Build in modperl-2.0 and made to use
> the PATHEXT env variable on WinNT: I can re-submit this one into the
> modperl-2.0 tree if you think that'll be useful, it finds the specified
> file terminated by .exe, .bat, etc..
Better yet release it on CPAN. I'm sure other people will find this very
useful.
> - use perl %ENV instead of `env` to set PERL5LIB whenh calling
docset_build
cool!
> - had to replace all regexes that used a directory/file path, and use
> quotemeta() there, because the backslahes created illegal escape
sequences.
simply adding \Q to the beginning of a regex is just fine, unless it has
to be run in the big loop, where doing quotemeta once is faster.
> - changed some things before calling URI in DocSet::Doc; it not, the
> directory name would be considered part of the host name and thus not
> tried to be opened. So I replaced \ with /, as that'll open the file
> correctly.
Well, I may scratch the use of URI altogether. I've simply planned to be
able to handle any URI as a source, but currently only file paths are
used. For now your patch is fine.
> I think that's it.
> For bin/build to work correctly, there must also be .bat versions of
> build and docset_build. I'm not sure about how to handle this in a
> general way, maybe the bat files should be integrated into CVS or
> something? I need some tips on that.
How other cross-platform packages that install binaries handle this?
> Furthermore, there was a problem with html2ps: it begins with a line
saying
> : # Use Perl
> When converting it to .bat (as it is when it's installed into perl/bin),
> that colon is a problem. It should be removed.
is this ok?
#!perl
eval 'exec perl -S $0 "$@"'
if $running_under_some_shell;
> For the PDF version, it all seems to have been build correctly, but
> after a loong wait (it takes a long time, even on a pretty decent
> computer here, but I guess that's normal), I get the following errors:
> Invalid Parameter - \svs..ppm
> Output file write error --- out of disk space?
> Invalid Parameter - \sds..ppm
> Output file write error --- out of disk space?
> Invalid Parameter - \sr0..ppm
> Invalid Parameter - \sr0..ppm
> Invalid Parameter - \sr0..ppm
> Invalid Parameter - \sr0..ppm
> Invalid Parameter - \su0..ppm
> Invalid Parameter - \su0..ppm
> Invalid Parameter - \su0..ppm
> Invalid Parameter - \su0..ppm
>
> Does anyone know where this is coming from? I don't have the guts to try
> and debug it now. Please tell me if you know where it's coming from
> (DocSet or Ghostscript?)
what's ppm? is it the perl package manager?
what operations do you get these errors from? you should see it by
building in the verbose more (-v)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org