format spc

This commit is contained in:
crazywhalecc 2023-03-18 17:39:08 +08:00
parent 65d38d5efc
commit 3d33c75a05
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
4 changed files with 3 additions and 21 deletions

View File

@ -1,16 +0,0 @@
#!php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
// 防止 Micro 打包状态下不支持中文的显示(虽然这个项目目前好像没输出过中文?)
if (PHP_OS_FAMILY === 'Windows' && Phar::running()) {
exec('CHCP 65001');
}
// 跑,反正一条命令跑就对了
try {
(new \SPC\ConsoleApplication())->run();
} catch (Exception $e) {
\SPC\exception\ExceptionHandler::getInstance()->handle($e);
}

View File

@ -37,7 +37,7 @@
} }
}, },
"bin": [ "bin": [
"bin/static-php-cli" "bin/spc"
], ],
"scripts": { "scripts": {
"analyse": "phpstan analyse --memory-limit 300M", "analyse": "phpstan analyse --memory-limit 300M",

View File

@ -143,8 +143,6 @@ class MacOSBuilder extends BuilderBase
); );
} }
$extra_libs .= ' /Users/jerry/project/git-project/static-php-cli/buildroot/lib/libsqlite3.a';
// patch before configure // patch before configure
Patcher::patchPHPBeforeConfigure($this); Patcher::patchPHPBeforeConfigure($this);
@ -157,7 +155,7 @@ class MacOSBuilder extends BuilderBase
Patcher::patchPHPConfigure($this); Patcher::patchPHPConfigure($this);
if ($this->getLib('libxml2') || $this->getExt('iconv')) { if ($this->getLib('libxml2') || $this->getExt('iconv')) {
$extra_libs .= ' /Users/jerry/project/git-project/static-php-cli/buildroot/lib/libcrypto.a -liconv'; $extra_libs .= ' -liconv';
} }
f_passthru( f_passthru(

View File

@ -84,7 +84,7 @@ class DeployCommand extends BaseCommand
str_replace( str_replace(
'/../vendor/autoload.php', '/../vendor/autoload.php',
'/vendor/autoload.php', '/vendor/autoload.php',
file_get_contents(ROOT_DIR . '/bin/static-php-cli') file_get_contents(ROOT_DIR . '/bin/spc')
) )
); );
$stub = '.phar-entry.php'; $stub = '.phar-entry.php';