blob: 05ef9c8ef1fb8cf9f7748be8087a154c6df9ecc0 [file] [log] [blame]
<!DOCTYPE html>
<html lang="cn" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="generator" content="Hugo 0.70.0" />
<meta name="description" content="">
<meta name="buildDate" content="2022-08-12 13:01:24">
<link rel="shortcut icon" href="https://shardingsphere.apache.org/document/current/img/favicon.png" type="image/x-icon" />
<title>开发环境指南 :: ShardingSphere</title>
<link href="https://shardingsphere.apache.org/community/css/nucleus.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/font-awesome.min.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/hybrid.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/featherlight.min.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/perfect-scrollbar.min.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/auto-complete.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/theme.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/hugo-theme.css?1660280484" rel="stylesheet">
<link href="https://shardingsphere.apache.org/community/css/theme-white.css?1660280484" rel="stylesheet">
<script src="https://shardingsphere.apache.org/community/js/jquery-2.x.min.js?1660280484"></script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d5a1dc8dcf63a64ee55b80de01c7fb1a";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-HPVGEN405S"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-HPVGEN405S');
</script>
<style type="text/css">
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
</style>
</head>
<body class="" data-url="/cn/contribute/establish-project/">
<div class="change-theme">
<div class="wrap">
<span data-item="retro">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
复古
</span>
<span data-item="eyehelp">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
护眼
</span>
<span data-item="haitian">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
海天
</span>
<span data-item="deep">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
深邃
</span>
<span data-item="dark">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
暗黑
</span>
<span class="active">
<svg t="1649761460834" class="icon" viewBox="0 0 1243 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2052" width="16" height="16"><path d="M755.093336 61.436797a511.973304 511.973304 0 1 0 207.495466 693.650688l-99.615377-53.757197a398.827204 398.827204 0 1 1-161.637286-540.351253l53.757197-99.615378z" fill="#ffffff" p-id="2053"></path><path d="M1204.971593 188.84501L534.652259 736.217612l-285.242269-364.086159 86.304071-67.653615 216.199012 275.953611 583.649567-476.574007 69.335813 84.987568z" fill="#ffffff" p-id="2054"></path></svg>
默认
</span>
</div>
</div>
<header>
<div class="wrap">
<a href="https://shardingsphere.apache.org/"><img src="https://shardingsphere.apache.org/document/current/img/logo_v3.png" /></a>
<section id="prefooter">
<ul>
<li>
<a class="padding">
<i class="fa fa-fw fa-language"></i>
<div class="select-style">
<select id="select-language" onchange="location = this.value;">
<option id="en" value="/community/en/contribute/establish-project/">English</option>
<option id="cn" value="/community/cn/contribute/establish-project/" selected>简体中文</option>
</select>
<svg t="1645437162166" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2449" width="32" height="32"><path d="M483.072 714.496l30.165333 30.208 415.957334-415.829333a42.837333 42.837333 0 0 0 0-60.288 42.538667 42.538667 0 0 0-60.330667-0.042667l-355.541333 355.413333-355.242667-355.413333a42.496 42.496 0 0 0-60.288 0 42.837333 42.837333 0 0 0-0.085333 60.330667l383.701333 383.872 1.706667 1.749333z" fill="#3D3D3D" p-id="2450"></path></svg>
</div>
</a>
</li>
</ul>
</section>
</div>
</header>
<div class="wrap">
<nav id="sidebar" class="">
<div id="header-wrapper">
<div class="searchbox">
<label for="search-by"><i class="fa fa-search"></i></label>
<input data-search-input id="search-by" type="text" placeholder="Search...">
<span data-search-clear=""><i class="fa fa-close"></i></span>
</div>
<script type="text/javascript" src="https://shardingsphere.apache.org/community/js/lunr.min.js?1660280484"></script>
<script type="text/javascript" src="https://shardingsphere.apache.org/community/js/auto-complete.js?1660280484"></script>
<script type="text/javascript">
var baseurl = "\/cn";
</script>
<script type="text/javascript" src="https://shardingsphere.apache.org/community/js/search.js?1660280484"></script>
</div>
<div class="highlightable">
<div class="leftMenu">
<ul class="topics">
<li data-nav-id="/cn/contribute/" title="参与和贡献" class="dd-item
parent
">
<a href="https://shardingsphere.apache.org/community/cn/contribute/">
<i class="collapse" style="display:inline; font-family:'courier';">
<svg class="icon icon-down"
style="display: inline-block;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#777">
<path d="M500.8 604.778667L267.306667 371.392l-45.226667 45.269333 278.741333 278.613334 278.485334-278.613334-45.248-45.248z" p-id="5376" ></path>
</svg>
<svg class="icon icon-right"
style="display: none;"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="#777">
<path d="M593.450667 512.128L360.064 278.613333l45.290667-45.226666 278.613333 278.762666L405.333333 790.613333l-45.226666-45.269333z" p-id="5605" ></path>
</svg>
</i>
<b>1. </b>参与和贡献
</a>
<ul>
<li data-nav-id="/cn/contribute/subscribe/" title="订阅指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/subscribe/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
订阅指南
</a>
</li>
<li data-nav-id="/cn/contribute/establish-project/" title="开发环境指南" class="dd-item active">
<a href="https://shardingsphere.apache.org/community/cn/contribute/establish-project/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
开发环境指南
</a>
</li>
<li data-nav-id="/cn/contribute/contributor/" title="贡献者指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/contributor/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
贡献者指南
</a>
</li>
<li data-nav-id="/cn/contribute/committer/" title="提交者指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/committer/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
提交者指南
</a>
</li>
<li data-nav-id="/cn/contribute/code-conduct/" title="开发规范" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/code-conduct/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
开发规范
</a>
</li>
<li data-nav-id="/cn/contribute/issue-conduct/" title="Issue 提交与处理规范" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/issue-conduct/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
Issue 提交与处理规范
</a>
</li>
<li data-nav-id="/cn/contribute/document-conduct/" title="文档规范" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/document-conduct/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
文档规范
</a>
</li>
<li data-nav-id="/cn/contribute/document-contributor/" title="官方文档贡献指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/document-contributor/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
官方文档贡献指南
</a>
</li>
<li data-nav-id="/cn/contribute/release/" title="ShardingSphere 发布指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/release/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
ShardingSphere 发布指南
</a>
</li>
<li data-nav-id="/cn/contribute/release-elasticjob/" title="ElasticJob 发布指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
ElasticJob 发布指南
</a>
</li>
<li data-nav-id="/cn/contribute/release-elasticjob-ui/" title="ElasticJob-UI 发布指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/release-elasticjob-ui/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
ElasticJob-UI 发布指南
</a>
</li>
<li data-nav-id="/cn/contribute/2fa/" title="2FA" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/2fa/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
2FA
</a>
</li>
<li data-nav-id="/cn/contribute/icla/" title="签署 iCLA 指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/icla/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
签署 iCLA 指南
</a>
</li>
<li data-nav-id="/cn/contribute/vote/" title="提交者选举流程指南" class="dd-item ">
<a href="https://shardingsphere.apache.org/community/cn/contribute/vote/">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
提交者选举流程指南
</a>
</li>
</ul>
</li>
<li data-nav-id="/cn/powered-by/" title="采用公司" class="dd-item
">
<a href="https://shardingsphere.apache.org/community/cn/powered-by/">
<i class="collapse" style="display:inline; font-family:'courier';">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
</i>
<b>2. </b>采用公司
</a>
</li>
<li data-nav-id="/cn/team/" title="团队" class="dd-item
">
<a href="https://shardingsphere.apache.org/community/cn/team/">
<i class="collapse" style="display:inline; font-family:'courier';">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
</i>
<b>3. </b>团队
</a>
</li>
<li data-nav-id="/cn/security/" title="安全" class="dd-item
">
<a href="https://shardingsphere.apache.org/community/cn/security/">
<i class="collapse" style="display:inline; font-family:'courier';">
<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5375" width="20" height="20"></svg>
</i>
<b>4. </b>安全
</a>
</li>
</ul>
</div>
<a class="padding" href="https://shardingsphere.apache.org/pdf/shardingsphere_docs_cn.pdf">
下载PDF文档
</a>
<section id="footer">
<p></p>
</section>
</div>
</nav>
<section id="body">
<div id="overlay"></div>
<div class="padding highlightable">
<div>
<div id="top-bar">
<div id="top-github-link">
<a class="github-link" title='Edit this page' href="https://github.com/apache/shardingsphere/tree/master/docs/community/content/contribute/establish-project.cn.md" target="blank">
<i class="fa fa-code-fork"></i>
<span id="top-github-link-text">Edit this page</span>
</a>
</div>
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<i class="fa fa-bars"></i>
</a>
</span>
<span class="links">
<a href='https://shardingsphere.apache.org/community/cn/'>ShardingSphere</a> > <a href='https://shardingsphere.apache.org/community/cn/contribute/'>参与和贡献</a> > 开发环境指南
</span>
</div>
</div>
</div>
<div id="chapter">
<div id="body-inner">
<nav id="TableOfContents">
<ul>
<li><a href="#安装-git">安装 Git</a>
<ul>
<li><a href="#git-配置">Git 配置</a></li>
</ul>
</li>
<li><a href="#安装-jdk">安装 JDK</a></li>
<li><a href="#安装-maven">安装 Maven</a></li>
<li><a href="#选择终端">选择终端</a>
<ul>
<li><a href="#macos">MacOS</a></li>
<li><a href="#windows">Windows</a></li>
<li><a href="#linux">Linux</a></li>
</ul>
</li>
<li><a href="#设置系统环境变量">设置系统环境变量</a></li>
<li><a href="#选择-ide">选择 IDE</a></li>
<li><a href="#安装-ide-插件">安装 IDE 插件</a>
<ul>
<li><a href="#checkstyle-插件配置">CheckStyle 插件配置</a></li>
</ul>
</li>
</ul>
</nav>
<h2 id="安装-git">安装 Git</h2>
<p>使用最新版。</p>
<p>可以从 <a href="https://git-scm.com/downloads">Git 下载页面</a> 下载最新安装包。</p>
<p>如果你运行的是 macOS 或者 Linux 系统,那也可以从相关软件仓库直接安装。</p>
<h3 id="git-配置">Git 配置</h3>
<p>如果系统是 Windows,请在克隆 ShardingSphere 代码之前完成以下配置。</p>
<p>在 PowerShell 或者 cmd 执行以下命令,预防克隆 ShardingSphere 代码的时候出现 <code>filename too long</code> 错误:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">git config --global core.longpaths true
</code></pre></div><h2 id="安装-jdk">安装 JDK</h2>
<p>使用 JDK 8 或以上版本。</p>
<p>可以从 <a href="https://adoptium.net/temurin/releases">OpenJDK 下载页面</a> 下载。</p>
<p>可以根据自己的系统自行搜索 JDK 安装指南。</p>
<h2 id="安装-maven">安装 Maven</h2>
<p>可选。Maven 安装并配置好的情况下可以使用 <code>mvn</code> 命令,否则可以使用 <code>mvnw</code> 命令(自动下载并安装需要的 Maven,使用在 <code>.mvn/wrapper/maven-wrapper.properties</code> 配置的版本)。</p>
<p>使用 Maven 3.6 或以上版本。</p>
<p>可以从 <a href="https://maven.apache.org/download.html">Maven 下载页面</a> 下载。</p>
<p>请参考 <a href="https://maven.apache.org/install.html">Maven 官方教程</a> 完成安装。</p>
<h2 id="选择终端">选择终端</h2>
<h3 id="macos">MacOS</h3>
<p>以下终端任选其一:</p>
<ul>
<li>Terminal:MacOS 自带。</li>
<li>iTerm2:可自行安装。</li>
</ul>
<h3 id="windows">Windows</h3>
<p>以下终端任选其一:</p>
<ul>
<li>PowerShell:Windows 自带。</li>
<li>Git Bash:可以通过 Git 官方客户端安装。</li>
<li>适用于 Linux 的 Windows 子系统 (WSL) :可自行安装。</li>
</ul>
<h3 id="linux">Linux</h3>
<p>不同发行版有不同的终端,可自行选择。</p>
<h2 id="设置系统环境变量">设置系统环境变量</h2>
<p>设置系统环境变量,包括:JAVA_HOME,MAVEN_HOME 和 PATH。</p>
<p>根据使用的系统自行查询设置方法并完成设置。</p>
<h2 id="选择-ide">选择 IDE</h2>
<p>以下 IDE 任选其一:</p>
<ul>
<li>IntelliJ IDEA</li>
<li>Eclipse</li>
<li>NetBeans</li>
</ul>
<h2 id="安装-ide-插件">安装 IDE 插件</h2>
<p>以下是一些常用插件:</p>
<ul>
<li>Lombok:必须。最新版 IntelliJ IDEA 已自带。</li>
<li>CheckStyle:可选。可以实时或根据需要扫描 Java 文件,找出不符合代码规范的地方并提示。<strong>注意</strong>:不是所有不符合 <a href="https://shardingsphere.apache.org/community/cn/contribute/code-conduct/">代码规范</a> 的地方都可以被检查出来。</li>
<li>ANTLR v4:可选。做 SQL 语法扩展任务的时候可能有用。</li>
</ul>
<h3 id="checkstyle-插件配置">CheckStyle 插件配置</h3>
<ol>
<li>添加配置文件 :使用 <code>src/resources/checkstyle.xml</code></li>
<li>选择 Checkstyle 版本 :使用 <code>8.8</code></li>
</ol>
<footer class=" footline" >
</footer>
</div>
</div>
</div>
<div id="navigation" >
<a class="nav nav-prev" href="https://shardingsphere.apache.org/community/cn/contribute/subscribe/" title="订阅指南"> <i class="fa fa-long-arrow-left fa-lg"></i> 上一篇</a>
<a class="nav nav-next" href="https://shardingsphere.apache.org/community/cn/contribute/contributor/" title="贡献者指南" style="margin-right: 0px;">下一篇 <i class="fa fa-long-arrow-right fa-lg"></i></a>
</div>
</section>
</div>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="https://shardingsphere.apache.org/community/js/clipboard.min.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/perfect-scrollbar.min.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/perfect-scrollbar.jquery.min.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/jquery.sticky.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/featherlight.min.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/html5shiv-printshiv.min.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/highlight.pack.js?1660280484"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="https://shardingsphere.apache.org/community/js/modernizr.custom.71422.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/learn.js?1660280484"></script>
<script src="https://shardingsphere.apache.org/community/js/hugo-learn.js?1660280484"></script>
<script>
try{
function log(fileName, category, locale){
window._hmt.push(['_trackEvent', 'document', 'download', locale ? 'PDF_'+locale : fileName]);
gtag('event', 'Downloads', {
'event_category' : locale ? 'PDF' : category,
'event_label' : locale ? locale+'.pdf' : fileName
});
}
$('.padding[href*=shardingsphere]').on('click', function(){
var locale = /cn/.test(location.pathname) ?'cn':'en';
log('','', locale)
})
function getFileName(str){
var strs = str.split('/');
return strs[strs.length - 1]
}
$('a[href$="src.zip"]').on('click', function(){
log(getFileName($(this).attr('href')), "SRC")
})
$('a[href$="zip.asc"]').on('click', function(){
log(getFileName($(this).attr('href')), "ASC")
})
$('a[href$="zip.sha512"]').on('click', function(){
log(getFileName($(this).attr('href')), "SHA512")
})
$('a[href$="tar.gz.asc"]').on('click', function(){
log(getFileName($(this).attr('href')), "ASC")
})
$('a[href$="tar.gz.sha512"]').on('click', function(){
log(getFileName($(this).attr('href')), "SHA512")
})
$('a[href$="tar.gz"]').on('click', function(){
log(getFileName($(this).attr('href')), "TAR")
})
}catch(ex){}
</script>
</body>
</html>