Add php proxies to replacement vars.
parent
3bdae180f6
commit
bc2d30492a
|
@ -54,20 +54,22 @@ class PearInstaller extends LibraryInstaller
|
||||||
parent::installCode($package);
|
parent::installCode($package);
|
||||||
|
|
||||||
$isWindows = defined('PHP_WINDOWS_VERSION_BUILD') ? true : false;
|
$isWindows = defined('PHP_WINDOWS_VERSION_BUILD') ? true : false;
|
||||||
|
$php_bin = realpath($this->binDir . ($isWindows ? '/composer-php.bat' : '/composer-php'));
|
||||||
|
|
||||||
|
$installPath = $this->getInstallPath($package);
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'os' => $isWindows ? 'windows' : 'linux',
|
'os' => $isWindows ? 'windows' : 'linux',
|
||||||
'php_bin' => ($isWindows ? getenv('PHPRC') .'php.exe' : trim(`which php`)),
|
'php_bin' => $php_bin,
|
||||||
'pear_php' => $this->getInstallPath($package),
|
'pear_php' => $installPath,
|
||||||
'bin_dir' => $this->getInstallPath($package) . '/bin',
|
'php_dir' => $installPath,
|
||||||
'php_dir' => $this->getInstallPath($package),
|
'bin_dir' => $installPath . '/bin',
|
||||||
'data_dir' => '@DATA_DIR@',
|
'data_dir' => $installPath . '/data',
|
||||||
'version' => $package->getPrettyVersion(),
|
'version' => $package->getPrettyVersion(),
|
||||||
);
|
);
|
||||||
|
|
||||||
$packageArchive = $this->getInstallPath($package).'/'.pathinfo($package->getDistUrl(), PATHINFO_BASENAME);
|
$packageArchive = $this->getInstallPath($package).'/'.pathinfo($package->getDistUrl(), PATHINFO_BASENAME);
|
||||||
$pearExtractor = new PearPackageExtractor($packageArchive);
|
$pearExtractor = new PearPackageExtractor($packageArchive);
|
||||||
$pearExtractor->extractTo($this->getInstallPath($package), array('php' => '/', 'script' => '/bin'), $vars);
|
$pearExtractor->extractTo($this->getInstallPath($package), array('php' => '/', 'script' => '/bin', 'data' => '/data'), $vars);
|
||||||
|
|
||||||
if ($this->io->isVerbose()) {
|
if ($this->io->isVerbose()) {
|
||||||
$this->io->write(' Cleaning up');
|
$this->io->write(' Cleaning up');
|
||||||
|
|
Loading…
Reference in New Issue