Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 78864be

Browse files
committed
debug
1 parent d4d7626 commit 78864be

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

‎src/InstallCommand.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,24 @@ protected function buildPHPOpenCV($directory)
299299
*/
300300
protected function execute(InputInterface $input, OutputInterface $output)
301301
{
302+
// 'enable sockets supports? [no] : ';
303+
//查找php配置
304+
try {
305+
$process = new Process('which phpize');
306+
$process->mustRun();
307+
$phpizePath = str_replace(PHP_EOL, '', $process->getOutput());
308+
$process = new Process('which php-config');
309+
$process->mustRun();
310+
$phpConfigPath = str_replace(PHP_EOL, '', $process->getOutput());
311+
312+
} catch (\Exception $e) {
313+
throw new RuntimeException($process->getErrorOutput());
314+
}
315+
exit;
316+
$output->writeln('<comment>Application ready! Build something amazing.</comment>');
317+
$output->write('<comment>Application ready! Build something amazing.</comment>');
318+
$this->userInput();
319+
exit;
302320
$this->checkIsRoot();
303321
$this->checkExtensionIsInstall($output);
304322
$this->buildEnvDetection();
@@ -321,4 +339,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
321339

322340
$output->writeln('<comment>Application ready! Build something amazing.</comment>');
323341
}
342+
343+
344+
/**
345+
* 用户输入
346+
* @author hihozhou
347+
* @return string
348+
*/
349+
protected function userInput()
350+
{
351+
$input = trim(fgets(STDIN));
352+
return $input;
353+
}
324354
}

‎src/UninstallCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
4242
//卸载扩展
4343
//cd /opt/opencv/opencv/build
4444
//sudo make uninstall
45-
//sudo find . -name "*opencv*" | xargs sudo rm -rf
45+
//sudo find . -name "*opencv*" | xargs sudo rm -rf\
46+
//通过pkg-config php-config --extension-dir 删除
4647

4748
}
4849
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /