2025-11-04 13:59:40 +00:00
|
|
|
|
import{d as fe,x as w,h as k,z as ae,c as g,o as x,j as e,e as W,ai as m,t as l,G as V,H as T,aj as S,ak as te,al as de,am as le,n as I,_ as ze}from"./framework.Bhsyh9kO.js";const ke={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},Se={type:"external",source:"apcu"},De={type:"external",source:"ast"},Be={type:"builtin"},Ce={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},qe={type:"builtin","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["bzip2"]},Ee={type:"builtin"},We={type:"builtin"},$e={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},Pe={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},Ie={support:{BSD:"wip"},type:"external",source:"dio"},Le={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},Ue={type:"external",source:"ext-ds"},je={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ae={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},Ne={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Oe={type:"builtin"},Ve={support:{Linux:"partial",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},Te={type:"builtin"},Me={type:"builtin"},Ge={type:"builtin","lib-suggests":["openssl"]},Xe={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"]},He={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gettext"]},Re={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Fe={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},Ze={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Qe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},Ke={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Ye={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Je={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},_e={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},ei={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},ii={support:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},si={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},ti={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],"build-with-php":!0,target:["static"]},li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ni={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},oi={type:"builtin","arg-type":"custom"},ai={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},di={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},ui={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"l
|
|
|
|
|
|
`),a}),ge=(a,t)=>{const s=o.get(t),b=u.value[a]?.support?.[s]??"yes";return b==="yes"||b==="partial"},xe=()=>{y.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},me=()=>{y.value=[...oe.value]},he=a=>{if(a.target.value==="all")z.value=["all"];else{const s=z.value.indexOf("all");s!==-1&&z.value.splice(s,1)}ne.value=z.value.map(s=>`--build-${s}`).join(" ")},se=(a,t)=>{if(!C.value||!a.includes(C.value))return t===0?a:"";const s=a.indexOf(C.value);switch(t){case 0:return a.substring(0,s);case 1:return C.value;case 2:return a.substring(s+C.value.length);default:return""}},P=async a=>{try{await navigator.clipboard.writeText(a);const s={[Q.value]:"spcDownload",[Y.value]:"downloadExt",[K.value]:"downloadAll",[J.value]:"downloadPkg",[_.value]:"doctor",[ee.value]:"build",[ie.value]:"craft"}[a];s&&(v.value[s]=!0,setTimeout(()=>{v.value[s]=!1},2e3))}catch(t){console.error("Failed to copy text: ",t);const s=document.createElement("textarea");s.value=a,document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}},ye=a=>{const t=new Set,s=b=>{let c=[];r.value==="linux"?c=u.value[b]?.["ext-depends-linux"]??u.value[b]?.["ext-depends-unix"]??u.value[b]?.["ext-depends"]??[]:r.value==="macos"?c=u.value[b]?.["ext-depends-macos"]??u.value[b]?.["ext-depends-unix"]??u.value[b]?.["ext-depends"]??[]:r.value==="windows"&&(c=u.value[b]?.["ext-depends-windows"]??u.value[b]?.["ext-depends"]??[]),c.length!==0&&c.forEach(f=>{t.add(f),s(f)})};return a.forEach(s),Array.from(t)},ve=a=>{const t=new Set,s=c=>{let f=[];r.value==="linux"?f=h.value[c]?.["lib-depends-linux"]??h.value[c]?.["lib-depends-unix"]??h.value[c]?.["lib-depends"]??[]:r.value==="macos"?f=h.value[c]?.["lib-depends-macos"]??h.value[c]?.["lib-depends-unix"]??h.value[c]?.["lib-depends"]??[]:r.value==="windows"&&(f=h.value[c]?.["lib-depends-windows"]??h.value[c]?.["lib-depends"]??[]),f.length!==0&&f.forEach(O=>{t.add(O),s(O)})},b=c=>{let f=[];r.value==="linux"?f=u.value[c]?.["lib-depends-linux"]??u.value[c]?.["lib-depends-unix"]??u.value[c]?.["lib-depends"]??[]:r.value==="macos"?f=u.value[c]?.["lib-depends-macos"]??u.value[c]?.["lib-depends-unix"]??u.value[c]?.["lib-depends"]??[]:r.value==="windows"&&(f=u.value[c]?.["lib-depends-windows"]??u.value[c]?.["lib-depends"]??[]),f.length!==0&&f.forEach(O=>{t.add(O),s(O)})};return a.forEach(b),Array.from(t)};ae(r,()=>{r.value==="windows"&&(X.value="x86_64"),y.value=[],E.value=0}),ae(y,a=>{H.value=ye(a),H.value.forEach(s=>{y.value.indexOf(s)===-1&&y.value.push(s)}),y.value.sort();const t=At({ext:u.value,lib:h.value,os:r.value},y.value);D.value=t.libs.sort(),q.value=[],M.value=ve(t.exts),M.value.forEach(s=>{q.value.indexOf(s)===-1&&q.value.push(s)})},{deep:!0});const n={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建(Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectAll:"选择全部",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini,每行写一个,例如:memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTip
|