mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-11 10:55:35 +08:00
Remove doctor item
This commit is contained in:
@@ -27,4 +27,5 @@ openssl:
|
|||||||
- libcrypto.lib
|
- libcrypto.lib
|
||||||
tools@windows:
|
tools@windows:
|
||||||
- jom
|
- jom
|
||||||
|
- nasm
|
||||||
- strawberry-perl
|
- strawberry-perl
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ use StaticPHP\Package\PackageInstaller;
|
|||||||
use StaticPHP\Runtime\SystemTarget;
|
use StaticPHP\Runtime\SystemTarget;
|
||||||
use StaticPHP\Toolchain\ToolchainManager;
|
use StaticPHP\Toolchain\ToolchainManager;
|
||||||
use StaticPHP\Util\FileSystem;
|
use StaticPHP\Util\FileSystem;
|
||||||
use StaticPHP\Util\GlobalEnvManager;
|
|
||||||
use StaticPHP\Util\System\WindowsUtil;
|
use StaticPHP\Util\System\WindowsUtil;
|
||||||
|
|
||||||
#[OptionalCheck([self::class, 'optional'])]
|
#[OptionalCheck([self::class, 'optional'])]
|
||||||
@@ -74,27 +73,6 @@ class WindowsToolCheck
|
|||||||
return CheckResult::ok($path);
|
return CheckResult::ok($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[CheckItem('if nasm installed', level: 995)]
|
|
||||||
public function checkNasm(): ?CheckResult
|
|
||||||
{
|
|
||||||
if (($a = WindowsUtil::findCommand('nasm.exe')) === null) {
|
|
||||||
return CheckResult::fail('nasm.exe not found in path.', 'install-nasm');
|
|
||||||
}
|
|
||||||
return CheckResult::ok($a);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[CheckItem('if perl(strawberry) installed', limit_os: 'Windows', level: 994)]
|
|
||||||
public function checkPerl(): ?CheckResult
|
|
||||||
{
|
|
||||||
if (($path = WindowsUtil::findCommand('perl.exe')) === null) {
|
|
||||||
return CheckResult::fail('perl not found in path.', 'install-perl');
|
|
||||||
}
|
|
||||||
if (!str_contains(implode('', cmd()->execWithResult(quote($path) . ' -v', false)[1]), 'MSWin32')) {
|
|
||||||
return CheckResult::fail($path . ' is not built for msvc.', 'install-perl');
|
|
||||||
}
|
|
||||||
return CheckResult::ok($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[CheckItem('if environment is properly set up', level: 1)]
|
#[CheckItem('if environment is properly set up', level: 1)]
|
||||||
public function checkenv(): ?CheckResult
|
public function checkenv(): ?CheckResult
|
||||||
{
|
{
|
||||||
@@ -113,16 +91,6 @@ class WindowsToolCheck
|
|||||||
return CheckResult::ok();
|
return CheckResult::ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[FixItem('install-perl')]
|
|
||||||
public function installPerl(): bool
|
|
||||||
{
|
|
||||||
$installer = new PackageInstaller();
|
|
||||||
$installer->addInstallPackage('strawberry-perl');
|
|
||||||
$installer->run(true);
|
|
||||||
GlobalEnvManager::addPathIfNotExists(PKG_ROOT_PATH . '\strawberry-perl');
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[FixItem('install-msys2-build-essentials')]
|
#[FixItem('install-msys2-build-essentials')]
|
||||||
public function installMsys2(): bool
|
public function installMsys2(): bool
|
||||||
{
|
{
|
||||||
@@ -141,15 +109,6 @@ class WindowsToolCheck
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[FixItem('install-nasm')]
|
|
||||||
public function installNasm(): bool
|
|
||||||
{
|
|
||||||
$installer = new PackageInstaller(interactive: false);
|
|
||||||
$installer->addInstallPackage('nasm');
|
|
||||||
$installer->run(true);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[FixItem('install-vswhere')]
|
#[FixItem('install-vswhere')]
|
||||||
public function installVSWhere(): bool
|
public function installVSWhere(): bool
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user