rquadling Thu Jan 25 16:55:12 2007 UTC
Modified files:
/phpdoc/htmlhelp filter_files.php
Log:
Force images to be included into the CHM compiler process.
http://cvs.php.net/viewvc.cgi/phpdoc/htmlhelp/filter_files.php?r1=1.18&r2=1.19&diff_format=u
Index: phpdoc/htmlhelp/filter_files.php
diff -u phpdoc/htmlhelp/filter_files.php:1.18
phpdoc/htmlhelp/filter_files.php:1.19
--- phpdoc/htmlhelp/filter_files.php:1.18 Thu Jul 6 19:49:32 2006
+++ phpdoc/htmlhelp/filter_files.php Thu Jan 25 16:55:11 2007
@@ -1,4 +1,4 @@
-<?php // $Id: filter_files.php,v 1.18 2006/07/06 19:49:32 nlopess Exp $
+<?php // $Id: filter_files.php,v 1.19 2007/01/25 16:55:11 rquadling Exp $
/*
This file is part of the Windows Compiled HTML Help
@@ -44,6 +44,10 @@
}
closedir($handle);
+ // Copy all the images to the target directory
+ exec("mkdir $HTML_TARGET\\figures");
+ exec("copy $HTML_SRC\\figures $HTML_TARGET\\figures /Y");
+
// Copy all supplemental files to the target directory
exec("copy suppfiles\\html $HTML_TARGET /Y");
@@ -83,10 +87,18 @@
}
$supp_files .= $delim."_index.html";
- // Insert [MERGE] section and supplemental files
+ // Build list of figures
+ $d = dir("$HTML_TARGET/figures");
+ $figure_files = "";
+ while (false !== ($entry = $d->read())) {
+ if ($entry != "." && $entry != ".." && !is_dir($entry))
+ $figure_files .= $delim.'figures\\'.$entry;
+ }
+
+ // Insert [MERGE] section, figures and supplemental files
$php_hhp = preg_replace(
"|\[FILES\]((\W+)\w)|i",
- "[MERGE FILES]$2php_manual_notes.chm$2$2[FILES]$supp_files$1",
+ "[MERGE
FILES]$2php_manual_notes.chm$2$2[FILES]$figure_files$supp_files$1",
$php_hhp);
$fp = fopen($hhp_file, "w");
fwrite($fp, $php_hhp);