Skip to content

Commit

Permalink
add querytrans build notice
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Feb 15, 2023
1 parent 35fcf0b commit 605e465
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,16 @@
配置 luoxu
----

* 安装 Rust nightly 以及 OpenCC
* 安装 Rust nightly 以及 [OpenCC](https://github.com/BYVoid/OpenCC) 库。

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install nightly

sudo apt update
sudo apt install doxygen cmake wget
wget https://github.com/BYVoid/OpenCC/archive/refs/tags/ver.1.1.4.tar.gz
tar xf ver.1.1.4.tar.gz
cd OpenCC-*
make -j$(nproc) PREFIX=/usr
sudo make PREFIX=/usr install
```

* Python 库依赖请见 `requirements.txt` 文件
* [获取](https://core.telegram.org/api/obtaining_api_id)一份 Telegram API key
*`querytrans` 目录下运行 `rustup run nightly cargo build --release` 然后把生成的文件(`target/release/libquerytrans.so`)复制为 `querytrans.so` 并放在 Python 能找到的地方(比如当前目录)
*`querytrans` 目录下运行 `rustup run nightly cargo build --release` 然后把生成的文件(`target/release/libquerytrans.so`)复制为 `querytrans.so` 并放在 Python 能找到的地方(比如当前目录)需要注意的是:构建 `querytrans` 之前需要提前准备好 python 环境,如果与运行 luoxu 的环境不一致将会出错。
* 复制 `config.toml.example` 并按需要修改
* (可选)词云插件需要在 `luoxu-cutwords` 下运行 `cargo build --release` 并将生成的可执行文件放到 `$PATH`

Expand Down

0 comments on commit 605e465

Please sign in to comment.