/**
* @param string $path
* @param InputInterface $input
* @param OutputInterface $output
*/
protected function binaryInstallWindows($path, InputInterface $input, OutputInterface $output)
{
$php = Engine::factory();
$table = new Table($output);
$table->setRows([['<info>' . $php->getName() . ' Path</info>', $php->getPath()], ['<info>' . $php->getName() . ' Version</info>', $php->getVersion()], ['<info>Compiler</info>', $php->getCompiler()], ['<info>Architecture</info>', $php->getArchitecture()], ['<info>Thread safety</info>', $php->getZts() ? 'yes' : 'no'], ['<info>Extension dir</info>', $php->getExtensionDir()], ['<info>php.ini</info>', $php->getIniPath()]])->render();
$inst = Install::factory($path);
$progress = $this->getHelperSet()->get('progress');
$inst->setProgress($progress);
$inst->setInput($input);
$inst->setOutput($output);
$inst->install();
$deps_handler = new Windows\DependencyLib($php);
$deps_handler->setProgress($progress);
$deps_handler->setInput($input);
$deps_handler->setOutput($output);
$helper = $this->getHelperSet()->get('question');
$cb = function ($choices) use($helper, $input, $output) {
$question = new ChoiceQuestion('Multiple choices found, please select the appropriate dependency package', $choices);
$question->setMultiselect(false);
return $helper->ask($input, $output, $question);
};
foreach ($inst->getExtDllPaths() as $dll) {
if (!$deps_handler->resolveForBin($dll, $cb)) {
throw new \Exception('Failed to resolve dependencies');
}
}
}