Files
static-php-cli/zh/develop/artifact-model.html

153 lines
84 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Artifact 模型 | StaticPHP</title>
<meta name="description" content="A powerful tool designed for building portable executables including PHP, extensions, and more.">
<meta name="generator" content="VitePress v2.0.0-alpha.12">
<link rel="preload stylesheet" href="/assets/style.DtFsVR9B.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.DFjSYdj3.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.CtIPYXhG.js">
<link rel="modulepreload" href="/assets/chunks/framework.C2AwuPrQ.js">
<link rel="modulepreload" href="/assets/zh_develop_artifact-model.md.BtcNBk1j.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-1df9f90f><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0b0ada53></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0b0ada53>Skip to content</a><!--]--><!----><header class="VPNav" data-v-1df9f90f data-v-9f75dce3><div class="VPNavBar" data-v-9f75dce3 data-v-2a96a3d0><div class="wrapper" data-v-2a96a3d0><div class="container" data-v-2a96a3d0><div class="title" data-v-2a96a3d0><div class="VPNavBarTitle has-sidebar" data-v-2a96a3d0 data-v-1e38c6bc><a class="title" href="/zh/" data-v-1e38c6bc><!--[--><!--]--><!--[--><img class="VPImage logo" src="/images/static-php_nobg.png" alt data-v-8426fc1a><!--]--><span data-v-1e38c6bc>StaticPHP</span><!--[--><!--]--></a></div></div><div class="content" data-v-2a96a3d0><div class="content-body" data-v-2a96a3d0><!--[--><!--]--><div class="VPNavBarSearch search" data-v-2a96a3d0><!--[--><!----><div id="docsearch"><button type="button" aria-label="Search" aria-keyshortcuts="/ control+k meta+k" class="DocSearch DocSearch-Button"><span class="DocSearch-Button-Container"><span class="vpi-search DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key"></kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-2a96a3d0 data-v-39714824><span id="main-nav-aria-label" class="visually-hidden" data-v-39714824> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zh/guide/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>构建指南</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zh/develop/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>开发者</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zh/contributing/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>贡献</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zh/faq/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>FAQ</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-39714824 data-v-42cb505d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-42cb505d><span class="text" data-v-42cb505d><!----><span data-v-42cb505d>v3 (alpha)</span><span class="vpi-chevron-down text-icon" data-v-42cb505d></span></span></button><div class="menu" data-v-42cb505d><div class="VPMenu" data-v-42cb505d data-v-25a6cce8><div class="items" data-v-25a6cce8><!--[--><!--[--><div class="VPMenuLink" data-v-25a6cce8 data-v-cd834e02><a class="VPLink link" href="/zh/" data-v-cd834e02><!--[--><span data-v-cd834e02>v3 (alpha)</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-25a6cce8 data-v-cd834e02><a class="VPLink link vp-external-link-icon" href="https://static-php.github.io/v2-docs/" target="_blank" rel="noreferrer" data-v-cd834e02><!--[--><span data-v-cd834e02>v2</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-2a96a3d0 data-v-88af2de4 data-v-42cb505d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-42cb505d><span class="text" data-v-42cb505d><span class="vpi-languages option-icon" data-v-42cb505d></span><!----><span class="vpi-chevron-down text-icon" data-v-42cb505d></span></span></button><div class="menu" data-v-42cb505d><div class="VPMenu" data-v-42cb505d data-v-25a6cce8><!----><!--[--><!--[--><div class="items" data-v-88af2de4><p class="title" data-v-88af2de4>简体中文</p><!--[--><div class="VPMenuLink" data-v-88af2de4 data-v-cd834e02><a class="VPLink link" href="/en/develop/artifact-model.html" data-v-cd834e02><!--[--><span data-v-cd834e02>English</span><!--]--></a></div><!--]--></div><!--]--><!--]-
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghrel</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl/curl</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl.+\.tar\.xz</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prefer-stable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span></code></pre></div><p>有两种方式定义一个 artifact 并关联到 package一种是独立定义 artifact如上另一种是直接在 package 定义中内联 artifact</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-16" id="tab-17" checked><label data-title="内联 Artifact 定义示例" for="tab-17">内联 Artifact 定义示例</label><input type="radio" name="group-16" id="tab-18"><label data-title="独立 Artifact 定义示例" for="tab-18">独立 Artifact 定义示例</label><input type="radio" name="group-16" id="tab-19"><label data-title="Package 引用独立 Artifact 示例" for="tab-19">Package 引用独立 Artifact 示例</label></div><div class="blocks"><div class="language-yaml active"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 该文件为 package 声明</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">curl</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">target</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghrel</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl/curl</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl.+\.tar\.xz</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prefer-stable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span></code></pre></div><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 该文件为 artifact 声明,通常位于 config/artifact/ 目录</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">curl-src</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghrel</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl/curl</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl.+\.tar\.xz</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prefer-stable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span></code></pre></div><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 该文件为 package 声明</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">curl</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">target</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">curl-src</span></span></code></pre></div></div></div><h2 id="类型" tabindex="-1">类型 <a class="header-anchor" href="#类型" aria-label="Permalink to “类型”"></a></h2><p>Artifact 包含 <code>source</code><code>binary</code><code>metadata</code> 三个部分。</p><p>其中,<code>source</code> 代表源码,<code>binary</code> 代表预构建的二进制文件,<code>metadata</code> 则包含一些额外的信息(如许可证文件路径等)。<code>source</code><code>binary</code> 都支持直接定义下载 URL 的方式,也支持引用同名 Artifact 定义的方式(如上例所示)。</p><p>下面是一个 artifact 配置的对象格式</p><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> binary</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> windows-x86_64</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> linux-x86_64</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> linux-aarch64</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> macos-x86_64</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> macos-aarch64</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">source-object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (optional)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (optional) SPDX</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license-files</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;LICENSE&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># License files from original source dir</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source-root</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;subdir&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (optional) If package source is in subdir, use this to change base</span></span></code></pre></div><p>下面是 <code>source-object</code> 的基本格式:</p><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&amp;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;url&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Download type</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # ...: Different type requires differnt keys here, read below</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> extract</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;path/to/dir&quot;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (optional) Change extract dir, default: `SOURCE_PATH/{artifact-name}`</span></span></code></pre></div><h2 id="metadata" tabindex="-1">Metadata <a class="header-anchor" href="#metadata" aria-label="Permalink to “Metadata”"></a></h2><p><code>metadata</code> 字段用于声明 Artifact 的附加信息,目前支持以下三个子字段:</p><h3 id="license" tabindex="-1">license <a class="header-anchor" href="#license" aria-label="Permalink to “license”"></a></h3><ul><li><strong>类型</strong><code>string</code>(选填)</li><li><strong>说明</strong>:该包的开源协议标识符,遵循 <a href="https://spdx.org/licenses/" target="_blank" rel="noreferrer">SPDX License Identifier</a> 规范(如 <code>MIT</code><code>Apache-2.0</code><code>GPL-2.0-only</code>)。仅用于在构建产物的 License 汇总中标注协议类型,不影响构建逻辑。</li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">MIT</span></span></code></pre></div><h3 id="license-files" tabindex="-1">license-files <a class="header-anchor" href="#license-files" aria-label="Permalink to “license-files”"></a></h3><ul><li><strong>类型</strong><code>string[]</code>(选填)</li><li><strong>说明</strong>License 文件的路径列表。构建完成后,框架会自动将这些文件收集到构建产物的 <code>license/</code> 目录中。路径支持两种写法: <ul><li><strong>相对路径</strong>(如 <code>LICENSE</code><code>COPYING</code><code>gettext-runtime/intl/COPYING.LIB</code>):相对于该 Artifact 的源码根目录解析。</li><li><strong><code>@/</code> 前缀路径</strong>(如 <code>@/bzip2.txt</code>):表示框架内置的 License 文件,路径解析为 <code>src/globals/licenses/</code> 目录下的文件。适用于源码包本身不附带 License 文件(或 License 文本嵌入在其他文档中)的场景,此时可将 License 文本预先放入框架内置目录并通过 <code>@/</code> 引用。</li></ul></li></ul><p>目前框架内置的 License 文件有:<code>bzip2.txt</code><code>gmp.txt</code><code>icu.txt</code><code>postgresql.txt</code><code>sqlite.txt</code><code>zlib.txt</code></p><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 常见用法:从源码目录读取</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license-files</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">LICENSE</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 多个 License 文件</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license-files</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">LICENSE</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">COPYING.LESSER</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 子目录中的 License 文件</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license-files</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">gettext-runtime/intl/COPYING.LIB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 使用框架内置 License源码包不含 License 文件时)</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> license-files</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;@/bzip2.txt&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><h3 id="source-root" tabindex="-1">source-root <a class="header-anchor" href="#source-root" aria-label="Permalink to “source-root”"></a></h3><ul><li><strong>类型</strong><code>string</code>(选填)</li><li><strong>说明</strong>:当 Artifact 解压后,实际的源码根目录位于解压目录的子目录中时,使用该字段指定子目录名。框架在执行构建时会将工作目录切换到该子目录,而非解压后的顶层目录。</li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># krb5 的源码解压后实际根目录在 src/ 子目录下</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">metadata</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source-root</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">src</span></span></code></pre></div><h2 id="下载来源" tabindex="-1">下载来源 <a class="header-anchor" href="#下载来源" aria-label="Permalink to “下载来源”"></a></h2><p>Artifact 支持多种下载来源类型。你可以根据实际情况选择对应包的下载来源。</p><table tabindex="0"><thead><tr><th>类型</th><th>说明</th></tr></thead><tbody><tr><td><code>url</code></td><td>直接下载固定 URL支持 <code>filename</code>(自定义本地文件名)和 <code>version</code>(手动指定版本号)字段</td></tr><tr><td><code>git</code></td><td>从 Git 仓库克隆源码,支持 <code>rev</code>(分支/标签/commit<code>submodules</code>(是否拉取子模块)、<code>extract</code>(解压目标路径)等字段</td></tr><tr><td><code>ghrel</code></td><td>从 GitHub Release 的 Assets 中按正则匹配下载,必填 <code>repo</code><code>owner/repo</code> 格式)和 <code>match</code>(文件名正则),支持 <code>prefer-stable</code>(优先稳定版)</td></tr><tr><td><code>ghtar</code></td><td>从 GitHub Release 下载源码 tarball<code>/releases</code> API<code>match</code> 正则匹配 Release 名称,支持 <code>prefer-stable</code></td></tr><tr><td><code>ghtagtar</code></td><td>从 GitHub Tag 下载源码 tarball<code>/tags</code> API<code>match</code> 正则匹配 Tag 名称,支持 <code>prefer-stable</code></td></tr><tr><td><code>filelist</code></td><td>抓取指定页面的 HTML<code>regex</code> 从中提取文件名和版本号,再拼接 <code>url</code> 下载,适用于有版本列表页的官方站点(如 php.net、openssl.org</td></tr><tr><td><code>pecl</code></td><td>从 PECLpecl.php.net下载 PHP 扩展,指定 <code>name</code>(扩展包名),支持 <code>prefer-stable</code></td></tr><tr><td><code>pie</code></td><td>从 Packagistrepo.packagist.org下载 PHP 扩展,指定 <code>repo</code><code>vendor/package</code> 格式),通过 Composer dist 获取下载链接</td></tr><tr><td><code>php-release</code></td><td>从 php.net 官方下载 PHP 源码,由 <code>domain</code> 指定镜像域名,版本由构建时的 <code>--with-php</code> 参数决定</td></tr><tr><td><code>bitbuckettag</code></td><td>从 Bitbucket Tag 下载源码 tarball指定 <code>repo</code><code>workspace/repo</code> 格式),自动获取最新 Tag</td></tr><tr><td><code>local</code></td><td>使用本地已有目录作为源码,指定 <code>dirname</code>(本地目录路径),适用于预先放置好源码的场景</td></tr><tr><td><code>custom</code></td><td>自定义下载逻辑,由 <code>src/Package/Artifact/</code> 下对应的 PHP 类实现,可指定 <code>func</code> 调用类中的特定方法</td></tr></tbody></table><h2 id="下载来源详情" tabindex="-1">下载来源详情 <a class="header-anchor" href="#下载来源详情" aria-label="Permalink to “下载来源详情”"></a></h2><h3 id="url" tabindex="-1">url <a class="header-anchor" href="#url" aria-label="Permalink to “url”"></a></h3><p>直接从固定 URL 下载文件。下载完成后自动解压到指定目录。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\Url</code></li><li><strong>支持能力</strong>:仅基础下载,不支持自动检查版本更新</li><li><strong>必填</strong><code>url</code> — 下载地址</li><li><strong>选填</strong> <ul><li><code>filename</code> — 保存到本地的文件名(默认取 URL 末段路径)</li><li><code>version</code> — 手动指定版本号(该类型无法自动检测版本)</li><li><code>extract</code> — 解压目标目录(默认为 <code>SOURCE_PATH/{artifact-name}</code></li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="co
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">url</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://www.sqlite.org/2024/sqlite-autoconf-3450200.tar.gz&#39;</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>在 artifact 中,以 <code>http://</code><code>https://</code> 开头的字符串会自动扩展为 <code>type: url</code> 对象,因此大多数情况下可以直接写裸 URL 字符串。</p><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://www.sqlite.org/2024/sqlite-autoconf-3450200.tar.gz&#39;</span></span></code></pre></div></div><hr><h3 id="git" tabindex="-1">git <a class="header-anchor" href="#git" aria-label="Permalink to “git”"></a></h3><p>从 Git 仓库克隆源码。支持两种模式:指定固定分支/Tag/commit<code>rev</code>),或通过正则从所有分支中匹配版本号(<code>regex</code>)。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\Git</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong><code>url</code> — 仓库地址</li><li><strong>选填</strong><code>rev</code><code>regex</code> 至少填一个): <ul><li><code>rev</code> — 直接克隆指定分支、Tag 或 commit hash</li><li><code>regex</code> — 对所有远程分支名执行正则匹配,自动选取版本最高的分支(需包含命名捕获组 <code>(?P&lt;version&gt;...)</code></li><li><code>submodules</code> — 是否拉取 git submodule布尔值</li><li><code>extract</code> — 克隆目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># php-glfw 使用 git 克隆 master 分支</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">git</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://github.com/mario-deluna/php-glfw&#39;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> rev</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">master</span></span></code></pre></div><hr><h3 id="ghrel" tabindex="-1">ghrel <a class="header-anchor" href="#ghrel" aria-label="Permalink to “ghrel”"></a></h3><p>通过 GitHub Release Assets API 下载文件。适合仓库在 Release 页面上传了预编译包或源码压缩包的情况。需要指定文件名正则来匹配 Assets 中的目标文件。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\GitHubRelease</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code>)、下载完整性校验(<code>ValidatorInterface</code>,校验 SHA256</li><li><strong>必填</strong> <ul><li><code>repo</code> — 仓库路径,格式 <code>owner/repo</code></li><li><code>match</code> — 匹配 Asset 文件名的正则(不含分隔符,如 <code>openssl.+\.tar\.gz</code></li></ul></li><li><strong>选填</strong> <ul><li><code>prefer-stable</code> — 是否跳过预发布版本(默认 <code>true</code></li><li><code>query</code> — 附加到 API URL 末尾的查询字符串(如 <code>?per_page=5</code></li><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># openssl 从 GitHub Release Assets 下载</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghrel</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">openssl/openssl</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">openssl.+\.tar\.gz</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> prefer-stable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span></span></code></pre></div><hr><h3 id="ghtar" tabindex="-1">ghtar <a class="header-anchor" href="#ghtar" aria-label="Permalink to “ghtar”"></a></h3><p>通过 GitHub <strong>Releases</strong> API 下载源码 tarball即 Release 页面中的 Source code 包)。与 <code>ghrel</code> 的区别在于:<code>ghrel</code> 下载 Assets<code>ghtar</code> 下载 Release 自动生成的源码 tarball。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\GitHubTarball</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong><code>repo</code> — 仓库路径,格式 <code>owner/repo</code></li><li><strong>选填</strong> <ul><li><code>prefer-stable</code> — 是否跳过预发布版本(默认 <code>true</code></li><li><code>match</code> — 对 <code>tarball_url</code> 进行正则过滤(不填则取第一个)</li><li><code>query</code> — 附加到 API URL 末尾的查询字符串</li><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># librdkafka 从 GitHub Release tarball 下载</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghtar</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">confluentinc/librdkafka</span></span></code></pre></div><hr><h3 id="ghtagtar" tabindex="-1">ghtagtar <a class="header-anchor" href="#ghtagtar" aria-label="Permalink to “ghtagtar”"></a></h3><p>通过 GitHub <strong>Tags</strong> API 下载源码 tarball。与 <code>ghtar</code> 用法相同,区别仅在于使用 <code>/tags</code> 接口而非 <code>/releases</code> 接口,适合只打 Tag 而不发布 Release 的仓库。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\GitHubTarball</code>(与 <code>ghtar</code> 共用同一实现类)</li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong><code>repo</code> — 仓库路径,格式 <code>owner/repo</code></li><li><strong>选填</strong> <ul><li><code>prefer-stable</code> — 是否跳过预发布版本(默认 <code>true</code></li><li><code>match</code> — 对 Tag 名称进行正则过滤(不填则取最新 Tag</li><li><code>query</code> — 附加到 API URL 末尾的查询字符串</li><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># brotli 通过 Tag 下载,只匹配 v1.x 系列</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghtagtar</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">google/brotli</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;v1\.\d.*&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># libpng 通过 Tag 下载,匹配 v1.6.x并增加分页参数</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ghtagtar</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pnggroup/libpng</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> match</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">v1\.6\.\d+</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> query</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;?per_page=150&#39;</span></span></code></pre></div><hr><h3 id="filelist" tabindex="-1">filelist <a class="header-anchor" href="#filelist" aria-label="Permalink to “filelist”"></a></h3><p>抓取一个 HTML 页面(通常是官方下载列表页),用正则从页面内容中提取文件名和版本号,然后自动选择最高稳定版本进行下载。预发布版本(含 alpha/beta/rc/dev/nightly/snapshot 关键词)会被自动跳过。</p><p><strong>适用场景</strong>:无 GitHub、只有官网下载索引页的开源项目<code>https://ftp.gnu.org/pub/gnu/ncurses/</code></p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\FileList</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong> <ul><li><code>url</code> — 包含文件列表的 HTML 页面地址</li><li><code>regex</code> — 用于从页面中提取文件名和版本号的 PCRE 正则(需包含命名捕获组 <code>(?&lt;file&gt;...)</code><code>(?&lt;version&gt;...)</code></li></ul></li><li><strong>选填</strong> <ul><li><code>extract</code> — 解压目标目录</li><li><code>download-url</code> — 自定义下载 URL 模板,支持 <code>{file}</code><code>{version}</code> 占位符(默认直接拼接 <code>url</code> + 文件名)</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># ncurses 从 GNU FTP 列表页抓取最新版本</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">filelist</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://ftp.gnu.org/pub/gnu/ncurses/&#39;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> regex</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;/href=&quot;(?&lt;file&gt;ncurses-(?&lt;version&gt;[^&quot;]+)\.tar\.gz)&quot;/&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># openssl 镜像源同样使用 filelist</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source-mirror</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">filelist</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://www.openssl.org/source/&#39;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> regex</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;/href=&quot;(?&lt;file&gt;openssl-(?&lt;version&gt;[^&quot;]+)\.tar\.gz)&quot;/&#39;</span></span></code></pre></div><hr><h3 id="pecl" tabindex="-1">pecl <a class="header-anchor" href="#pecl" aria-label="Permalink to “pecl”"></a></h3><p><a href="https://pecl.php.net" target="_blank" rel="noreferrer">PECL</a>PHP 扩展库)下载 PHP 扩展源码包。通过 PECL REST API 获取版本列表,自动选取最新稳定版。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\PECL</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong><code>name</code> — PECL 包名(大小写不敏感,如 <code>APCu</code></li><li><strong>选填</strong> <ul><li><code>prefer-stable</code> — 是否只下载稳定版(默认 <code>true</code></li><li><code>extract</code> — 解压目标目录(默认解压到 <code>php-src/ext/{name}</code></li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># APCu 从 PECL 下载</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pecl</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">APCu</span></span></code></pre></div><hr><h3 id="pie" tabindex="-1">pie <a class="header-anchor" href="#pie" aria-label="Permalink to “pie”"></a></h3><p><a href="https://repo.packagist.org" target="_blank" rel="noreferrer">Packagist</a> 下载符合 <a href="https://github.com/php/pie" target="_blank" rel="noreferrer">PIE</a> 规范的 PHP 扩展包。通过 Packagist 的 <code>p2/</code> API 获取包信息,并从 <code>dist</code> 字段下载源码。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\PIE</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code></li><li><strong>必填</strong><code>repo</code> — Packagist 包路径,格式 <code>vendor/package</code></li><li><strong>选填</strong> <ul><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># xdebug 从 Packagist 下载</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pie</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">xdebug/xdebug</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># php-spx 指定自定义解压目录</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pie</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">noisebynorthwest/php-spx</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> extract</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">php-src/ext/spx</span></span></code></pre></div><hr><h3 id="php-release" tabindex="-1">php-release <a class="header-anchor" href="#php-release" aria-label="Permalink to “php-release”"></a></h3><p><a href="https://www.php.net" target="_blank" rel="noreferrer">php.net</a> 官方下载 PHP 源码。版本号由构建时传入的 <code>--with-php</code> 参数决定,并会自动校验 SHA256 完整性。支持传入 <code>git</code> 作为版本号以直接克隆 <code>php/php-src</code> 的 master 分支。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\PhpRelease</code></li><li><strong>支持能力</strong>:检查版本更新(<code>CheckUpdateInterface</code>)、下载完整性校验(<code>ValidatorInterface</code>,校验 SHA256</li><li><strong>必填</strong><code>domain</code> — 下载镜像域名(如 <code>https://www.php.net</code> 或自定义镜像)</li><li><strong>选填</strong> <ul><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># php-src 官方下载,同时配置镜像</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">php-release</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> domain</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://www.php.net&#39;</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source-mirror</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">php-release</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> domain</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;https://phpmirror.static-php.dev&#39;</span></span></code></pre></div><hr><h3 id="bitbuckettag" tabindex="-1">bitbuckettag <a class="header-anchor" href="#bitbuckettag" aria-label="Permalink to “bitbuckettag”"></a></h3><p>从 Bitbucket 仓库的最新 Tag 下载源码 tarball。通过 Bitbucket REST API 获取 Tag 列表,取第一条(即最新 Tag进行下载。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\BitBucketTag</code></li><li><strong>支持能力</strong>:仅基础下载,不支持自动检查版本更新</li><li><strong>必填</strong><code>repo</code> — 仓库路径,格式 <code>workspace/repo</code></li><li><strong>选填</strong> <ul><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">bitbuckettag</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> repo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">snappy-m-o/php-snappy</span></span></code></pre></div><hr><h3 id="local" tabindex="-1">local <a class="header-anchor" href="#local" aria-label="Permalink to “local”"></a></h3><p>直接使用本地已有目录作为源码,不执行任何下载操作。适用于源码已预先放置到本地的场景(如离线环境、本地开发调试)。</p><ul><li><strong>实现类</strong><code>StaticPHP\Artifact\Downloader\Type\LocalDir</code></li><li><strong>支持能力</strong>:仅基础下载,不支持自动检查版本更新</li><li><strong>必填</strong><code>dirname</code> — 本地目录绝对路径</li><li><strong>选填</strong> <ul><li><code>extract</code> — 解压目标目录</li></ul></li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">local</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> dirname</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/path/to/local/source</span></span></code></pre></div><hr><h3 id="custom" tabindex="-1">custom <a class="header-anchor" href="#custom" aria-label="Permalink to “custom”"></a></h3><p>完全自定义的下载逻辑,由 <code>src/Package/Artifact/</code> 目录下对应的 PHP 类实现。如果不指定 <code>func</code>,则调用类的默认下载方法。</p><ul><li><strong>选填</strong><code>func</code> — 调用实现类中的指定方法名</li></ul><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifact</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> source</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">custom</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-7011f0d8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/zh/develop/package-model.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>Package 模型</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/zh/develop/craft-yml.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>craft.yml 配置</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-1df9f90f data-v-c3855bb3><div class="container" data-v-c3855bb3><p class="message" data-v-c3855bb3>Released under the MIT License.</p><p class="copyright" data-v-c3855bb3>Copyright © 2023-present crazywhalecc</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"deps-craft-yml.md\":\"DaRp5sDR\",\"en_contributing_index.md\":\"Bw6aGZo7\",\"en_develop_artifact-model.md\":\"Be9wN_ZU\",\"en_develop_build-lifecycle.md\":\"BrkkrOI9\",\"en_develop_craft-yml.md\":\"CJqlRAWM\",\"en_develop_doctor-module.md\":\"BPx_gh7b\",\"en_develop_extending_annotations.md\":\"rWEgD5t7\",\"en_develop_extending_custom-artifact.md\":\"BQoftnUi\",\"en_develop_extending_dependency-injection.md\":\"3RvnsJs8\",\"en_develop_extending_index.md\":\"CBALgGvM\",\"en_develop_extending_lifecycle-hooks.md\":\"TH51ajMN\",\"en_develop_extending_package-classes.md\":\"DL47sxq4\",\"en_develop_index.md\":\"CDPdLdXm\",\"en_develop_package-model.md\":\"D5wiXvya\",\"en_develop_php-src-changes.md\":\"CIUUevPf\",\"en_develop_registry.md\":\"B5tf5XnG\",\"en_develop_structure.md\":\"B3aY4J4P\",\"en_develop_system-build-tools.md\":\"aR6vgJMi\",\"en_faq_index.md\":\"ButqLRAC\",\"en_guide_cli-generator.md\":\"Bh1mnldB\",\"en_guide_cli-reference.md\":\"B6zUxFdM\",\"en_guide_deps-map.md\":\"B9M0h5GJ\",\"en_guide_env-vars.md\":\"B5JOZL1S\",\"en_guide_extension-notes.md\":\"C1QFg1E9\",\"en_guide_extensions.md\":\"CYT0fXgd\",\"en_guide_first-build.md\":\"C3LOd79t\",\"en_guide_index.md\":\"Chrx4Kg2\",\"en_guide_installation.md\":\"DNcSrgIL\",\"en_guide_migrate-from-v2.md\":\"CfVymFnT\",\"en_guide_sapi-reference.md\":\"Dx3FnmW6\",\"en_guide_troubleshooting.md\":\"Mc4ZUzP-\",\"en_index.md\":\"CZz4hp1l\",\"index.md\":\"DlohUUjo\",\"zh_contributing_index.md\":\"BxNPLW0M\",\"zh_develop_artifact-model.md\":\"BtcNBk1j\",\"zh_develop_build-lifecycle.md\":\"D1JbjvDB\",\"zh_develop_craft-yml.md\":\"oQn7yY_F\",\"zh_develop_doctor-module.md\":\"DAzJoWwn\",\"zh_develop_extending_annotations.md\":\"DAa7FG7j\",\"zh_develop_extending_custom-artifact.md\":\"BTEWH7KO\",\"zh_develop_extending_dependency-injection.md\":\"PLkrv44m\",\"zh_develop_extending_index.md\":\"B478Mpx4\",\"zh_develop_extending_lifecycle-hooks.md\":\"BNdlHrBu\",\"zh_develop_extending_package-classes.md\":\"CLofM-pE\",\"zh_develop_index.md\":\"CYr92Q4h\",\"zh_develop_package-model.md\":\"DYRZ8aaf\",\"zh_develop_php-src-changes.md\":\"QIFUEZHE\",\"zh_develop_registry.md\":\"BvRBmoGT\",\"zh_develop_structure.md\":\"EpUhxfrR\",\"zh_develop_system-build-tools.md\":\"DEEE1raf\",\"zh_faq_index.md\":\"DkTldA8b\",\"zh_guide_cli-generator.md\":\"Djvjm7dZ\",\"zh_guide_cli-reference.md\":\"DMttieGz\",\"zh_guide_deps-map.md\":\"BsudOLor\",\"zh_guide_env-vars.md\":\"Bs72W99k\",\"zh_guide_extension-notes.md\":\"D-KMlaiu\",\"zh_guide_extensions.md\":\"CdF_j2fu\",\"zh_guide_first-build.md\":\"CQdFhKsg\",\"zh_guide_index.md\":\"B1jsb7XJ\",\"zh_guide_installation.md\":\"Ap2snxXu\",\"zh_guide_migrate-from-v2.md\":\"Df8wnmfP\",\"zh_guide_sapi-reference.md\":\"DXv5eV6I\",\"zh_guide_troubleshooting.md\":\"CueHHZkW\",\"zh_index.md\":\"CkWIeJB6\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"StaticPHP\",\"description\":\"A powerful tool designed for building portable executables including PHP, extensions, and more.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/images/static-php_nobg.png\",\"nav\":[],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/crazywhalecc/static-php-cli\"}],\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"},\"externalLinkIcon\":true,\"search\":{\"provider\":\"algolia\",\"options\":{\"appId\":\"IHJHUB1SF1\",\"apiKey\":\"8266d31cc2ffbd0e059f1c6e5bdaf8fc\",\"indexName\":\"static-php docs\",\"askAi\":{\"assistantId\":\"b72369b2-60a5-461d-902c-5c18d8c05902\",\"agentStudio\":true,\"sidePanel\":true}}}},\"locales\":{\"en\":{\"label\":\"English\",\"lang\":\"en\",\"themeConfig\":{\"nav\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Develop\",\"link\":\"/en/develop/\"},{\"text\":\"Contributing\",\"link\":\"/en/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/en/faq/\"},{\"text\":\"v3 (alpha)\",\"items\":[{\"text\":\"v3 (alpha)\",\"link\":\"/en/\
</body>
</html>