mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
deploy: b45081dd9cd09fe1c9c820f340a2e06ad7dc8809
This commit is contained in:
parent
b39aef4671
commit
85b6dd9c3f
@ -73,7 +73,11 @@ import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.CszIUXhs.js";const g
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Specifying to download an older version of the curl library</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "curl:https://curl.se/download/curl-7.88.1.tar.gz"</span></span></code></pre></div><h2 id="command-doctor" tabindex="-1">Command - doctor <a class="header-anchor" href="#command-doctor" aria-label="Permalink to "Command - doctor""></a></h2><p>If you can run <code>bin/spc</code> normally but cannot compile static PHP or dependent libraries normally, you can run <code>bin/spc doctor</code> first to check whether the system itself lacks dependencies.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Quick check</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "curl:https://curl.se/download/curl-7.88.1.tar.gz"</span></span></code></pre></div><p>If the source you download is not a link, but a git repository, you can use <code>-G</code> or <code>--custom-git</code> to rewrite the download link, so that the downloader can force the use of the specified git repository to download packages from this source. The usage method is <code>{source-name}:{branch}:{url}</code>, which can rewrite the download link of multiple libraries at the same time. It is also available when downloading with the <code>--for-extensions</code> option.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Specifying to download the source code of the PHP extension from the specified branch of the git repository</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=redis</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -G</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "php-src:master:https://github.com/php/php-src.git"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download the latest code from the master branch of the swoole-src repository instead of PECL release version</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=swoole</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -G</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "swoole:master:https://github.com/swoole/swoole-src.git"</span></span></code></pre></div><h2 id="command-doctor" tabindex="-1">Command - doctor <a class="header-anchor" href="#command-doctor" aria-label="Permalink to "Command - doctor""></a></h2><p>If you can run <code>bin/spc</code> normally but cannot compile static PHP or dependent libraries normally, you can run <code>bin/spc doctor</code> first to check whether the system itself lacks dependencies.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Quick check</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Quickly check and fix when it can be automatically repaired (use package management to install dependent packages, only support the above-mentioned operating systems and distributions)</span></span>
|
||||
@ -140,4 +144,4 @@ import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.CszIUXhs.js";const g
|
||||
<span class="line"><span>Loaded Configuration File => /Users/jerry/project/git-project/static-php-cli/php.ini</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span>
|
||||
<span class="line"><span>memory_limit => 8G => 8G</span></span></code></pre></div><p>For the objects, methods and interfaces supported by static-php-cli, you can read the source code. Most methods and objects have corresponding comments.</p><p>Commonly used objects and functions using the <code>-P</code> function are:</p><ul><li><code>SPC\\store\\FileSystem</code>: file management class <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: Replace file string content</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: Regularly replace file content</li><li><code>::replaceFileUser(string $filename, $callback)</code>: User-defined function replaces file content</li><li><code>::copyDir(string $from, string $to)</code>: Recursively copy a directory to another location</li><li><code>::convertPath(string $path)</code>: Convert the path delimiter to the current system delimiter</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: Traverse directory files</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: Build object <ul><li><code>->getPatchPoint()</code>: Get the current injection point name</li><li><code>->getOption(string $key, $default = null)</code>: Get command line and compile-time options</li><li><code>->getPHPVersionID()</code>: Get the currently compiled PHP version ID</li><li><code>->getPHPVersion()</code>: Get the currently compiled PHP version number</li><li><code>->setOption(string $key, $value)</code>: Set options</li><li><code>->setOptionIfNotExists(string $key, $value)</code>: Set option if option does not exist</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli has many open methods, which cannot be listed in the docs, but as long as it is a <code>public function</code> and is not marked as <code>@internal</code>, it theoretically can be called.</p></div><h2 id="multiple-builds" tabindex="-1">Multiple builds <a class="header-anchor" href="#multiple-builds" aria-label="Permalink to "Multiple builds""></a></h2><p>If you need to build multiple times locally, the following method can save you time downloading resources and compiling.</p><ul><li>If you only switch the PHP version without changing the dependent libraries, you can use <code>bin/spc switch-php-version</code> to quickly switch the PHP version, and then re-run the same <code>build</code> command.</li><li>If you want to rebuild once, but do not re-download the source code, you can first <code>rm -rf buildroot source</code> to delete the compilation directory and source code directory, and then rebuild.</li><li>If you want to update a version of a dependency, you can use <code>bin/spc del-download <source-name></code> to delete the specified source code, and then use <code>download <source-name></code> to download it again.</li><li>If you want to update all dependent versions, you can use <code>bin/spc download --clean</code> to delete all downloaded sources, and then download them again.</li></ul>`,105),l=[t];function o(p,d,h,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default};
|
||||
<span class="line"><span>memory_limit => 8G => 8G</span></span></code></pre></div><p>For the objects, methods and interfaces supported by static-php-cli, you can read the source code. Most methods and objects have corresponding comments.</p><p>Commonly used objects and functions using the <code>-P</code> function are:</p><ul><li><code>SPC\\store\\FileSystem</code>: file management class <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: Replace file string content</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: Regularly replace file content</li><li><code>::replaceFileUser(string $filename, $callback)</code>: User-defined function replaces file content</li><li><code>::copyDir(string $from, string $to)</code>: Recursively copy a directory to another location</li><li><code>::convertPath(string $path)</code>: Convert the path delimiter to the current system delimiter</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: Traverse directory files</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: Build object <ul><li><code>->getPatchPoint()</code>: Get the current injection point name</li><li><code>->getOption(string $key, $default = null)</code>: Get command line and compile-time options</li><li><code>->getPHPVersionID()</code>: Get the currently compiled PHP version ID</li><li><code>->getPHPVersion()</code>: Get the currently compiled PHP version number</li><li><code>->setOption(string $key, $value)</code>: Set options</li><li><code>->setOptionIfNotExists(string $key, $value)</code>: Set option if option does not exist</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli has many open methods, which cannot be listed in the docs, but as long as it is a <code>public function</code> and is not marked as <code>@internal</code>, it theoretically can be called.</p></div><h2 id="multiple-builds" tabindex="-1">Multiple builds <a class="header-anchor" href="#multiple-builds" aria-label="Permalink to "Multiple builds""></a></h2><p>If you need to build multiple times locally, the following method can save you time downloading resources and compiling.</p><ul><li>If you only switch the PHP version without changing the dependent libraries, you can use <code>bin/spc switch-php-version</code> to quickly switch the PHP version, and then re-run the same <code>build</code> command.</li><li>If you want to rebuild once, but do not re-download the source code, you can first <code>rm -rf buildroot source</code> to delete the compilation directory and source code directory, and then rebuild.</li><li>If you want to update a version of a dependency, you can use <code>bin/spc del-download <source-name></code> to delete the specified source code, and then use <code>download <source-name></code> to download it again.</li><li>If you want to update all dependent versions, you can use <code>bin/spc download --clean</code> to delete all downloaded sources, and then download them again.</li></ul>`,107),l=[t];function o(p,h,d,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.CszIUXhs.js";const g=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a("",105),l=[t];function o(p,d,h,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default};
|
||||
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.CszIUXhs.js";const g=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a("",107),l=[t];function o(p,h,d,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",o]]);export{g as __pageData,m as default};
|
||||
1
assets/style.B7QwpTn2.css
Normal file
1
assets/style.B7QwpTn2.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -71,7 +71,11 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.CszIUXhs.js";const g
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 指定下载旧版本的 curl 库</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "curl:https://curl.se/download/curl-7.88.1.tar.gz"</span></span></code></pre></div><h2 id="命令-doctor-环境检查" tabindex="-1">命令 doctor - 环境检查 <a class="header-anchor" href="#命令-doctor-环境检查" aria-label="Permalink to "命令 doctor - 环境检查""></a></h2><p>如果你可以正常运行 <code>bin/spc</code> 但无法正常编译静态的 PHP 或依赖库,可以先运行 <code>bin/spc doctor</code> 检查系统自身是否缺少依赖。</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 快速检查</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -U</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "curl:https://curl.se/download/curl-7.88.1.tar.gz"</span></span></code></pre></div><p>如果你下载的资源不是链接,而是一个 Git 仓库,你可以使用 <code>-G</code> 或 <code>--custom-git</code> 重写下载链接,让下载器强制使用你指定的 Git 仓库下载此 source 的包。 使用方法为 <code>{source-name}:{branch}:{url}</code> 即可,可同时重写多个库的下载地址。在使用 <code>--for-extensions</code> 选项下载时同样可用。</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 例如:下载 master 分支的 php-src</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=redis,phar</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -G</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "php-src:master:https://github.com/php/php-src.git"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 从 swoole-src 仓库下载 master 分支的最新代码,而不是发行版</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=swoole</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -G</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "swoole:master:https://github.com/swoole/swoole-src.git"</span></span></code></pre></div><h2 id="命令-doctor-环境检查" tabindex="-1">命令 doctor - 环境检查 <a class="header-anchor" href="#命令-doctor-环境检查" aria-label="Permalink to "命令 doctor - 环境检查""></a></h2><p>如果你可以正常运行 <code>bin/spc</code> 但无法正常编译静态的 PHP 或依赖库,可以先运行 <code>bin/spc doctor</code> 检查系统自身是否缺少依赖。</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 快速检查</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 快速检查,并在可以自动修复的时候修复(使用包管理安装依赖包,仅支持上述提到的操作系统及发行版)</span></span>
|
||||
@ -134,4 +138,4 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.CszIUXhs.js";const g
|
||||
<span class="line"><span>Loaded Configuration File => /Users/jerry/project/git-project/static-php-cli/php.ini</span></span>
|
||||
<span class="line"><span></span></span>
|
||||
<span class="line"><span>$ buildroot/bin/php -i | grep memory</span></span>
|
||||
<span class="line"><span>memory_limit => 8G => 8G</span></span></code></pre></div><p>对于 static-php-cli 支持的对象、方法及接口,可以阅读源码,大部分的方法和对象都有相应的注释。</p><p>一般使用 <code>-P</code> 功能常用的对象及函数有:</p><ul><li><code>SPC\\store\\FileSystem</code>: 文件管理类 <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: 替换文件字符串内容</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: 正则替换文件内容</li><li><code>::replaceFileUser(string $filename, $callback)</code>: 用户自定义函数替换文件内容</li><li><code>::copyDir(string $from, string $to)</code>: 递归拷贝某个目录到另一个位置</li><li><code>::convertPath(string $path)</code>: 转换路径的分隔符为当前系统分隔符</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: 遍历目录文件</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: 构建对象 <ul><li><code>->getPatchPoint()</code>: 获取当前的注入点名称</li><li><code>->getOption(string $key, $default = null)</code>: 获取命令行和编译时的选项</li><li><code>->getPHPVersionID()</code>: 获取当前编译的 PHP 版本 ID</li><li><code>->getPHPVersion()</code>: 获取当前编译的 PHP 版本号</li><li><code>->setOption(string $key, $value)</code>: 设定选项</li><li><code>->setOptionIfNotExists(string $key, $value)</code>: 如果选项不存在则设定选项</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli 开放的方法非常多,文档中无法一一列举,但只要是 <code>public function</code> 并且不被标注为 <code>@internal</code>,均可调用。</p></div><h2 id="多次构建" tabindex="-1">多次构建 <a class="header-anchor" href="#多次构建" aria-label="Permalink to "多次构建""></a></h2><p>如果你在本地要多次构建,以下方法可以为你节省下载资源、编译的时间。</p><ul><li>仅切换 PHP 版本,不更换依赖库版本时,可以使用 <code>bin/spc switch-php-version</code> 快速切换 PHP 版本,然后重新运行同样的 <code>build</code> 命令。</li><li>如果你想重新构建一次,但不重新下载源码,可以先 <code>rm -rf buildroot source</code> 删除编译目录和源码目录,然后重新构建。</li><li>如果你想更新某个依赖的版本,可以使用 <code>bin/spc del-download <source-name></code> 删除指定的源码,然后使用 <code>download <source-name></code> 重新下载。</li><li>如果你想更新所有依赖的版本,可以使用 <code>bin/spc download --clean</code> 删除所有下载的源码,然后重新下载。</li></ul>`,104),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default};
|
||||
<span class="line"><span>memory_limit => 8G => 8G</span></span></code></pre></div><p>对于 static-php-cli 支持的对象、方法及接口,可以阅读源码,大部分的方法和对象都有相应的注释。</p><p>一般使用 <code>-P</code> 功能常用的对象及函数有:</p><ul><li><code>SPC\\store\\FileSystem</code>: 文件管理类 <ul><li><code>::replaceFileStr(string $filename, string $search, $replace)</code>: 替换文件字符串内容</li><li><code>::replaceFileStr(string $filename, string $pattern, $replace)</code>: 正则替换文件内容</li><li><code>::replaceFileUser(string $filename, $callback)</code>: 用户自定义函数替换文件内容</li><li><code>::copyDir(string $from, string $to)</code>: 递归拷贝某个目录到另一个位置</li><li><code>::convertPath(string $path)</code>: 转换路径的分隔符为当前系统分隔符</li><li><code>::scanDirFiles(string $dir, bool $recursive = true, bool|string $relative = false, bool $include_dir = false)</code>: 遍历目录文件</li></ul></li><li><code>SPC\\builder\\BuilderBase</code>: 构建对象 <ul><li><code>->getPatchPoint()</code>: 获取当前的注入点名称</li><li><code>->getOption(string $key, $default = null)</code>: 获取命令行和编译时的选项</li><li><code>->getPHPVersionID()</code>: 获取当前编译的 PHP 版本 ID</li><li><code>->getPHPVersion()</code>: 获取当前编译的 PHP 版本号</li><li><code>->setOption(string $key, $value)</code>: 设定选项</li><li><code>->setOptionIfNotExists(string $key, $value)</code>: 如果选项不存在则设定选项</li></ul></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>static-php-cli 开放的方法非常多,文档中无法一一列举,但只要是 <code>public function</code> 并且不被标注为 <code>@internal</code>,均可调用。</p></div><h2 id="多次构建" tabindex="-1">多次构建 <a class="header-anchor" href="#多次构建" aria-label="Permalink to "多次构建""></a></h2><p>如果你在本地要多次构建,以下方法可以为你节省下载资源、编译的时间。</p><ul><li>仅切换 PHP 版本,不更换依赖库版本时,可以使用 <code>bin/spc switch-php-version</code> 快速切换 PHP 版本,然后重新运行同样的 <code>build</code> 命令。</li><li>如果你想重新构建一次,但不重新下载源码,可以先 <code>rm -rf buildroot source</code> 删除编译目录和源码目录,然后重新构建。</li><li>如果你想更新某个依赖的版本,可以使用 <code>bin/spc del-download <source-name></code> 删除指定的源码,然后使用 <code>download <source-name></code> 重新下载。</li><li>如果你想更新所有依赖的版本,可以使用 <code>bin/spc download --clean</code> 删除所有下载的源码,然后重新下载。</li></ul>`,106),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.CszIUXhs.js";const g=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),p={name:"zh/guide/manual-build.md"},l=n("",104),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default};
|
||||
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.CszIUXhs.js";const g=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),p={name:"zh/guide/manual-build.md"},l=n("",106),e=[l];function t(h,d,c,k,o,r){return a(),i("div",null,e)}const b=s(p,[["render",t]]);export{g as __pageData,b as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"en_guide_env-vars.md":"Cfljs3Iy","zh_guide_cli-generator.md":"B90jBWv3","en_develop_structure.md":"Bam0WW0K","en_faq_index.md":"DM_hczmb","zh_guide_build-on-windows.md":"C1RFP4Q6","zh_guide_extension-notes.md":"SlBCrb5I","zh_guide_action-build.md":"BQOsJgGT","en_develop_system-build-tools.md":"Ds5Kgdf6","zh_guide_index.md":"D0Jfo4Dz","zh_develop_structure.md":"DDUlE6Vc","zh_guide_manual-build.md":"Q3TJN6bZ","extension-notes.md":"CYTuu5Xm","index.md":"DDaDbFm-","zh_develop_doctor-module.md":"CPRdzud3","en_develop_doctor-module.md":"M_P38WuA","zh_contributing_index.md":"BgLPhRbJ","zh_develop_index.md":"CISWAEXj","extensions.md":"dvLwihYA","zh_develop_php-src-changes.md":"C7L9rEms","en_guide_extension-notes.md":"C-SzmSnl","en_guide_extensions.md":"BeSGT7E-","zh_faq_index.md":"Bs3v_2I2","en_index.md":"B7rqxnyF","en_guide_troubleshooting.md":"BZNNttUZ","deps-map-ext.md":"YUYMh0WS","zh_guide_env-vars.md":"CsRQyiY-","zh_guide_deps-map.md":"kce0feMZ","zh_guide_extensions.md":"Di_WlM9e","en_guide_index.md":"DzPC1rL-","en_contributing_index.md":"0xRtVBv6","en_guide_action-build.md":"DqfXKtKF","en_guide_cli-generator.md":"BECA_Gms","en_develop_php-src-changes.md":"Dw_q8s3t","zh_index.md":"Bu-me8xZ","en_guide_deps-map.md":"QDl3bZ79","en_guide_build-on-windows.md":"Bw1buXoR","zh_guide_troubleshooting.md":"CSXAWaMN","zh_develop_system-build-tools.md":"DvA9SnOG","en_develop_index.md":"BqNiKnHj","en_develop_source-module.md":"BvLG6ZYy","deps-map-lib.md":"B6iE3n36","en_guide_manual-build.md":"CfdQxQ8k","zh_develop_source-module.md":"ByssbQZ9"}
|
||||
{"deps-map-lib.md":"B6iE3n36","en_contributing_index.md":"0xRtVBv6","en_develop_doctor-module.md":"M_P38WuA","extension-notes.md":"CYTuu5Xm","en_develop_index.md":"BqNiKnHj","zh_guide_index.md":"D0Jfo4Dz","en_guide_cli-generator.md":"BECA_Gms","en_guide_deps-map.md":"QDl3bZ79","en_guide_env-vars.md":"Cfljs3Iy","zh_guide_action-build.md":"BQOsJgGT","en_develop_source-module.md":"BvLG6ZYy","en_guide_troubleshooting.md":"BZNNttUZ","en_develop_structure.md":"Bam0WW0K","en_guide_extension-notes.md":"C-SzmSnl","en_guide_index.md":"DzPC1rL-","zh_develop_php-src-changes.md":"C7L9rEms","zh_develop_doctor-module.md":"CPRdzud3","zh_develop_index.md":"CISWAEXj","en_guide_extensions.md":"BeSGT7E-","en_index.md":"B7rqxnyF","zh_guide_troubleshooting.md":"CSXAWaMN","zh_index.md":"Bu-me8xZ","zh_develop_structure.md":"DDUlE6Vc","zh_guide_build-on-windows.md":"C1RFP4Q6","extensions.md":"dvLwihYA","index.md":"DDaDbFm-","zh_contributing_index.md":"BgLPhRbJ","en_faq_index.md":"DM_hczmb","zh_guide_extension-notes.md":"SlBCrb5I","zh_develop_system-build-tools.md":"DvA9SnOG","en_develop_php-src-changes.md":"Dw_q8s3t","zh_faq_index.md":"Bs3v_2I2","zh_guide_deps-map.md":"kce0feMZ","zh_guide_manual-build.md":"Br54dIKC","en_guide_action-build.md":"DqfXKtKF","en_develop_system-build-tools.md":"Ds5Kgdf6","zh_develop_source-module.md":"ByssbQZ9","zh_guide_env-vars.md":"CsRQyiY-","en_guide_build-on-windows.md":"Bw1buXoR","en_guide_manual-build.md":"DBARuEeg","deps-map-ext.md":"YUYMh0WS","zh_guide_extensions.md":"Di_WlM9e","zh_guide_cli-generator.md":"B90jBWv3"}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user