2025-06-19 07:57:56 +00:00
|
|
|
import{d as ge,x as w,h as z,z as G,c as g,o as x,j as e,e as C,ag as m,t as n,G as N,H as O,ah as f,ai as F,aj as Y,ak as Z,a as xe,_ as me}from"./framework.PeLcR_tw.js";const he={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ye={type:"external",source:"apcu"},ve={type:"external",source:"ast"},fe={type:"builtin"},ze={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},Se={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},De={type:"builtin"},ke={type:"builtin"},Be={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},qe={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},Ee={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"},Pe={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ie={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},$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"},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"]},Te={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},je={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"]},He={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"custom","cpp-extension":!0,"lib-depends":["grpc"]},Me={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},_e={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Re={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Fe={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Ze={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Qe={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Ke={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ye={support:{BSD:"wip"},type:"builtin","arg-type":"none",target:["static"]},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ei={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},ii={type:"builtin","arg-type":"custom"},si={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},ti={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"lib-depends-unix":["libmemcached","fastlz"],"ext-depends":["session","zlib
|
2025-06-12 04:49:10 +00:00
|
|
|
`);let s=[];return a.forEach(t=>{t.indexOf("=")>=1&&s.push(t)})," "+s.map(t=>'-I "'+t+'"').join(" ")}),P=w(""),R=(a,s)=>a.includes(P.value)?s===0?a.substring(0,a.indexOf(P.value)):s===1?P.value:a.substring(a.indexOf(P.value)+P.value.length):s===0?a:"",ae=a=>{let s;v.value.indexOf("all")!==-1&&a.target.value==="all"?v.value=["all"]:(s=v.value.indexOf("all"))!==-1&&a.target.value!=="all"&&v.value.splice(s,1),K.value=v.value.map(t=>"--build-"+t).join(" ")},de=a=>{const s=new Set,t=c=>{let p=[];if(r.value==="linux"){if(p=l.value[c]["ext-depends-linux"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="macos"){if(p=l.value[c]["ext-depends-macos"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="windows"&&(p=l.value[c]["ext-depends-windows"]??l.value[c]["ext-depends"]??[],p.length===0))return;p.forEach(b=>{s.add(b),t(b)})};return a.forEach(c=>{t(c)}),Array.from(s)},ue=z(()=>`${j.value} download --all --with-php=${I.value}${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=z(()=>`${j.value} download --with-php=${I.value} --for-extensions "${X.value}"${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),re=z(()=>`${j.value} install-pkg upx${k.value?" --debug":""}`),ce=z(()=>`${j.value} build ${K.value} "${X.value}"${H.value}${k.value?" --debug":""}${$.value?" --enable-zts":""}${q.value?" --with-upx-pack":""}${oe.value}`),be=z(()=>{let a=`php-version: ${I.value}
|
|
|
|
|
`;return a+=`extensions: "${X.value}"
|
|
|
|
|
`,v.value.join(",")==="all"?a+="sapi: "+["cli","fpm","micro","embed"].join(",")+`
|
|
|
|
|
`:a+=`sapi: ${v.value.join(",")}
|
|
|
|
|
`,H.value&&(a+=`libs: ${H.value.replace('--with-libs="',"").replace('"',"").trim()}
|
|
|
|
|
`),k.value&&(a+=`debug: true
|
|
|
|
|
`),a+="{{position_hold}}",q.value&&(a+=` with-upx-pack: true
|
|
|
|
|
`),$.value&&(a+=` enable-zts: true
|
|
|
|
|
`),W.value&&(a+=` prefer-pre-built: true
|
|
|
|
|
`),a.endsWith("{{position_hold}}")?a=a.replace("{{position_hold}}",""):a=a.replace("{{position_hold}}",`build-options:
|
2025-06-19 07:57:56 +00:00
|
|
|
`),a}),we=a=>{const s=new Set,t=p=>{let b=[];if(r.value==="linux"){if(b=d.value[p]["lib-depends-linux"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=d.value[p]["lib-depends-macos"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=d.value[p]["lib-depends-windows"]??d.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})},c=p=>{let b=[];if(r.value==="linux"){if(b=l.value[p]["lib-depends-linux"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=l.value[p]["lib-depends-macos"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=l.value[p]["lib-depends-windows"]??l.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})};return a.forEach(p=>{c(p)}),Array.from(s)};return G(r,()=>y.value=[]),G(r,()=>q.value=0),G(y,a=>{M.value=de(a),M.value.forEach(t=>{y.value.indexOf(t)===-1&&y.value.push(t)}),y.value.sort(),console.log("检测到变化!"),console.log(a);const s=Dt({ext:l.value,lib:d.value,os:r.value},y.value);h.value=s.libs.sort(),B.value=[],V.value=we(s.exts),V.value.forEach(t=>{B.value.indexOf(t)===-1&&B.value.push(t)})}),(a,s)=>(x(),g("div",null,[e("h2",null,n(o[i.lang].selectedSystem),1),e("div",Et,[(x(),g(N,null,O(S,(t,c)=>e("span",{key:c,style:{"margin-right":"8px"}},[m(e("input",{type:"radio",id:"os-"+t.os,value:t.os,disabled:t.disabled===!0,"onUpdate:modelValue":s[0]||(s[0]=p=>r.value=p)},null,8,Ct),[[f,r.value]]),e("label",{for:"os-"+t.os},n(t.label),9,Wt)])),64))]),e("div",Pt,[m(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>T.value=t)},[s[20]||(s[20]=e("option",{value:"x86_64"},"x86_64",-1)),e("option",{value:"aarch64",disabled:r.value==="windows"},"aarch64",8,It)],512),[[F,T.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",$t,[m(e("input",{class:"input","onUpdate:modelValue":s[2]||(s[2]=t=>P.value=t),placeholder:"Highlight search..."},null,512),[[Y,P.value]]),s[21]||(s[21]=e("br",null,null,-1)),(x(!0),g(N,null,O(u.value,t=>(x(),g("div",Ut,[e("span",null,[m(e("input",{type:"checkbox",id:t,value:t,"onUpdate:modelValue":s[3]||(s[3]=c=>y.value=c),disabled:M.value.indexOf(t)!==-1},null,8,Lt),[[Z,y.value]]),e("label",{for:t},[e("span",null,n(R(t,0)),1),e("span",Ot,n(R(t,1)),1),e("span",null,n(R(t,2)),1)],8,Nt)])]))),256))]),r.value!=="windows"?(x(),g("div",{key:0,class:"my-btn",onClick:le},n(o[i.lang].selectCommon),1)):C("",!0),r.value!=="windows"?(x(),g("div",{key:1,class:"my-btn",onClick:ne},n(o[i.lang].selectAll),1)):C("",!0),e("div",{class:"my-btn",onClick:s[4]||(s[4]=t=>y.value=[])},n(o[i.lang].selectNone),1),e("details",Vt,[e("summary",null,n(o[i.lang].buildLibs)+n(B.value.length>0?" ("+B.value.length+")":""),1),e("div",At,[(x(!0),g(N,null,O(h.value,(t,c)=>(x(),g("div",Tt,[m(e("input",{type:"checkbox",id:c,value:t,"onUpdate:modelValue":s[5]||(s[5]=p=>B.value=p),disabled:V.value.indexOf(t)!==-1},null,8,jt),[[Z,B.value]]),e("label",{for:c},n(t),9,Gt)]))),256))])]),e("div",Xt,[s[22]||(s[22]=e("p",{class:"custom-block-title"},"TIP",-1)),e("p",null,n(o[i.lang].depTips),1),e("p",null,n(o[i.lang].depTips2),1)]),e("h2",null,n(o[i.lang].buildTarget),1),e("div",Ht,[(x(),g(N,null,O(te,t=>e("div",Mt,[m(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":s[6]||(s[6]=c=>v.value=c),onChange:ae},null,40,_t),[[Z,v.value]]),e("label",{for:"build_"+t},n(t),9,Rt)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(x(),g("div",Ft,[s[23]||(s[23]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].microUnavailable),1)])):C("",!0),r.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(x(),g("div",Zt,[s[24]||(s[24]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].windowsSAPIUnavailable),1)])):C("",!0),e("h2",null,n(o[i.lang].buildOptions),1),e("tab
|