/** * */ private function _buildProject() { // if (!$this->ProjectDirectory->loadSetting($this->ProjectInfo, 0)) { return; } $package = new PEAR_PackageProjector_Package(); $oldcwd = getcwd(); $handler = PEAR_PackageProjector::singleton()->getMessageHandler(); // try { chdir($this->ProjectDirectory->getSrcPath()); /* * Create package2.xml */ $handler->buildMessage(5, "*** Create package2.xml ***", true); // $package->accept($this->ProjectDirectory->getPackageDirectory()); $package->accept($this->ProjectInfo); $package->build(); $handler->buildMessage(5, "", true); /* * Create Tgz */ $handler->buildMessage(5, "*** Create Tgz File ***", true); // chdir($this->ProjectDirectory->getRelasePath()); $pkg = new PEAR_PackageProjector_Packager(); $pkg->setMessageHandler($handler); $pkg->package($this->ProjectDirectory->getPackageFile()); $handler->buildMessage(5, "", true); } catch (Exception $e) { chdir($oldcwd); $handler->buildMessage(5, "\n*** Stop for the exception was generated. ***", true); throw $e; } $handler->buildMessage(5, "*** Finish ***", true); // chdir($oldcwd); // return true; }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { foreach ($this->roles as $num => $value) { $package->accept($value); } }
/** * */ public function visit(PEAR_PackageProjector_Package $package) { // foreach ($this->items as $key => $item) { $package->accept($item); } // $package->accept($this->Roles); $package->accept($this->Maintainers); $package->accept($this->AttributeManager); $package->accept($this->Dependencies); $package->accept($this->InstallGroups); }