2025-06-06 10:09:04 +00:00
|
|
|
import{d as ge,s as w,h as z,v as G,o as g,c as x,j as e,t as n,F as N,E as O,a2 as m,a3 as Z,a4 as J,e as I,a5 as f,a as xe,a6 as Q,p as me,l as he,_ as ye}from"./framework.gjrnbxUT.js";const ve={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},fe={type:"external",source:"apcu"},ze={type:"external",source:"ast"},Se={type:"builtin"},De={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},ke={type:"builtin"},Be={type:"builtin"},qe={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},Ee={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},_e={support:{BSD:"wip"},type:"external",source:"dio"},Ce={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},We={type:"external",source:"ext-ds"},Ie={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Pe={type:"external",source:"ev","arg-type-windows":"with"},$e={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Ue={type:"builtin"},Le={support:{Linux:"partial",BSD:"wip"},target:["static","shared"],notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},Ne={type:"builtin"},Oe={type:"builtin"},Ve={type:"builtin","lib-suggests":["openssl"]},Ae={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},je={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},Te={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Ge={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gmp"]},Xe={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Me={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"custom","cpp-extension":!0,"lib-depends":["grpc"]},He={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Re={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Fe={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Ze={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Qe={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Ke={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Ye={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ei={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"]},ii={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},si={type:"builtin","arg-type":"custom"},ti={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"]},ni={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},oi={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zl
|
2025-06-06 06:58:03 +00:00
|
|
|
`);let t=[];return o.forEach(s=>{s.indexOf("=")>=1&&t.push(s)})," "+t.map(s=>'-I "'+s+'"').join(" ")}),W=w(""),F=(o,t)=>o.includes(W.value)?t===0?o.substring(0,o.indexOf(W.value)):t===1?W.value:o.substring(o.indexOf(W.value)+W.value.length):t===0?o:"",ae=o=>{let t;v.value.indexOf("all")!==-1&&o.target.value==="all"?v.value=["all"]:(t=v.value.indexOf("all"))!==-1&&o.target.value!=="all"&&v.value.splice(t,1),Y.value=v.value.map(s=>"--build-"+s).join(" ")},de=o=>{const t=new Set,s=r=>{let u=[];if(c.value==="linux"){if(u=l.value[r]["ext-depends-linux"]??l.value[r]["ext-depends-unix"]??l.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="macos"){if(u=l.value[r]["ext-depends-macos"]??l.value[r]["ext-depends-unix"]??l.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="windows"&&(u=l.value[r]["ext-depends-windows"]??l.value[r]["ext-depends"]??[],u.length===0))return;u.forEach(b=>{t.add(b),s(b)})};return o.forEach(r=>{s(r)}),Array.from(t)},pe=z(()=>`${T.value} download --all --with-php=${P.value}${C.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),ue=z(()=>`${T.value} download --with-php=${P.value} --for-extensions "${X.value}"${C.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),ce=z(()=>`${T.value} install-pkg upx${k.value?" --debug":""}`),re=z(()=>`${T.value} build ${Y.value} "${X.value}"${M.value}${k.value?" --debug":""}${$.value?" --enable-zts":""}${E.value?" --with-upx-pack":""}${oe.value}`),be=z(()=>{let o=`php-version: ${P.value}
|
|
|
|
|
`;return o+=`extensions: "${X.value}"
|
|
|
|
|
`,v.value.join(",")==="all"?o+="sapi: "+["cli","fpm","micro","embed"].join(",")+`
|
|
|
|
|
`:o+=`sapi: ${v.value.join(",")}
|
|
|
|
|
`,M.value&&(o+=`libs: ${M.value.replace('--with-libs="',"").replace('"',"").trim()}
|
|
|
|
|
`),k.value&&(o+=`debug: true
|
|
|
|
|
`),o+="{{position_hold}}",E.value&&(o+=` with-upx-pack: true
|
|
|
|
|
`),$.value&&(o+=` enable-zts: true
|
|
|
|
|
`),C.value&&(o+=` prefer-pre-built: true
|
|
|
|
|
`),o.endsWith("{{position_hold}}")?o=o.replace("{{position_hold}}",""):o=o.replace("{{position_hold}}",`build-options:
|
|
|
|
|
`),o}),we=o=>{const t=new Set,s=u=>{let b=[];if(c.value==="linux"){if(b=d.value[u]["lib-depends-linux"]??d.value[u]["lib-depends-unix"]??d.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=d.value[u]["lib-depends-macos"]??d.value[u]["lib-depends-unix"]??d.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=d.value[u]["lib-depends-windows"]??d.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(_=>{t.add(_),s(_)})},r=u=>{let b=[];if(c.value==="linux"){if(b=l.value[u]["lib-depends-linux"]??l.value[u]["lib-depends-unix"]??l.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=l.value[u]["lib-depends-macos"]??l.value[u]["lib-depends-unix"]??l.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=l.value[u]["lib-depends-windows"]??l.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(_=>{t.add(_),s(_)})};return o.forEach(u=>{r(u)}),Array.from(t)};return G(c,()=>y.value=[]),G(c,()=>E.value=0),G(y,o=>{H.value=de(o),H.value.forEach(s=>{y.value.indexOf(s)===-1&&y.value.push(s)}),y.value.sort(),console.log("检测到变化!"),console.log(o);const t=zt({ext:l.value,lib:d.value,os:c.value},y.value);h.value=t.libs.sort(),q.value=[],V.value=we(t.exts),V.value.forEach(s=>{q.value.indexOf(s)===-1&&q.value.push(s)})}),(o,t)=>(g(),x("div",null,[e("h2",null,n(a[i.lang].selectedSystem),1),e("div",Bt,[(g(),x(N,null,O(S,(s,r)=>e("span",{key:r,style:{"margin-right":"8px"}},[m(e("input",{type:"radio",id:"os-"+s.os,value:s.os,disabled:s.disabled===!0,"onUpdate:modelValue":t[0]||(t[0]=u=>c.value=u)},null,8,qt),[[f,c.value]]),e("label",{for:"os-"+s.os},n(s.label),9,Et)])),64))]),e("div",_t,[m(e("select",{"onUpdate:modelValue":t[1]||(t[1]=s=>j.value=s)},[Ct,e("option",{value:"aarch64",disabled:c.value==="windows"},"aarch64",8,Wt)],512),[[Z,j.value]])]),e("h2",null,n(a[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",It,[m(e("input",{class:"input","onUpdate:modelValue":t[2]||(t[2]=s=>W.value=s),placeholder:"Highlight search..."},null,512),[[J,W.value]]),Pt,(g(!0),x(N,null,O(p.value,s=>(g(),x("div",$t,[e("span",null,[m(e("input",{type:"checkbox",id:s,value:s,"onUpdate:modelValue":t[3]||(t[3]=r=>y.value=r),disabled:H.value.indexOf(s)!==-1},null,8,Ut),[[Q,y.value]]),e("label",{for:s},[e("span",null,n(F(s,0)),1),e("span",Nt,n(F(s,1)),1),e("span",null,n(F(s,2)),1)],8,Lt)])]))),256))]),c.value!=="windows"?(g(),x("div",{key:0,class:"my-btn",onClick:ne},n(a[i.lang].selectCommon),1)):I("",!0),e("div",{class:"my-btn",onClick:t[4]||(t[4]=s=>y.value=[])},n(a[i.lang].selectNone),1),e("details",Ot,[e("summary",null,n(a[i.lang].buildLibs)+n(q.value.length>0?" ("+q.value.length+")":""),1),e("div",Vt,[(g(!0),x(N,null,O(h.value,(s,r)=>(g(),x("div",At,[m(e("input",{type:"checkbox",id:r,value:s,"onUpdate:modelValue":t[5]||(t[5]=u=>q.value=u),disabled:V.value.indexOf(s)!==-1},null,8,jt),[[Q,q.value]]),e("label",{for:r},n(s),9,Tt)]))),256))])]),e("div",Gt,[Xt,e("p",null,n(a[i.lang].depTips),1)]),e("h2",null,n(a[i.lang].buildTarget),1),e("div",Mt,[(g(),x(N,null,O(le,s=>e("div",Ht,[m(e("input",{type:"checkbox",id:"build_"+s,value:s,"onUpdate:modelValue":t[6]||(t[6]=r=>v.value=r),onChange:ae},null,40,Rt),[[Q,v.value]]),e("label",{for:"build_"+s},n(s),9,Ft)])),64))]),P.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(g(),x("div",Zt,[Qt,e("p",null,n(a[i.lang].microUnavailable),1)])):I("",!0),c.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(g(),x("div",Kt,[Yt,e("p",null,n(a[i.lang].windowsSAPIUnavailable),1)])):I("",!0),e("h2",null,n(a[i.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,n(a[i.lang].buildEnvironment),1),e("td",null,[m(e("select",{"onUpdate:modelValue":t[7]||(t[7]=s=>A.value=s)},[e("option",Jt,n(a[i.lang].buildEnvNative),1),e("option",el,n(a[i.lang].buildEnvSpc),1),c.value!=="windows"?(g(),x("option",il,n(a[i.lang].buildEnvDocker),1)):I("",!0)],512),[[Z,A.value]])])]),e("tr",null,[e("td",null,n(a[i.lang].downloadPhpVersion),1),e("td",
|