deploy: 289f4b300a8d1c901e385dd68c45c84998d9674f

This commit is contained in:
henderkes 2025-06-12 04:49:10 +00:00
parent 02c38b7768
commit cf37e68881
236 changed files with 871 additions and 820 deletions

File diff suppressed because one or more lines are too long

1
assets/app.B4hLhYRx.js Normal file
View File

@ -0,0 +1 @@
import{R as p}from"./chunks/theme.8dVMQbWa.js";import{C as o,a1 as i,a2 as u,a3 as c,a4 as l,a5 as f,a6 as d,a7 as m,a8 as h,a9 as g,aa as A,d as y,u as C,p as v,y as w,ab as P,ac as R,ad as b,ae as E}from"./chunks/framework.PeLcR_tw.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=y({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=C();return v(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&P(),R(),b(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=L(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function L(){let e=o;return h(a=>{let t=g(a),s=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),s=import(t)),o&&(e=!1),s},n.NotFound)}o&&T().then(({app:e,router:a,data:t})=>{a.go(location.href,{initialLoad:!0}).then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};

View File

@ -1 +0,0 @@
import{U as o,a7 as p,a8 as u,a9 as l,aa as c,ab as f,ac as d,ad as m,ae as h,af as g,ag as A,d as P,u as v,y,x as w,ah as C,ai as R,aj as b,ak as E}from"./chunks/framework.gjrnbxUT.js";import{R as S}from"./chunks/theme.5IQMzWyn.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=x(),a=j();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function j(){return h(T)}function x(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp};

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,4 +1,4 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-craft-yml.md","filePath":"deps-craft-yml.md"}'),l={name:"deps-craft-yml.md"},t=n(`<div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># PHP version to build (default: 8.4)</span></span>
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-craft-yml.md","filePath":"deps-craft-yml.md"}'),t={name:"deps-craft-yml.md"};function p(h,s,e,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l(`<div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</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;"># PHP version to build (default: 8.4)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">php-version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8.4</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># [REQUIRED] Static PHP extensions to build (list or comma-separated are both accepted)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">extensions</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bcmath,fileinfo,phar,zlib,sodium,posix,pcntl</span></span>
@ -62,4 +62,4 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extra environment variables</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">extra-env</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # e.g. Use github token to avoid rate limit</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> GITHUB_TOKEN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">your-github-token</span></span></code></pre></div>`,1),p=[t];function h(e,k,r,d,o,c){return a(),i("div",null,p)}const y=s(l,[["render",h]]);export{g as __pageData,y as default};
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> GITHUB_TOKEN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">your-github-token</span></span></code></pre></div>`,1)]))}const c=i(t,[["render",p]]);export{E as __pageData,c as default};

View File

@ -0,0 +1 @@
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-craft-yml.md","filePath":"deps-craft-yml.md"}'),t={name:"deps-craft-yml.md"};function p(h,s,e,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l("",1)]))}const c=i(t,[["render",p]]);export{E as __pageData,c as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-craft-yml.md","filePath":"deps-craft-yml.md"}'),l={name:"deps-craft-yml.md"},t=n("",1),p=[t];function h(e,k,r,d,o,c){return a(),i("div",null,p)}const y=s(l,[["render",h]]);export{g as __pageData,y as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as d,c as b,o as r,af as l}from"./chunks/framework.PeLcR_tw.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-map-ext.md","filePath":"deps-map-ext.md"}'),s={name:"deps-map-ext.md"};function i(e,t,o,p,a,n){return r(),b("div",null,t[0]||(t[0]=[l("",8)]))}const g=d(s,[["render",i]]);export{c as __pageData,g as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as t,c as d,o as b,a1 as r}from"./chunks/framework.gjrnbxUT.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-map-ext.md","filePath":"deps-map-ext.md"}'),l={name:"deps-map-ext.md"},s=r("",8),i=[s];function e(o,p,a,n,m,q){return b(),d("div",null,i)}const g=t(l,[["render",e]]);export{c as __pageData,g as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as t,c as d,o as b,a1 as r}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-map-lib.md","filePath":"deps-map-lib.md"}'),i={name:"deps-map-lib.md"},l=r("",8),e=[l];function s(n,a,p,o,h,z){return b(),d("div",null,e)}const m=t(i,[["render",s]]);export{g as __pageData,m as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as d,c as b,o as r,af as i}from"./chunks/framework.PeLcR_tw.js";const z=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"deps-map-lib.md","filePath":"deps-map-lib.md"}'),l={name:"deps-map-lib.md"};function e(s,t,n,a,p,o){return r(),b("div",null,t[0]||(t[0]=[i("",8)]))}const c=d(l,[["render",e]]);export{z as __pageData,c as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as t,c as i,o,af as n}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Contributing","description":"","frontmatter":{},"headers":[],"relativePath":"en/contributing/index.md","filePath":"en/contributing/index.md"}'),a={name:"en/contributing/index.md"};function r(s,e,c,l,d,h){return o(),i("div",null,e[0]||(e[0]=[n("",18)]))}const p=t(a,[["render",r]]);export{m as __pageData,p as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"Contributing","description":"","frontmatter":{},"headers":[],"relativePath":"en/contributing/index.md","filePath":"en/contributing/index.md"}'),n={name:"en/contributing/index.md"},a=i("",18),r=[a];function s(c,l,d,u,h,m){return o(),t("div",null,r)}const b=e(n,[["render",s]]);export{f as __pageData,b as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"craft.yml Configuration","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/develop/craft-yml.md","filePath":"en/develop/craft-yml.md"}'),l={name:"en/develop/craft-yml.md"},t=n("",2),p=[t];function e(h,k,r,d,o,c){return a(),i("div",null,p)}const y=s(l,[["render",e]]);export{g as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"craft.yml Configuration","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/develop/craft-yml.md","filePath":"en/develop/craft-yml.md"}'),l={name:"en/develop/craft-yml.md"},t=n(`<h1 id="craft-yml-configuration" tabindex="-1">craft.yml Configuration <a class="header-anchor" href="#craft-yml-configuration" aria-label="Permalink to &quot;craft.yml Configuration&quot;"></a></h1><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># PHP version to build (default: 8.4)</span></span>
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const c=JSON.parse('{"title":"craft.yml Configuration","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/develop/craft-yml.md","filePath":"en/develop/craft-yml.md"}'),t={name:"en/develop/craft-yml.md"};function p(e,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l(`<h1 id="craft-yml-configuration" tabindex="-1">craft.yml Configuration <a class="header-anchor" href="#craft-yml-configuration" aria-label="Permalink to “craft.yml Configuration”"></a></h1><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</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;"># PHP version to build (default: 8.4)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">php-version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">8.4</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># [REQUIRED] Static PHP extensions to build (list or comma-separated are both accepted)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">extensions</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bcmath,fileinfo,phar,zlib,sodium,posix,pcntl</span></span>
@ -62,4 +62,4 @@ import{_ as s,c as i,o as a,a1 as n}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extra environment variables</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">extra-env</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # e.g. Use github token to avoid rate limit</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> GITHUB_TOKEN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">your-github-token</span></span></code></pre></div>`,2),p=[t];function e(h,k,r,d,o,c){return a(),i("div",null,p)}const y=s(l,[["render",e]]);export{g as __pageData,y as default};
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> GITHUB_TOKEN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">your-github-token</span></span></code></pre></div>`,2)]))}const E=i(t,[["render",p]]);export{c as __pageData,E as default};

View File

@ -0,0 +1 @@
import{_ as i,c as a,o as n,af as l}from"./chunks/framework.PeLcR_tw.js";const c=JSON.parse('{"title":"craft.yml Configuration","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/develop/craft-yml.md","filePath":"en/develop/craft-yml.md"}'),t={name:"en/develop/craft-yml.md"};function p(e,s,h,k,r,d){return n(),a("div",null,s[0]||(s[0]=[l("",2)]))}const E=i(t,[["render",p]]);export{c as __pageData,E as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Doctor module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/doctor-module.md","filePath":"en/develop/doctor-module.md"}'),t={name:"en/develop/doctor-module.md"},h=e("",13),n=[h];function l(k,p,r,d,o,c){return a(),i("div",null,n)}const y=s(t,[["render",l]]);export{g as __pageData,y as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Doctor module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/doctor-module.md","filePath":"en/develop/doctor-module.md"}'),t={name:"en/develop/doctor-module.md"},h=e(`<h1 id="doctor-module" tabindex="-1">Doctor module <a class="header-anchor" href="#doctor-module" aria-label="Permalink to &quot;Doctor module&quot;"></a></h1><p>The Doctor module is a relatively independent module used to check the system environment, which can be entered with the command <code>bin/spc doctor</code>, and the entry command class is in <code>DoctorCommand.php</code>.</p><p>The Doctor module is a checklist with a series of check items and automatic repair items. These items are stored in the <code>src/SPC/doctor/item/</code> directory, And two Attributes are used as check item tags and auto-fix item tags: <code>#[AsCheckItem]</code> and <code>#[AsFixItem]</code>.</p><p>Take the existing check item <code>if necessary tools are installed</code>, which is used to check whether the packages necessary for compilation are installed in the macOS system. The following is its source code:</p><div class="language-php vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">php</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;">use</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> SPC\\doctor\\AsCheckItem</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
import{_ as i,c as a,o as e,af as t}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"Doctor module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/doctor-module.md","filePath":"en/develop/doctor-module.md"}'),h={name:"en/develop/doctor-module.md"};function n(l,s,k,p,r,d){return e(),a("div",null,s[0]||(s[0]=[t(`<h1 id="doctor-module" tabindex="-1">Doctor module <a class="header-anchor" href="#doctor-module" aria-label="Permalink to “Doctor module”"></a></h1><p>The Doctor module is a relatively independent module used to check the system environment, which can be entered with the command <code>bin/spc doctor</code>, and the entry command class is in <code>DoctorCommand.php</code>.</p><p>The Doctor module is a checklist with a series of check items and automatic repair items. These items are stored in the <code>src/SPC/doctor/item/</code> directory, And two Attributes are used as check item tags and auto-fix item tags: <code>#[AsCheckItem]</code> and <code>#[AsFixItem]</code>.</p><p>Take the existing check item <code>if necessary tools are installed</code>, which is used to check whether the packages necessary for compilation are installed in the macOS system. The following is its source code:</p><div class="language-php"><button title="Copy Code" class="copy"></button><span class="lang">php</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:#D73A49;--shiki-dark:#F97583;">use</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> SPC\\doctor\\AsCheckItem</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">use</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> SPC\\doctor\\AsFixItem</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">use</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> SPC\\doctor\\CheckResult</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"></span>
@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> CheckResult</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">fail</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;missing system commands: &#39;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> implode</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;, &#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, $missing), </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;build-tools&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, [$missing]);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> CheckResult</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ok</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The first parameter of the attribute is the name of the check item, and the following <code>limit_os</code> parameter restricts the check item to be triggered only under the specified system, and <code>level</code> is the priority of executing the check item, the larger the number, the higher the priority higher.</p><p>The <code>$this-&gt;findCommand()</code> method used in it is the method of <code>SPC\\builder\\traits\\UnixSystemUtilTrait</code>, the purpose is to find the location of the system command, and return NULL if it cannot be found.</p><p>Each check item method should return a <code>SPC\\doctor\\CheckResult</code>:</p><ul><li>When returning <code>CheckResult::fail()</code>, the first parameter is used to output the error prompt of the terminal, and the second parameter is the name of the repair item when this check item can be automatically repaired.</li><li>When <code>CheckResult::ok()</code> is returned, the check passed. You can also pass a parameter to return the check result, for example: <code>CheckResult::ok(&#39;OS supported&#39;)</code>.</li><li>When returning <code>CheckResult::fail()</code>, if the third parameter is included, the array of the third parameter will be used as the parameter of <code>AsFixItem</code>.</li></ul><p>The following is the method for automatically repairing items corresponding to this check item:</p><div class="language-php vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">php</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">#[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">AsFixItem</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;build-tools&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The first parameter of the attribute is the name of the check item, and the following <code>limit_os</code> parameter restricts the check item to be triggered only under the specified system, and <code>level</code> is the priority of executing the check item, the larger the number, the higher the priority higher.</p><p>The <code>$this-&gt;findCommand()</code> method used in it is the method of <code>SPC\\builder\\traits\\UnixSystemUtilTrait</code>, the purpose is to find the location of the system command, and return NULL if it cannot be found.</p><p>Each check item method should return a <code>SPC\\doctor\\CheckResult</code>:</p><ul><li>When returning <code>CheckResult::fail()</code>, the first parameter is used to output the error prompt of the terminal, and the second parameter is the name of the repair item when this check item can be automatically repaired.</li><li>When <code>CheckResult::ok()</code> is returned, the check passed. You can also pass a parameter to return the check result, for example: <code>CheckResult::ok(&#39;OS supported&#39;)</code>.</li><li>When returning <code>CheckResult::fail()</code>, if the third parameter is included, the array of the third parameter will be used as the parameter of <code>AsFixItem</code>.</li></ul><p>The following is the method for automatically repairing items corresponding to this check item:</p><div class="language-php"><button title="Copy Code" class="copy"></button><span class="lang">php</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:#24292E;--shiki-dark:#E1E4E8;">#[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">AsFixItem</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;build-tools&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> fixBuildTools</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">array</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $missing)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> bool</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> foreach</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ($missing </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">as</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $cmd) {</span></span>
@ -26,4 +26,4 @@ import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const g
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><code>#[AsFixItem()]</code> first parameter is the name of the fix item, and this method must return True or False. When False is returned, the automatic repair failed and manual handling is required.</p><p>In the code here, <code>shell()-&gt;exec()</code> is the method of executing commands of the project, which is used to replace <code>exec()</code> and <code>system()</code>, and also provides debugging, obtaining execution status, entering directories, etc. characteristic.</p>`,13),n=[h];function l(k,p,r,d,o,c){return a(),i("div",null,n)}const y=s(t,[["render",l]]);export{g as __pageData,y as default};
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><code>#[AsFixItem()]</code> first parameter is the name of the fix item, and this method must return True or False. When False is returned, the automatic repair failed and manual handling is required.</p><p>In the code here, <code>shell()-&gt;exec()</code> is the method of executing commands of the project, which is used to replace <code>exec()</code> and <code>system()</code>, and also provides debugging, obtaining execution status, entering directories, etc. characteristic.</p>`,13)]))}const c=i(h,[["render",n]]);export{E as __pageData,c as default};

View File

@ -0,0 +1 @@
import{_ as i,c as a,o as e,af as t}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"Doctor module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/doctor-module.md","filePath":"en/develop/doctor-module.md"}'),h={name:"en/develop/doctor-module.md"};function n(l,s,k,p,r,d){return e(),a("div",null,s[0]||(s[0]=[t("",13)]))}const c=i(h,[["render",n]]);export{E as __pageData,c as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as n}from"./chunks/framework.gjrnbxUT.js";const v=JSON.parse('{"title":"Start Developing","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}'),i={name:"en/develop/index.md"},s=n('<h1 id="start-developing" tabindex="-1">Start Developing <a class="header-anchor" href="#start-developing" aria-label="Permalink to &quot;Start Developing&quot;"></a></h1><p>Developing this project requires the installation and deployment of a PHP environment, as well as some extensions and Composer commonly used in PHP projects.</p><p>The development environment and running environment of the project are almost exactly the same. You can refer to the <strong>Manual Build</strong> section to install system PHP or use the pre-built static PHP of this project as the environment. I will not go into details here.</p><p>Regardless of its purpose, this project itself is actually a <code>php-cli</code> program. You can edit and develop it as a normal PHP project. At the same time, you need to understand the Shell languages of different systems.</p><p>The current purpose of this project is to compile statically compiled independent PHP, but the main part also includes compiling static versions of many dependent libraries, so you can reuse this set of compilation logic to build independent binary versions of other programs, such as Nginx, etc.</p><h2 id="environment-preparation" tabindex="-1">Environment preparation <a class="header-anchor" href="#environment-preparation" aria-label="Permalink to &quot;Environment preparation&quot;"></a></h2><p>A PHP environment is required to develop this project. You can use the PHP that comes with the system, or you can use the static PHP built by this project.</p><p>Regardless of which PHP you use, in your development environment you need to install these extensions:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>curl,dom,filter,mbstring,openssl,pcntl,phar,posix,sodium,tokenizer,xml,xmlwriter</span></span></code></pre></div><p>The static-php-cli project itself does not require so many extensions, but during the development process, you will use tools such as Composer and PHPUnit, which require these extensions.</p><blockquote><p>For micro self-executing binaries built by static-php-cli itself, only <code>pcntl,posix,mbstring,tokenizer,phar</code> is required.</p></blockquote><h2 id="start-development" tabindex="-1">Start development <a class="header-anchor" href="#start-development" aria-label="Permalink to &quot;Start development&quot;"></a></h2><p>Continuing down to see the project structure documentation, you can learn how <code>static-php-cli</code> works.</p>',13),a=[s];function r(p,l,c,d,h,u){return o(),t("div",null,a)}const g=e(i,[["render",r]]);export{v as __pageData,g as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as n}from"./chunks/framework.gjrnbxUT.js";const v=JSON.parse('{"title":"Start Developing","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}'),i={name:"en/develop/index.md"},s=n("",13),a=[s];function r(p,l,c,d,h,u){return o(),t("div",null,a)}const g=e(i,[["render",r]]);export{v as __pageData,g as default};

View File

@ -0,0 +1 @@
import{_ as t,c as o,o as n,af as i}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Start Developing","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}'),s={name:"en/develop/index.md"};function a(r,e,l,p,c,d){return n(),o("div",null,e[0]||(e[0]=[i('<h1 id="start-developing" tabindex="-1">Start Developing <a class="header-anchor" href="#start-developing" aria-label="Permalink to “Start Developing”"></a></h1><p>Developing this project requires the installation and deployment of a PHP environment, as well as some extensions and Composer commonly used in PHP projects.</p><p>The development environment and running environment of the project are almost exactly the same. You can refer to the <strong>Manual Build</strong> section to install system PHP or use the pre-built static PHP of this project as the environment. I will not go into details here.</p><p>Regardless of its purpose, this project itself is actually a <code>php-cli</code> program. You can edit and develop it as a normal PHP project. At the same time, you need to understand the Shell languages of different systems.</p><p>The current purpose of this project is to compile statically compiled independent PHP, but the main part also includes compiling static versions of many dependent libraries, so you can reuse this set of compilation logic to build independent binary versions of other programs, such as Nginx, etc.</p><h2 id="environment-preparation" tabindex="-1">Environment preparation <a class="header-anchor" href="#environment-preparation" aria-label="Permalink to “Environment preparation”"></a></h2><p>A PHP environment is required to develop this project. You can use the PHP that comes with the system, or you can use the static PHP built by this project.</p><p>Regardless of which PHP you use, in your development environment you need to install these extensions:</p><div class="language-"><button title="Copy Code" class="copy"></button><span class="lang"></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>curl,dom,filter,mbstring,openssl,pcntl,phar,posix,sodium,tokenizer,xml,xmlwriter</span></span></code></pre></div><p>The static-php-cli project itself does not require so many extensions, but during the development process, you will use tools such as Composer and PHPUnit, which require these extensions.</p><blockquote><p>For micro self-executing binaries built by static-php-cli itself, only <code>pcntl,posix,mbstring,tokenizer,phar</code> is required.</p></blockquote><h2 id="start-development" tabindex="-1">Start development <a class="header-anchor" href="#start-development" aria-label="Permalink to “Start development”"></a></h2><p>Continuing down to see the project structure documentation, you can learn how <code>static-php-cli</code> works.</p>',13)]))}const u=t(s,[["render",a]]);export{m as __pageData,u as default};

View File

@ -0,0 +1 @@
import{_ as t,c as o,o as n,af as i}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Start Developing","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/index.md","filePath":"en/develop/index.md"}'),s={name:"en/develop/index.md"};function a(r,e,l,p,c,d){return n(),o("div",null,e[0]||(e[0]=[i("",13)]))}const u=t(s,[["render",a]]);export{m as __pageData,u as default};

View File

@ -1 +0,0 @@
import{_ as e,c as i,o as t,a1 as o}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"Modifications to PHP source code","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/php-src-changes.md","filePath":"en/develop/php-src-changes.md"}'),a={name:"en/develop/php-src-changes.md"},s=o('<h1 id="modifications-to-php-source-code" tabindex="-1">Modifications to PHP source code <a class="header-anchor" href="#modifications-to-php-source-code" aria-label="Permalink to &quot;Modifications to PHP source code&quot;"></a></h1><p>During the static compilation process, static-php-cli made some modifications to the PHP source code in order to achieve good compatibility, performance, and security. The following is a description of the current modifications to the PHP source code.</p><h2 id="micro-related-patches" tabindex="-1">Micro related patches <a class="header-anchor" href="#micro-related-patches" aria-label="Permalink to &quot;Micro related patches&quot;"></a></h2><p>Based on the patches provided by the phpmicro project, static-php-cli has made some modifications to the PHP source code to meet the needs of static compilation. The patches currently used by static-php-cli during compilation in the <a href="https://github.com/easysoft/phpmicro/tree/master/patches" target="_blank" rel="noreferrer">patch list</a> are:</p><ul><li>static_opcache</li><li>static_extensions_win32</li><li>cli_checks</li><li>disable_huge_page</li><li>vcruntime140</li><li>win32</li><li>zend_stream</li><li>cli_static</li><li>macos_iconv</li><li>phar</li></ul><h2 id="php-8-1-libxml-patch" tabindex="-1">PHP &lt;= 8.1 libxml patch <a class="header-anchor" href="#php-8-1-libxml-patch" aria-label="Permalink to &quot;PHP &lt;= 8.1 libxml patch&quot;"></a></h2><p>Because PHP only provides security updates for 8.1 and stops updating older versions, static-php-cli applies the libxml compilation patch that has been applied in newer versions of PHP to PHP 8.1 and below.</p><h2 id="gd-extension-windows-patch" tabindex="-1">gd extension Windows patch <a class="header-anchor" href="#gd-extension-windows-patch" aria-label="Permalink to &quot;gd extension Windows patch&quot;"></a></h2><p>Compiling the gd extension under Windows requires major changes to the <code>config.w32</code> file. static-php-cli has made some changes to the gd extension to make it easier to compile under Windows.</p><h2 id="yaml-extension-windows-patch" tabindex="-1">YAML extension Windows patch <a class="header-anchor" href="#yaml-extension-windows-patch" aria-label="Permalink to &quot;YAML extension Windows patch&quot;"></a></h2><p>YAML extension needs to modify the <code>config.w32</code> file to compile under Windows. static-php-cli has made some modifications to the YAML extension to make it easier to compile under Windows.</p><h2 id="static-php-cli-version-information-insertion" tabindex="-1">static-php-cli version information insertion <a class="header-anchor" href="#static-php-cli-version-information-insertion" aria-label="Permalink to &quot;static-php-cli version information insertion&quot;"></a></h2><p>When compiling, static-php-cli will insert the static-php-cli version information into the PHP version information for easy identification.</p><h2 id="add-option-to-hardcode-ini" tabindex="-1">Add option to hardcode INI <a class="header-anchor" href="#add-option-to-hardcode-ini" aria-label="Permalink to &quot;Add option to hardcode INI&quot;"></a></h2><p>When using the <code>-I</code> parameter to hardcode INI into static PHP functionality, static-php-cli will modify the PHP source code to insert the hardcoded content.</p><h2 id="linux-system-repair-patch" tabindex="-1">Linux system repair patch <a class="header-anchor" href="#linux-system-repair-patch" aria-label="Permalink to &quot;Linux system repair patch&quot;"></a></h2><p>Some compilation environments may lack some system header files or libraries. static-php-cli will automatically fix these problems during compilation, such as:</p><ul><li>HAVE_STRLCAT missing problem</li><li>HAVE_STRLCPY missing problem</li></ul><h2 id="fiber-issue-fix-patch-for-windows" tabindex="-1">Fiber issue fix patch for Windows <a class="header-anchor" href="#fiber-issue-fix-patch-for-windows" aria-label="Permalink to &quot;Fiber issue fix patch for Windows&quot;"></a></h2><p>When compiling PHP on Windows, there will be some issues with the Fiber extension. static-php-cli will automatically fix these issues during compilation (modify <code>config.w32</code> in php-src).</p>',20),n=[s];function c(r,h,l,p,d,m){return t(),i("div",null,n)}const P=e(a,[["render",c]]);export{f as __pageData,P as default};

View File

@ -1 +0,0 @@
import{_ as e,c as i,o as t,a1 as o}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"Modifications to PHP source code","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/php-src-changes.md","filePath":"en/develop/php-src-changes.md"}'),a={name:"en/develop/php-src-changes.md"},s=o("",20),n=[s];function c(r,h,l,p,d,m){return t(),i("div",null,n)}const P=e(a,[["render",c]]);export{f as __pageData,P as default};

View File

@ -0,0 +1 @@
import{_ as i,c as t,o as a,af as o}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Modifications to PHP source code","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/php-src-changes.md","filePath":"en/develop/php-src-changes.md"}'),s={name:"en/develop/php-src-changes.md"};function n(c,e,r,l,h,p){return a(),t("div",null,e[0]||(e[0]=[o('<h1 id="modifications-to-php-source-code" tabindex="-1">Modifications to PHP source code <a class="header-anchor" href="#modifications-to-php-source-code" aria-label="Permalink to “Modifications to PHP source code”"></a></h1><p>During the static compilation process, static-php-cli made some modifications to the PHP source code in order to achieve good compatibility, performance, and security. The following is a description of the current modifications to the PHP source code.</p><h2 id="micro-related-patches" tabindex="-1">Micro related patches <a class="header-anchor" href="#micro-related-patches" aria-label="Permalink to “Micro related patches”"></a></h2><p>Based on the patches provided by the phpmicro project, static-php-cli has made some modifications to the PHP source code to meet the needs of static compilation. The patches currently used by static-php-cli during compilation in the <a href="https://github.com/easysoft/phpmicro/tree/master/patches" target="_blank" rel="noreferrer">patch list</a> are:</p><ul><li>static_opcache</li><li>static_extensions_win32</li><li>cli_checks</li><li>disable_huge_page</li><li>vcruntime140</li><li>win32</li><li>zend_stream</li><li>cli_static</li><li>macos_iconv</li><li>phar</li></ul><h2 id="php-8-1-libxml-patch" tabindex="-1">PHP &lt;= 8.1 libxml patch <a class="header-anchor" href="#php-8-1-libxml-patch" aria-label="Permalink to “PHP &lt;= 8.1 libxml patch”"></a></h2><p>Because PHP only provides security updates for 8.1 and stops updating older versions, static-php-cli applies the libxml compilation patch that has been applied in newer versions of PHP to PHP 8.1 and below.</p><h2 id="gd-extension-windows-patch" tabindex="-1">gd extension Windows patch <a class="header-anchor" href="#gd-extension-windows-patch" aria-label="Permalink to “gd extension Windows patch”"></a></h2><p>Compiling the gd extension under Windows requires major changes to the <code>config.w32</code> file. static-php-cli has made some changes to the gd extension to make it easier to compile under Windows.</p><h2 id="yaml-extension-windows-patch" tabindex="-1">YAML extension Windows patch <a class="header-anchor" href="#yaml-extension-windows-patch" aria-label="Permalink to “YAML extension Windows patch”"></a></h2><p>YAML extension needs to modify the <code>config.w32</code> file to compile under Windows. static-php-cli has made some modifications to the YAML extension to make it easier to compile under Windows.</p><h2 id="static-php-cli-version-information-insertion" tabindex="-1">static-php-cli version information insertion <a class="header-anchor" href="#static-php-cli-version-information-insertion" aria-label="Permalink to “static-php-cli version information insertion”"></a></h2><p>When compiling, static-php-cli will insert the static-php-cli version information into the PHP version information for easy identification.</p><h2 id="add-option-to-hardcode-ini" tabindex="-1">Add option to hardcode INI <a class="header-anchor" href="#add-option-to-hardcode-ini" aria-label="Permalink to “Add option to hardcode INI”"></a></h2><p>When using the <code>-I</code> parameter to hardcode INI into static PHP functionality, static-php-cli will modify the PHP source code to insert the hardcoded content.</p><h2 id="linux-system-repair-patch" tabindex="-1">Linux system repair patch <a class="header-anchor" href="#linux-system-repair-patch" aria-label="Permalink to “Linux system repair patch”"></a></h2><p>Some compilation environments may lack some system header files or libraries. static-php-cli will automatically fix these problems during compilation, such as:</p><ul><li>HAVE_STRLCAT missing problem</li><li>HAVE_STRLCPY missing problem</li></ul><h2 id="fiber-issue-fix-patch-for-windows" tabindex="-1">Fiber issue fix patch for Windows <a class="header-anchor" href="#fiber-issue-fix-patch-for-windows" aria-label="Permalink to “Fiber issue fix patch for Windows”"></a></h2><p>When compiling PHP on Windows, there will be some issues with the Fiber extension. static-php-cli will automatically fix these issues during compilation (modify <code>config.w32</code> in php-src).</p>',20)]))}const f=i(s,[["render",n]]);export{m as __pageData,f as default};

View File

@ -0,0 +1 @@
import{_ as i,c as t,o as a,af as o}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Modifications to PHP source code","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/php-src-changes.md","filePath":"en/develop/php-src-changes.md"}'),s={name:"en/develop/php-src-changes.md"};function n(c,e,r,l,h,p){return a(),t("div",null,e[0]||(e[0]=[o("",20)]))}const f=i(s,[["render",n]]);export{m as __pageData,f as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Source module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/source-module.md","filePath":"en/develop/source-module.md"}'),t={name:"en/develop/source-module.md"},n=e("",75),l=[n];function h(p,o,k,d,r,E){return a(),i("div",null,l)}const g=s(t,[["render",h]]);export{u as __pageData,g as default};

View File

@ -1,4 +1,4 @@
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Source module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/source-module.md","filePath":"en/develop/source-module.md"}'),t={name:"en/develop/source-module.md"},n=e(`<h1 id="source-module" tabindex="-1">Source module <a class="header-anchor" href="#source-module" aria-label="Permalink to &quot;Source module&quot;"></a></h1><p>The download source module of static-php-cli is a major module. It includes dependent libraries, external extensions, PHP source code download methods and file decompression methods. The download configuration file mainly involves the <code>source.json</code> and <code>pkg.json</code> file, which records the download method of all downloadable sources.</p><p>The main commands involved in the download function are <code>bin/spc download</code> and <code>bin/spc extract</code>. The <code>download</code> command is a downloader that downloads sources according to the configuration file, and the <code>extract</code> command is an extractor that extract sources from downloaded files.</p><p>Generally speaking, downloading sources may be slow because these sources come from various official websites, GitHub, and other different locations. At the same time, they also occupy a large space, so you can download the sources once and reuse them.</p><p>The configuration file of the downloader is <code>source.json</code>, which contains the download methods of all sources. You can add the source download methods you need, or modify the existing source download methods.</p><p>The download configuration structure of each source is as follows. The following is the source download configuration corresponding to the <code>libevent</code> extension:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
import{_ as i,c as a,o as e,af as t}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"Source module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/source-module.md","filePath":"en/develop/source-module.md"}'),n={name:"en/develop/source-module.md"};function l(h,s,p,o,k,d){return e(),a("div",null,s[0]||(s[0]=[t(`<h1 id="source-module" tabindex="-1">Source module <a class="header-anchor" href="#source-module" aria-label="Permalink to “Source module”"></a></h1><p>The download source module of static-php-cli is a major module. It includes dependent libraries, external extensions, PHP source code download methods and file decompression methods. The download configuration file mainly involves the <code>source.json</code> and <code>pkg.json</code> file, which records the download method of all downloadable sources.</p><p>The main commands involved in the download function are <code>bin/spc download</code> and <code>bin/spc extract</code>. The <code>download</code> command is a downloader that downloads sources according to the configuration file, and the <code>extract</code> command is an extractor that extract sources from downloaded files.</p><p>Generally speaking, downloading sources may be slow because these sources come from various official websites, GitHub, and other different locations. At the same time, they also occupy a large space, so you can download the sources once and reuse them.</p><p>The configuration file of the downloader is <code>source.json</code>, which contains the download methods of all sources. You can add the source download methods you need, or modify the existing source download methods.</p><p>The download configuration structure of each source is as follows. The following is the source download configuration corresponding to the <code>libevent</code> extension:</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;libevent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ghrel&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;libevent/libevent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -9,7 +9,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The most important field here is <code>type</code>. Currently, the types it supports are:</p><ul><li><code>url</code>: Directly use URL to download, for example: <code>https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz</code>.</li><li><code>ghrel</code>: Use the GitHub Release API to download, download the artifacts uploaded from the latest version released by maintainers.</li><li><code>ghtar</code>: Use the GitHub Release API to download. Different from <code>ghrel</code>, <code>ghtar</code> is downloaded from the <code>source code (tar.gz)</code> in the latest Release of the project.</li><li><code>ghtagtar</code>: Use GitHub Release API to download. Compared with <code>ghtar</code>, <code>ghtagtar</code> can find the latest one from the <code>tags</code> list and download the source code in <code>tar.gz</code> format (because some projects only use <code>tag</code> release version).</li><li><code>bitbuckettag</code>: Download using BitBucket API, basically the same as <code>ghtagtar</code>, except this one applies to BitBucket.</li><li><code>git</code>: Clone the project directly from a Git address to download sources, applicable to any public Git repository.</li><li><code>filelist</code>: Use a crawler to crawl the Web download site that provides file index, and get the latest version of the file name and download it.</li><li><code>custom</code>: If none of the above download methods are satisfactory, you can write <code>custom</code>, create a new class under <code>src/SPC/store/source/</code>, extends <code>CustomSourceBase</code>, and write the download script yourself.</li></ul><h2 id="source-json-common-parameters" tabindex="-1">source.json Common parameters <a class="header-anchor" href="#source-json-common-parameters" aria-label="Permalink to &quot;source.json Common parameters&quot;"></a></h2><p>Each source file in source.json has the following params:</p><ul><li><code>license</code>: the open source license of the source code, see <strong>Open Source License</strong> section below</li><li><code>type</code>: must be one of the types mentioned above</li><li><code>path</code> (optional): release the source code to the specified directory instead of <code>source/{name}</code></li><li><code>provide-pre-built</code> (optional): whether to provide precompiled binary files. If <code>true</code>, it will automatically try to download precompiled binary files when running <code>bin/spc download</code></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The <code>path</code> parameter in <code>source.json</code> can specify a relative or absolute path. When specified as a relative path, the path is based on <code>source/</code>.</p></div><h2 id="download-type-url" tabindex="-1">Download type - url <a class="header-anchor" href="#download-type-url" aria-label="Permalink to &quot;Download type - url&quot;"></a></h2><p>URL type sources refer to downloading files directly from the URL.</p><p>The parameters included are:</p><ul><li><code>url</code>: The download address of the file, such as <code>https://example.com/file.tgz</code></li><li><code>filename</code> (optional): The file name saved to the local area. If not specified, the file name of the url will be used.</li></ul><p>Example (download the imagick extension and extract it to the extension storage path of the php source code):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The most important field here is <code>type</code>. Currently, the types it supports are:</p><ul><li><code>url</code>: Directly use URL to download, for example: <code>https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz</code>.</li><li><code>ghrel</code>: Use the GitHub Release API to download, download the artifacts uploaded from the latest version released by maintainers.</li><li><code>ghtar</code>: Use the GitHub Release API to download. Different from <code>ghrel</code>, <code>ghtar</code> is downloaded from the <code>source code (tar.gz)</code> in the latest Release of the project.</li><li><code>ghtagtar</code>: Use GitHub Release API to download. Compared with <code>ghtar</code>, <code>ghtagtar</code> can find the latest one from the <code>tags</code> list and download the source code in <code>tar.gz</code> format (because some projects only use <code>tag</code> release version).</li><li><code>bitbuckettag</code>: Download using BitBucket API, basically the same as <code>ghtagtar</code>, except this one applies to BitBucket.</li><li><code>git</code>: Clone the project directly from a Git address to download sources, applicable to any public Git repository.</li><li><code>filelist</code>: Use a crawler to crawl the Web download site that provides file index, and get the latest version of the file name and download it.</li><li><code>custom</code>: If none of the above download methods are satisfactory, you can write <code>custom</code>, create a new class under <code>src/SPC/store/source/</code>, extends <code>CustomSourceBase</code>, and write the download script yourself.</li></ul><h2 id="source-json-common-parameters" tabindex="-1">source.json Common parameters <a class="header-anchor" href="#source-json-common-parameters" aria-label="Permalink to source.json Common parameters"></a></h2><p>Each source file in source.json has the following params:</p><ul><li><code>license</code>: the open source license of the source code, see <strong>Open Source License</strong> section below</li><li><code>type</code>: must be one of the types mentioned above</li><li><code>path</code> (optional): release the source code to the specified directory instead of <code>source/{name}</code></li><li><code>provide-pre-built</code> (optional): whether to provide precompiled binary files. If <code>true</code>, it will automatically try to download precompiled binary files when running <code>bin/spc download</code></li></ul><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>The <code>path</code> parameter in <code>source.json</code> can specify a relative or absolute path. When specified as a relative path, the path is based on <code>source/</code>.</p></div><h2 id="download-type-url" tabindex="-1">Download type - url <a class="header-anchor" href="#download-type-url" aria-label="Permalink to Download type - url"></a></h2><p>URL type sources refer to downloading files directly from the URL.</p><p>The parameters included are:</p><ul><li><code>url</code>: The download address of the file, such as <code>https://example.com/file.tgz</code></li><li><code>filename</code> (optional): The file name saved to the local area. If not specified, the file name of the url will be used.</li></ul><p>Example (download the imagick extension and extract it to the extension storage path of the php source code):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;ext-imagick&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://pecl.php.net/get/imagick&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -20,7 +20,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghrel" tabindex="-1">Download type - ghrel <a class="header-anchor" href="#download-type-ghrel" aria-label="Permalink to &quot;Download type - ghrel&quot;"></a></h2><p>ghrel will download files from Assets uploaded in GitHub Release. First use the GitHub Release API to get the latest version, and then download the corresponding files according to the regular matching method.</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>match</code>: regular expression matching Assets files</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (download the libsodium library, matching the libsodium-x.y.tar.gz file in Release):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghrel" tabindex="-1">Download type - ghrel <a class="header-anchor" href="#download-type-ghrel" aria-label="Permalink to Download type - ghrel"></a></h2><p>ghrel will download files from Assets uploaded in GitHub Release. First use the GitHub Release API to get the latest version, and then download the corresponding files according to the regular matching method.</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>match</code>: regular expression matching Assets files</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (download the libsodium library, matching the libsodium-x.y.tar.gz file in Release):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;libsodium&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ghrel&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;jedisct1/libsodium&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -30,7 +30,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghtar" tabindex="-1">Download type - ghtar <a class="header-anchor" href="#download-type-ghtar" aria-label="Permalink to &quot;Download type - ghtar&quot;"></a></h2><p>ghtar will download the file from the GitHub Release Tag. Unlike <code>ghrel</code>, <code>ghtar</code> will download the <code>source code (tar.gz)</code> from the latest Release of the project.</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (brotli library):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghtar" tabindex="-1">Download type - ghtar <a class="header-anchor" href="#download-type-ghtar" aria-label="Permalink to Download type - ghtar"></a></h2><p>ghtar will download the file from the GitHub Release Tag. Unlike <code>ghrel</code>, <code>ghtar</code> will download the <code>source code (tar.gz)</code> from the latest Release of the project.</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (brotli library):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;brotli&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ghtar&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;google/brotli&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -39,7 +39,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghtagtar" tabindex="-1">Download type - ghtagtar <a class="header-anchor" href="#download-type-ghtagtar" aria-label="Permalink to &quot;Download type - ghtagtar&quot;"></a></h2><p>Use the GitHub Release API to download. Compared with <code>ghtar</code>, <code>ghtagtar</code> can find the latest one from the <code>tags</code> list and download the source code in <code>tar.gz</code> format (because some projects only use the <code>tag</code> version).</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (gmp library):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-ghtagtar" tabindex="-1">Download type - ghtagtar <a class="header-anchor" href="#download-type-ghtagtar" aria-label="Permalink to Download type - ghtagtar"></a></h2><p>Use the GitHub Release API to download. Compared with <code>ghtar</code>, <code>ghtagtar</code> can find the latest one from the <code>tags</code> list and download the source code in <code>tar.gz</code> format (because some projects only use the <code>tag</code> version).</p><p>The parameters included are:</p><ul><li><code>repo</code>: GitHub repository name</li><li><code>prefer-stable</code>: Whether to download stable versions first (default is <code>false</code>)</li></ul><p>Example (gmp library):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;gmp&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ghtagtar&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;alisw/GMP&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -48,7 +48,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;text&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;EXAMPLE LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-bitbuckettag" tabindex="-1">Download Type - bitbuckettag <a class="header-anchor" href="#download-type-bitbuckettag" aria-label="Permalink to &quot;Download Type - bitbuckettag&quot;"></a></h2><p>Download using BitBucket API, basically the same as <code>ghtagtar</code>, except this one works with BitBucket.</p><p>The parameters included are:</p><ul><li><code>repo</code>: BitBucket repository name</li></ul><h2 id="download-type-git" tabindex="-1">Download type - git <a class="header-anchor" href="#download-type-git" aria-label="Permalink to &quot;Download type - git&quot;"></a></h2><p>Clone the project directly from a Git address to download sources, applicable to any public Git repository.</p><p>The parameters included are:</p><ul><li><code>url</code>: Git link (HTTPS only)</li><li><code>rev</code>: branch name</li></ul><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-bitbuckettag" tabindex="-1">Download Type - bitbuckettag <a class="header-anchor" href="#download-type-bitbuckettag" aria-label="Permalink to Download Type - bitbuckettag"></a></h2><p>Download using BitBucket API, basically the same as <code>ghtagtar</code>, except this one works with BitBucket.</p><p>The parameters included are:</p><ul><li><code>repo</code>: BitBucket repository name</li></ul><h2 id="download-type-git" tabindex="-1">Download type - git <a class="header-anchor" href="#download-type-git" aria-label="Permalink to Download type - git"></a></h2><p>Clone the project directly from a Git address to download sources, applicable to any public Git repository.</p><p>The parameters included are:</p><ul><li><code>url</code>: Git link (HTTPS only)</li><li><code>rev</code>: branch name</li></ul><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;imap&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;git&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://github.com/static-php/imap.git&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -58,7 +58,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-filelist" tabindex="-1">Download type - filelist <a class="header-anchor" href="#download-type-filelist" aria-label="Permalink to &quot;Download type - filelist&quot;"></a></h2><p>Use a crawler to crawl a web download site that provides a file index and get the latest version of the file name and download it.</p><p>Note that this method is only applicable to static sites with page index functions such as mirror sites and GNU official websites.</p><p>The parameters included are:</p><ul><li><code>url</code>: The URL of the page to crawl the latest version of the file</li><li><code>regex</code>: regular expression matching file names and download links</li></ul><p>Example (download the libiconv library from the GNU official website):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-filelist" tabindex="-1">Download type - filelist <a class="header-anchor" href="#download-type-filelist" aria-label="Permalink to Download type - filelist"></a></h2><p>Use a crawler to crawl a web download site that provides a file index and get the latest version of the file name and download it.</p><p>Note that this method is only applicable to static sites with page index functions such as mirror sites and GNU official websites.</p><p>The parameters included are:</p><ul><li><code>url</code>: The URL of the page to crawl the latest version of the file</li><li><code>regex</code>: regular expression matching file names and download links</li></ul><p>Example (download the libiconv library from the GNU official website):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;libiconv&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;filelist&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://ftp.gnu.org/gnu/libiconv/&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -68,7 +68,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;COPYING&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-custom" tabindex="-1">Download type - custom <a class="header-anchor" href="#download-type-custom" aria-label="Permalink to &quot;Download type - custom&quot;"></a></h2><p>If the above downloading methods are not satisfactory, you can write <code>custom</code>, create a new class under <code>src/SPC/store/source/</code>, extends <code>CustomSourceBase</code>, and write the download script yourself.</p><p>I wont go into details here, you can look at <code>src/SPC/store/source/PhpSource.php</code> or <code>src/SPC/store/source/PostgreSQLSource.php</code> as examples.</p><h2 id="pkg-json-general-parameters" tabindex="-1">pkg.json General parameters <a class="header-anchor" href="#pkg-json-general-parameters" aria-label="Permalink to &quot;pkg.json General parameters&quot;"></a></h2><p>pkg.json stores non-source-code files, such as precompiled tools musl-toolchain and UPX. It includes:</p><ul><li><code>type</code>: The same type as <code>source.json</code> and different kinds of parameters.</li><li><code>extract</code> (optional): The path to decompress after downloading, the default is <code>pkgroot/{pkg_name}</code>.</li><li><code>extract-files</code> (optional): Extract only the specified files to the specified location after downloading.</li></ul><p>It should be noted that <code>pkg.json</code> does not involve compilation, modification and distribution of source code, so there is no <code>license</code> open source license field. And you cannot use the <code>extract</code> and <code>extract-files</code> parameters at the same time.</p><p>Example (download nasm locally and extract only program files to PHP SDK):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="download-type-custom" tabindex="-1">Download type - custom <a class="header-anchor" href="#download-type-custom" aria-label="Permalink to Download type - custom"></a></h2><p>If the above downloading methods are not satisfactory, you can write <code>custom</code>, create a new class under <code>src/SPC/store/source/</code>, extends <code>CustomSourceBase</code>, and write the download script yourself.</p><p>I wont go into details here, you can look at <code>src/SPC/store/source/PhpSource.php</code> or <code>src/SPC/store/source/PostgreSQLSource.php</code> as examples.</p><h2 id="pkg-json-general-parameters" tabindex="-1">pkg.json General parameters <a class="header-anchor" href="#pkg-json-general-parameters" aria-label="Permalink to pkg.json General parameters"></a></h2><p>pkg.json stores non-source-code files, such as precompiled tools musl-toolchain and UPX. It includes:</p><ul><li><code>type</code>: The same type as <code>source.json</code> and different kinds of parameters.</li><li><code>extract</code> (optional): The path to decompress after downloading, the default is <code>pkgroot/{pkg_name}</code>.</li><li><code>extract-files</code> (optional): Extract only the specified files to the specified location after downloading.</li></ul><p>It should be noted that <code>pkg.json</code> does not involve compilation, modification and distribution of source code, so there is no <code>license</code> open source license field. And you cannot use the <code>extract</code> and <code>extract-files</code> parameters at the same time.</p><p>Example (download nasm locally and extract only program files to PHP SDK):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;nasm-x86_64-win&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;url&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -77,7 +77,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;nasm-2.16.01/ndisasm.exe&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;{php_sdk_path}/bin/ndisasm.exe&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The key name in <code>extract-files</code> is the file in the source folder, and the key value is the storage path. The storage path can use the following variables:</p><ul><li><code>{php_sdk_path}</code>: (Windows only) PHP SDK path</li><li><code>{pkg_root_path}</code>: <code>pkgroot/</code></li><li><code>{working_dir}</code>: current working directory</li><li><code>{download_path}</code>: download directory</li><li><code>{source_path}</code>: source code decompression directory</li></ul><p>When <code>extract-files</code> does not use variables and is a relative path, the directory of the relative path is <code>{working_dir}</code>.</p><h2 id="open-source-license" tabindex="-1">Open source license <a class="header-anchor" href="#open-source-license" aria-label="Permalink to &quot;Open source license&quot;"></a></h2><p>For <code>source.json</code>, each source file should contain an open source license. The <code>license</code> field stores the open source license information.</p><p>Each <code>license</code> contains the following parameters:</p><ul><li><code>type</code>: <code>file</code> or <code>text</code></li><li><code>path</code>: the license file in the source code directory (required when <code>type</code> is <code>file</code>)</li><li><code>text</code>: License text (required when <code>type</code> is <code>text</code>)</li></ul><p>Example (yaml extension source code with LICENSE file):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The key name in <code>extract-files</code> is the file in the source folder, and the key value is the storage path. The storage path can use the following variables:</p><ul><li><code>{php_sdk_path}</code>: (Windows only) PHP SDK path</li><li><code>{pkg_root_path}</code>: <code>pkgroot/</code></li><li><code>{working_dir}</code>: current working directory</li><li><code>{download_path}</code>: download directory</li><li><code>{source_path}</code>: source code decompression directory</li></ul><p>When <code>extract-files</code> does not use variables and is a relative path, the directory of the relative path is <code>{working_dir}</code>.</p><h2 id="open-source-license" tabindex="-1">Open source license <a class="header-anchor" href="#open-source-license" aria-label="Permalink to Open source license"></a></h2><p>For <code>source.json</code>, each source file should contain an open source license. The <code>license</code> field stores the open source license information.</p><p>Each <code>license</code> contains the following parameters:</p><ul><li><code>type</code>: <code>file</code> or <code>text</code></li><li><code>path</code>: the license file in the source code directory (required when <code>type</code> is <code>file</code>)</li><li><code>text</code>: License text (required when <code>type</code> is <code>text</code>)</li></ul><p>Example (yaml extension source code with LICENSE file):</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;yaml&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;git&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;php-src/ext/yaml&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -88,7 +88,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:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>When an open source project has multiple licenses, multiple files can be specified:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>When an open source project has multiple licenses, multiple files can be specified:</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;libuv&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ghtar&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;repo&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;libuv/libuv&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -103,7 +103,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:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>When the license of an open source project uses different files between versions, <code>path</code> can be used as an array to list the possible license files:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>When the license of an open source project uses different files between versions, <code>path</code> can be used as an array to list the possible license files:</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</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:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;redis&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;git&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;path&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;php-src/ext/redis&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@ -117,4 +117,4 @@ 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:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,75),l=[n];function h(p,o,k,d,r,E){return a(),i("div",null,l)}const g=s(t,[["render",h]]);export{u as __pageData,g as default};
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,75)]))}const c=i(n,[["render",l]]);export{E as __pageData,c as default};

View File

@ -0,0 +1 @@
import{_ as i,c as a,o as e,af as t}from"./chunks/framework.PeLcR_tw.js";const E=JSON.parse('{"title":"Source module","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/source-module.md","filePath":"en/develop/source-module.md"}'),n={name:"en/develop/source-module.md"};function l(h,s,p,o,k,d){return e(),a("div",null,s[0]||(s[0]=[t("",75)]))}const c=i(n,[["render",l]]);export{E as __pageData,c as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as o,o as t,a1 as c}from"./chunks/framework.gjrnbxUT.js";const y=JSON.parse('{"title":"Introduction to project structure","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/structure.md","filePath":"en/develop/structure.md"}'),d={name:"en/develop/structure.md"},a=c("",50),r=[a];function i(s,n,p,l,h,m){return t(),o("div",null,r)}const b=e(d,[["render",i]]);export{y as __pageData,b as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as o,c as t,o as c,af as d}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Introduction to project structure","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/structure.md","filePath":"en/develop/structure.md"}'),a={name:"en/develop/structure.md"};function r(i,e,s,n,p,l){return c(),t("div",null,e[0]||(e[0]=[d("",50)]))}const u=o(a,[["render",r]]);export{m as __pageData,u as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Compilation Tools","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/system-build-tools.md","filePath":"en/develop/system-build-tools.md"}'),n={name:"en/develop/system-build-tools.md"},t=e("",50),l=[t];function o(p,h,c,r,k,d){return a(),i("div",null,l)}const E=s(n,[["render",o]]);export{g as __pageData,E as default};

View File

@ -0,0 +1 @@
import{_ as i,c as a,o as e,af as n}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Compilation Tools","description":"","frontmatter":{},"headers":[],"relativePath":"en/develop/system-build-tools.md","filePath":"en/develop/system-build-tools.md"}'),t={name:"en/develop/system-build-tools.md"};function l(o,s,p,h,c,r){return e(),a("div",null,s[0]||(s[0]=[n("",50)]))}const m=i(t,[["render",l]]);export{d as __pageData,m as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as i,c as s,o,af as t}from"./chunks/framework.PeLcR_tw.js";const u=JSON.parse('{"title":"FAQ","description":"","frontmatter":{},"headers":[],"relativePath":"en/faq/index.md","filePath":"en/faq/index.md"}'),a={name:"en/faq/index.md"};function n(l,e,r,c,d,p){return o(),s("div",null,e[0]||(e[0]=[t("",36)]))}const m=i(a,[["render",n]]);export{u as __pageData,m as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as i,o,a1 as s}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"FAQ","description":"","frontmatter":{},"headers":[],"relativePath":"en/faq/index.md","filePath":"en/faq/index.md"}'),t={name:"en/faq/index.md"},a=s("",36),n=[a];function l(r,c,d,p,h,u){return o(),i("div",null,n)}const y=e(t,[["render",l]]);export{f as __pageData,y as default};

View File

@ -0,0 +1 @@
import{_ as t,c as o,o as i,af as n}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"GitHub Action Build","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/action-build.md","filePath":"en/guide/action-build.md"}'),a={name:"en/guide/action-build.md"};function l(r,e,s,c,d,u){return i(),o("div",null,e[0]||(e[0]=[n('<h1 id="github-action-build" tabindex="-1">GitHub Action Build <a class="header-anchor" href="#github-action-build" aria-label="Permalink to “GitHub Action Build”"></a></h1><p>Action Build refers to compiling directly using GitHub Action.</p><p>If you don&#39;t want to compile it yourself, you can download the artifact from the existing Action in this project, or you can download it from a self-hosted server<a href="https://dl.static-php.dev/static-php-cli/common/" target="_blank" rel="noreferrer">Enter</a>.</p><blockquote><p>Self-hosted binaries are also built from Actions: <a href="https://github.com/static-php/static-php-cli-hosted" target="_blank" rel="noreferrer">repo</a>. The extensions included are: bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl, pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip</p></blockquote><h2 id="build-guide" tabindex="-1">Build Guide <a class="header-anchor" href="#build-guide" aria-label="Permalink to “Build Guide”"></a></h2><p>Using GitHub Action makes it easy to build a statically compiled PHP and phpmicro, while also defining the extensions to compile.</p><ol><li>Fork project.</li><li>Go to the Actions of the project and select <code>CI</code>.</li><li>Select <code>Run workflow</code>, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. <code>bcmath,curl,mbstring</code>)</li><li>After waiting for about a period of time, enter the corresponding task and get <code>Artifacts</code>.</li></ol><p>If you enable <code>debug</code>, all logs will be output at build time, including compiled logs, for troubleshooting.</p><blockquote><p>If you need to build in other environments, you can use <a href="./manual-build.html">manual build</a>.</p></blockquote><h2 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to “Extensions”"></a></h2><p>You can go to <a href="./extensions.html">extensions</a> check here to see if all the extensions you need currently support. and then go to <a href="./cli-generator.html">command generator</a> select the extension you need to compile, copy the extensions string to <code>extensions</code> option.</p>',11)]))}const m=t(a,[["render",l]]);export{h as __pageData,m as default};

View File

@ -0,0 +1 @@
import{_ as t,c as o,o as i,af as n}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"GitHub Action Build","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/action-build.md","filePath":"en/guide/action-build.md"}'),a={name:"en/guide/action-build.md"};function l(r,e,s,c,d,u){return i(),o("div",null,e[0]||(e[0]=[n("",11)]))}const m=t(a,[["render",l]]);export{h as __pageData,m as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"GitHub Action Build","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/action-build.md","filePath":"en/guide/action-build.md"}'),n={name:"en/guide/action-build.md"},a=i('<h1 id="github-action-build" tabindex="-1">GitHub Action Build <a class="header-anchor" href="#github-action-build" aria-label="Permalink to &quot;GitHub Action Build&quot;"></a></h1><p>Action Build refers to compiling directly using GitHub Action.</p><p>If you don&#39;t want to compile it yourself, you can download the artifact from the existing Action in this project, or you can download it from a self-hosted server<a href="https://dl.static-php.dev/static-php-cli/common/" target="_blank" rel="noreferrer">Enter</a>.</p><blockquote><p>Self-hosted binaries are also built from Actions: <a href="https://github.com/static-php/static-php-cli-hosted" target="_blank" rel="noreferrer">repo</a>. The extensions included are: bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl, pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip</p></blockquote><h2 id="build-guide" tabindex="-1">Build Guide <a class="header-anchor" href="#build-guide" aria-label="Permalink to &quot;Build Guide&quot;"></a></h2><p>Using GitHub Action makes it easy to build a statically compiled PHP and phpmicro, while also defining the extensions to compile.</p><ol><li>Fork project.</li><li>Go to the Actions of the project and select <code>CI</code>.</li><li>Select <code>Run workflow</code>, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. <code>bcmath,curl,mbstring</code>)</li><li>After waiting for about a period of time, enter the corresponding task and get <code>Artifacts</code>.</li></ol><p>If you enable <code>debug</code>, all logs will be output at build time, including compiled logs, for troubleshooting.</p><blockquote><p>If you need to build in other environments, you can use <a href="./manual-build.html">manual build</a>.</p></blockquote><h2 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to &quot;Extensions&quot;"></a></h2><p>You can go to <a href="./extensions.html">extensions</a> check here to see if all the extensions you need currently support. and then go to <a href="./cli-generator.html">command generator</a> select the extension you need to compile, copy the extensions string to <code>extensions</code> option.</p>',11),l=[a];function s(r,c,d,u,p,h){return o(),t("div",null,l)}const f=e(n,[["render",s]]);export{b as __pageData,f as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"GitHub Action Build","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/action-build.md","filePath":"en/guide/action-build.md"}'),n={name:"en/guide/action-build.md"},a=i("",11),l=[a];function s(r,c,d,u,p,h){return o(),t("div",null,l)}const f=e(n,[["render",s]]);export{b as __pageData,f as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as i,o as s,a1 as a}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"Build on Windows","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/build-on-windows.md","filePath":"en/guide/build-on-windows.md"}'),t={name:"en/guide/build-on-windows.md"},o=a("",64),l=[o];function n(p,d,h,c,r,u){return s(),i("div",null,l)}const b=e(t,[["render",n]]);export{m as __pageData,b as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as e,c as s,o as a,af as t}from"./chunks/framework.PeLcR_tw.js";const k=JSON.parse('{"title":"Build on Windows","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/build-on-windows.md","filePath":"en/guide/build-on-windows.md"}'),l={name:"en/guide/build-on-windows.md"};function o(n,i,h,d,r,p){return a(),s("div",null,i[0]||(i[0]=[t("",64)]))}const u=e(l,[["render",o]]);export{k as __pageData,u as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as i,c as e,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"Build glibc Compatible Linux Binary","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/build-with-glibc.md","filePath":"en/guide/build-with-glibc.md"}'),s={name:"en/guide/build-with-glibc.md"},n=a("",22),l=[n];function o(r,c,u,b,d,h){return t(),e("div",null,l)}const g=i(s,[["render",o]]);export{m as __pageData,g as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as e,c as t,o as s,af as a}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"Build glibc Compatible Linux Binary","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/build-with-glibc.md","filePath":"en/guide/build-with-glibc.md"}'),n={name:"en/guide/build-with-glibc.md"};function l(o,i,r,c,b,u){return s(),t("div",null,i[0]||(i[0]=[a("",22)]))}const p=e(n,[["render",l]]);export{h as __pageData,p as default};

View File

@ -1 +0,0 @@
import{C as e}from"./chunks/CliGenerator.CaE8R34N.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 +0,0 @@
import{C as e}from"./chunks/CliGenerator.CaE8R34N.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

@ -0,0 +1 @@
import{C as t}from"./chunks/CliGenerator.D2FJpN3t.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};

View File

@ -0,0 +1 @@
import{C as t}from"./chunks/CliGenerator.D2FJpN3t.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};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as t,c as d,o as b,a1 as r}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Dependency Table","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/deps-map.md","filePath":"en/guide/deps-map.md"}'),l={name:"en/guide/deps-map.md"},i=r("",22),e=[i];function s(o,n,a,p,h,m){return b(),d("div",null,e)}const z=t(l,[["render",s]]);export{g as __pageData,z as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as d,c as b,o as r,af as l}from"./chunks/framework.PeLcR_tw.js";const h=JSON.parse('{"title":"Dependency Table","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/deps-map.md","filePath":"en/guide/deps-map.md"}'),i={name:"en/guide/deps-map.md"};function e(s,t,o,n,a,p){return r(),b("div",null,t[0]||(t[0]=[l("",22)]))}const c=d(i,[["render",e]]);export{h as __pageData,c as default};

View File

@ -1,12 +0,0 @@
import{_ as e,c as i,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),n={name:"en/guide/env-vars.md"},s=a(`<h1 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;"></a></h1><p>All environment variables mentioned in the list on this page have default values unless otherwise noted. You can override the default values by setting these environment variables.</p><h2 id="environment-variables-list" tabindex="-1">Environment variables list <a class="header-anchor" href="#environment-variables-list" aria-label="Permalink to &quot;Environment variables list&quot;"></a></h2><p>Starting from version 2.3.5, we have centralized the environment variables in the <code>config/env.ini</code> file. You can set environment variables by modifying this file.</p><p>We divide the environment variables supported by static-php-cli into three types:</p><ul><li>Global internal environment variables: declared after static-php-cli starts, you can use <code>getenv()</code> to get them internally in static-php-cli, and you can override them before starting static-php-cli.</li><li>Fixed environment variables: declared after static-php-cli starts, you can only use <code>getenv()</code> to get them, but you cannot override them through shell scripts.</li><li>Config file environment variables: declared before static-php-cli build, you can set these environment variables by modifying the <code>config/env.ini</code> file or through shell scripts.</li></ul><p>You can read the comments for each parameter in <a href="https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini" target="_blank" rel="noreferrer">config/env.ini</a> to understand its purpose.</p><h2 id="custom-environment-variables" tabindex="-1">Custom environment variables <a class="header-anchor" href="#custom-environment-variables" aria-label="Permalink to &quot;Custom environment variables&quot;"></a></h2><p>Generally, you don&#39;t need to modify any of the following environment variables as they are already set to optimal values. However, if you have special needs, you can set these environment variables to meet your needs (for example, you need to debug PHP performance under different compilation parameters).</p><p>If you want to use custom environment variables, you can use the <code>export</code> command in the terminal or set the environment variables directly before the command, for example:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;"># export first</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">4</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or direct use</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><p>Or, if you need to modify an environment variable for a long time, you can modify the <code>config/env.ini</code> file.</p><p><code>config/env.ini</code> is divided into three sections, <code>[global]</code> is globally effective, <code>[windows]</code>, <code>[macos]</code>, <code>[linux]</code> are only effective for the corresponding operating system.</p><p>For example, if you need to modify the <code>./configure</code> command for compiling PHP, you can find the <code>SPC_CMD_PREFIX_PHP_CONFIGURE</code> environment variable in the <code>config/env.ini</code> file, and then modify its value.</p><p>If your build conditions are more complex and require multiple <code>env.ini</code> files to switch, we recommend that you use the <code>config/env.custom.ini</code> file. In this way, you can specify your environment variables by writing additional override items without modifying the default <code>config/env.ini</code> file.</p><div class="language-ini vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; This is an example of \`config/env.custom.ini\` file, </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; we modify the \`SPC_CONCURRENCY\` and linux default CFLAGS passing to libs and PHP</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[global]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_CONCURRENCY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=4</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[linux]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_DEFAULT_C_FLAGS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O3&quot;</span></span></code></pre></div><h2 id="library-environment-variables-unix-only" tabindex="-1">Library environment variables (Unix only) <a class="header-anchor" href="#library-environment-variables-unix-only" aria-label="Permalink to &quot;Library environment variables (Unix only)&quot;"></a></h2><p>Starting from 2.2.0, static-php-cli supports custom environment variables for all compilation dependent library commands of macOS, Linux, FreeBSD and other Unix systems.</p><p>In this way, you can adjust the behavior of compiling dependent libraries through environment variables at any time. For example, you can set the optimization parameters for compiling the xxx library through <code>xxx_CFLAGS=-O0</code>.</p><p>Of course, not every library supports the injection of environment variables. We currently provide three wildcard environment variables with the suffixes:</p><ul><li><code>_CFLAGS</code>: CFLAGS for the compiler</li><li><code>_LDFLAGS</code>: LDFLAGS for the linker</li><li><code>_LIBS</code>: LIBS for the linker</li></ul><p>The prefix is the name of the dependent library, and the specific name of the library is subject to <code>lib.json</code>. Among them, the library name with <code>-</code> needs to replace <code>-</code> with <code>_</code>.</p><p>Here is an example of an optimization option that replaces the openssl library compilation:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">openssl_CFLAGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O0&quot;</span></span></code></pre></div><p>The library name uses the same name listed in <code>lib.json</code> and is case-sensitive.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>When no relevant environment variables are specified, except for the following variables, the remaining values are empty by default:</p><table tabindex="0"><thead><tr><th>var name</th><th>var default value</th></tr></thead><tbody><tr><td><code>pkg_config_CFLAGS</code></td><td>macOS: <code>$SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion</code>, Other: empty</td></tr><tr><td><code>pkg_config_LDFLAGS</code></td><td>Linux: <code>--static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LDFLAGS</code></td><td>Linux: <code>-static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LIBS</code></td><td>macOS: <code>-liconv</code>, Other: empty</td></tr><tr><td><code>ldap_LDFLAGS</code></td><td><code>-L$BUILD_LIB_PATH</code></td></tr><tr><td><code>openssl_CFLAGS</code></td><td>Linux: <code>$SPC_DEFAULT_C_FLAGS</code>, Other: empty</td></tr><tr><td>others...</td><td>empty</td></tr></tbody></table></div><p>The following table is a list of library names that support customizing the above three variables:</p><table tabindex="0"><thead><tr><th>lib name</th></tr></thead><tbody><tr><td>brotli</td></tr><tr><td>bzip</td></tr><tr><td>curl</td></tr><tr><td>freetype</td></tr><tr><td>gettext</td></tr><tr><td>gmp</td></tr><tr><td>imagemagick</td></tr><tr><td>ldap</td></tr><tr><td>libargon2</td></tr><tr><td>libavif</td></tr><tr><td>libcares</td></tr><tr><td>libevent</td></tr><tr><td>openssl</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Because adapting custom environment variables to each library is a particularly tedious task, and in most cases you do not need custom environment variables for these libraries, so we currently only support custom environment variables for some libraries.</p><p>If the library you need to customize environment variables is not listed above, you can submit your request through <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">GitHub Issue</a>.</p></div>`,29),o=[s];function r(l,d,c,p,h,m){return t(),i("div",null,o)}const b=e(n,[["render",r]]);export{u as __pageData,b as default};

View File

@ -1 +0,0 @@
import{_ as e,c as i,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),n={name:"en/guide/env-vars.md"},s=a("",29),o=[s];function r(l,d,c,p,h,m){return t(),i("div",null,o)}const b=e(n,[["render",r]]);export{u as __pageData,b as default};

View File

@ -0,0 +1,12 @@
import{_ as i,c as t,o as a,af as n}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),s={name:"en/guide/env-vars.md"};function r(o,e,l,d,c,h){return a(),t("div",null,e[0]||(e[0]=[n(`<h1 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to “Environment variables”"></a></h1><p>All environment variables mentioned in the list on this page have default values unless otherwise noted. You can override the default values by setting these environment variables.</p><h2 id="environment-variables-list" tabindex="-1">Environment variables list <a class="header-anchor" href="#environment-variables-list" aria-label="Permalink to “Environment variables list”"></a></h2><p>Starting from version 2.3.5, we have centralized the environment variables in the <code>config/env.ini</code> file. You can set environment variables by modifying this file.</p><p>We divide the environment variables supported by static-php-cli into three types:</p><ul><li>Global internal environment variables: declared after static-php-cli starts, you can use <code>getenv()</code> to get them internally in static-php-cli, and you can override them before starting static-php-cli.</li><li>Fixed environment variables: declared after static-php-cli starts, you can only use <code>getenv()</code> to get them, but you cannot override them through shell scripts.</li><li>Config file environment variables: declared before static-php-cli build, you can set these environment variables by modifying the <code>config/env.ini</code> file or through shell scripts.</li></ul><p>You can read the comments for each parameter in <a href="https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini" target="_blank" rel="noreferrer">config/env.ini</a> to understand its purpose.</p><h2 id="custom-environment-variables" tabindex="-1">Custom environment variables <a class="header-anchor" href="#custom-environment-variables" aria-label="Permalink to “Custom environment variables”"></a></h2><p>Generally, you don&#39;t need to modify any of the following environment variables as they are already set to optimal values. However, if you have special needs, you can set these environment variables to meet your needs (for example, you need to debug PHP performance under different compilation parameters).</p><p>If you want to use custom environment variables, you can use the <code>export</code> command in the terminal or set the environment variables directly before the command, for example:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;"># export first</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">4</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or direct use</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><p>Or, if you need to modify an environment variable for a long time, you can modify the <code>config/env.ini</code> file.</p><p><code>config/env.ini</code> is divided into three sections, <code>[global]</code> is globally effective, <code>[windows]</code>, <code>[macos]</code>, <code>[linux]</code> are only effective for the corresponding operating system.</p><p>For example, if you need to modify the <code>./configure</code> command for compiling PHP, you can find the <code>SPC_CMD_PREFIX_PHP_CONFIGURE</code> environment variable in the <code>config/env.ini</code> file, and then modify its value.</p><p>If your build conditions are more complex and require multiple <code>env.ini</code> files to switch, we recommend that you use the <code>config/env.custom.ini</code> file. In this way, you can specify your environment variables by writing additional override items without modifying the default <code>config/env.ini</code> file.</p><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</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;">; This is an example of \`config/env.custom.ini\` file, </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; we modify the \`SPC_CONCURRENCY\` and linux default CFLAGS passing to libs and PHP</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[global]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_CONCURRENCY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=4</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[linux]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_DEFAULT_C_FLAGS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O3&quot;</span></span></code></pre></div><h2 id="library-environment-variables-unix-only" tabindex="-1">Library environment variables (Unix only) <a class="header-anchor" href="#library-environment-variables-unix-only" aria-label="Permalink to Library environment variables (Unix only)"></a></h2><p>Starting from 2.2.0, static-php-cli supports custom environment variables for all compilation dependent library commands of macOS, Linux, FreeBSD and other Unix systems.</p><p>In this way, you can adjust the behavior of compiling dependent libraries through environment variables at any time. For example, you can set the optimization parameters for compiling the xxx library through <code>xxx_CFLAGS=-O0</code>.</p><p>Of course, not every library supports the injection of environment variables. We currently provide three wildcard environment variables with the suffixes:</p><ul><li><code>_CFLAGS</code>: CFLAGS for the compiler</li><li><code>_LDFLAGS</code>: LDFLAGS for the linker</li><li><code>_LIBS</code>: LIBS for the linker</li></ul><p>The prefix is the name of the dependent library, and the specific name of the library is subject to <code>lib.json</code>. Among them, the library name with <code>-</code> needs to replace <code>-</code> with <code>_</code>.</p><p>Here is an example of an optimization option that replaces the openssl library compilation:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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:#24292E;--shiki-dark:#E1E4E8;">openssl_CFLAGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O0&quot;</span></span></code></pre></div><p>The library name uses the same name listed in <code>lib.json</code> and is case-sensitive.</p><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>When no relevant environment variables are specified, except for the following variables, the remaining values are empty by default:</p><table tabindex="0"><thead><tr><th>var name</th><th>var default value</th></tr></thead><tbody><tr><td><code>pkg_config_CFLAGS</code></td><td>macOS: <code>$SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion</code>, Other: empty</td></tr><tr><td><code>pkg_config_LDFLAGS</code></td><td>Linux: <code>--static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LDFLAGS</code></td><td>Linux: <code>-static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LIBS</code></td><td>macOS: <code>-liconv</code>, Other: empty</td></tr><tr><td><code>ldap_LDFLAGS</code></td><td><code>-L$BUILD_LIB_PATH</code></td></tr><tr><td><code>openssl_CFLAGS</code></td><td>Linux: <code>$SPC_DEFAULT_C_FLAGS</code>, Other: empty</td></tr><tr><td>others...</td><td>empty</td></tr></tbody></table></div><p>The following table is a list of library names that support customizing the above three variables:</p><table tabindex="0"><thead><tr><th>lib name</th></tr></thead><tbody><tr><td>brotli</td></tr><tr><td>bzip</td></tr><tr><td>curl</td></tr><tr><td>freetype</td></tr><tr><td>gettext</td></tr><tr><td>gmp</td></tr><tr><td>imagemagick</td></tr><tr><td>ldap</td></tr><tr><td>libargon2</td></tr><tr><td>libavif</td></tr><tr><td>libcares</td></tr><tr><td>libevent</td></tr><tr><td>openssl</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>Because adapting custom environment variables to each library is a particularly tedious task, and in most cases you do not need custom environment variables for these libraries, so we currently only support custom environment variables for some libraries.</p><p>If the library you need to customize environment variables is not listed above, you can submit your request through <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">GitHub Issue</a>.</p></div>`,29)]))}const b=i(s,[["render",r]]);export{m as __pageData,b as default};

View File

@ -0,0 +1 @@
import{_ as i,c as t,o as a,af as n}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),s={name:"en/guide/env-vars.md"};function r(o,e,l,d,c,h){return a(),t("div",null,e[0]||(e[0]=[n("",29)]))}const b=i(s,[["render",r]]);export{m as __pageData,b as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as o,o as a,a1 as i}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),l={name:"en/guide/extension-notes.md"},t=i("",61),s=[t];function n(r,h,d,c,p,u){return a(),o("div",null,s)}const f=e(l,[["render",n]]);export{m as __pageData,f as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as o,c as i,o as a,af as l}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),s={name:"en/guide/extension-notes.md"};function t(n,e,r,h,d,c){return a(),i("div",null,e[0]||(e[0]=[l("",61)]))}const u=o(s,[["render",t]]);export{b as __pageData,u as default};

View File

@ -0,0 +1 @@
import{_ as o}from"./chunks/SearchTable.B9T2e1C1.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};

View File

@ -0,0 +1 @@
import{_ as o}from"./chunks/SearchTable.B9T2e1C1.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};

View File

@ -1 +0,0 @@
import{_ as t}from"./chunks/SearchTable.CnJN64_Q.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 +0,0 @@
import{_ as t}from"./chunks/SearchTable.CnJN64_Q.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

@ -0,0 +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};

View File

@ -0,0 +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("",12)]))}const m=t(n,[["render",a]]);export{h as __pageData,m as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),r={name:"en/guide/index.md"},n=i('<h1 id="guide" tabindex="-1">Guide <a class="header-anchor" href="#guide" aria-label="Permalink to &quot;Guide&quot;"></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 &quot;Compilation Environment&quot;"></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 &quot;Supported PHP Version&quot;"></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),a=[n];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),r={name:"en/guide/index.md"},n=i("",12),a=[n];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};

View File

@ -0,0 +1 @@
import{_ as s,c as e,o as a,af as n}from"./chunks/framework.PeLcR_tw.js";const k=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),t={name:"en/guide/manual-build.md"};function l(p,i,h,o,d,r){return a(),e("div",null,i[0]||(i[0]=[n("",136)]))}const g=s(t,[["render",l]]);export{k as __pageData,g as default};

View File

@ -1 +0,0 @@
import{_ as s,c as i,o as e,a1 as a}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"Build (Linux, macOS, FreeBSD)","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/manual-build.md","filePath":"en/guide/manual-build.md"}'),n={name:"en/guide/manual-build.md"},t=a("",136),l=[t];function p(o,h,d,c,r,k){return e(),i("div",null,l)}const m=s(n,[["render",p]]);export{g as __pageData,m as default};

View File

@ -0,0 +1 @@
import{_ as o,c as t,o as a,af as r}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),n={name:"en/guide/troubleshooting.md"};function i(s,e,l,d,c,u){return a(),t("div",null,e[0]||(e[0]=[r('<h1 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to “Troubleshooting”"></a></h1><p>Various failures may be encountered in the process of using static-php-cli, here will describe how to check the errors by yourself and report Issue.</p><h2 id="download-failure" tabindex="-1">Download Failure <a class="header-anchor" href="#download-failure" aria-label="Permalink to “Download Failure”"></a></h2><p>Problems with downloading resources are one of the most common problems with spc. The main reason is that the addresses used for SPC download resources are generally the official website of the corresponding project or GitHub, etc., and these websites may occasionally go down and block IP addresses. After encountering a download failure, you can try to call the download command multiple times.</p><p>When downloading extensions, you may eventually see errors like <code>curl: (56) The requested URL returned error: 403</code> which are often caused by github rate limiting. You can verify this by adding <code>--debug</code> to the command and will see something like <code>[DEBU] Running command (no output) : curl -sfSL &quot;https://api.github.com/repos/openssl/openssl/releases&quot;</code>.</p><p>To fix this, <a href="https://github.com/settings/tokens" target="_blank" rel="noreferrer">create</a> a personal access token on GitHub and set it as an environment variable <code>GITHUB_TOKEN=&lt;XXX&gt;</code>.</p><p>If you confirm that the address is indeed inaccessible, you can submit an Issue or PR to update the url or download type.</p><h2 id="doctor-can-t-fix-something" tabindex="-1">Doctor Can&#39;t Fix Something <a class="header-anchor" href="#doctor-can-t-fix-something" aria-label="Permalink to “Doctor Can&#39;t Fix Something”"></a></h2><p>In most cases, the doctor module can automatically repair and install missing system environments, but there are also special circumstances where the automatic repair function cannot be used normally.</p><p>Due to system limitations (for example, software such as Visual Studio cannot be automatically installed under Windows), the automatic repair function cannot be used for some projects. When encountering a function that cannot be automatically repaired, if you encounter the words <code>Some check items can not be fixed</code>, it means that it cannot be automatically repaired. Please submit an issue according to the method displayed on the terminal or repair the environment yourself.</p><h2 id="compile-error" tabindex="-1">Compile Error <a class="header-anchor" href="#compile-error" aria-label="Permalink to “Compile Error”"></a></h2><p>When you encounter a compilation error, if the <code>--debug</code> log is not enabled, please enable the debug log first, and then determine the command that reported the error. The error terminal output is very important for fixing compilation errors. When submitting an issue, please upload the last error fragment of the terminal log (or the entire terminal log output), and include the <code>spc</code> command and parameters used.</p><p>If you are rebuilding, please refer to the <a href="./manual-build.html#multiple-builds">Local Build - Multiple Builds</a> section.</p>',13)]))}const p=o(n,[["render",i]]);export{m as __pageData,p as default};

View File

@ -0,0 +1 @@
import{_ as o,c as t,o as a,af as r}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),n={name:"en/guide/troubleshooting.md"};function i(s,e,l,d,c,u){return a(),t("div",null,e[0]||(e[0]=[r("",13)]))}const p=o(n,[["render",i]]);export{m as __pageData,p as default};

View File

@ -1 +0,0 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a('<h1 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;"></a></h1><p>Various failures may be encountered in the process of using static-php-cli, here will describe how to check the errors by yourself and report Issue.</p><h2 id="download-failure" tabindex="-1">Download Failure <a class="header-anchor" href="#download-failure" aria-label="Permalink to &quot;Download Failure&quot;"></a></h2><p>Problems with downloading resources are one of the most common problems with spc. The main reason is that the addresses used for SPC download resources are generally the official website of the corresponding project or GitHub, etc., and these websites may occasionally go down and block IP addresses. After encountering a download failure, you can try to call the download command multiple times.</p><p>When downloading extensions, you may eventually see errors like <code>curl: (56) The requested URL returned error: 403</code> which are often caused by github rate limiting. You can verify this by adding <code>--debug</code> to the command and will see something like <code>[DEBU] Running command (no output) : curl -sfSL &quot;https://api.github.com/repos/openssl/openssl/releases&quot;</code>.</p><p>To fix this, <a href="https://github.com/settings/tokens" target="_blank" rel="noreferrer">create</a> a personal access token on GitHub and set it as an environment variable <code>GITHUB_TOKEN=&lt;XXX&gt;</code>.</p><p>If you confirm that the address is indeed inaccessible, you can submit an Issue or PR to update the url or download type.</p><h2 id="doctor-can-t-fix-something" tabindex="-1">Doctor Can&#39;t Fix Something <a class="header-anchor" href="#doctor-can-t-fix-something" aria-label="Permalink to &quot;Doctor Can&#39;t Fix Something&quot;"></a></h2><p>In most cases, the doctor module can automatically repair and install missing system environments, but there are also special circumstances where the automatic repair function cannot be used normally.</p><p>Due to system limitations (for example, software such as Visual Studio cannot be automatically installed under Windows), the automatic repair function cannot be used for some projects. When encountering a function that cannot be automatically repaired, if you encounter the words <code>Some check items can not be fixed</code>, it means that it cannot be automatically repaired. Please submit an issue according to the method displayed on the terminal or repair the environment yourself.</p><h2 id="compile-error" tabindex="-1">Compile Error <a class="header-anchor" href="#compile-error" aria-label="Permalink to &quot;Compile Error&quot;"></a></h2><p>When you encounter a compilation error, if the <code>--debug</code> log is not enabled, please enable the debug log first, and then determine the command that reported the error. The error terminal output is very important for fixing compilation errors. When submitting an issue, please upload the last error fragment of the terminal log (or the entire terminal log output), and include the <code>spc</code> command and parameters used.</p><p>If you are rebuilding, please refer to the <a href="./manual-build.html#multiple-builds">Local Build - Multiple Builds</a> section.</p>',13),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};

View File

@ -1 +0,0 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a("",13),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};

View File

@ -1 +1 @@
import{_ as e,c as t,o as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"static-php-cli","tagline":"Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.","actions":[{"theme":"brand","text":"Guide","link":"./guide/"}]},"features":[{"title":"Static CLI Binary","details":"You can easily compile a standalone php binary for general use. Including CLI, FPM sapi."},{"title":"Micro Self-Extracted Executable","details":"You can compile a self-extracted executable and build with your php source code."},{"title":"Dependency Management","details":"static-php-cli comes with dependency management and supports installation of different types of PHP extensions."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),n={name:"en/index.md"};function i(o,s,c,d,r,l){return a(),t("div")}const m=e(n,[["render",i]]);export{u as __pageData,m as default};
import{_ as e,c as t,o as a}from"./chunks/framework.PeLcR_tw.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"static-php-cli","tagline":"Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.","actions":[{"theme":"brand","text":"Guide","link":"./guide/"}]},"features":[{"title":"Static CLI Binary","details":"You can easily compile a standalone php binary for general use. Including CLI, FPM sapi."},{"title":"Micro Self-Extracted Executable","details":"You can compile a self-extracted executable and build with your php source code."},{"title":"Dependency Management","details":"static-php-cli comes with dependency management and supports installation of different types of PHP extensions."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),n={name:"en/index.md"};function i(o,s,c,d,r,l){return a(),t("div")}const m=e(n,[["render",i]]);export{u as __pageData,m as default};

View File

@ -1 +1 @@
import{_ as e,c as t,o as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"static-php-cli","tagline":"Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.","actions":[{"theme":"brand","text":"Guide","link":"./guide/"}]},"features":[{"title":"Static CLI Binary","details":"You can easily compile a standalone php binary for general use. Including CLI, FPM sapi."},{"title":"Micro Self-Extracted Executable","details":"You can compile a self-extracted executable and build with your php source code."},{"title":"Dependency Management","details":"static-php-cli comes with dependency management and supports installation of different types of PHP extensions."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),n={name:"en/index.md"};function i(o,s,c,d,r,l){return a(),t("div")}const m=e(n,[["render",i]]);export{u as __pageData,m as default};
import{_ as e,c as t,o as a}from"./chunks/framework.PeLcR_tw.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"static-php-cli","tagline":"Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.","actions":[{"theme":"brand","text":"Guide","link":"./guide/"}]},"features":[{"title":"Static CLI Binary","details":"You can easily compile a standalone php binary for general use. Including CLI, FPM sapi."},{"title":"Micro Self-Extracted Executable","details":"You can compile a self-extracted executable and build with your php source code."},{"title":"Dependency Management","details":"static-php-cli comes with dependency management and supports installation of different types of PHP extensions."}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),n={name:"en/index.md"};function i(o,s,c,d,r,l){return a(),t("div")}const m=e(n,[["render",i]]);export{u as __pageData,m as default};

View File

@ -1 +1 @@
import{_ as e,c as t,o as n}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"extension-notes.md","filePath":"extension-notes.md"}'),o={name:"extension-notes.md"};function s(a,r,c,i,p,_){return n(),t("div")}const f=e(o,[["render",s]]);export{m as __pageData,f as default};
import{_ as e,c as t,o as n}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"extension-notes.md","filePath":"extension-notes.md"}'),o={name:"extension-notes.md"};function s(a,r,c,i,p,_){return n(),t("div")}const f=e(o,[["render",s]]);export{m as __pageData,f as default};

Some files were not shown because too many files have changed in this diff Show More