PageSourceSearch

https://anwen-anyi.github.io/assets/win.html-BHRQWKAI.js

js anwen-anyi.github.io collected 2026-10-03 08:38:50 UTC 35,541 bytes, 30 lines download raw bytes

1import{_ as d}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,e as l,a,b as s,d as n,f as g,r as t,o as k}from"./app-K8asS0af.js";const u="/img/build/build02.jpeg",c="/img/build/build01.jpeg",b="/img/build/build03.gif",m="/img/build/build04.gif",y="/img/build/build05.gif",A="/img/build/build06.png",F="/img/build/build07.png",v="/img/build/build08.png",f="/img/build/build09.png",C="/img/build/build10.gif",B="/img/build/build11.gif",w="/img/build/build12.gif",E={},_={class:"hint-container tip"};function x(q,i){const h=t("BiliBili"),r=t("RouteLink"),e=t("Badge"),p=t("SiteInfo");return k(),o("div",null,[i[11]||(i[11]=l('<p>有的小伙伴想着自己编译一下 Alist<br> 不管是出于自己想折腾还是自己想改改源码哩.大家都可以编译~ (๑•́₃ •)</p><h2 id="windows版本编译教程" tabindex="-1"><a class="header-anchor" href="#windows版本编译教程"><span>Windows版本编译教程</span></a></h2><h2 id="_1-编译前准备" tabindex="-1"><a class="header-anchor" href="#_1-编译前准备"><span>1.编译前准备</span></a></h2><h3 id="_1-1-编译视频版教程" tabindex="-1"><a class="header-anchor" href="#_1-1-编译视频版教程"><span>1.1 编译视频版教程</span></a></h3>',4)),a(h,{bvid:"BV1ye4y1m7e1"}),i[12]||(i[12]=s("h3",{id:"_1-2-编译之前的前提条件",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#_1-2-编译之前的前提条件"},[s("span",null,"1.2 编译之前的前提条件")])],-1)),i[13]||(i[13]=s("p",null,[n("大家可以看一下这里需要啥:"),s("a",{href:"https://github.com/AlistGo/alist/blob/main/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer"},"https://github.com/AlistGo/alist/blob/main/CONTRIBUTING.md")],-1)),i[14]||(i[14]=s("p",null,"编译AList Go竟然需要 1.20+了...呜呜呜",-1)),i[15]||(i[15]=s("p",null,"我没记错前几个月才升级了1.18+...升级真快(´◔‸◔')”",-1)),s("div",_,[i[3]||(i[3]=s("p",{class:"hint-container-title"},"提示",-1)),s("p",null,[i[1]||(i[1]=n("这样的编译的似乎只有一个版本,如果你想要像AList官方那样编译很多可以使用 ")),a(r,{to:"/index/build/github.html"},{default:g(()=>i[0]||(i[0]=[n("GitHub Actions")])),_:1}),i[2]||(i[2]=n(" 来进行编译"))]),i[4]||(i[4]=s("ul",null,[s("li",null,[n("如果你只有修改前端的想法,"),s("mark",null,[s("strong",null,"强烈推荐")]),n(" 单独只进行编译前端即可,后端(二进制)应用程序继续使用AList官方原版的文件 "),s("ul",null,[s("li",null,[n("因为现在支持引用第三方前端文件使用:参考 "),s("a",{href:"https://alist.nn.ci/zh/config/configuration.html#bleve-dir",target:"_blank",rel:"noopener noreferrer"},"https://alist.nn.ci/zh/config/configuration.html#bleve-dir")])])]),s("li",null,"这样就不用担心设备不同不会交叉编译,以及编译过程中出现的问题无法解决")],-1))]),i[16]||(i[16]=l(`<p><strong>编译之前我们需要先准备安装好以下软件:</strong></p><ol><li><a href="https://git-scm.com/download/win" target="_blank" rel="noopener noreferrer"><strong>git</strong></a></li><li><a href="https://golang.org/doc/install" target="_blank" rel="noopener noreferrer"><strong>golang 1.20+</strong></a></li><li><a href="https://gcc.gnu.org/" target="_blank" rel="noopener noreferrer"><strong>gcc</strong></a></li><li><a href="https://nodejs.org/" target="_blank" rel="noopener noreferrer"><strong>nodejs</strong></a></li><li><a href="https://www.npmjs.com/package/pnpm" target="_blank" rel="noopener noreferrer"><strong>pnpm</strong></a></li></ol><p>以上安装过程我就不赘述了...<strong>(安装问题都解决不了的话编译也够呛)</strong></p><p>以上软件安装好后我们先把 <strong>Go的代理改为国内</strong> 的..</p><p>安装好Golang后并且也将 &quot;<strong>环境变量&quot;</strong> 配置好,然后win+R 输入CMD打开DDos黑窗口(这里是用的Windows)</p><p>根据自己的配置输入:</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">go</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> env</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -w</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> GOPROXY=https://goproxy.cn,direct</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">      //</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> Windows</span></span>
2<span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD;">export</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;"> GOPROXY</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">https</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">://</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">goproxy</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">.</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">cn</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">,</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">direct</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">         // </span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">macOS</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> 或 </span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">Linux</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div></div></div><p>将代理改为国内,不然编译时会出错,前人血泪史之一... <strong>(踩坑一号)</strong></p><p><strong>然后我们改好后看看生效没有:</strong></p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">CMD黑窗口输入go</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> env查看(需要配置好环境变量哦先)</span></span>
3<span class="line"></span>
4<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">安装好默认的是:</span></span>
5<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> GOPROXY=&quot;https://proxy.golang.org,direct&quot;</span></span>
6<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">修改代理后是</span></span>
7<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> GOPROXY=https://goproxy.cn,direct</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><strong>反正不管他默认的是啥,改就完事了!!!</strong></p><p><strong>以上就是编译前需要的准备 安装好5个软件,改一下代理 ..不难吧(ฅ&#39;ω&#39;ฅ)</strong></p><h3 id="_1-3-编译前端前准备" tabindex="-1"><a class="header-anchor" href="#_1-3-编译前端前准备"><span>1.3 编译前端前准备</span></a></h3><p><strong>编译前我们看看文档怎么编译</strong>:<a href="https://github.com/AlistGo/alist/blob/main/CONTRIBUTING.md" target="_blank" rel="noopener noreferrer">https://github.com/AlistGo/alist/blob/main/CONTRIBUTING.md</a></p><figure><img src="`+u+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>我们需要编译前肯定是要先克隆一下<strong>前端</strong>和<strong>后端</strong>的代码(clone)</p><p>执行图上的两行命令在我们安装的 <strong>git</strong> 终端里面</p><figure><img src="'+c+`" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>你克隆到任意地方都行建议放到一个文件夹里面去,这样我们修改的时候也方便</p><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">alist.git是后端,alist-web.git是前端</span></span>
8<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">
8无代理</span></span>
9<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> clone</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> https://github.com/AlistGo/alist.git</span></span>
10<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> clone</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --recurse-submodules</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> https://github.com/AlistGo/alist-web.git</span></span>
11<span class="line"></span>
12<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">代理</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> -</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> (大白提供-可能服务中断了)</span></span>
13<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> clone</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> https://hub.cooluc.com/AlistGo/alist.git</span></span>
14<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> clone</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --recurse-submodules</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> https://hub.cooluc.com/AlistGo/alist-web.git</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>前后端 拉取/克隆(clone)好了</p><p>但是我们拉取/克隆(clone)下来的前端里面只有一个 默认的英文语言文件</p><p>我们还需要去下载一个带中文的语言文件</p><h3 id="_1-4-手动下载语言包地址" tabindex="-1"><a class="header-anchor" href="#_1-4-手动下载语言包地址"><span>1.4 手动下载语言包地址</span></a></h3><p><strong><a href="https://crowdin.com/project/alist/zh-CN" target="_blank" rel="noopener noreferrer">https://crowdin.com/project/alist/zh-CN</a></strong></p><p>这里是手动下载,还有命令自动下的哪个我没研究明白...害,卡了好几天了这个语言文件..</p><figure><img src="`+b+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><figure><img src="'+m+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><h3 id="_1-5-直接下载语言包直链" tabindex="-1"><a class="header-anchor" href="#_1-5-直接下载语言包直链"><span>1.5 直接下载语言包直链:</span></a></h3><p><strong><a href="https://crowdin.com/backend/download/project/alist/zh-CN.zip" target="_blank" rel="noopener noreferrer">https://crowdin.com/backend/download/project/alist/zh-CN.zip</a></strong></p><p>上面的语言文件放进去后我们去终端里面输入命令:</p><div class="language-vue line-numbers-mode" data-highlighter="shiki" data-ext="vue" data-title="vue" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">node ./scripts/i18n.mjs</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p>执行完毕语言里面会出现一个 <strong>entry.ts</strong> 的文件,这样我们就可以用了</p><figure><img src="'+y+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>以上软件安装并且配置好环境变量了,Go 代理设置好了,语言包文件下载好了 ,我们编译前准备工作就可以了</p><h2 id="_2-编译前端" tabindex="-1"><a class="header-anchor" href="#_2-编译前端"><span>2.编译前端</span></a></h2><p>首先CD进入 <strong><code>alist-web</code></strong> 前端文件夹内,</p><p>然后输入 <strong>pnpm install</strong> 将 <strong>node_modules</strong> (包管理工具下载安装的包的文件夹),下载下来,</p><p>别问问什么不用 <strong>npm</strong> 要用 <strong>pnpm</strong> ...问就是用 <strong>pnpm</strong> 就完了...这个也是血的教训.. <strong>%&gt;_&lt;% <sup>(踩坑2号)</sup></strong></p><p>中间自己改源码的过程就不演示了,自己想怎么改就怎怎么改</p><p>改完了 执行如下命令将前端文件进行编译: <strong><code>pnpm build</code></strong> <strong><code>npm run build</code></strong> 这两个二选一都行</p>',41)),s("p",null,[i[5]||(i[5]=n("编译好后,会看到一个叫 ")),a(e,{text:"dist",type:"info"}),i[6]||(i[6]=n(" 的文件夹,这个就是我们编译好的内容一会我们移动到后端里面去"))]),i[17]||(i[17]=l('<figure><img src="'+A+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><h3 id="_2-1-编译前端期间可能会遇到的问题" tabindex="-1"><a class="header-anchor" href="#_2-1-编译前端期间可能会遇到的问题"><span>2.1 编译前端期间可能会遇到的问题</span></a></h3><h4 id="输入pnpm-install会报错-三号坑" tabindex="-1"><a class="header-anchor" href="#输入pnpm-install会报错-三号坑"><span>输入<code>pnpm install</code>会报错 <sup>(三号坑)</sup></span></a></h4><h4 id="如果你输入-pnpm-install-出现如下图中的错误" tabindex="-1">
14<a class="header-anchor" href="#如果你输入-pnpm-install-出现如下图中的错误"><span>如果你输入 pnpm install 出现如下图中的错误</span></a></h4><figure><img src="'+F+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><h4 id="上述报错中的解决方案" tabindex="-1"><a class="header-anchor" href="#上述报错中的解决方案"><span>上述报错中的解决方案</span></a></h4><figure><img src="'+v+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>如果没出现上述的错误能正常编译 忽略即可!</p><h4 id="输入-pnpm-install-会报错-四号坑" tabindex="-1"><a class="header-anchor" href="#输入-pnpm-install-会报错-四号坑"><span>输入 pnpm install 会报错 (四号坑)</span></a></h4><h4 id="如果你输入-pnpm-install-出现如下图中的错误-1" tabindex="-1"><a class="header-anchor" href="#如果你输入-pnpm-install-出现如下图中的错误-1"><span>如果你输入 pnpm install 出现如下图中的错误</span></a></h4><figure><img src="'+f+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p><strong>上述问题的问题所在以及解决方案</strong></p><p>问题所在</p><ul><li><p>看看你前端的 <strong><code> solid-router</code></strong> 这个文件夹里面是不是空的..估计是空的</p></li><li><p>下载前端的时候没有带 <code>--recurse-submodules</code> 参数导致附属的文件没有下载下来</p></li></ul><p>解决方案</p><ul><li>下载前端带上 <code>--recurse-submodules</code> 参数去下载</li></ul><div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> clone</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --recurse-submodules</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> https://github.com/AlistGo/alist-web.git</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><h2 id="_3-编译后端" tabindex="-1"><a class="header-anchor" href="#_3-编译后端"><span>3.编译后端</span></a></h2><ol><li>在前端编译好后我们就会看到一个 <strong><code>&quot;dist&quot;</code></strong> 的文件夹</li><li>我们移动一下把 <strong><code>&quot;dist&quot;</code></strong> 目录移动到的后端的 <strong><code>&quot;public&quot;</code></strong> 目录里面去即可</li><li>虽然里面已经有了一个 <strong>&quot;dist&quot;</strong> 文件夹,不用管直接覆盖</li></ol><figure><img src="'+C+`" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>将编译好的前端移文件动到后端里面去,准备编译</p><p><strong>&quot;dist&quot;</strong> 目录移动到 <strong><code>&quot;public&quot;</code></strong> 去之后,我们就可以编译了(如果有改代码的需求自己改完再编译)</p><div class="language-bash line-numbers-mode has-collapsed-lines collapsed" data-highlighter="shiki" data-ext="bash" data-title="bash" style="--vp-collapsed-lines:15;--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34;"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code><span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">appName</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;alist&quot;</span></span>
15<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">builtAt</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> +&#39;%F %T %z&#39;)&quot;</span></span>
16<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">goVersion</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">go</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> version</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">sed</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &#39;s/go version //&#39;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">)</span></span>
17<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">gitAuthor</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> show</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -s</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --format=</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39;format:%aN &lt;%ae&gt;&#39;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> HEAD</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">)</span></span>
18<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">gitCommit</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> log</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --pretty=format:</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;%h&quot;</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -1</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">)</span></span>
19<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">version</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">git</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> describe</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --long</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --tags</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> --dirty</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;">
19 --always</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">)</span></span>
20<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">webVersion</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">wget</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -qO-</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -t1</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -T2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &quot;https://api.github.com/repos/AlistGo/alist-web/releases/latest&quot;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">grep</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &quot;tag_name&quot;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">head</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -n</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> 1</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">awk</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -F</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &quot;:&quot;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &#39;{print $2}&#39;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">sed</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> &#39;s/\\&quot;//g;s/,//g;s/ //g&#39;</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF;">)</span></span>
21<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">ldflags</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2;">=</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
22<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-w -s </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
23<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.BuiltAt=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$builtAt</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
24<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.GoVersion=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$goVersion</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
25<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.GitAuthor=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$gitAuthor</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
26<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.GitCommit=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$gitCommit</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
27<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.Version=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$version</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
28<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">-X &#39;github.com/alist-org/alist/v3/internal/conf.WebVersion=</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$webVersion</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&#39; </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2;">\\</span></span>
29<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;</span></span>
30<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF;">go</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> build</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66;"> -ldflags=</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75;">$ldflags</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;">&quot;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379;"> .</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div><div class="collapsed-lines"></div></div><p>有人看到这么一大坨这怎么执行...我们可以创建一个 &quot; <strong>.sh</strong>&quot; 后缀的文件,然后把这一坨复制粘贴进去即可</p><p>‪如果怕自己创建的 <strong>.sh</strong>
30 后缀 文件不能用我们可以复制粘贴一个已经有的然后把里面的内容替换了即可</p><h3 id="_3-1-演示创建-sh" tabindex="-1"><a class="header-anchor" href="#_3-1-演示创建-sh"><span>3.1 <a href="#_3-1-%E6%BC%94%E7%A4%BA%E5%88%9B%E5%BB%BA-sh">演示创建.sh</a></span></a></h3><figure><img src="`+B+'" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>我们创建好了,<strong>可以直接双击执行</strong>,或者在命令行运行 这个我们刚刚修改的 <strong><a href="http://run.sh" target="_blank" rel="noopener noreferrer">run.sh</a></strong> 文件也行</p>',28)),s("p",null,[i[7]||(i[7]=n("运行好了 ")),i[8]||(i[8]=s("strong",null,"(可能大概需要1-2分钟)",-1)),i[9]||(i[9]=n(" 目录里面会出现一个")),a(e,{text:"alist.exe",type:"info"}),i[10]||(i[10]=n(" 的文件 这就是编译好了"))]),i[18]||(i[18]=s("p",null,"我这里的Windows自然是.exe后缀的,如果是Linux,那肯定出现的是二进制文件",-1)),i[19]||(i[19]=s("figure",null,[s("img",{src:w,alt:"",tabindex:"0",loading:"lazy"}),s("figcaption")],-1)),i[20]||(i[20]=s("p",null,[n("‪好了,以上教程就是本次编译的教程啦... 想折腾的自己折腾吧...有想试试的 可以试试看..."),s("strong",null,"(‾◡◝)")],-1)),i[21]||(i[21]=s("hr",null,null,-1)),a(p,{name:"Linux 编译教程",desc:"",url:"./linux.md",logo:"/img/start/linux.svg",repo:"",preview:""}),a(p,{name:"GitHub Actions",desc:"",url:"./github.md",logo:"/img/start/github.svg",repo:"",preview:""})])}const z=d(E,[["render",x],["__file","win.html.vue"]]),N=JSON.parse('{"path":"/index/build/win.html","title":"Windows编译教程","lang":"zh-CN","frontmatter":{"title":"Windows编译教程","icon":"fa-brands fa-windows","order":110,"author":"安稳","date":"2023-01-01T00:00:00.000Z","category":["使用指南"],"tag":["AList魔改教程","自己编译","编译AList教程","Build","Windows"],"sticky":true,"star":true,"headerDepth":6,"collapsible":false,"description":"有的小伙伴想着自己编译一下 Alist 不管是出于自己想折腾还是自己想改改源码哩.大家都可以编译~ (๑•́₃ •) Windows版本编译教程 1.编译前准备 1.1 编译视频版教程","head":[["meta",{"property":"og:url","content":"https://anwen-anyi/anwen-anyi.github.io/index/build/win.html"}],["meta",{"property":"og:site_name","content":"安安稳稳"}],["meta",{"property":"og:title","content":"Windows编译教程"}],["meta",{"property":"og:description","content":"有的小伙伴想着自己编译一下 Alist 不管是出于自己想折腾还是自己想改改源码哩.大家都可以编译~ (๑•́₃ •) Windows版本编译教程 1.编译前准备 1.1 编译视频版教程"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://anwen-anyi/anwen-anyi.github.io/img/build/build02.jpeg"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-10-26T06:43:42.000Z"}],["meta",{"property":"article:author","content":"安稳"}],["meta",{"property":"article:tag","content":"AList魔改教程"}],["meta",{"property":"article:tag","content":"自己编译"}],["meta",{"property":"article:tag","content":"编译AList教程"}],["meta",{"property":"article:tag","content":"Build"}],["meta",{"property":"article:tag","content":"Windows"}],["meta",{"property":"article:published_time","content":"2023-01-01T00:00:00.000Z"}],["meta",{"property":"article:modified_time","content":"2024-10-26T06:43:42.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Windows编译教程\\",\\"image\\":[\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build02.jpeg\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build01.jpeg\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build03.gif\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build04.gif\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build05.gif\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build06.png\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build07.png\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build08.png\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build09.png\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build10.gif\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build11.gif\\",\\"https://anwen-anyi/anwen-anyi.github.io/img/build/build12.gif\\"],\\"datePublished\\":\\"2023-01-01T00:00:00.000Z\\",\\"dateModified\\":\\"2024-10-26T06:43:42.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"安稳\\"}]}"]]},"headers":[{"level":2,"title":"Windows版本编译教程","slug":"windows版本编译教程","link":"#windows版本编译教程","children":[]},{"level":2,"title":"1.编译前准备","slug":"_1-编译前准备","link":"#_1-编译前准备","children":[{"level":3,"title":"1.1 编译视频版教程","slug":"_1-1-编译视频版教程","link":"#_1-1-编译视频版教程","children":[]},{"level":3,"title":"1.2 编译之前的前提条件","slug":"_1-2-编译之前的前提条件","link":"#_1-2-编译之前的前提条件","children":[]},{"level":3,"title":"1.3 编译前端前准备","slug":"_1-3-编译前端前准备","link":"#_1-3-编译前端前准备","children":[]},{"level":3,"title":"1.4 手动下载语言包地址","slug":"_1-4-手动下载语言包地址","link":"#_1-4-手动下载语言包地址","children":[]},{"level":3,"title":"1.5 直接下载语言包直链:","slug":"_1-5-直接下载语言包直链","link":"#_1-5-直接下载语言包直链","children":[]}]},{"level":2,"title":"2.编译前端","slug":"_2-编译前端","link":"#_2-编译前端","children":[{"level":3,"title":"2.1 编译前端期间可能会遇到的问题","slug":"_2-1-编译前端期间可能会遇到的问题","link":"#_2-1-编译前端期间可能会遇到的问题","children":[{"level":4,"title":"输入pnpm install会报错 (三号坑)","slug":"输入pnpm-install会报错-三号坑","link":"#输入pnpm-install会报错-三号坑","children":[]},{"level":4,"title":"如果你输入 pnpm install 出现如下图中的错误","slug":"如果你输入-pnpm-install-出现如下图中的错误","link":"#如æž
30œä½ è¾“å…¥-pnpm-install-出现如下图中的错误","children":[]},{"level":4,"title":"上述报错中的解决方案","slug":"上述报错中的解决方案","link":"#上述报错中的解决方案","children":[]},{"level":4,"title":"输入 pnpm install 会报错 (四号坑)","slug":"输入-pnpm-install-会报错-四号坑","link":"#输入-pnpm-install-会报错-四号坑","children":[]},{"level":4,"title":"如果你输入 pnpm install 出现如下图中的错误","slug":"如果你输入-pnpm-install-出现如下图中的错误-1","link":"#如果你输入-pnpm-install-出现如下图中的错误-1","children":[]}]}]},{"level":2,"title":"3.编译后端","slug":"_3-编译后端","link":"#_3-编译后端","children":[{"level":3,"title":"3.1 演示创建.sh","slug":"_3-1-演示创建-sh","link":"#_3-1-演示创建-sh","children":[]}]}],"git":{"createdTime":1680678324000,"updatedTime":1729925022000,"contributors":[{"name":"AnWen-anyi","username":"AnWen-anyi","email":"[email protected]","commits":12,"url":"https://github.com/AnWen-anyi"}]},"readingTime":{"minutes":6.56,"words":1969},"filePathRelative":"index/build/win.md","localizedDate":"2023å¹´1月1日","autoDesc":true}');export{z as comp,N as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.