Merge docs into static-php-cli repo (#492)

* Move docs to here

* Move docs to here

* Modify old docs links
This commit is contained in:
Jerry Ma
2024-07-01 10:29:31 +08:00
committed by GitHub
parent eb00e0012f
commit b31539f0f4
51 changed files with 5172 additions and 28 deletions

View File

@@ -8,6 +8,7 @@ use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
use SPC\exception\WrongUsageException;
use SPC\store\Config;
use SPC\store\SourceManager;
abstract class LibraryBase
{
@@ -137,6 +138,14 @@ abstract class LibraryBase
// force means just build
if ($force_build) {
logger()->info('Building required library [' . static::NAME . ']');
// extract first if not exists
if (!is_dir($this->source_dir)) {
$this->getBuilder()->emitPatchPoint('before-library[ ' . static::NAME . ']-extract');
SourceManager::initSource(libs: [static::NAME]);
$this->getBuilder()->emitPatchPoint('after-library[ ' . static::NAME . ']-extract');
}
if (!$this->patched && $this->patchBeforeBuild()) {
file_put_contents($this->source_dir . '/.spc.patched', 'PATCHED!!!');
}