This commit is contained in:
crazywhalecc
2025-03-07 02:46:39 +00:00
parent e49e36e08d
commit 0a9f306287
50 changed files with 165 additions and 101 deletions

View File

@@ -1,4 +1,4 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=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(`<h1 id="build-linux-macos-freebsd" tabindex="-1">Build (Linux, macOS, FreeBSD) <a class="header-anchor" href="#build-linux-macos-freebsd" aria-label="Permalink to &quot;Build (Linux, macOS, FreeBSD)&quot;"></a></h1><p>This section covers the build process for Linux, macOS, and FreeBSD. If you want to build on Windows, also need to read <a href="./build-on-windows.html">Build on Windows</a>.</p><h3 id="build-locally-using-spc-binary-recommended" tabindex="-1">Build locally (using SPC binary) (recommended) <a class="header-anchor" href="#build-locally-using-spc-binary-recommended" aria-label="Permalink to &quot;Build locally (using SPC binary) (recommended)&quot;"></a></h3><p>This project provides a binary file of static-php-cli. You can directly download the binary file of the corresponding platform and then use it to build static PHP. Currently, the platforms supported by <code>spc</code> binary are Linux and macOS.</p><p>Here&#39;s how to download from self-hosted server:</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;"># Download from self-hosted nightly builds (sync with main branch)</span></span>
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=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=e(`<h1 id="build-linux-macos-freebsd" tabindex="-1">Build (Linux, macOS, FreeBSD) <a class="header-anchor" href="#build-linux-macos-freebsd" aria-label="Permalink to &quot;Build (Linux, macOS, FreeBSD)&quot;"></a></h1><p>This section covers the build process for Linux, macOS, and FreeBSD. If you want to build on Windows, also need to read <a href="./build-on-windows.html">Build on Windows</a>.</p><h3 id="build-locally-using-spc-binary-recommended" tabindex="-1">Build locally (using SPC binary) (recommended) <a class="header-anchor" href="#build-locally-using-spc-binary-recommended" aria-label="Permalink to &quot;Build locally (using SPC binary) (recommended)&quot;"></a></h3><p>This project provides a binary file of static-php-cli. You can directly download the binary file of the corresponding platform and then use it to build static PHP. Currently, the platforms supported by <code>spc</code> binary are Linux and macOS.</p><p>Here&#39;s how to download from self-hosted server:</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;"># Download from self-hosted nightly builds (sync with main branch)</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux x86_64</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For Linux aarch64</span></span>
@@ -113,7 +113,23 @@ import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> a.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -N</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/custom.ini</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Note, please do not directly use the PHP source code or the <code>php.ini</code> file in the system-installed PHP, it is best to manually write an ini configuration file that you need, for example:</p><div class="language-ini vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ini</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;">; custom.ini</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">curl.cainfo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=/path/to/your/cafile.pem</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">memory_limit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=1G</span></span></code></pre></div><p>The ini injection of this command is achieved by appending a special structure after micro.sfx, which is different from the function of inserting hard-coded INI during compilation.</p></div><p>If you want to package phar, just replace <code>a.php</code> with the packaged phar file. But please note that micro.sfx under phar needs extra attention to the path problem, see <a href="./../develop/structure.html#phar-application-directory-issue">Developing - Phar directory issue</a>.</p><h2 id="command-extract" tabindex="-1">Command - extract <a class="header-anchor" href="#command-extract" aria-label="Permalink to &quot;Command - extract&quot;"></a></h2><p>Use the command <code>bin/spc extract</code> to unpack and copy the source code required for compilation, including php-src and the source code of various dependent libraries (you need to specify the name of the library to be unpacked).</p><p>For example, after we have downloaded sources, we want to distribute and execute the build process, manually unpack and copy the package to a specified location, and we can use commands.</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;"># Unzip the downloaded compressed package of php-src and libxml2, and store the decompressed source code in the source directory</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-src,libxml2</span></span></code></pre></div><h2 id="dev-command-dev" tabindex="-1">Dev Command - dev <a class="header-anchor" href="#dev-command-dev" aria-label="Permalink to &quot;Dev Command - dev&quot;"></a></h2><p>Debug commands refer to a collection of commands that can assist in outputting some information when you use static-php-cli to build PHP or modify and enhance the static-php-cli project itself.</p><ul><li><code>dev:extensions</code>: output all currently supported extension names, or output the specified extension information</li><li><code>dev:php-version</code>: output the currently compiled PHP version (by reading <code>php_version.h</code>)</li><li><code>dev:sort-config</code>: Sort the list of configuration files in the <code>config/</code> directory in alphabetical order</li><li><code>dev:lib-ver &lt;lib-name&gt;</code>: Read the version from the source code of the dependency library (only available for specific dependency libraries)</li><li><code>dev:ext-ver &lt;ext-name&gt;</code>: Read the corresponding version from the source code of the extension (only available for specific extensions)</li><li><code>dev:pack-lib &lt;lib-name&gt;</code>: Package the specified library into a tar.gz file (maintainer only)</li><li><code>dev:gen-ext-docs</code>: Generate extension documentation (maintainer only)</li></ul><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;"># output all extensions information</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-src,libxml2</span></span></code></pre></div><h2 id="command-dump-extensions" tabindex="-1">Command - dump-extensions <a class="header-anchor" href="#command-dump-extensions" aria-label="Permalink to &quot;Command - dump-extensions&quot;"></a></h2><p>Use the command <code>bin/spc dump-extensions</code> to export required extensions of the current project.</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;"># Print the extension list of the project, pass in the root directory of the project containing composer.json</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/project/</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Print the extension list of the project, excluding development dependencies</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-dev</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output in the extension list format acceptable to the spc command (comma separated)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --format=text</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output as a JSON list</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --format=json</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># When the project does not have any extensions, output the specified extension combination instead of returning failure</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/your/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-ext-output=mbstring,posix,pcntl,phar</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Do not exclude extensions not supported by spc when outputting</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-spc-filter</span></span></code></pre></div><p>It should be noted that the project directory must contain the <code>vendor/installed.json</code> and <code>composer.lock</code> files, otherwise they cannot be found normally.</p><h2 id="dev-command-dev" tabindex="-1">Dev Command - dev <a class="header-anchor" href="#dev-command-dev" aria-label="Permalink to &quot;Dev Command - dev&quot;"></a></h2><p>Debug commands refer to a collection of commands that can assist in outputting some information when you use static-php-cli to build PHP or modify and enhance the static-php-cli project itself.</p><ul><li><code>dev:extensions</code>: output all currently supported extension names, or output the specified extension information</li><li><code>dev:php-version</code>: output the currently compiled PHP version (by reading <code>php_version.h</code>)</li><li><code>dev:sort-config</code>: Sort the list of configuration files in the <code>config/</code> directory in alphabetical order</li><li><code>dev:lib-ver &lt;lib-name&gt;</code>: Read the version from the source code of the dependency library (only available for specific dependency libraries)</li><li><code>dev:ext-ver &lt;ext-name&gt;</code>: Read the corresponding version from the source code of the extension (only available for specific extensions)</li><li><code>dev:pack-lib &lt;lib-name&gt;</code>: Package the specified library into a tar.gz file (maintainer only)</li><li><code>dev:gen-ext-docs</code>: Generate extension documentation (maintainer only)</li></ul><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;"># output all extensions information</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev:extensions</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output the meta information of the specified extension</span></span>
@@ -176,4 +192,4 @@ import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">clang</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,119),l=[t];function p(o,h,d,c,r,k){return e(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,123),l=[t];function p(o,h,d,c,r,k){return a(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};

View File

@@ -1 +1 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=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("",119),l=[t];function p(o,h,d,c,r,k){return e(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=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=e("",123),l=[t];function p(o,h,d,c,r,k){return a(),i("div",null,l)}const F=s(n,[["render",p]]);export{u as __pageData,F as default};

File diff suppressed because one or more lines are too long

View File

@@ -111,7 +111,23 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.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;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> a.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -N</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/custom.ini</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>使 PHP PHP <code>php.ini</code> </p><div class="language-ini vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ini</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;">; custom.ini</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">curl.cainfo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=/path/to/your/cafile.pem</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">memory_limit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=1G</span></span></code></pre></div><p> ini micro.sfx INI </p></div><p> phar <code>a.php</code> phar phar micro.sfx <a href="./../develop/structure.html#phar-">Developing - Phar </a></p><h2 id="-extract-" tabindex="-1"> extract - <a class="header-anchor" href="#-extract-" aria-label="Permalink to &quot; extract - &quot;"></a></h2><p>使 <code>bin/spc extract</code> php-src </p><p>使</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;"># php-src libxml2 source </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-src,libxml2</span></span></code></pre></div><h2 id="-dev-" tabindex="-1"> dev - <a class="header-anchor" href="#-dev-" aria-label="Permalink to &quot; dev - &quot;"></a></h2><p>使 static-php-cli PHP static-php-cli </p><ul><li><code>dev:extensions</code>: </li><li><code>dev:php-version</code>: PHP <code>php_version.h</code> </li><li><code>dev:sort-config</code>: <code>config/</code> </li><li><code>dev:lib-ver &lt;lib-name&gt;</code>: </li><li><code>dev:ext-ver &lt;ext-name&gt;</code>: </li><li><code>dev:pack-lib &lt;lib-name&gt;</code>: </li><li><code>dev:gen-ext-docs</code>: </li></ul><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;"> extract</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-src,libxml2</span></span></code></pre></div><h2 id="-dump-extensions-" tabindex="-1"> dump-extensions - <a class="header-anchor" href="#-dump-extensions-" aria-label="Permalink to &quot; dump-extensions - &quot;"></a></h2><p>使 <code>bin/spc dump-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;"># composer.json</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/project/</span></span>
<span class="line"></span>
<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;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-dev</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 输出为 spc 命令可接受的扩展列表格式逗号分割</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --format=text</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 输出为 JSON 列表</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/tour/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --format=json</span></span>
<span class="line"></span>
<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;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path-to/your/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-ext-output=mbstring,posix,pcntl,phar</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 输出时不排除 spc 不支持的扩展</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/project/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-spc-filter</span></span></code></pre></div><p> <code>vendor/installed.json</code> <code>composer.lock</code> </p><h2 id="-dev-" tabindex="-1"> dev - <a class="header-anchor" href="#-dev-" aria-label="Permalink to &quot; dev - &quot;"></a></h2><p>使 static-php-cli PHP static-php-cli </p><ul><li><code>dev:extensions</code>: </li><li><code>dev:php-version</code>: PHP <code>php_version.h</code> </li><li><code>dev:sort-config</code>: <code>config/</code> </li><li><code>dev:lib-ver &lt;lib-name&gt;</code>: </li><li><code>dev:ext-ver &lt;ext-name&gt;</code>: </li><li><code>dev:pack-lib &lt;lib-name&gt;</code>: </li><li><code>dev:gen-ext-docs</code>: </li></ul><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;"> dev:extensions</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 输出指定扩展的信息</span></span>
@@ -170,4 +186,4 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">clang</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed.c</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bcmath,zlib</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> embed</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./embed</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,118),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># out: Hello world!</span></span></code></pre></div>`,122),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};

View File

@@ -1 +1 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.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("",118),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.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("",122),e=[l];function t(h,k,d,c,o,r){return a(),i("div",null,e)}const y=s(p,[["render",t]]);export{g as __pageData,y as default};