deploy: b6243d84786376df4b7cafe90ab05e5c3b938e21

This commit is contained in:
crazywhalecc 2025-03-08 02:05:41 +00:00
parent 0a9f306287
commit d73a1490fc
72 changed files with 146 additions and 152 deletions

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

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.u1TQZKA-.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};
import{C as e}from"./chunks/CliGenerator.ByPVB1Zk.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.u1TQZKA-.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};
import{C as e}from"./chunks/CliGenerator.ByPVB1Zk.js";import{d as t,c as a,I as o,a1 as n,o as r}from"./chunks/framework.gjrnbxUT.js";const i=n('<h1 id="cli-build-command-generator" tabindex="-1">CLI Build Command Generator <a class="header-anchor" href="#cli-build-command-generator" aria-label="Permalink to &quot;CLI Build Command Generator&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check <a href="./extensions.html">Supported Extensions</a> first.</p></div>',2),u=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},h=t({...s,setup(c){return(l,d)=>(r(),a("div",null,[i,o(e,{lang:"en"})]))}});export{u as __pageData,h as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as t}from"./chunks/SearchTable.B5gzMFOw.js";import{c as o,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const a=e('<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to &quot;Extensions&quot;"></a></h1><blockquote><ul><li><code>yes</code>: supported</li><li><em>blank</em>: not supported yet, or WIP</li><li><code>no</code> with issue link: confirmed to be unavailable due to issue</li><li><code>partial</code> with issue link: supported but not perfect due to issue</li></ul></blockquote>',2),n=e('<div class="tip custom-block"><p class="custom-block-title">TIP</p><p>If an extension you need is missing, you can create a <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">Feature Request</a>.</p><p>Some extensions or libraries that the extension depends on will have some optional features. For example, the gd library optionally supports libwebp, freetype, etc. If you only use <code>bin/spc build gd --build-cli</code> they will not be included (static-php-cli defaults to the minimum dependency principle).</p><p>For more information about optional libraries, see <a href="./deps-map.html">Extensions, Library Dependency Map</a>. For optional libraries, you can also select an extension from the <a href="./cli-generator.html">Command Generator</a> and then select optional libraries.</p></div>',1),_=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),l={name:"en/guide/extensions.md"},m=Object.assign(l,{setup(r){return(c,p)=>(s(),o("div",null,[a,i(t),n]))}});export{_ as __pageData,m as default};
import{_ as t}from"./chunks/SearchTable.CyGlUrS0.js";import{c as o,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const a=e('<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to &quot;Extensions&quot;"></a></h1><blockquote><ul><li><code>yes</code>: supported</li><li><em>blank</em>: not supported yet, or WIP</li><li><code>no</code> with issue link: confirmed to be unavailable due to issue</li><li><code>partial</code> with issue link: supported but not perfect due to issue</li></ul></blockquote>',2),n=e('<div class="tip custom-block"><p class="custom-block-title">TIP</p><p>If an extension you need is missing, you can create a <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">Feature Request</a>.</p><p>Some extensions or libraries that the extension depends on will have some optional features. For example, the gd library optionally supports libwebp, freetype, etc. If you only use <code>bin/spc build gd --build-cli</code> they will not be included (static-php-cli defaults to the minimum dependency principle).</p><p>For more information about optional libraries, see <a href="./deps-map.html">Extensions, Library Dependency Map</a>. For optional libraries, you can also select an extension from the <a href="./cli-generator.html">Command Generator</a> and then select optional libraries.</p></div>',1),_=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),l={name:"en/guide/extensions.md"},m=Object.assign(l,{setup(r){return(c,p)=>(s(),o("div",null,[a,i(t),n]))}});export{_ as __pageData,m as default};

View File

@ -1 +1 @@
import{_ as t}from"./chunks/SearchTable.B5gzMFOw.js";import{c as o,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const a=e("",2),n=e("",1),_=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),l={name:"en/guide/extensions.md"},m=Object.assign(l,{setup(r){return(c,p)=>(s(),o("div",null,[a,i(t),n]))}});export{_ as __pageData,m as default};
import{_ as t}from"./chunks/SearchTable.CyGlUrS0.js";import{c as o,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const a=e("",2),n=e("",1),_=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),l={name:"en/guide/extensions.md"},m=Object.assign(l,{setup(r){return(c,p)=>(s(),o("div",null,[a,i(t),n]))}});export{_ as __pageData,m as default};

View File

@ -21,7 +21,11 @@ import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> static-php-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># You need to install the PHP environment first before running Composer and this project. The installation method can be referred to below.</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><h3 id="use-system-php" tabindex="-1">Use System PHP <a class="header-anchor" href="#use-system-php" aria-label="Permalink to &quot;Use System PHP&quot;"></a></h3><p>Below are some example commands for installing PHP and Composer in the system. It is recommended to search for the specific installation method yourself or ask the AI search engine to obtain the answer, which will not be elaborated here.</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;"># [macOS], need install Homebrew first. See https://brew.sh/</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><h3 id="use-precompiled-static-php-binaries" tabindex="-1">Use Precompiled Static PHP Binaries <a class="header-anchor" href="#use-precompiled-static-php-binaries" aria-label="Permalink to &quot;Use Precompiled Static PHP Binaries&quot;"></a></h3><p>If you don&#39;t want to use Docker and install PHP in the system, you can directly download the php binary cli program compiled by this project itself. The usage process is as follows:</p><p>Deploy the environment using the command, the command will download a static php-cli binary from <a href="https://dl.static-php.dev/static-php-cli/" target="_blank" rel="noreferrer">self-hosted server</a>. Next, it will automatically download Composer from <a href="https://getcomposer.org/download/latest-stable/composer.phar" target="_blank" rel="noreferrer">getcomposer</a> or <a href="https://mirrors.aliyun.com/composer/composer.phar" target="_blank" rel="noreferrer">Aliyun mirror</a>.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Using precompiled static PHP binaries is currently only supported on Linux and macOS. The FreeBSD environment is currently not supported due to the lack of an automated build environment.</p></div><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:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For users with special network environments such as mainland China, you can use mirror sites (aliyun) to speed up the download speed</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mirror</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> china</span></span></code></pre></div><p>This script will download two files in total: <code>bin/php</code> and <code>bin/composer</code>. After the download is complete, there are two ways to use it:</p><ol><li>Add the <code>bin/</code> directory to the PATH: <code>export PATH=&quot;/path/to/your/static-php-cli/bin:$PATH&quot;</code>, after adding the path, it is equivalent to installing PHP in the system, you can directly Use commands such as <code>composer</code>, <code>php -v</code>, or directly use <code>bin/spc</code>.</li><li>Direct call, such as executing static-php-cli command: <code>bin/php bin/spc --help</code>, executing Composer: <code>bin/php bin/composer update</code>.</li></ol><h3 id="use-docker" tabindex="-1">Use Docker <a class="header-anchor" href="#use-docker" aria-label="Permalink to &quot;Use Docker&quot;"></a></h3><p>If you don&#39;t want to install PHP and Composer runtime environment on your system, you can use the built-in Docker environment build script.</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;"># To use directly, replace \`bin/spc\` with \`bin/spc-alpine-docker\` in all used commands</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc-alpine-docker</span></span></code></pre></div><p>The first time the command is executed, <code>docker build</code> will be used to build a Docker image. The default built Docker image is the <code>x86_64</code> architecture, and the image name is <code>cwcc-spc-x86_64</code>.</p><p>If you want to build <code>aarch64</code> static-php-cli in <code>x86_64</code> environment, you can use qemu to emulate the arm image to run Docker, but the speed will be very slow. Use command: <code>SPC_USE_ARCH=aarch64 bin/spc-alpine-docker</code>.</p><p>If it prompts that sudo is required to run after running, execute the following command once to grant static-php-cli permission to execute sudo:</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:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_USE_SUDO</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">yes</span></span></code></pre></div><h3 id="use-system-php" tabindex="-1">Use System PHP <a class="header-anchor" href="#use-system-php" aria-label="Permalink to &quot;Use System PHP&quot;"></a></h3><p>Below are some example commands for installing PHP and Composer in the system. It is recommended to search for the specific installation method yourself or ask the AI search engine to obtain the answer, which will not be elaborated here.</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;"># [macOS], need install Homebrew first. See https://brew.sh/</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Remember change your composer executable path. For M1/M2 Chip mac, &quot;/opt/homebrew/bin/&quot;, for Intel mac, &quot;/usr/local/bin/&quot;. Or add it to your own path.</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://getcomposer.org/download/latest-stable/composer.phar</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -O</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/bin/composer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/bin/composer</span></span>
@ -30,11 +34,7 @@ import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-tokenizer</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># [Alpine]</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">apk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> file</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xz</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-common</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-pcntl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-tokenizer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-phar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-posix</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-xml</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Currently, some versions of Ubuntu install older PHP versions, so no installation commands are provided. If necessary, it is recommended to add software sources such as ppa first, and then install the latest version of PHP and tokenizer, XML, and phar extensions.</p><p>Older versions of Debian may have an older (&lt;= 7.4) version of PHP installed by default, it is recommended to upgrade Debian first.</p></div><h3 id="use-docker" tabindex="-1">Use Docker <a class="header-anchor" href="#use-docker" aria-label="Permalink to &quot;Use Docker&quot;"></a></h3><p>If you don&#39;t want to install PHP and Composer runtime environment on your system, you can use the built-in Docker environment build script.</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;"># To use directly, replace \`bin/spc\` with \`bin/spc-alpine-docker\` in all used commands</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc-alpine-docker</span></span></code></pre></div><p>The first time the command is executed, <code>docker build</code> will be used to build a Docker image. The default built Docker image is the <code>x86_64</code> architecture, and the image name is <code>cwcc-spc-x86_64</code>.</p><p>If you want to build <code>aarch64</code> static-php-cli in <code>x86_64</code> environment, you can use qemu to emulate the arm image to run Docker, but the speed will be very slow. Use command: <code>SPC_USE_ARCH=aarch64 bin/spc-alpine-docker</code>.</p><p>If it prompts that sudo is required to run after running, execute the following command once to grant static-php-cli permission to execute sudo:</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:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_USE_SUDO</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">yes</span></span></code></pre></div><h3 id="use-precompiled-static-php-binaries" tabindex="-1">Use Precompiled Static PHP Binaries <a class="header-anchor" href="#use-precompiled-static-php-binaries" aria-label="Permalink to &quot;Use Precompiled Static PHP Binaries&quot;"></a></h3><p>If you don&#39;t want to use Docker and install PHP in the system, you can directly download the php binary cli program compiled by this project itself. The usage process is as follows:</p><p>Deploy the environment using the command, the command will download a static php-cli binary from <a href="https://dl.static-php.dev/static-php-cli/" target="_blank" rel="noreferrer">self-hosted server</a>. Next, it will automatically download Composer from <a href="https://getcomposer.org/download/latest-stable/composer.phar" target="_blank" rel="noreferrer">getcomposer</a> or <a href="https://mirrors.aliyun.com/composer/composer.phar" target="_blank" rel="noreferrer">Aliyun mirror</a>.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Using precompiled static PHP binaries is currently only supported on Linux and macOS. The FreeBSD environment is currently not supported due to the lack of an automated build environment.</p></div><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:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># For users with special network environments such as mainland China, you can use mirror sites (aliyun) to speed up the download speed</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mirror</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> china</span></span></code></pre></div><p>This script will download two files in total: <code>bin/php</code> and <code>bin/composer</code>. After the download is complete, there are two ways to use it:</p><ol><li>Add the <code>bin/</code> directory to the PATH: <code>export PATH=&quot;/path/to/your/static-php-cli/bin:$PATH&quot;</code>, after adding the path, it is equivalent to installing PHP in the system, you can directly Use commands such as <code>composer</code>, <code>php -v</code>, or directly use <code>bin/spc</code>.</li><li>Direct call, such as executing static-php-cli command: <code>bin/php bin/spc --help</code>, executing Composer: <code>bin/php bin/composer update</code>.</li></ol><h2 id="command-download" tabindex="-1">Command - download <a class="header-anchor" href="#command-download" aria-label="Permalink to &quot;Command - download&quot;"></a></h2><p>Use the command <code>bin/spc download</code> to download the source code required for compilation, including php-src and the source code of various dependent libraries.</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 all dependencies</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">apk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> file</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xz</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-common</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-pcntl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-tokenizer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-phar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-posix</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-xml</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Currently, some versions of Ubuntu install older PHP versions, so no installation commands are provided. If necessary, it is recommended to add software sources such as ppa first, and then install the latest version of PHP and tokenizer, XML, and phar extensions.</p><p>Older versions of Debian may have an older (&lt;= 7.4) version of PHP installed by default, it is recommended to upgrade Debian first.</p></div><h2 id="command-download" tabindex="-1">Command - download <a class="header-anchor" href="#command-download" aria-label="Permalink to &quot;Command - download&quot;"></a></h2><p>Use the command <code>bin/spc download</code> to download the source code required for compilation, including php-src and the source code of various dependent libraries.</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 all 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;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download all dependent packages, and specify the main version of PHP to download, optional: 8.1, 8.2, 8.3, 8.4</span></span>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.u1TQZKA-.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};
import{C as e}from"./chunks/CliGenerator.ByPVB1Zk.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};

View File

@ -1 +1 @@
import{C as e}from"./chunks/CliGenerator.u1TQZKA-.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};
import{C as e}from"./chunks/CliGenerator.ByPVB1Zk.js";import{d as a,c as t,I as o,a1 as r,o as i}from"./chunks/framework.gjrnbxUT.js";const s=r('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to &quot;CLI 编译命令生成器&quot;"></a></h1><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2),p=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),c={name:"zh/guide/cli-generator.md"},_=a({...c,setup(l){return(n,d)=>(i(),t("div",null,[s,o(e,{lang:"zh"})]))}});export{p as __pageData,_ as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{_ as t}from"./chunks/SearchTable.B5gzMFOw.js";import{c as a,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const c=e('<h1 id="扩展列表" tabindex="-1">扩展列表 <a class="header-anchor" href="#扩展列表" aria-label="Permalink to &quot;扩展列表&quot;"></a></h1><blockquote><ul><li><code>yes</code>: 已支持</li><li>空白: 目前还不支持,或正在支持中</li><li><code>no</code> with issue link: 确定不支持或无法支持</li><li><code>partial</code> with issue link: 已支持,但是无法完美工作</li></ul></blockquote>',2),o=e('<div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果缺少您需要的扩展,您可以创建 <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">功能请求</a>。</p><p>有些扩展或扩展依赖的库会有一些可选的特性,例如 gd 库可选支持 libwebp、freetype 等。 如果你只使用 <code>bin/spc build gd --build-cli</code> 是不会包含它们static-php-cli 默认为最小依赖原则)。</p><p>有关编译可选库,请参考 <a href="./deps-map.html">扩展、库的依赖关系图表</a>。对于可选的库,你也可以从 <a href="./cli-generator.html">编译命令生成器</a> 中选择扩展后展开选择可选库。</p></div>',1),h=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),l={name:"zh/guide/extensions.md"},u=Object.assign(l,{setup(_){return(r,d)=>(s(),a("div",null,[c,i(t),o]))}});export{h as __pageData,u as default};
import{_ as t}from"./chunks/SearchTable.CyGlUrS0.js";import{c as a,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const c=e('<h1 id="扩展列表" tabindex="-1">扩展列表 <a class="header-anchor" href="#扩展列表" aria-label="Permalink to &quot;扩展列表&quot;"></a></h1><blockquote><ul><li><code>yes</code>: 已支持</li><li>空白: 目前还不支持,或正在支持中</li><li><code>no</code> with issue link: 确定不支持或无法支持</li><li><code>partial</code> with issue link: 已支持,但是无法完美工作</li></ul></blockquote>',2),o=e('<div class="tip custom-block"><p class="custom-block-title">TIP</p><p>如果缺少您需要的扩展,您可以创建 <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">功能请求</a>。</p><p>有些扩展或扩展依赖的库会有一些可选的特性,例如 gd 库可选支持 libwebp、freetype 等。 如果你只使用 <code>bin/spc build gd --build-cli</code> 是不会包含它们static-php-cli 默认为最小依赖原则)。</p><p>有关编译可选库,请参考 <a href="./deps-map.html">扩展、库的依赖关系图表</a>。对于可选的库,你也可以从 <a href="./cli-generator.html">编译命令生成器</a> 中选择扩展后展开选择可选库。</p></div>',1),h=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),l={name:"zh/guide/extensions.md"},u=Object.assign(l,{setup(_){return(r,d)=>(s(),a("div",null,[c,i(t),o]))}});export{h as __pageData,u as default};

View File

@ -1 +1 @@
import{_ as t}from"./chunks/SearchTable.B5gzMFOw.js";import{c as a,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const c=e("",2),o=e("",1),h=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),l={name:"zh/guide/extensions.md"},u=Object.assign(l,{setup(_){return(r,d)=>(s(),a("div",null,[c,i(t),o]))}});export{h as __pageData,u as default};
import{_ as t}from"./chunks/SearchTable.CyGlUrS0.js";import{c as a,I as i,a1 as e,o as s}from"./chunks/framework.gjrnbxUT.js";const c=e("",2),o=e("",1),h=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),l={name:"zh/guide/extensions.md"},u=Object.assign(l,{setup(_){return(r,d)=>(s(),a("div",null,[c,i(t),o]))}});export{h as __pageData,u as default};

View File

@ -20,20 +20,17 @@ 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:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> static-php-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 你需要先安装 PHP 环境后再运行 Composer 和本项目安装方式可参考下面</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><h3 id="使-php-" tabindex="-1">使 PHP <a class="header-anchor" href="#使-php-" aria-label="Permalink to &quot;使 PHP &quot;"></a></h3><p> PHPComposer AI </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;"># [macOS], Homebrew. See https://brew.sh/</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> update</span></span></code></pre></div><h3 id="使-php--static-php-cli" tabindex="-1">使 PHP static-php-cli <a class="header-anchor" href="#使-php--static-php-cli" aria-label="Permalink to &quot;使 PHP static-php-cli&quot;"></a></h3><p>使 Docker PHP php cli 使</p><p>使 <a href="https://dl.static-php.dev/static-php-cli/" target="_blank" rel="noreferrer"></a> php-cli <a href="https://getcomposer.org/download/latest-stable/composer.phar" target="_blank" rel="noreferrer">getcomposer</a> <a href="https://mirrors.aliyun.com/composer/composer.phar" target="_blank" rel="noreferrer">Aliyun</a> Composer</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使 PHP Linux macOSFreeBSD </p></div><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:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</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/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mirror</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> china</span></span></code></pre></div><p><code>bin/php</code> <code>bin/composer</code>使</p><ol><li> <code>bin/</code> PATH <code>export PATH=&quot;/path/to/your/static-php-cli/bin:$PATH&quot;</code> PHP使 <code>composer</code><code>php -v</code> 使 <code>bin/spc</code></li><li> static-php-cli <code>bin/php bin/spc --help</code> Composer<code>bin/php bin/composer update</code></li></ol><h3 id="使-docker-" tabindex="-1">使 Docker <a class="header-anchor" href="#使-docker-" aria-label="Permalink to &quot;使 Docker &quot;"></a></h3><p> PHP Composer 使 Docker </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;"># 使使 \`bin/spc\` \`bin/spc-alpine-docker\` </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc-alpine-docker</span></span></code></pre></div><p>使 <code>docker build</code> Docker Docker <code>x86_64</code> <code>cwcc-spc-x86_64</code></p><p> <code>x86_64</code> <code>aarch64</code> static-php-cli使 qemu arm Docker使<code>SPC_USE_ARCH=aarch64 bin/spc-alpine-docker</code></p><p> sudo static-php-cli sudo </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:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_USE_SUDO</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">yes</span></span></code></pre></div><h3 id="使-php-" tabindex="-1">使 PHP <a class="header-anchor" href="#使-php-" aria-label="Permalink to &quot;使 PHP &quot;"></a></h3><p> PHPComposer AI </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;"># [macOS], Homebrew. See https://brew.sh/</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Remember change your composer executable path. For M1/M2 Chip mac, &quot;/opt/homebrew/bin/&quot;, for Intel mac, &quot;/usr/local/bin/&quot;. Or add it to your own path.</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://getcomposer.org/download/latest-stable/composer.phar</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -O</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/bin/composer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/your/bin/composer</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># [Debian], you need to make sure your php version &gt;= 8.1 and composer &gt;= 2.0</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-tokenizer</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># [Alpine]</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">apk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> file</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> wget</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xz</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-common</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-pcntl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-tokenizer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-phar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-posix</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php81-xml</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p> Ubuntu apt php ppa PHP tokenizerxmlphar </p><p> Debian &lt;= 7.4 PHP Debian</p></div><h3 id="使-docker-" tabindex="-1">使 Docker <a class="header-anchor" href="#使-docker-" aria-label="Permalink to &quot;使 Docker &quot;"></a></h3><p> PHP Composer 使 Docker </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;"># 使使 \`bin/spc\` \`bin/spc-alpine-docker\` </span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc-alpine-docker</span></span></code></pre></div><p>使 <code>docker build</code> Docker Docker <code>x86_64</code> <code>cwcc-spc-x86_64</code></p><p> <code>x86_64</code> <code>aarch64</code> static-php-cli使 qemu arm Docker使<code>SPC_USE_ARCH=aarch64 bin/spc-alpine-docker</code></p><p> sudo static-php-cli sudo </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:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_USE_SUDO</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">yes</span></span></code></pre></div><h3 id="使-php-" tabindex="-1">使 PHP <a class="header-anchor" href="#使-php-" aria-label="Permalink to &quot;使 PHP &quot;"></a></h3><p>使 Docker PHP php cli 使</p><p>使 <a href="https://dl.static-php.dev/static-php-cli/" target="_blank" rel="noreferrer"></a> php-cli <a href="https://getcomposer.org/download/latest-stable/composer.phar" target="_blank" rel="noreferrer">getcomposer</a> <a href="https://mirrors.aliyun.com/composer/composer.phar" target="_blank" rel="noreferrer">Aliyun</a> Composer</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>使 PHP Linux macOSFreeBSD </p></div><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:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</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/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mirror</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> china</span></span></code></pre></div><p><code>bin/php</code> <code>bin/composer</code>使</p><ol><li> <code>bin/</code> PATH <code>export PATH=&quot;/path/to/your/static-php-cli/bin:$PATH&quot;</code> PHP使 <code>composer</code><code>php -v</code> 使 <code>bin/spc</code></li><li> static-php-cli <code>bin/php bin/spc --help</code> Composer<code>bin/php bin/composer update</code></li></ol><h2 id="-download-" tabindex="-1"> download - <a class="header-anchor" href="#-download-" aria-label="Permalink to &quot; download - &quot;"></a></h2><p>使 <code>bin/spc download</code> php-src </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:#6A737D;--shiki-dark:#6A737D;"># [Debian], you need to make sure your php version &gt;= 8.4 and composer &gt;= 2.0</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> apt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> php-tokenizer</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p> Ubuntu apt php ppa PHP tokenizerxmlphar </p><p> Debian &lt;= 8.3 PHP Debian 使 Docker </p></div><h2 id="-download-" tabindex="-1"> download - <a class="header-anchor" href="#-download-" aria-label="Permalink to &quot; download - &quot;"></a></h2><p>使 <code>bin/spc download</code> php-src </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;"> --for-extensions=openssl,swoole,zip,pcntl,zstd</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 仅下载要编译的扩展及依赖库使用扩展名不包含可选库</span></span>

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

View File

@ -1 +1 @@
{"en_develop_php-src-changes.md":"DLlooohw","en_develop_doctor-module.md":"DGd8PeM_","en_contributing_index.md":"CsY8mx8F","en_guide_extension-notes.md":"BaBSDnpT","en_guide_build-on-windows.md":"0XosmiyO","en_guide_cli-generator.md":"DsQUY_G0","zh_develop_index.md":"-CPpDfMx","zh_develop_doctor-module.md":"DgFAPT6E","en_guide_manual-build.md":"C-MJHVXA","zh_develop_php-src-changes.md":"Df0-NcBw","extensions.md":"BOvD4zE9","en_develop_index.md":"B7_c9YYa","en_guide_index.md":"CjOUKFgy","en_guide_action-build.md":"BKamBazh","en_faq_index.md":"DLWPz-7S","deps-map-lib.md":"CHkEUaxl","en_guide_extensions.md":"C5vF7yDY","en_guide_env-vars.md":"DXDG6yvH","en_develop_structure.md":"BA5PDIse","en_develop_source-module.md":"CdOHR0ez","en_index.md":"Cbpb4iAg","extension-notes.md":"Bw8xYOie","en_guide_troubleshooting.md":"9z66WsuC","zh_contributing_index.md":"BvgdahxO","deps-map-ext.md":"Ct90_tZH","zh_guide_env-vars.md":"CfYA93uA","zh_guide_extensions.md":"A3n52TMR","zh_guide_build-on-windows.md":"BxVEYT8r","zh_guide_deps-map.md":"b1yfT0cS","zh_guide_extension-notes.md":"Bk8p1Uuk","zh_guide_index.md":"20ged7P4","zh_guide_troubleshooting.md":"DsBZI1Y4","zh_develop_source-module.md":"D0odLsHX","zh_index.md":"LslJ1UMp","en_guide_deps-map.md":"BMawLo1f","en_develop_system-build-tools.md":"D6vaAwN3","zh_faq_index.md":"DL8Ncj95","zh_develop_system-build-tools.md":"Ds53VEw1","zh_guide_manual-build.md":"BXKvCcei","zh_guide_cli-generator.md":"B7mYo4Lw","zh_guide_action-build.md":"DWMlBDvT","index.md":"mKXtywCA","zh_develop_structure.md":"B-0RMSSw"}
{"zh_faq_index.md":"DL8Ncj95","deps-map-lib.md":"CHkEUaxl","extensions.md":"BOvD4zE9","en_develop_index.md":"B7_c9YYa","en_develop_doctor-module.md":"DGd8PeM_","en_faq_index.md":"DLWPz-7S","en_guide_cli-generator.md":"xEZhv-_Y","zh_develop_index.md":"-CPpDfMx","en_index.md":"Cbpb4iAg","en_guide_deps-map.md":"CqlUBlcY","zh_guide_env-vars.md":"CfYA93uA","zh_develop_system-build-tools.md":"Ds53VEw1","zh_guide_extensions.md":"CR9s6CxE","zh_guide_action-build.md":"DWMlBDvT","deps-map-ext.md":"CLNwni-7","en_guide_troubleshooting.md":"9z66WsuC","en_guide_action-build.md":"BKamBazh","en_guide_build-on-windows.md":"0XosmiyO","en_contributing_index.md":"CsY8mx8F","zh_develop_source-module.md":"D0odLsHX","en_guide_extension-notes.md":"BaBSDnpT","en_guide_extensions.md":"CNECRpOR","en_develop_system-build-tools.md":"D6vaAwN3","zh_guide_deps-map.md":"UWX1b51U","zh_guide_troubleshooting.md":"DsBZI1Y4","index.md":"mKXtywCA","zh_contributing_index.md":"BvgdahxO","zh_develop_structure.md":"B-0RMSSw","en_guide_manual-build.md":"C-VHJ_6X","zh_guide_extension-notes.md":"Bk8p1Uuk","zh_develop_php-src-changes.md":"Df0-NcBw","extension-notes.md":"Bw8xYOie","zh_index.md":"LslJ1UMp","en_develop_php-src-changes.md":"DLlooohw","zh_develop_doctor-module.md":"DgFAPT6E","zh_guide_cli-generator.md":"CVhhOKTB","en_develop_structure.md":"BA5PDIse","zh_guide_build-on-windows.md":"BxVEYT8r","en_develop_source-module.md":"CdOHR0ez","zh_guide_manual-build.md":"DVwBMluu","en_guide_index.md":"CjOUKFgy","zh_guide_index.md":"20ged7P4","en_guide_env-vars.md":"DXDG6yvH"}

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