2025-08-21 13:32:23 +00:00
|
|
|
import{d as ge,x as w,h as z,z as _,c as g,o as x,j as e,e as C,ag as h,t as n,G as j,H as N,ah as f,ai as F,aj as Y,ak as Z,a as xe,_ as he}from"./framework.PeLcR_tw.js";const me={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-path","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"]},je={type:"builtin"},Ne={type:"builtin"},Oe={type:"builtin","lib-suggests":["openssl"]},Ve={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"]},Ae={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","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":[]},_e={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},Ge={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},He={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Me={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:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},Ke={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ye={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],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":["libm
|
2025-08-20 05:56:48 +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(()=>`${T.value} download --all --with-php=${I.value}${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=z(()=>`${T.value} download --with-php=${I.value} --for-extensions "${G.value}"${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),re=z(()=>`${T.value} install-pkg upx${k.value?" --debug":""}`),ce=z(()=>`${T.value} build ${K.value} "${G.value}"${X.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: "${G.value}"
|
|
|
|
|
`,v.value.join(",")==="all"?a+="sapi: "+["cli","fpm","micro","embed"].join(",")+`
|
|
|
|
|
`:a+=`sapi: ${v.value.join(",")}
|
|
|
|
|
`,X.value&&(a+=`libs: ${X.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:
|
|
|
|
|
`),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 _(r,()=>y.value=[]),_(r,()=>q.value=0),_(y,a=>{H.value=de(a),H.value.forEach(t=>{y.value.indexOf(t)===-1&&y.value.push(t)}),y.value.sort(),console.log("检测到变化!"),console.log(a);const s=Et({ext:l.value,lib:d.value,os:r.value},y.value);m.value=s.libs.sort(),B.value=[],O.value=we(s.exts),O.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",It,[(x(),g(j,null,N(S,(t,c)=>e("span",{key:c,style:{"margin-right":"8px"}},[h(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,$t),[[f,r.value]]),e("label",{for:"os-"+t.os},n(t.label),9,Ut)])),64))]),e("div",Lt,[h(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>A.value=t)},[s[20]||(s[20]=e("option",{value:"x86_64"},"x86_64",-1)),e("option",{value:"aarch64",disabled:r.value==="windows"},"aarch64",8,jt)],512),[[F,A.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",Nt,[h(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(j,null,N(u.value,t=>(x(),g("div",Ot,[e("span",null,[h(e("input",{type:"checkbox",id:t,value:t,"onUpdate:modelValue":s[3]||(s[3]=c=>y.value=c),disabled:H.value.indexOf(t)!==-1},null,8,Vt),[[Z,y.value]]),e("label",{for:t},[e("span",null,n(R(t,0)),1),e("span",Tt,n(R(t,1)),1),e("span",null,n(R(t,2)),1)],8,At)])]))),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",_t,[e("summary",null,n(o[i.lang].buildLibs)+n(B.value.length>0?" ("+B.value.length+")":""),1),e("div",Gt,[(x(!0),g(j,null,N(m.value,(t,c)=>(x(),g("div",Xt,[h(e("input",{type:"checkbox",id:c,value:t,"onUpdate:modelValue":s[5]||(s[5]=p=>B.value=p),disabled:O.value.indexOf(t)!==-1},null,8,Ht),[[Z,B.value]]),e("label",{for:c},n(t),9,Mt)]))),256))])]),e("div",Rt,[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",Ft,[(x(),g(j,null,N(te,t=>e("div",Zt,[h(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":s[6]||(s[6]=c=>v.value=c),onChange:ae},null,40,Qt),[[Z,v.value]]),e("label",{for:"build_"+t},n(t),9,Kt)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(x(),g("div",Yt,[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",Jt,[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
|