home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / createPhpDocumentor_package.xml.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  3.7 KB  |  119 lines

  1. <?php
  2. /**
  3.  * A complex example
  4.  * @package PEAR_PackageFileManager
  5.  */
  6. /**
  7.  * Include the package file manager
  8.  */
  9. require_once('PEAR/PackageFileManager.php');
  10. $test = new PEAR_PackageFileManager;
  11.  
  12. // directory that phpDocumentor 1.2.2 CVS is located in
  13. $packagedir = 'C:/Web Pages/chiara/phpdoc';
  14.  
  15. $e = $test->setOptions(
  16. array('baseinstalldir' => 'PhpDocumentor',
  17. 'version' => '1.2.2',
  18. 'packagedirectory' => $packagedir,
  19. 'state' => 'stable',
  20. 'filelistgenerator' => 'cvs',
  21. 'notes' => 'Bugfix release
  22.  
  23. - DocBook/peardoc2 converter outputs valid DocBook
  24. - fixed Page-Level DocBlock issues, now a page-level
  25.   docblock is the first docblock in a file if it contains
  26.   a @package tag, UNLESS the next element is a class.  Warnings
  27.   raised are much more informative
  28. - removed erroneous warning of duplicate @package tag in certain cases
  29. - fixed these bugs:
  30.  [ 765455 ] phpdoc can\'t find php if it is in /usr/local/bin
  31.  [ 767251 ] broken links when no files in default package
  32.  [ 768947 ] Multiple vars not recognised
  33.  [ 772441 ] nested arrays fail parser
  34. ',
  35. 'package' => 'PhpDocumentor',
  36. 'dir_roles' => array('Documentation' => 'doc', 'Documentation/tests' => 'test'),
  37. 'exceptions' =>
  38.     array(
  39.         'index.html' => 'php',
  40.         'docbuilder/index.html' => 'php',
  41.         'docbuilder/blank.html' => 'php',
  42.         'README' => 'doc',
  43.         'ChangeLog' => 'doc',
  44.         'PHPLICENSE.txt' => 'doc',
  45.         'poweredbyphpdoc.gif' => 'data',
  46.         'INSTALL' => 'doc',
  47.         'FAQ' => 'doc',
  48.         'Authors' => 'doc',
  49.         'Release-1.2.0beta1' => 'doc',
  50.         'Release-1.2.0beta2' => 'doc',
  51.         'Release-1.2.0beta3' => 'doc',
  52.         'Release-1.2.0rc1' => 'doc',
  53.         'Release-1.2.0rc2' => 'doc',
  54.         'Release-1.2.0' => 'doc',
  55.         'Release-1.2.1' => 'doc',
  56.         'Release-1.2.2' => 'doc',
  57.         'pear-phpdoc' => 'script',
  58.         'pear-phpdoc.bat' => 'script',
  59.         ),
  60. 'ignore' => array('package.xml', "$packagedir/phpdoc", 'phpdoc.bat', 'LICENSE'),
  61. 'installas' => array('pear-phpdoc' => 'phpdoc', 'pear-phpdoc.bat' => 'phpdoc.bat'),
  62. 'installexceptions' => array('pear-phpdoc' => '/', 'pear-phpdoc.bat' => '/', 'scripts/makedoc.sh' => '/'),
  63. ));
  64. if (PEAR::isError($e)) {
  65.     echo $e->getMessage();
  66.     exit;
  67. }
  68. $e = $test->addPlatformException('pear-phpdoc', '(*ix|*ux)');
  69. if (PEAR::isError($e)) {
  70.     echo $e->getMessage();
  71.     exit;
  72. }
  73. $e = $test->addPlatformException('pear-phpdoc.bat', 'windows');
  74. if (PEAR::isError($e)) {
  75.     echo $e->getMessage();
  76.     exit;
  77. }
  78. $e = $test->addDependency('php', '4.1.0', 'ge', 'php');
  79. if (PEAR::isError($e)) {
  80.     echo $e->getMessage();
  81.     exit;
  82. }
  83. // replace @PHP-BIN@ in this file with the path to php executable!  pretty neat
  84. $e = $test->addReplacement('pear-phpdoc', 'pear-config', '@PHP-BIN@', 'php_bin');
  85. if (PEAR::isError($e)) {
  86.     echo $e->getMessage();
  87.     exit;
  88. }
  89. $e = $test->addReplacement('pear-phpdoc.bat', 'pear-config', '@PHP-BIN@', 'php_bin');
  90. if (PEAR::isError($e)) {
  91.     echo $e->getMessage();
  92.     exit;
  93. }
  94. // hack until they get their shit in line with docroot role
  95. $test->addRole('tpl', 'php');
  96. $test->addRole('png', 'php');
  97. $test->addRole('gif', 'php');
  98. $test->addRole('jpg', 'php');
  99. $test->addRole('css', 'php');
  100. $test->addRole('js', 'php');
  101. $test->addRole('ini', 'php');
  102. $test->addRole('inc', 'php');
  103. $test->addRole('afm', 'php');
  104. $test->addRole('pkg', 'doc');
  105. $test->addRole('cls', 'doc');
  106. $test->addRole('proc', 'doc');
  107. $test->addRole('sh', 'script');
  108. if (isset($_GET['make'])) {
  109.     $e = $test->writePackageFile();
  110. } else {
  111.     $e = $test->debugPackageFile();
  112. }
  113. if (PEAR::isError($e)) {
  114.     echo $e->getMessage();
  115. }
  116. if (!isset($_GET['make'])) {
  117.     echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>';
  118. }
  119. ?>