2023-03-18 17:32:21 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\command;
|
|
|
|
|
|
|
|
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
|
|
|
|
|
|
|
|
abstract class BuildCommand extends BaseCommand
|
|
|
|
|
{
|
2024-03-20 21:50:05 +08:00
|
|
|
public function __construct(?string $name = null)
|
2023-03-18 17:32:21 +08:00
|
|
|
{
|
|
|
|
|
parent::__construct($name);
|
|
|
|
|
|
2025-03-14 18:22:50 +08:00
|
|
|
if (PHP_OS_FAMILY === 'Windows') {
|
|
|
|
|
$this->addOption('with-sdk-binary-dir', null, InputOption::VALUE_REQUIRED, 'path to binary sdk');
|
|
|
|
|
$this->addOption('vs-ver', null, InputOption::VALUE_REQUIRED, 'vs version, e.g. "17" for Visual Studio 2022');
|
2023-03-18 17:32:21 +08:00
|
|
|
}
|
|
|
|
|
|
2025-03-14 18:22:50 +08:00
|
|
|
$this->addOption('with-clean', null, null, 'fresh build, remove `source` and `buildroot` dir before build');
|
2023-03-18 17:32:21 +08:00
|
|
|
$this->addOption('bloat', null, null, 'add all libraries into binary');
|
2023-10-17 18:34:23 +08:00
|
|
|
$this->addOption('rebuild', 'r', null, 'Delete old build and rebuild');
|
2025-02-10 21:28:00 +09:00
|
|
|
$this->addOption('enable-zts', null, null, 'enable ZTS support');
|
2023-03-18 17:32:21 +08:00
|
|
|
}
|
|
|
|
|
}
|