Skip to content

Commit

Permalink
📝 更新安装文档
Browse files Browse the repository at this point in the history
  • Loading branch information
KimigaiiWuyi committed Jan 15, 2025
1 parent ab23746 commit 07c11d3
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 29 deletions.
39 changes: 33 additions & 6 deletions docs/Started/EnvCheck.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 确认环境有无缺失<Badge type="tip" text="简单" />

- ✅确保安装`Python`环境(版本须`>=3.7`, 建议`>=3.11`,不建议`>=3.12`
+ 部分插件不支持3.10以下的python版本(例如`StarrailUID`
- ✅确保安装`Python`环境(版本须`>3.8`, 建议`>=3.12`,不建议`>=3.13`

::: details 检查Python

```shell
# 【命令行内输入】
Expand All @@ -11,14 +12,19 @@ python -V
# 回复类似Python 3.10.10的信息,即为已经安装python环境
>>> Python 3.x.x
```
:::

- ✅确保安装`git`环境

::: details 检查Git

::: tip

如果你没有安装`git`且的系统是`ubuntu`,安装`git`只需要输入`sudo apt-get install git`

:::
如果系统为`Windows`,则自行前往 🔗[官网](https://git-scm.com/) 下载安装包安装即可

---

```shell
# 【命令行内输入】(注意v为小写)
Expand All @@ -28,11 +34,12 @@ git -v
# 回复类似git version 2.38.1.windows.1的信息,即为已经安装Git环境
>>> git version xxxxx
```
:::

- ✅确保安装`poetry`(版本须`>=1.4.0`)**或者**`pdm`(建议使用`pdm`
- `poetry``pdm`**【二选一即可】**

- ✅确保安装`poetry`(版本须`>=1.4.0`)**或者**`pdm`**或者**`uv`(建议使用`uv`
- `poetry``uv``pdm`**【三选一即可】**

::: details 检查PDM
```shell
# 【PDM】
# 命令行内输入
Expand All @@ -42,7 +49,9 @@ pdm -V
# 回复类似PDM (PDM, version 2.10.4)的信息,即为已经安装PDM环境
>>> PDM, version x.x.x
```
:::

::: details 检查Poetry
```shell
# 【Poetry】
# 命令行内输入
Expand All @@ -52,9 +61,27 @@ poetry -V
# 回复类似Poetry (version 1.4.1)的信息,即为已经安装Poetry环境
>>> Poetry (version x.x.x)
```
:::

::: details 检查uv
```shell
# 【uv】
# 命令行内输入
uv -V

# 以下为回复示例、无需输入
# 回复类似`uv 0.5.18`的信息,即为已经安装uv环境
>>> uv 0.5.18 (27d1bad55 2025-01-11)
```
:::

::: tip

如果你没有安装`poetry`,只需要输入`pip install poetry`即可安装

如果你没有安装`uv`, 只需要输入`pip install uv`即可安装(**更推荐使用**`pipx`

如果你没有安装`pdm`, 则更加复杂一点, 必须使用`pipx`管理`pdm`环境
`pipx install pdm`

:::
53 changes: 40 additions & 13 deletions docs/Started/InstallCore.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# 手动安装Core<Badge type="danger" text="普通" />
# 安装Core<Badge type="danger" text="普通" />

::: tip

如需选择`自动安装Core`、可**直接跳转**至对应Bot的安装文档

**推荐使用本方法安装Core**

:::
## 下载/克隆仓库

-`Bot目录`的上级(例如你的bot目录为`./Wuyi/nb2`,则cd至`./Wuyi`处)

Expand All @@ -22,21 +17,50 @@ git clone https://github.com/Genshin-bots/gsuid_core.git --depth=1 --single-bran
cd gsuid_core
```

- 安装依赖(以下两种二选一即可)
- 执行`poetry install`安装依赖
- 执行`pdm install`安装依赖
- 然后执行`pdm run python -m ensurepip`
## 安装依赖
::: tip

可以根据你的喜好,自行选择`uv`, `pdm`, `poetry`等环境工具安装Core

或使用裸环境`python`&`pip`安装

:::

::: details 【🥳 推荐】uv
```sh
# uv安装依赖方式
uv sync
uv run python -m ensurepip
```
:::

::: details poetry
```sh
# poetry安装依赖方式
poetry install
```
:::

::: details pdm

```sh
# pdm安装依赖方式
pdm install
pdm run python -m ensurepip
```

- 安装所需插件<Badge type="tip" text="可选" />
:::

::: details 【😡 不推荐】直接使用python

```sh
# 不推荐该方式
python -m pip install -r requirements.txt
```

:::

## 安装所需插件<Badge type="tip" text="可选" />

```sh
cd gsuid_core
Expand All @@ -45,4 +69,7 @@ cd plugins
git clone -b v4 https://github.com/KimigaiiWuyi/GenshinUID.git --depth=1 --single-branch
```

- 🎉你已经成功安装GsCore
## 🎉你已经成功安装GsCore

[启动Core](./StartCore)

61 changes: 51 additions & 10 deletions docs/Started/StartCore.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,73 @@
# 手动启动Core<Badge type="tip" text="简单" />
# 启动Core<Badge type="tip" text="简单" />

::: warning

**推荐使用本方法启动Core**
下面四种启动方式,根据你安装时使用的工具选择即可。

**不推荐使用Bot命令启动Core**
启动时需移动至主路径, 例如`E:\gsuid_core`

`pdm`启动和`poetry`启动二选一即可
示例命令 `cd E:\MyPyProject\gsuid_core`

:::

## Poetry启动
## 启动命令

- 移动至`gsuid_core/gsuid_core`文件夹内
::: details 【🥳 推荐】UV启动

- 输入命令`poetry run core`或者`poetry run python core.py `
```sh
uv run core
```

:::

::: details Poetry启动

```sh
poetry run core
```

## Pdm启动
:::


- 移动至`gsuid_core/gsuid_core`文件夹内
- 输入命令`pdm run core`或者`pdm run python core.py `
::: details PDM启动

```sh
pdm run core
```

:::

::: details 【😡 不推荐】直接使用Python

```sh
# 不推荐使用该方法
python -m gsuid_core.core
```

:::

## 下一步你可能需要的页面

::: warning

GsCore并**不能独立使用**,你需要连接NoneBot2或其他支持的Bot才能使用!

【以下是部分支持的Bot列表】:

🔗 [连接 NoneBot2](../LinkBots/NoneBot2)

🔗 [连接 HoshinoBot](../LinkBots/HoshinoBot)

🔗 [连接 YunZai-Bot](https://gitee.com/xiaoye12123/ws-plugin)

🔗 [连接 ZeroBot](https://github.com/RemKeeper/GSUID_Utils_ZeroBot)

🔗 [连接 Koishi](https://github.com/GithubCin/gscore-adapter)

你可以选择前往 🔗[该页面](../LinkBots/AdapterList) 查看更多支持Bot列表

:::

🔧 [配置Core](./CoreConfig)

🤖 [插件市场](../InstallPlugins/PluginsList)

0 comments on commit 07c11d3

Please sign in to comment.