From e765113d07b9a000e83c39d637b181ad91ca4f5d Mon Sep 17 00:00:00 2001 From: Masterain Date: Thu, 12 Oct 2023 00:23:38 -0700 Subject: [PATCH] Update development documents --- docs/.vuepress/sidebar/en.ts | 6 +++++ docs/.vuepress/sidebar/zh.ts | 6 +++++ docs/en/development/README.md | 6 +++-- docs/en/development/contribute.md | 36 +++++++++++++++++++++++++++++ docs/en/development/platform.md | 9 ++++---- docs/zh/development/README.md | 6 +++-- docs/zh/development/contribute.md | 38 +++++++++++++++++++++++++++++++ docs/zh/development/platform.md | 5 ++-- 8 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 docs/en/development/contribute.md create mode 100644 docs/zh/development/contribute.md diff --git a/docs/.vuepress/sidebar/en.ts b/docs/.vuepress/sidebar/en.ts index 3f8c0ee86..d134d5b35 100644 --- a/docs/.vuepress/sidebar/en.ts +++ b/docs/.vuepress/sidebar/en.ts @@ -18,6 +18,12 @@ export const enSidebar = sidebar({ prefix: "advanced/", children: "structure", }, + { + icon: "iconfont icon-github", + text: "Open Source Development", + prefix: "development/", + children: "structure" + }, { icon: "iconfont icon-article", text: "Statements", diff --git a/docs/.vuepress/sidebar/zh.ts b/docs/.vuepress/sidebar/zh.ts index 812176dc5..5fdcfe550 100644 --- a/docs/.vuepress/sidebar/zh.ts +++ b/docs/.vuepress/sidebar/zh.ts @@ -18,6 +18,12 @@ export const zhSidebar = sidebar({ prefix: "advanced/", children: "structure", }, + { + icon: "iconfont icon-github", + text: "开源开发", + prefix: "development/", + children: "structure" + }, { icon: "iconfont icon-article", text: "声明和公告", diff --git a/docs/en/development/README.md b/docs/en/development/README.md index 8d00426cf..6f6f1e0d4 100644 --- a/docs/en/development/README.md +++ b/docs/en/development/README.md @@ -3,8 +3,10 @@ headerDepth: 0 comment: false index: false dir: - text: Development + text: Open Source Development order: 3 --- -# Development +# Open Source Development + + diff --git a/docs/en/development/contribute.md b/docs/en/development/contribute.md new file mode 100644 index 000000000..740d4fe9f --- /dev/null +++ b/docs/en/development/contribute.md @@ -0,0 +1,36 @@ +--- +category: [open source, development] +tag: ["development", "GitHub"] +icon: iconfont icon-code +order: 2 +--- + +# Contribute Your Code + +Snap Hutao is using C# and .NET Framework to develop both client and server. If you are willing to contribute your code +to the project, please read the following guidelines. + +You can find all [unsolved opened issues](https://github.com/DGP-Studio/Snap.Hutao/issues?q=is%3Aissue+is%3Aopen+-label%3A%E5%B7%B2%E4%BF%AE%E5%A4%8D+) on GitHub + +## Setup Snap.Hutao Project + +1. Download and install [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/) +2. Open Visual Studio Installer to complete Visual Studio installation + - You need to install `.NET desktop development`, `Desktop development with C++` and `Universal Windows Platform development` components +3. Install `Single-project MSIX Packaging Tools for VS 2022` provided by Microsoft in Visual Studio marketplace +4. Use git to clone the project `https://github.com/DGP-Studio/Snap.Hutao.git` to your local device +5. Switch git branch to `develop` +6. Open project solution with your Visual Studio and then you are ready to go + +## Start Pull Request + +- All code-related changes from authors' own branches are only allowed be merged to `develop` branch +- Please use [keywords](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) to link your PR or commits with issues, so issues can be automatically closed once commits are merged into `main` branch. + +## Test Binary Package + +Once the code in updated in `develop` and `main` branches, an Azure Pipeline CI script will build the latest code to `Snap Hutao Alpha` package. Once the package is built, it will be released on [GitHub Release page](https://github.com/DGP-Studio/Snap.Hutao/releases) as a pre-released package. + +You need to install [Snap.Hutao.CI.cer](https://github.com/DGP-Studio/Snap.Hutao/releases/download/2023.10.3.1/Snap.Hutao.CI.cer) certificate to your local machine, and then install the msix package in the release. + +\*If the latest release does not contain attached file, that means package is still in uploading process. diff --git a/docs/en/development/platform.md b/docs/en/development/platform.md index fddbc3658..6823928b3 100644 --- a/docs/en/development/platform.md +++ b/docs/en/development/platform.md @@ -1,5 +1,6 @@ --- category: [open source, development] +tag: [open source, Hutao Database, Spiral Abyss Database, Enka, UIGF, Open data] icon: iconfont icon-vscode order: 1 --- @@ -23,8 +24,8 @@ Open-source software authors can use the Hutao API to retrieve data from the Hut Developers who gain access to the Hutao API also receive full privileges to the Hutao Cloud feature within the Snap Hutao as a benefit. -Developers can apply for access by submitting their information through the Hutao API Open Platform at -[https://homa.snapgenshin.com/](https://homa.snapgenshin.com/) +Developers can apply for access by submitting their information through the Hutao API Open Platform +at [homa.snapgenshin.com](https://homa.snapgenshin.com/) ## Enka API with China Acceleration @@ -35,9 +36,7 @@ the stability of Enka Network's functionality in the region is compromised. To ensure a smooth user experience for Snap Hutao users in China, the development team has utilized Enka Network's data for the development of the [My Characters](../features/character-data.md) feature and established a proxy server. -If you are a developer of open-source Genshin Impact tools and require this functionality, you can fill out the -[form](https://docs.google.com/forms/d/e/1FAIpQLSefnrYz41NZ2hSG0xC6OoBsIiM_mDdVLS7lsUg9thHmA1h8qw/viewform?usp=sf_link) -to apply for the usage of our maintained proxy service. +Developers can ask for access in Snap Hutao development group chat or discord group from administrator. ## UIGF Interchangeable Game Data Format diff --git a/docs/zh/development/README.md b/docs/zh/development/README.md index 667eee3c9..e55e9e1d1 100644 --- a/docs/zh/development/README.md +++ b/docs/zh/development/README.md @@ -4,8 +4,10 @@ comment: false index: false redirectFrom: /development/ dir: - text: 开发 + text: 开源开发 order: 3 --- -# 开发 +# 开源开发 + + diff --git a/docs/zh/development/contribute.md b/docs/zh/development/contribute.md new file mode 100644 index 000000000..3a32216dc --- /dev/null +++ b/docs/zh/development/contribute.md @@ -0,0 +1,38 @@ +--- +category: [open source, development] +tag: ["开发", "GitHub"] +icon: iconfont icon-code +order: 2 +--- + +# 贡献你的代码 + +胡桃工具箱使用 C# 和 .NET 框架开发桌面客户端和服务端。如果你愿意贡献你的代码,请阅读以下指导文档。 + +你可以在 GitHub 上查看所有当前仍然[未解决的问题](https://github.com/DGP-Studio/Snap.Hutao/issues?q=is%3Aissue+is%3Aopen+-label%3A%E5%B7%B2%E4%BF%AE%E5%A4%8D+) + +## 设置 Snap.Hutao 项目 + +1. 下载并安装 [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/) +2. 启动 Visual Studio Installer 以完成 Visual Studio 的安装流程 + - 你需要安装 `.NET desktop development`、 `Desktop development with C++` 和 `Universal Windows Platform development` 组件 +3. 安装 Visual Studio 商店中由 Microsoft 提供的 `Single-project MSIX Packaging Tools for VS 2022` 插件 +4. 使用 Git clone `https://github.com/DGP-Studio/Snap.Hutao.git` 到你的本地设备 +5. 将分支切换为 `develop` +6. 使用你的 Visual Studio 打开项目 solution,接下来你就可以开始编辑代码了 + +## 发起 Pull Request + +- 所有不是从项目其它分支发起的 Pull Request 都只被允许合并进 `develop` 分支 +- 如果你提交的代码与已有的 issue 相关,请使用请使用[关键词](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) + 将你的 PR 与相关的 issue 关联起来。这样当你的 PR 最终被合并进 `main` 主分支时,这些 issue 将被自动关闭。 + +## 测试打包程序 + +一旦你的代码被合并进 `develop` 和 `main` 分支,一个 Azure Pipeline CI 流水线脚本将运行起来以构建所在分支的最新代码,并以 `Snap Hutao Alpha` 命名。 +当该测试包打包完成后,它将被以 `pre-release` 的形式发布在 [GitHub 发布页面](https://github.com/DGP-Studio/Snap.Hutao/releases)上。 + +你需要安装 [Snap.Hutao.CI.cer](https://github.com/DGP-Studio/Snap.Hutao/releases/download/2023.10.3.1/Snap.Hutao.CI.cer) +证书到你的本地设备上以允许你安装测试版安装包。 + +\*如果在最新的发布中没有包含程序安装包附件,则意味着它仍然处于上传过程中。 diff --git a/docs/zh/development/platform.md b/docs/zh/development/platform.md index 7b82df708..2854d1c3a 100644 --- a/docs/zh/development/platform.md +++ b/docs/zh/development/platform.md @@ -1,5 +1,6 @@ --- category: [开源, 开发] +tag: [开源, 胡桃数据库, 深渊数据库, Enka, UIGF, 数据开放] icon: iconfont icon-vscode order: 1 --- @@ -18,7 +19,7 @@ Snap Hutao 的中间组件。 获得胡桃 API 权限的开发者同时也获得胡桃工具箱内胡桃云功能的完整权限作为福利。 -开发者可以通过 [胡桃 API 开放平台](https://homa.snapgenshin.com/),提交信息申请权限。 +开发者可以通过[胡桃 API 开放平台](https://homa.snapgenshin.com/),提交信息申请权限。 ## Enka API 中国加速服务 @@ -28,7 +29,7 @@ Snap Hutao 的中间组件。 胡桃工具箱在开发[我的角色](../features/character-data.md)功能时使用了 Enka Network 的数据, 并搭建了中转服务器以保证胡桃工具箱中国用户的使用体验。 -如果你是原神开源工具的开发者并且有该功能的需要可以填写[该表格](https://docs.google.com/forms/d/e/1FAIpQLSefnrYz41NZ2hSG0xC6OoBsIiM_mDdVLS7lsUg9thHmA1h8qw/viewform?usp=sf_link)以申请使用我们维护的中转服务。 +开发者可以在 Snap Hutao 开发者交流群或者 Discord 频道中向管理员提出申请 ## UIGF 可交换数据记录