src/Tasks/Build/Package.php
private function createInstaller()
	{
		$this->say("Creating package installer");

		// Copy XML and script.php
		$sourceFolder = $this->getSourceFolder() . "/administrator/manifests/packages";
		$targetFolder = $this->getBuildFolder() . "/administrator/manifests/packages";
		$xmlFile      = $targetFolder . "/pkg_" . $this->getExtensionName() . ".xml";
		$scriptFile   = $targetFolder . "/" . $this->getExtensionName() . "/script.php";

		$this->_copy($sourceFolder . "/pkg_" . $this->getExtensionName() . ".xml", $xmlFile);

		// Version & Date Replace
		$this->taskReplaceInFile($xmlFile)
			->from(array('##DATE##', '##YEAR##', '##VERSION##'))
			->to(array($this->getDate(), date('Y'), $this->getJConfig()->version))
			->run();

		if (is_file($sourceFolder . "/" . $this->getExtensionName() . "/script.php"))
		{
			$this->_copy($sourceFolder . "/" . $this->getExtensionName() . "/script.php", $scriptFile);

			$this->taskReplaceInFile($scriptFile)
				->from(array('##DATE##', '##YEAR##', '##VERSION##'))
				->to(array($this->getDate(), date('Y'), $this->getJConfig()->version))
				->run();
		}

		// Language files
		$f = $this->generateLanguageFileList($this->getFiles('frontendLanguage'));

		$this->taskReplaceInFile($xmlFile)
			->from('##LANGUAGE_FILES##')
			->to($f)
			->run();
	}
private function createInstaller()
	{
		$this->say("Creating package installer");

		// Copy XML and script.php
		$sourceFolder = $this->getSourceFolder() . "/administrator/manifests/packages";
		$targetFolder = $this->getBuildFolder() . "/administrator/manifests/packages";
		$xmlFile      = $targetFolder . "/pkg_" . $this->getExtensionName() . ".xml";
		$scriptFile   = $targetFolder . "/" . $this->getExtensionName() . "/script.php";

		$this->_copy($sourceFolder . "/pkg_" . $this->getExtensionName() . ".xml", $xmlFile);

		// Version & Date Replace
		$this->taskReplaceInFile($xmlFile)
			->from(array('##DATE##', '##YEAR##', '##VERSION##'))
			->to(array($this->getDate(), date('Y'), $this->getJConfig()->version))
			->run();

		if (is_file($sourceFolder . "/" . $this->getExtensionName() . "/script.php"))
		{
			$this->_copy($sourceFolder . "/" . $this->getExtensionName() . "/script.php", $scriptFile);

			$this->taskReplaceInFile($scriptFile)
				->from(array('##DATE##', '##YEAR##', '##VERSION##'))
				->to(array($this->getDate(), date('Y'), $this->getJConfig()->version))
				->run();
		}

		// Language files
		$f = $this->generateLanguageFileList($this->getFiles('frontendLanguage'));

		$this->taskReplaceInFile($xmlFile)
			->from('##LANGUAGE_FILES##')
			->to($f)
			->run();
	}
private function createInstaller ( ) { $ this -> say ( "Creating package installer" ) ; // Copy XML and script.php $ sourceFolder = $ this -> getSourceFolder ( ) . "/administrator/manifests/packages" ; $ targetFolder = $ this -> getBuildFolder ( ) . "/administrator/manifests/packages" ; $ xmlFile = $ targetFolder . "/pkg_" . $ this -> getExtensionName ( ) . ".xml" ; $ scriptFile = $ targetFolder . "/" . $ this -> getExtensionName ( ) . "/script.php" ; $ this -> _copy ( $ sourceFolder . "/pkg_" . $ this -> getExtensionName ( ) . ".xml" , $ xmlFile ) ; // Version & Date Replace $ this -> taskReplaceInFile ( $ xmlFile ) -> from ( array ( '##DATE##' , '##YEAR##' , '##VERSION##' ) ) -> to ( array ( $ this -> getDate ( ) , date ( 'Y' ) , $ this -> getJConfig ( ) -> version ) ) -> run ( ) ; if ( is_file ( $ sourceFolder . "/" . $ this -> getExtensionName ( ) . "/script.php" ) ) { $ this -> _copy ( $ sourceFolder . "/" . $ this -> getExtensionName ( ) . "/script.php" , $ scriptFile ) ; $ this -> taskReplaceInFile ( $ scriptFile ) -> from ( array ( '##DATE##' , '##YEAR##' , '##VERSION##' ) ) -> to ( array ( $ this -> getDate ( ) , date ( 'Y' ) , $ this -> getJConfig ( ) -> version ) ) -> run ( ) ; } // Language files $ f = $ this -> generateLanguageFileList ( $ this -> getFiles ( 'frontendLanguage' ) ) ; $ this -> taskReplaceInFile ( $ xmlFile ) -> from ( '##LANGUAGE_FILES##' ) -> to ( $ f ) -> run ( ) ; }
Generate the installer xml file for the package

@return  void

@since   1.0
Generate the installer xml file for the package