Skip to content

Commit

Permalink
💾 Feat: Updating translation for English
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Feb 8, 2025
1 parent 611f861 commit 192ecdd
Show file tree
Hide file tree
Showing 13 changed files with 201 additions and 187 deletions.
64 changes: 19 additions & 45 deletions docs/client/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,69 +15,44 @@ createTime: 2025/01/25 11:24:47
KitX 项目使用 Git 进行版本控制, 您可以通过以下命令获取源码:

```shell
git clone [email protected]:Crequency/KitX.git
git clone [email protected]:Crequency/KitX.git --recurse-submodules
cd KitX

# 若您未设置 SSH 密钥, 可以使用 HTTPS 方式获取源码
# 此时, git clone 命令的链接请换成 https://github.com/Crequency/KitX.git
```

**注意: 暂不支持通过 https 协议获取子模块, 强烈建议配置本地 git 以及 ssh 环境**
::: warning

---
**暂不支持通过 https 协议获取子模块, 强烈建议配置本地 git 以及 ssh 环境**

### 初始化子模块
:::

> 您也可以在上一步的 `clone` 命令中追加 `--recurse-submodules` 参数来获取子模块从而跳过这一步, 但是使用 `start.sh` 来初始化项目仍然是必须的
> 或者在 `clone` 命令之后, 在项目根目录执行 `git submodule update --recursive --remote` 来获取所有子模块
---

KitX 项目使用子模块来对仓库进行拆分, 您需要在获取源码后执行以下命令来初始化子模块:
### 初始化依赖

```shell
git submodule init
```

使用 KitX 的初始化工具来选择获取哪些子模块并进行相关设置:
使用 `cheese` 来选择初始化子模块并进行相关设置:

:::: code-group
::: code-group-item Bash
::: tabs
@tab 初始化依赖
```shell
./ToolKits/start.sh <type>
cheese reference --setup
```
:::
::: code-group-item PowerShell
```pwsh
./ToolKits/start.ps1 <type>
@tab 安装 Cheese
```shell
# 您需要 dotnet sdk 才可以执行此命令
dotnet tool install cheese -g
```
:::
::::

其中 `<type>` 为开发类型, 可选值为:

`list` | `dashboard` | `mobile` | `loader` | `plugin` | `installer` | `reference` | `all`

若您想要开发 KitX PC 端客户端, 请 start `dashboard``reference`

若您想要开发 KitX 移动端客户端, 请 start `mobile`

若您想要开发加载器, 请 start `loader`

若您想要开发插件, 请 start `loader``plugin`

若您想要开发 KitX 安装包, 请 start `installer`

您也可以随时 start `list` 来列出可供选择的开发类型

或者 start `all` 来更新所有子模块
> 如果遇到 `cheese` 命令出错的情况, 可以添加 `--verbose` 参数来查看详细错误信息
---

## 构建项目

### 编译前准备

1. 您需要安装 dotnet 7 SDK, 请前往 [dotnet 官网](https://dotnet.microsoft.com/download/dotnet/7.0) 下载并安装
安装成功的标志是: 成功运行命令 `dotnet --list-sdks` 并且列出了 dotnet 7 SDK 的版本号
1. 您需要安装 dotnet 8 SDK, 请前往 [dotnet 官网](https://dotnet.microsoft.com/download/dotnet/8.0) 下载并安装
安装成功的标志是: 成功运行命令 `dotnet --list-sdks` 并且列出了 dotnet 8 SDK 的版本号

---

Expand Down Expand Up @@ -109,8 +84,7 @@ dotnet publish /p:Profile=Properties/PublishProfiles/<xxx>.pubxml
您也可以执行以下命令来一键发布所有配置文件:

```shell
cd "ToolKits/KitX.ToolKits.Publisher"
dotnet run
cheese scripts -e publish
```

:::
Expand All @@ -121,7 +95,7 @@ dotnet run

您也可以使用一些 IDE 来构建项目
例如:
- Visual Studio (推荐 2019 以上的版本, 目前建议使用 2022 版本)
- Visual Studio (建议使用 2022 版本)
- Jetbrains Rider

其中, 您可以在 Visual Studio 中右键解决方案资源管理器中的项目, 选择 `发布`, 然后选择发布配置文件来进行发布
Expand Down
22 changes: 13 additions & 9 deletions docs/client/guide/package-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ createTime: 2025/01/25 11:24:47

---

# 打包插件
::: details 旧的打包方式已弃用

## 手动环境搭建
## ~~手动环境搭建~~

1. 准备打包工具 (首先需要拥有 .NET 7 的 SDK 方可执行以下命令)
> ***注意: 本节内容已过时, 请使用 `KitX SDK` 来打包插件***
1. ~~准备打包工具 (首先需要拥有 .NET 7 的 SDK 方可执行以下命令)~~
```SHELL
dotnet tool install --global KitX.KXP.Tool
```

1. 准备模板生成工具 (同样需要有 .NET 7 的 SDK)
1. ~~准备模板生成工具 (同样需要有 .NET 7 的 SDK)~~
```SHELL
dotnet tool install --global KitX.Struct.Producer
```

## 开始打包
## ~~开始打包~~

```SHELL
mkdir plugin # 将您插件的所有文件放置于某一个文件夹下, 例如: `./plugin`
Expand All @@ -30,12 +32,14 @@ vim ./plugin/LoaderStruct.json # 编辑生成的加载器结构模板, 可把 `v
kxpmaker -s ./plugin/ # 打包插件, 默认输出到工作目录 `plugin.kxp` 文件
```

更多关于 `ksmaker``kxpmaker` 的命令语法请执行命令: `ksmaker --help` 或者 `kxpmaker --help`
~~更多关于 `ksmaker``kxpmaker` 的命令语法请执行命令: `ksmaker --help` 或者 `kxpmaker --help`~~

:::

## 使用 KitX SDK
# 使用 KitX SDK 打包插件

//TODO: KitX SDK
`KitX SDK` 正在开发中

# 发布插件

//TODO: KitX 插件市场
KitX 插件市场正在开发中
111 changes: 42 additions & 69 deletions docs/en/client/guide/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,136 +1,109 @@
---
lang: en-US
title: Get Started
description: This page will lead you to get started with KitX
createTime: 2025/01/25 11:25:05
title: Get started quickly
description: This page guides newcomers to quickly get familiar with the KitX project -> including obtaining source code, first compilation, etc....
createTime: 2025/01/25 11:24:47

---

# Get Started
# Get started quickly

## Get Source Code
## Get the source code

### Clone Main Repository
### Clone main warehouse

KitX Project use Git to manage version, you can get source code by following command:
The KitX project uses Git for version control, and you can get the source code through the following command:

```shell
git clone [email protected]:Crequency/KitX.git
git clone [email protected]:Crequency/KitX.git --recurse-submodules
cd KitX
```

If you haven't set SSH key, you can use HTTPS to get source code:
::: warning

```shell
git clone https://github.com/Crequency/KitX.git
cd KitX
```
**It is not supported to obtain submodules through the https protocol. It is strongly recommended to configure local git and ssh environments**

---
:::

### Init Submodules
---

> And you can add `--recurse-submodules` to the command above to get submodules at the same time.
### Initialize dependencies

KitX Project use submodules to split the repository, you need to execute following command to init submodules:
Use `cheese` to select the initialization submodule and make relevant settings:

::: tabs
@tab Initialize dependencies
```shell
git submodule init
cheese reference --setup
```

Then use KitX init tool to select which submodules you want to get:

:::: code-group
::: code-group-item Bash
@tab Install Cheese
```shell
./ToolKits/start.sh <type>
# You need dotnet sdk to execute this command
dotnet tool install cheese -g
```
:::
::: code-group-item PowerShell
```pwsh
./ToolKits/start.ps1 <type>
```
:::
::::

You can select value of `<type>` to get different submodules:

`dashboard` | `mobile` | `loader` | `plugin` | `installer` | `reference`

If you want to develop KitX Dashboard PC Client, please start `dashboard` and `reference`

If you want to develop KitX Mobile Client, please start `mobile`

If you want to develop KitX Loader, please start `loader`

If you want to develop KitX Plugins, please start `loader` and `plugin`

If you want to develop KitX Installer, please start `installer`

And you can always run `list` to list available types
> If you encounter an error in the `cheese` command, you can add the `--verbose` parameter to view detailed error information
---

## Build Project
## Build a project

### Preparations before build
### Preparation before compilation

1. You need to install dotnet 6 SDK, please go to [dotnet official website](https://dotnet.microsoft.com/download/dotnet/6.0) to download and install
The sign of successful installation is: successfully run command `dotnet --list-sdks` and list dotnet 6 SDK version
2. You need to install dotnet 6 SDK, please go to [dotnet official website](https://dotnet.microsoft.com/download/dotnet/7.0) to download and install
The way to check if installation is successful is the same as above, part of projects use dotnet 7 while others use dotnet 6
1. You need to install dotnet 8 SDK, please go to [dotnet official website](https://dotnet.microsoft.com/download/dotnet/8.0) to download and install
The installation is successful: the command `dotnet --list-sdks` was successfully run and the version number of the dotnet 8 SDK is listed.

---

### Compile
### Compilation

You only need to `cd` to the project directory (contains `.csproj` file) you want to compile, and then run the following command:
You just need `cd` to the project directory you want to compile (including the `.csproj` file), and then run the following command:

```shell
dotnet build
```

If you run the command `dotnet run`, the project will be compiled and run automatically
If you run the command `dotnet run`, the project will be automatically compiled and run.

::: details Compile for publish
::: details Release-oriented compilation

You may notice that there are many files with `.pubxml` suffix in `KitX Dashboard/Properties/PublishProfiles/`
You may notice that there are many files with `.pubxml` suffix under `KitX Dashboard/Properties/PublishProfiles/`

These are the publish profiles, you can use the following command:
These are the Publish configuration files, you can use the commands:

```shell
cd "KitX Dashboard"
dotnet publish /p:Profile=Properties/PublishProfiles/<xxx>.pubxml
```

to publish with these profiles, where `<xxx>` is the name of the profile file
To publish using these configuration files, where `<xxx>` is the configuration file name

The binary file will be generated in `KitX Publish/`
The published binary file will exist under `KitX Publish/`

And you can execute the following command to publish all profiles at once:
You can also execute the following command to publish all configuration files in one click:

```shell
cd "ToolKits/KitX.ToolKits.Publisher"
dotnet run
cheese scripts -e publish
```

:::

---

### Other Build Methods
### Other construction methods

You can also use some IDE to build the project
You can also use some IDEs to build your project
For example:
- Visual Studio (Recommended version: 2019 or above, currently recommended version: 2022)
- Visual Studio (Recommended to use version 2022)
- Jetbrains Rider

In Visual Studio, you can right-click the project in the solution explorer, and select `Publish`, then select the publish profile to publish
You can also use similar operations in Rider to publish
Among them, you can right-click the project in Solution Explorer in Visual Studio, select `Publish`, and then select Publish configuration file to publish
You can also use similar actions in Rider to publish

Or, you can also configure your editor to simplify the build process
Alternatively, you can configure an editor to simplify the build steps
For example:
- Visual Studio Code
- Vim

Here is the omitted steps to configure the editor, please search for related tutorials yourself
The steps to configure the editor are omitted here, please search for relevant tutorials by yourself
32 changes: 3 additions & 29 deletions docs/en/client/guide/package-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,10 @@ createTime: 2025/01/25 11:25:05

---

# Package Plugin
# Use KitX SDK to Package Plugin

## Prepair Environment Manually

1. Prepair Package Tool (First you need to have the .NET 6 SDK to execute the following command)
```SHELL
dotnet tool install --global KitX.KXP.Tool
```

2. Prepair Template Generator Tool (You also need to have the .NET 6 SDK)
```SHELL
dotnet tool install --global KitX.Struct.Producer
```

## Start Packaging

```SHELL
mkdir plugin # Put all the files of your plugin in a folder, for example: `./plugin`
ksmaker -o ./plugin/ # Run the template generation tool, this command will generate `PluginStruct.json` and `LoaderStruct.json` files in `./plugin/`
vim ./plugin/PluginStruct.json # Edit generated plugin struct file, you can change `vim` command to other text editor
vim ./plugin/LoaderStruct.json # Edit generated loader struct file, you can change `vim` command to other text editor
kxpmaker -s ./plugin/ # Pack plugin, output to `plugin.kxp` file in current directory as default
```

More commands usage about `ksmaker` and `kxpmaker` please try `kxmaker --help` or `kxpmaker --help`

## Use KitX SDK

//TODO: KitX SDK
`KitX SDK` is under development

# Publish Plugin

//TODO: KitX plugin market
The KitX plugin market is under development
3 changes: 2 additions & 1 deletion docs/en/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ createTime: 2023/07/27 00:25:50

# Project Description

Kitx Project aims to create a cross-platform and scalable toolbox, so that the electronic devices are no longer split, the computing power is shared, and everyone can enjoy the fun of technology.
KitX Project aims to create a cross-platform and scalable toolbox, so that the electronic devices are no longer split, the computing power is shared, and everyone can enjoy the fun of technology.

# Project Composition

Expand All @@ -24,6 +24,7 @@ To end users
- [KitX Mobile](https://github.com/Crequency/KitX-Mobile) is the specific implementation of KitX Project on the mobile terminal, which can be run on `Android`, `iOS` devices.

Due to the low authority of the mobile terminal, the mobile terminal cannot perform extensive function expansion, but users can use mobile to manage devices and call the function on the remote device.
In addition, the mobile terminal will also integrate some common plug-in functions, these plug-in functions will be updated with the main software
Of course, the mobile terminal can also expand the function through the `Mini App` and other forms, similar to the `WeChat Mini App`

The mobile project is based on the `Flutter` to realize the cross-platform graphic interface, and use `dart` as the main development language.
Expand Down
Loading

0 comments on commit 192ecdd

Please sign in to comment.