mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 05:14:52 +08:00
3 lines
36 KiB
JavaScript
3 lines
36 KiB
JavaScript
|
|
import{d as we,s as w,h as D,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 R,a4 as Y,e as I,a5 as f,a as ge,a6 as F,p as xe,l as me,_ as ye}from"./framework.gjrnbxUT.js";const he={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ve={type:"external",source:"apcu"},fe={type:"external",source:"ast"},ze={type:"builtin"},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"},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"]},$e={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-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":[]},je={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","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":"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"]},He={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","ext-depends":["xml"]},Je={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},ei={type:"builtin","arg-type":"custom"},ii={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},si={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"]},ti={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},li={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"]},ni={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable"},oi={ty
|
||
|
|
`);let t=[];return u.forEach(s=>{s.indexOf("=")>=1&&t.push(s)})," "+t.map(s=>'-I "'+s+'"').join(" ")}),W=w(""),H=(u,t)=>u.includes(W.value)?t===0?u.substring(0,u.indexOf(W.value)):t===1?W.value:u.substring(u.indexOf(W.value)+W.value.length):t===0?u:"",ae=u=>{let t;v.value.indexOf("all")!==-1&&u.target.value==="all"?v.value=["all"]:(t=v.value.indexOf("all"))!==-1&&u.target.value!=="all"&&v.value.splice(t,1),K.value=v.value.map(s=>"--build-"+s).join(" ")},de=u=>{const t=new Set,s=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=>{t.add(b),s(b)})};return u.forEach(c=>{s(c)}),Array.from(t)},pe=D(()=>`${j.value} download --all --with-php=${U.value}${P.value?" --prefer-pre-built":""}${B.value?" --debug":""}`),ue=D(()=>`${j.value} download --with-php=${U.value} --for-extensions "${Q.value}"${P.value?" --prefer-pre-built":""}${B.value?" --debug":""}`),re=D(()=>`${j.value} install-pkg upx${B.value?" --debug":""}`),ce=D(()=>`${j.value} build ${K.value} "${Q.value}"${ne.value}${B.value?" --debug":""}${L.value?" --enable-zts":""}${C.value?" --with-upx-pack":""}${oe.value}`),be=u=>{const t=new Set,s=p=>{let b=[];if(r.value==="linux"){if(b=a.value[p]["lib-depends-linux"]??a.value[p]["lib-depends-unix"]??a.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=a.value[p]["lib-depends-macos"]??a.value[p]["lib-depends-unix"]??a.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=a.value[p]["lib-depends-windows"]??a.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(q=>{t.add(q),s(q)})},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(q=>{t.add(q),s(q)})};return u.forEach(p=>{c(p)}),Array.from(t)};return G(r,()=>h.value=[]),G(r,()=>C.value=0),G(h,u=>{X.value=de(u),X.value.forEach(s=>{h.value.indexOf(s)===-1&&h.value.push(s)}),h.value.sort(),console.log("检测到变化!"),console.log(u);const t=yt({ext:l.value,lib:a.value,os:r.value},h.value);y.value=t.libs.sort(),k.value=[],V.value=be(t.exts),V.value.forEach(s=>{k.value.indexOf(s)===-1&&k.value.push(s)})}),(u,t)=>(g(),x("div",null,[e("h2",null,n(o[i.lang].selectedSystem),1),e("div",zt,[(g(),x(N,null,O(z,(s,c)=>e("span",{key:c,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]=p=>r.value=p)},null,8,St),[[f,r.value]]),e("label",{for:"os-"+s.os},n(s.label),9,Dt)])),64))]),e("div",kt,[m(e("select",{"onUpdate:modelValue":t[1]||(t[1]=s=>T.value=s)},[Bt,e("option",{value:"aarch64",disabled:r.value==="windows"},"aarch64",8,qt)],512),[[R,T.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(h.value.length>0?" ("+h.value.length+")":""),1),e("div",Et,[m(e("input",{class:"input","onUpdate:modelValue":t[2]||(t[2]=s=>W.value=s),placeholder:"Highlight search..."},null,512),[[Y,W.value]]),Ct,(g(!0),x(N,null,O(d.value,s=>(g(),x("div",Wt,[e("span",null,[m(e("input",{type:"checkbox",id:s,value:s,"onUpdate:modelValue":t[3]||(t[3]=c=>h.value=c),disabled:X.value.indexOf(s)!==-1},null,8,It),[[F,h.value]]),e("label",{for:s},[e("span",null,n(H(s,0)),1),e("span",_t,n(H(s,1)),1),e("span",null,n(H(s,2)),1)],8,Pt)])]))),256))]),r.value!=="windows"?(g(),x("div",{key:0,class:"my-btn",onClick:le},n(o[i.lang].selectCommon),1)):I("",!0),e("div",{class:"my-btn",onClick:t[4]||(t[4]=s=>h.value=[])},n(o[i.lang].selectNone),1),
|