Add DirDiff utility and enhance package build process

- Introduced DirDiff class for tracking directory file changes.
- Updated ConsoleApplication to use addCommand for build targets.
- Enhanced PackageBuilder with methods for deploying binaries and extracting debug info.
- Improved package installation logic to support shared extensions.
- Added readline extension with patching for static builds.
This commit is contained in:
crazywhalecc
2025-12-04 10:53:49 +08:00
parent c38f174a6b
commit daa87e1350
12 changed files with 544 additions and 11 deletions

View File

@@ -232,7 +232,7 @@ class PackageLoader
$installer = ApplicationContext::get(PackageInstaller::class);
$stages = self::$before_stages[$package_name][$stage] ?? [];
foreach ($stages as [$callback, $only_when_package_resolved]) {
if ($only_when_package_resolved !== null && !$installer->isPackageBeingResolved($only_when_package_resolved)) {
if ($only_when_package_resolved !== null && !$installer->isPackageResolved($only_when_package_resolved)) {
continue;
}
yield $callback;
@@ -246,7 +246,7 @@ class PackageLoader
$stages = self::$after_stage[$package_name][$stage] ?? [];
$result = [];
foreach ($stages as [$callback, $only_when_package_resolved]) {
if ($only_when_package_resolved !== null && !$installer->isPackageBeingResolved($only_when_package_resolved)) {
if ($only_when_package_resolved !== null && !$installer->isPackageResolved($only_when_package_resolved)) {
continue;
}
$result[] = $callback;