diff options
author | wei <> | 2006-02-15 07:44:51 +0000 |
---|---|---|
committer | wei <> | 2006-02-15 07:44:51 +0000 |
commit | 6e29b055b3cbc2a46e29075608c7e82a328d5270 (patch) | |
tree | 13a197ad850f360125a96f5de83f1742a12e98ad /buildscripts/texbuilder/build.php | |
parent | d653bda6c6217f160a4de77e3f2f0ee62096be67 (diff) |
Adding new TRatingList component.
Diffstat (limited to 'buildscripts/texbuilder/build.php')
-rw-r--r-- | buildscripts/texbuilder/build.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/buildscripts/texbuilder/build.php b/buildscripts/texbuilder/build.php index ae264843..5149b879 100644 --- a/buildscripts/texbuilder/build.php +++ b/buildscripts/texbuilder/build.php @@ -1,4 +1,9 @@ <?php
+$pdflatexExec = "C:/Wei/miktex/texmf/MiKTeX/bin/pdflatex.exe";
+$pdfTex = "$pdflatexExec -interaction=nonstopmode -max-print-line=120 %s";
+
+$mainTexFile = dirname(__FILE__).'/prado3_quick_start.tex';
+
//page root location
$base = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/pages/');
@@ -225,6 +230,7 @@ function get_section_label($section) //--------------- BEGIN PROCESSING -------------------
+// ---------------- Create the Tex files ---------
$count = 1;
$current_path = '';
echo "Compiling .page files to Latex files\n\n";
@@ -248,9 +254,28 @@ foreach($pages as $chapter => $sections) echo "\n";
}
-if($count > 1)
+
+if($argc <= 1 && $count > 1)
{
echo "** Use pdftex to compile prado3_quick_start.tex to obtain PDF version of quickstart tutorial. **\n";
+ exit;
+}
+if($argv[1] == 'pdf')
+{
+ if(is_file($pdflatexExec))
+ {
+ //build pdfTex
+ $command=sprintf($pdfTex,$mainTexFile);
+ system($command);
+ system($command); //run it twice
+
+ echo "\n\n** PDF file prado3_quick_start.pdf created **\n\n";
+
+ }
+ else
+ {
+ echo " Unable to find pdfLatex executable $pdflatexExec";
+ }
}
|