mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
craft needs to download shared extensions too
This commit is contained in:
parent
8b98792ccf
commit
108bf34cca
@ -48,7 +48,8 @@ class CraftCommand extends BaseCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$extensions = implode(',', $craft['extensions']);
|
$static_extensions = implode(',', $craft['extensions']);
|
||||||
|
$shared_extensions = implode(',', $craft['build-options']['build-shared']) ?? '';
|
||||||
$libs = implode(',', $craft['libs']);
|
$libs = implode(',', $craft['libs']);
|
||||||
|
|
||||||
// init log
|
// init log
|
||||||
@ -67,7 +68,8 @@ class CraftCommand extends BaseCommand
|
|||||||
}
|
}
|
||||||
// craft download
|
// craft download
|
||||||
if ($craft['craft-options']['download']) {
|
if ($craft['craft-options']['download']) {
|
||||||
$args = ["--for-extensions={$extensions}"];
|
$sharedAppend = $shared_extensions ? ',' . $shared_extensions : '';
|
||||||
|
$args = ["--for-extensions={$static_extensions}{$sharedAppend}"];
|
||||||
if ($craft['libs'] !== []) {
|
if ($craft['libs'] !== []) {
|
||||||
$args[] = "--for-libs={$libs}";
|
$args[] = "--for-libs={$libs}";
|
||||||
}
|
}
|
||||||
@ -90,7 +92,7 @@ class CraftCommand extends BaseCommand
|
|||||||
|
|
||||||
// craft build
|
// craft build
|
||||||
if ($craft['craft-options']['build']) {
|
if ($craft['craft-options']['build']) {
|
||||||
$args = [$extensions, "--with-libs={$libs}", ...array_map(fn ($x) => "--build-{$x}", $craft['sapi'])];
|
$args = [$static_extensions, "--with-libs={$libs}", ...array_map(fn ($x) => "--build-{$x}", $craft['sapi'])];
|
||||||
$this->optionsToArguments($craft['build-options'], $args);
|
$this->optionsToArguments($craft['build-options'], $args);
|
||||||
$retcode = $this->runCommand('build', ...$args);
|
$retcode = $this->runCommand('build', ...$args);
|
||||||
if ($retcode !== 0) {
|
if ($retcode !== 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user