diff --git a/docs/en/guide/cli-reference.md b/docs/en/guide/cli-reference.md index 3ca5b527..ddf1dbaf 100644 --- a/docs/en/guide/cli-reference.md +++ b/docs/en/guide/cli-reference.md @@ -516,10 +516,3 @@ spc spc-config "bcmath,openssl" --libs # Use absolute library paths spc spc-config "bcmath,openssl" --libs --absolute-libs ``` -Enter an interactive shell with StaticPHP's build environment pre-loaded (compiler wrappers, `buildroot/`, `pkgroot/` paths, etc. on `PATH`). - -```bash -spc dev:shell -``` - -Useful for compiling small programs against `libphp.a` (embed SAPI) or inspecting the build environment manually. diff --git a/docs/en/guide/first-build.md b/docs/en/guide/first-build.md index b9e6a75a..24ab6d22 100644 --- a/docs/en/guide/first-build.md +++ b/docs/en/guide/first-build.md @@ -74,6 +74,10 @@ This approach lets you run download and compile as separate steps — useful whe ### Step 1: Download Dependencies +In v3, you can skip this step entirely — running `build:php` directly will automatically download any missing artifacts. + +If you want to pre-download ahead of time, or if you're working in a slow-network environment and want to separate the download phase, use the `download` command: + ```bash # Download only what the chosen extensions need (recommended) spc download --for-extensions="bcmath,posix,phar,zlib,openssl,curl,fileinfo,tokenizer" --with-php=8.4 diff --git a/docs/en/guide/installation.md b/docs/en/guide/installation.md index 73c0134a..3f8da1f9 100644 --- a/docs/en/guide/installation.md +++ b/docs/en/guide/installation.md @@ -82,13 +82,6 @@ The script downloads `php` and `composer` into a `runtime/` subdirectory. You th # Add this to ~/.bashrc or ~/.zshrc to make it permanent ``` -::: tip -In regions with restricted access to GitHub or getcomposer.org, pass `--mirror china` to use a mirror: -```bash -bin/setup-runtime --mirror china -``` -::: - ## Vendor mode If you already have a PHP project and want to call StaticPHP's build APIs directly, or use a custom registry to support private libraries and extensions, pull it in as a Composer dependency: diff --git a/docs/zh/guide/cli-reference.md b/docs/zh/guide/cli-reference.md index e4a37f9a..eb014447 100644 --- a/docs/zh/guide/cli-reference.md +++ b/docs/zh/guide/cli-reference.md @@ -405,9 +405,6 @@ spc install-pkg [options] ```bash # 安装 UPX 压缩工具 spc install-pkg upx - -# 安装时优先使用预编译二进制(默认行为) -spc install-pkg upx ``` ## micro:combine diff --git a/docs/zh/guide/deps-map.md b/docs/zh/guide/deps-map.md index 04615a29..b18c44c5 100644 --- a/docs/zh/guide/deps-map.md +++ b/docs/zh/guide/deps-map.md @@ -8,7 +8,7 @@ aside: false - **必需依赖**:构建该包时会强制一同构建的包。 - **可选依赖**:默认不构建,使用 `--with-suggests` 参数可启用,或在构建命令中手动指定。 -- **被依赖**:其他哪些包需要当前包。 +- **被依赖 / 被建议**:其他哪些包将当前包作为必需或可选依赖。 运行以下命令生成依赖数据(需要在源码模式下): diff --git a/docs/zh/guide/extension-notes.md b/docs/zh/guide/extension-notes.md index 99a95621..101a6be2 100644 --- a/docs/zh/guide/extension-notes.md +++ b/docs/zh/guide/extension-notes.md @@ -90,7 +90,7 @@ bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli ## xml -1. xml 包括 xmlreader、xmlwriter、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。 +1. xml 包括 xmlreader、xmlwriter、xsl、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。 2. libxml 包含在 xml 扩展中。启用 xml 相当于启用 libxml。 ## glfw diff --git a/docs/zh/guide/installation.md b/docs/zh/guide/installation.md index fdb5fef0..84bafed5 100644 --- a/docs/zh/guide/installation.md +++ b/docs/zh/guide/installation.md @@ -51,7 +51,7 @@ chmod +x spc && ./spc --version 适合想参与开发、或需要修改核心注册表和构建脚本的开发者。需要系统已安装 PHP >= 8.4、Composer,以及 `mbstring,posix,pcntl,iconv,phar,zlib` 扩展。 ```bash -git clone https://github.com/static-php/static-php.git --branch v3 +git clone https://github.com/crazywhalecc/static-php-cli.git --branch v3 cd static-php-cli composer install ``` @@ -100,9 +100,15 @@ Vendor 模式的详细用法见 [扩展 StaticPHP](../develop/extending/)。 ```bash # 使用 spc 二进制 -./spc doctor --auto-fix +./spc doctor # 使用源码安装 -bin/spc doctor --auto-fix +bin/spc doctor +``` + +如有缺失,`--auto-fix` 会尝试自动安装修复: + +```bash +./spc doctor --auto-fix ``` 检查通过后,继续阅读[第一次构建](./first-build)。