mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
deploy: 085abd635ec71cfc664c56a79708628939a34465
This commit is contained in:
parent
cc7a4f3b6b
commit
63e3c6df8c
File diff suppressed because one or more lines are too long
12
assets/chunks/CliGenerator.sWo19fOQ.js
Normal file
12
assets/chunks/CliGenerator.sWo19fOQ.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/chunks/SearchTable.DJokgFLn.js
Normal file
1
assets/chunks/SearchTable.DJokgFLn.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/deps-map-ext.md.DUyTm_Hg.js
Normal file
1
assets/deps-map-ext.md.DUyTm_Hg.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{C as t}from"./chunks/CliGenerator.CBybgzdB.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=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"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r('<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 “CLI Build Command Generator”"></a></h1><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default};
|
||||
import{C as t}from"./chunks/CliGenerator.sWo19fOQ.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=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"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r('<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 “CLI Build Command Generator”"></a></h1><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default};
|
||||
@ -1 +1 @@
|
||||
import{C as t}from"./chunks/CliGenerator.CBybgzdB.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=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"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r("",2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default};
|
||||
import{C as t}from"./chunks/CliGenerator.sWo19fOQ.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=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"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r("",2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default};
|
||||
1
assets/en_guide_deps-map.md.CpWEZHIz.js
Normal file
1
assets/en_guide_deps-map.md.CpWEZHIz.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as o}from"./chunks/SearchTable.B161kDpJ.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t('<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to “Extensions”"></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)),a(o),e[1]||(e[1]=t('<div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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))]))}});export{d as __pageData,u as default};
|
||||
import{_ as o}from"./chunks/SearchTable.DJokgFLn.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t('<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to “Extensions”"></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)),a(o),e[1]||(e[1]=t('<div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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))]))}});export{d as __pageData,u as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as o}from"./chunks/SearchTable.B161kDpJ.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t("",2)),a(o),e[1]||(e[1]=t("",1))]))}});export{d as __pageData,u as default};
|
||||
import{_ as o}from"./chunks/SearchTable.DJokgFLn.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t("",2)),a(o),e[1]||(e[1]=t("",1))]))}});export{d as __pageData,u as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as t,c as i,o,af as r}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"};function a(s,e,d,l,p,c){return o(),i("div",null,e[0]||(e[0]=[r('<h1 id="guide" tabindex="-1">Guide <a class="header-anchor" href="#guide" aria-label="Permalink to “Guide”"></a></h1><p>Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.</p><p>In the guide section, you will learn how to use static php cli to build standalone PHP programs.</p><ul><li><a href="./manual-build.html">Build (local)</a></li><li><a href="./action-build.html">Build (GitHub Actions)</a></li><li><a href="./extensions.html">Supported Extensions</a></li></ul><h2 id="compilation-environment" tabindex="-1">Compilation Environment <a class="header-anchor" href="#compilation-environment" aria-label="Permalink to “Compilation Environment”"></a></h2><p>The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>Among them, Linux is currently only tested on Ubuntu, Debian, and Alpine distributions, and other distributions have not been tested, which cannot guarantee successful compilation. For untested distributions, local compilation can be done using methods such as Docker to avoid environmental issues.</p><p>There are two architectures for macOS: <code>x86_64</code> and <code>Arm</code>, but binaries compiled on one architecture cannot be directly used on the other architecture. Rosetta 2 cannot guarantee that programs compiled with <code>Arm</code> architecture can fully run on <code>x86_64</code> environment.</p><p>Windows currently only supports the x86_64 architecture, and does not support 32-bit x86 or arm64 architecture.</p><h2 id="supported-php-version" tabindex="-1">Supported PHP Version <a class="header-anchor" href="#supported-php-version" aria-label="Permalink to “Supported PHP Version”"></a></h2><p>Currently, static php cli supports PHP versions 8.1 to 8.4, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.</p>',12)]))}const m=t(n,[["render",a]]);export{h as __pageData,m as default};
|
||||
import{_ as t,c as i,o,af as r}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"};function a(s,e,d,l,p,c){return o(),i("div",null,e[0]||(e[0]=[r('<h1 id="guide" tabindex="-1">Guide <a class="header-anchor" href="#guide" aria-label="Permalink to “Guide”"></a></h1><p>Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.</p><p>In the guide section, you will learn how to use static php cli to build standalone PHP programs.</p><ul><li><a href="./manual-build.html">Build (local)</a></li><li><a href="./action-build.html">Build (GitHub Actions)</a></li><li><a href="./extensions.html">Supported Extensions</a></li></ul><h2 id="compilation-environment" tabindex="-1">Compilation Environment <a class="header-anchor" href="#compilation-environment" aria-label="Permalink to “Compilation Environment”"></a></h2><p>The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>Among them, Linux is currently only tested on Ubuntu, Debian, and Alpine distributions, and other distributions have not been tested, which cannot guarantee successful compilation. For untested distributions, local compilation can be done using methods such as Docker to avoid environmental issues.</p><p>There are two architectures for macOS: <code>x86_64</code> and <code>Arm</code>, but binaries compiled on one architecture cannot be directly used on the other architecture. Rosetta 2 cannot guarantee that programs compiled with <code>Arm</code> architecture can fully run on <code>x86_64</code> environment.</p><p>Windows currently only supports the x86_64 architecture, and does not support 32-bit x86 or arm64 architecture.</p><h2 id="supported-php-version" tabindex="-1">Supported PHP Version <a class="header-anchor" href="#supported-php-version" aria-label="Permalink to “Supported PHP Version”"></a></h2><p>Currently, static php cli supports PHP versions 8.1 to 8.5, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.</p>',12)]))}const m=t(n,[["render",a]]);export{h as __pageData,m as default};
|
||||
@ -74,8 +74,8 @@ import{_ as s,c as e,o as a,af as n}from"./chunks/framework.PeLcR_tw.js";const k
|
||||
<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=curl,pcntl,xml</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --ignore-cache-sources=php-src</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-php=8.3.10</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Set retry times (default is 0)</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;"> --retry=2</span></span></code></pre></div><p>If the network in your area is not good, or the speed of downloading the dependency package is too slow, you can download <code>download.zip</code> which is packaged regularly every week from GitHub Action, and use the command to directly use the zip archive as a dependency.</p><p>Dependent packages can be downloaded locally from <a href="https://github.com/static-php/static-php-cli-hosted/actions/workflows/download-cache.yml" target="_blank" rel="noreferrer">Action</a>. Enter Action and select the latest Workflow that has been successfully run, and download <code>download-files-x.y</code>.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><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;"> --from-zip=/path/to/your/download.zip</span></span></code></pre></div><p>If a source cannot be downloaded all the time, or you need to download some specific version of the package, such as downloading the beta version of PHP, the old version of the library, etc., you can use the parameter <code>-U</code> or <code>--custom-url</code> to rewrite the download link, Make the downloader force the link you specify to download packages from this source. The method of use is <code>{source-name}:{url}</code>, which can rewrite the download URLs of multiple libraries at the same time. Also, it is available when downloading with the <code>--for-extensions</code> option.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Specifying to download a beta version of PHP8.3</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;"> "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"</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;"> --retry=2</span></span></code></pre></div><p>If the network in your area is not good, or the speed of downloading the dependency package is too slow, you can download <code>download.zip</code> which is packaged regularly every week from GitHub Action, and use the command to directly use the zip archive as a dependency.</p><p>Dependent packages can be downloaded locally from <a href="https://github.com/static-php/static-php-cli-hosted/actions/workflows/download-cache.yml" target="_blank" rel="noreferrer">Action</a>. Enter Action and select the latest Workflow that has been successfully run, and download <code>download-files-x.y</code>.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><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;"> --from-zip=/path/to/your/download.zip</span></span></code></pre></div><p>If a source cannot be downloaded all the time, or you need to download some specific version of the package, such as downloading the beta version of PHP, the old version of the library, etc., you can use the parameter <code>-U</code> or <code>--custom-url</code> to rewrite the download link, Make the downloader force the link you specify to download packages from this source. The method of use is <code>{source-name}:{url}</code>, which can rewrite the download URLs of multiple libraries at the same time. Also, it is available when downloading with the <code>--for-extensions</code> option.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Specifying to download a alpha version of PHP 8.5</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;"> "php-src:https://downloads.php.net/~edorian/php-8.5.0alpha2.tar.xz"</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><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"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><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>
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{C as a}from"./chunks/CliGenerator.CBybgzdB.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to “CLI 编译命令生成器”"></a></h1><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default};
|
||||
import{C as a}from"./chunks/CliGenerator.sWo19fOQ.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i('<h1 id="cli-编译命令生成器" tabindex="-1">CLI 编译命令生成器 <a class="header-anchor" href="#cli-编译命令生成器" aria-label="Permalink to “CLI 编译命令生成器”"></a></h1><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 <a href="./extensions.html">支持的扩展</a>。</p></div>',2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default};
|
||||
@ -1 +1 @@
|
||||
import{C as a}from"./chunks/CliGenerator.CBybgzdB.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i("",2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default};
|
||||
import{C as a}from"./chunks/CliGenerator.sWo19fOQ.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i("",2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default};
|
||||
1
assets/zh_guide_deps-map.md.BtnTeTE6.js
Normal file
1
assets/zh_guide_deps-map.md.BtnTeTE6.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{_ as i}from"./chunks/SearchTable.B161kDpJ.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t('<h1 id="扩展列表" tabindex="-1">扩展列表 <a class="header-anchor" href="#扩展列表" aria-label="Permalink to “扩展列表”"></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)),s(i),e[1]||(e[1]=t('<div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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))]))}});export{n as __pageData,p as default};
|
||||
import{_ as i}from"./chunks/SearchTable.DJokgFLn.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t('<h1 id="扩展列表" tabindex="-1">扩展列表 <a class="header-anchor" href="#扩展列表" aria-label="Permalink to “扩展列表”"></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)),s(i),e[1]||(e[1]=t('<div class="tip custom-block"><p class="custom-block-title custom-block-title-default">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))]))}});export{n as __pageData,p as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as i}from"./chunks/SearchTable.B161kDpJ.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t("",2)),s(i),e[1]||(e[1]=t("",1))]))}});export{n as __pageData,p as default};
|
||||
import{_ as i}from"./chunks/SearchTable.DJokgFLn.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t("",2)),s(i),e[1]||(e[1]=t("",1))]))}});export{n as __pageData,p as default};
|
||||
@ -1 +1 @@
|
||||
import{_ as a,c as e,o as d,af as i}from"./chunks/framework.PeLcR_tw.js";const _=JSON.parse('{"title":"指南","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/index.md","filePath":"zh/guide/index.md"}'),r={name:"zh/guide/index.md"};function n(h,t,l,p,c,o){return d(),e("div",null,t[0]||(t[0]=[i('<h1 id="指南" tabindex="-1">指南 <a class="header-anchor" href="#指南" aria-label="Permalink to “指南”"></a></h1><p>static-php-cli 是一个用于构建静态编译的 PHP 二进制的工具,目前支持 Linux 和 macOS 系统。</p><p>在指南章节中,你将了解到如何使用 static-php-cli 构建独立的 php 程序。</p><ul><li><a href="./manual-build.html">本地构建</a></li><li><a href="./action-build.html">Action 构建</a></li><li><a href="./extensions.html">扩展列表</a></li></ul><h2 id="编译环境" tabindex="-1">编译环境 <a class="header-anchor" href="#编译环境" aria-label="Permalink to “编译环境”"></a></h2><p>下面是架构支持情况,⚙️ 代表支持 GitHub Action 构建,💻 代表支持本地构建,空 代表暂不支持。</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>其中,Linux 目前仅在 Ubuntu、Debian、Alpine 发行版测试通过,其他发行版未进行测试,不能保证编译成功。 对于未经过测试的发行版,可以使用 Docker 等方式本地编译,避免环境导致的问题。</p><p>macOS 下支持 x86_64 和 Arm 两种架构,但在其中一个架构上编译的二进制无法直接在另一个架构上使用。 Rosetta 2 不能保证 Arm 架构编译的程序可以完全运行在 x86_64 环境下。</p><p>Windows 目前只支持 x86_64 架构,不支持 32 位 x86、不支持 arm64 架构。</p><h2 id="php-支持版本" tabindex="-1">PHP 支持版本 <a class="header-anchor" href="#php-支持版本" aria-label="Permalink to “PHP 支持版本”"></a></h2><p>目前,static-php-cli 对 PHP 8.1 ~ 8.4 版本是支持的,对于 PHP 8.0 及更早版本理论上支持,只需下载时选择早期版本即可。 但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。 我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。</p>',12)]))}const m=a(r,[["render",n]]);export{_ as __pageData,m as default};
|
||||
import{_ as a,c as e,o as d,af as i}from"./chunks/framework.PeLcR_tw.js";const _=JSON.parse('{"title":"指南","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/index.md","filePath":"zh/guide/index.md"}'),r={name:"zh/guide/index.md"};function n(h,t,l,p,c,o){return d(),e("div",null,t[0]||(t[0]=[i('<h1 id="指南" tabindex="-1">指南 <a class="header-anchor" href="#指南" aria-label="Permalink to “指南”"></a></h1><p>static-php-cli 是一个用于构建静态编译的 PHP 二进制的工具,目前支持 Linux 和 macOS 系统。</p><p>在指南章节中,你将了解到如何使用 static-php-cli 构建独立的 php 程序。</p><ul><li><a href="./manual-build.html">本地构建</a></li><li><a href="./action-build.html">Action 构建</a></li><li><a href="./extensions.html">扩展列表</a></li></ul><h2 id="编译环境" tabindex="-1">编译环境 <a class="header-anchor" href="#编译环境" aria-label="Permalink to “编译环境”"></a></h2><p>下面是架构支持情况,⚙️ 代表支持 GitHub Action 构建,💻 代表支持本地构建,空 代表暂不支持。</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>其中,Linux 目前仅在 Ubuntu、Debian、Alpine 发行版测试通过,其他发行版未进行测试,不能保证编译成功。 对于未经过测试的发行版,可以使用 Docker 等方式本地编译,避免环境导致的问题。</p><p>macOS 下支持 x86_64 和 Arm 两种架构,但在其中一个架构上编译的二进制无法直接在另一个架构上使用。 Rosetta 2 不能保证 Arm 架构编译的程序可以完全运行在 x86_64 环境下。</p><p>Windows 目前只支持 x86_64 架构,不支持 32 位 x86、不支持 arm64 架构。</p><h2 id="php-支持版本" tabindex="-1">PHP 支持版本 <a class="header-anchor" href="#php-支持版本" aria-label="Permalink to “PHP 支持版本”"></a></h2><p>目前,static-php-cli 对 PHP 8.1 ~ 8.5 版本是支持的,对于 PHP 8.0 及更早版本理论上支持,只需下载时选择早期版本即可。 但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。 我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。</p>',12)]))}const m=a(r,[["render",n]]);export{_ as __pageData,m as default};
|
||||
@ -1,4 +1,4 @@
|
||||
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const o=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),e={name:"zh/guide/manual-build.md"};function p(t,s,h,k,d,c){return n(),a("div",null,s[0]||(s[0]=[l(`<h1 id="本地构建-linux、macos、freebsd" tabindex="-1">本地构建(Linux、macOS、FreeBSD) <a class="header-anchor" href="#本地构建-linux、macos、freebsd" aria-label="Permalink to “本地构建(Linux、macOS、FreeBSD)”"></a></h1><p>本章节为 Linux、macOS、FreeBSD 的构建过程,如果你要在 Windows 上构建,请到 <a href="./build-on-windows.html">在 Windows 上构建</a>。</p><h2 id="手动构建-使用-spc-二进制-推荐" tabindex="-1">手动构建(使用 SPC 二进制)(推荐) <a class="header-anchor" href="#手动构建-使用-spc-二进制-推荐" aria-label="Permalink to “手动构建(使用 SPC 二进制)(推荐)”"></a></h2><p>本项目提供了一个 static-php-cli 的二进制文件,你可以直接下载对应平台的二进制文件,然后使用它来构建静态的 PHP。目前 <code>spc</code> 二进制支持的平台有 Linux 和 macOS。</p><p>使用以下命令从自托管服务器下载:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><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 i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const o=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),e={name:"zh/guide/manual-build.md"};function p(h,s,t,k,d,c){return n(),a("div",null,s[0]||(s[0]=[l(`<h1 id="本地构建-linux、macos、freebsd" tabindex="-1">本地构建(Linux、macOS、FreeBSD) <a class="header-anchor" href="#本地构建-linux、macos、freebsd" aria-label="Permalink to “本地构建(Linux、macOS、FreeBSD)”"></a></h1><p>本章节为 Linux、macOS、FreeBSD 的构建过程,如果你要在 Windows 上构建,请到 <a href="./build-on-windows.html">在 Windows 上构建</a>。</p><h2 id="手动构建-使用-spc-二进制-推荐" tabindex="-1">手动构建(使用 SPC 二进制)(推荐) <a class="header-anchor" href="#手动构建-使用-spc-二进制-推荐" aria-label="Permalink to “手动构建(使用 SPC 二进制)(推荐)”"></a></h2><p>本项目提供了一个 static-php-cli 的二进制文件,你可以直接下载对应平台的二进制文件,然后使用它来构建静态的 PHP。目前 <code>spc</code> 二进制支持的平台有 Linux 和 macOS。</p><p>使用以下命令从自托管服务器下载:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><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>
|
||||
@ -69,8 +69,8 @@ import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const o
|
||||
<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:#032F62;--shiki-dark:#9ECBFF;"> php-src,micro,zstd,ext-zstd</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;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --retry=2</span></span></code></pre></div><p>如果你所在地区的网络不好,或者下载依赖包速度过于缓慢,可以从 GitHub Action 下载每周定时打包的 <code>download.zip</code>,并使用命令直接使用 zip 压缩包作为依赖。 依赖包可以从 <a href="https://github.com/static-php/static-php-cli-hosted/actions/workflows/download-cache.yml" target="_blank" rel="noreferrer">Action</a> 下载到本地。 进入 Action 并选择一个最新成功运行的 Workflow,下载 <code>download-files-x.y</code> 即可。</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><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;"> --from-zip=/path/to/your/download.zip</span></span></code></pre></div><p>如果某个 source 始终无法下载,或者你需要下载一些特定版本的包,例如下载测试版 PHP、旧版本库等,可以使用参数 <code>-U</code> 或 <code>--custom-url</code> 重写下载链接, 让下载器强制使用你指定的链接下载此 source 的包。使用方法为 <code>{source-name}:{url}</code> 即可,可同时重写多个库的下载地址。在使用 <code>--for-extensions</code> 选项下载时同样可用。</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 例如:指定下载测试版的 PHP8.3</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;"> "php-src:https://downloads.php.net/~eric/php-8.3.0beta1.tar.gz"</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;"> --retry=2</span></span></code></pre></div><p>如果你所在地区的网络不好,或者下载依赖包速度过于缓慢,可以从 GitHub Action 下载每周定时打包的 <code>download.zip</code>,并使用命令直接使用 zip 压缩包作为依赖。 依赖包可以从 <a href="https://github.com/static-php/static-php-cli-hosted/actions/workflows/download-cache.yml" target="_blank" rel="noreferrer">Action</a> 下载到本地。 进入 Action 并选择一个最新成功运行的 Workflow,下载 <code>download-files-x.y</code> 即可。</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><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;"> --from-zip=/path/to/your/download.zip</span></span></code></pre></div><p>如果某个 source 始终无法下载,或者你需要下载一些特定版本的包,例如下载测试版 PHP、旧版本库等,可以使用参数 <code>-U</code> 或 <code>--custom-url</code> 重写下载链接, 让下载器强制使用你指定的链接下载此 source 的包。使用方法为 <code>{source-name}:{url}</code> 即可,可同时重写多个库的下载地址。在使用 <code>--for-extensions</code> 选项下载时同样可用。</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 例如:指定下载 Alpha 版的 PHP8.5</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;"> "php-src:https://downloads.php.net/~edorian/php-8.5.0alpha2.tar.xz"</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><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"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 例如:下载 master 分支的 php-src</span></span>
|
||||
@ -1 +1 @@
|
||||
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const o=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),e={name:"zh/guide/manual-build.md"};function p(t,s,h,k,d,c){return n(),a("div",null,s[0]||(s[0]=[l("",135)]))}const g=i(e,[["render",p]]);export{o as __pageData,g as default};
|
||||
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const o=JSON.parse('{"title":"本地构建(Linux、macOS、FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"zh/guide/manual-build.md","filePath":"zh/guide/manual-build.md"}'),e={name:"zh/guide/manual-build.md"};function p(h,s,t,k,d,c){return n(),a("div",null,s[0]||(s[0]=[l("",135)]))}const g=i(e,[["render",p]]);export{o as __pageData,g 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
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 @@
|
||||
{"deps-craft-yml.md":"DWPKeuXi","deps-map-ext.md":"C_51TV4x","deps-map-lib.md":"DOtBR8NX","en_contributing_index.md":"C8tXDL1f","en_develop_craft-yml.md":"BDq8uWIr","en_develop_doctor-module.md":"DYVfKght","en_develop_index.md":"DSlquryN","en_develop_php-src-changes.md":"DadHFaGC","en_develop_source-module.md":"CeJEgS_j","en_develop_structure.md":"D1kBTweh","en_develop_system-build-tools.md":"DK4AaCy_","en_faq_index.md":"DnHLgGcl","en_guide_action-build.md":"BCJvLz8l","en_guide_build-on-windows.md":"CG23CkLK","en_guide_build-with-glibc.md":"BDBCsGWa","en_guide_cli-generator.md":"bbOqH_9G","en_guide_deps-map.md":"Cy-sDexB","en_guide_env-vars.md":"DzVATbtO","en_guide_extension-notes.md":"qcRlR4zd","en_guide_extensions.md":"DZTyKBB9","en_guide_index.md":"BE1G5v55","en_guide_manual-build.md":"9IRiOUoX","en_guide_troubleshooting.md":"BvJgQKvb","en_index.md":"kO-e39M0","extension-notes.md":"DkpYDq7p","extensions.md":"I66dgmMR","index.md":"wJBxKTzp","zh_contributing_index.md":"22akXfoC","zh_develop_craft-yml.md":"Dfv1fXuq","zh_develop_doctor-module.md":"B8r2lbU8","zh_develop_index.md":"DecU9Y3b","zh_develop_php-src-changes.md":"CkjaMIky","zh_develop_source-module.md":"DoBnezP5","zh_develop_structure.md":"DStJTsYD","zh_develop_system-build-tools.md":"CxPkPV_h","zh_faq_index.md":"nE1d0aPt","zh_guide_action-build.md":"CYeVjGhJ","zh_guide_build-on-windows.md":"6JBREABQ","zh_guide_build-with-glibc.md":"CGbU937o","zh_guide_cli-generator.md":"DneI8j6p","zh_guide_deps-map.md":"DrAYlntu","zh_guide_env-vars.md":"DqYHbUfS","zh_guide_extension-notes.md":"BkfCboVT","zh_guide_extensions.md":"CXcHOBWO","zh_guide_index.md":"8F3ztbe5","zh_guide_manual-build.md":"CrFA3mm-","zh_guide_troubleshooting.md":"DSUIb51x","zh_index.md":"DcikGFee"}
|
||||
{"deps-craft-yml.md":"DWPKeuXi","deps-map-ext.md":"DUyTm_Hg","deps-map-lib.md":"DOtBR8NX","en_contributing_index.md":"C8tXDL1f","en_develop_craft-yml.md":"BDq8uWIr","en_develop_doctor-module.md":"DYVfKght","en_develop_index.md":"DSlquryN","en_develop_php-src-changes.md":"DadHFaGC","en_develop_source-module.md":"CeJEgS_j","en_develop_structure.md":"D1kBTweh","en_develop_system-build-tools.md":"DK4AaCy_","en_faq_index.md":"DnHLgGcl","en_guide_action-build.md":"BCJvLz8l","en_guide_build-on-windows.md":"CG23CkLK","en_guide_build-with-glibc.md":"BDBCsGWa","en_guide_cli-generator.md":"DxnnSLf6","en_guide_deps-map.md":"CpWEZHIz","en_guide_env-vars.md":"DzVATbtO","en_guide_extension-notes.md":"qcRlR4zd","en_guide_extensions.md":"mwwn3I1N","en_guide_index.md":"By6XUN6E","en_guide_manual-build.md":"szvbN8j_","en_guide_troubleshooting.md":"BvJgQKvb","en_index.md":"kO-e39M0","extension-notes.md":"DkpYDq7p","extensions.md":"I66dgmMR","index.md":"wJBxKTzp","zh_contributing_index.md":"22akXfoC","zh_develop_craft-yml.md":"Dfv1fXuq","zh_develop_doctor-module.md":"B8r2lbU8","zh_develop_index.md":"DecU9Y3b","zh_develop_php-src-changes.md":"CkjaMIky","zh_develop_source-module.md":"DoBnezP5","zh_develop_structure.md":"DStJTsYD","zh_develop_system-build-tools.md":"CxPkPV_h","zh_faq_index.md":"nE1d0aPt","zh_guide_action-build.md":"CYeVjGhJ","zh_guide_build-on-windows.md":"6JBREABQ","zh_guide_build-with-glibc.md":"CGbU937o","zh_guide_cli-generator.md":"DzQ7ESw0","zh_guide_deps-map.md":"BtnTeTE6","zh_guide_env-vars.md":"DqYHbUfS","zh_guide_extension-notes.md":"BkfCboVT","zh_guide_extensions.md":"DhhRyH8e","zh_guide_index.md":"DWAO4_zO","zh_guide_manual-build.md":"CBjxVwQN","zh_guide_troubleshooting.md":"DSUIb51x","zh_index.md":"DcikGFee"}
|
||||
|
||||
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
Loading…
x
Reference in New Issue
Block a user