cvs: peardoc /scripts pearwebbuild.php

From: Date: Sun, 22 Feb 2009 11:11:30 +0000
Subject: cvs: peardoc /scripts pearwebbuild.php
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-11571@lists.php.net to get a copy of this message
cweiske Sun Feb 22 11:11:30 2009 UTC Modified files: /peardoc/scripts pearwebbuild.php Log: Build chm when parameter is set http://cvs.php.net/viewvc.cgi/peardoc/scripts/pearwebbuild.php?r1=1.15&r2=1.16&diff_format=u Index: peardoc/scripts/pearwebbuild.php diff -u peardoc/scripts/pearwebbuild.php:1.15 peardoc/scripts/pearwebbuild.php:1.16 --- peardoc/scripts/pearwebbuild.php:1.15 Wed Jan 28 22:43:50 2009 +++ peardoc/scripts/pearwebbuild.php Sun Feb 22 11:11:30 2009 @@ -22,7 +22,7 @@ require_once 'Console/CommandLine.php'; $parser = new Console_CommandLine(); $parser->description = 'Builds the full manual'; -$parser->version = '$Id: pearwebbuild.php,v 1.15 2009/01/28 22:43:50 cweiske Exp $'; +$parser->version = '$Id: pearwebbuild.php,v 1.16 2009/02/22 11:11:30 cweiske Exp $'; $parser->addOption('updatecvs', array( 'long_name' => '--updatecvs', 'description' => 'Update peardoc from CVS', @@ -43,6 +43,11 @@ 'description' => 'Directory to copy the downloadable manuals to', 'action' => 'StoreString' )); +$parser->addOption('hhc', array( + 'long_name' => '--htmlhelpcompiler', + 'description' => 'Full path to HTML Help compiler executable', + 'action' => 'StoreString' +)); try { $cmdline = $parser->parse(); @@ -92,10 +97,11 @@ logAndEcho("Now running phd for $lang"); //bightml - logAndEcho(' Rendering and bzipping pearbightml downloadable file'); - shell_exec("$phd_executable -f xhtml -t pearbightml -o build/$lang -d .manual.xml" . $tobuildlog); + logAndEcho(' Rendering all pear themes'); + shell_exec("$phd_executable -f xhtml -t pear -o build/$lang -d .manual.xml" . $tobuildlog); // bzip2 + logAndEcho(' Bzipping pearbightml downloadable file'); passthru('bzip2' . ' ' . escapeshellarg("build/$lang/pear_manual_en.html") . ' --stdout' @@ -119,8 +125,7 @@ ); //chunkedhtml - logAndEcho(' Rendering and bzipping pearchunked downloadable zip'); - shell_exec("$phd_executable -f xhtml -t pearchunkedhtml -o build/$lang -d .manual.xml" . $tobuildlog); + logAndEcho(' Bzipping pearchunked downloadable zip'); // tar.bz2 passthru( @@ -147,10 +152,6 @@ . $tobuildlog ); - //pearweb - shell_exec("$phd_executable -f xhtml -t pearweb -o build/$lang -d .manual.xml" . $tobuildlog); - - //pearweb package tocs if ($lang == 'en') { logAndEcho("Building pearweb package tocs"); @@ -168,19 +169,28 @@ mkdir($cmdline->options['phpdir'], 0755, true); } shell_exec("mv build/$lang/php " . escapeshellarg($phplangdir) . $tobuildlog); - + //move packagetoc over, too if (file_exists("build/$lang/packagetocs")) { shell_exec("mv build/$lang/packagetocs " . escapeshellarg($phplangdir . '/packagetocs/') . $tobuildlog); } } + if ($cmdline->options['hhc']) { + passthru( + "cd build/$lang/chm && " + . $cmdline->options['hhc'] + . ' pear_manual_' . $lang . '.hhp' + . $tobuildlog + ); + } + // move compressed downloadable files to downloaddir if ($cmdline->options['downloaddir'] !== null) { if (is_writeable($cmdline->options['downloaddir'])) { - logAndEcho(' Moving downloadable file to ' + logAndEcho(' Moving downloadable file to ' . escapeshellarg($cmdline->options['downloaddir'])); - shell_exec('mv' + shell_exec('mv' . ' ' . escapeshellarg("build/$lang/pear_manual_$lang.html.bz2") . ' ' . escapeshellarg("build/$lang/pear_manual_$lang.html.gz") . ' ' . escapeshellarg("build/$lang/pear_manual_$lang.html.zip")

« previous php.pear.doc (#11571) next »