2025-01-16 22:01:38 +08:00

67 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Windows
本节介绍如何在Windows上安装ew。
:::tip 注意
本节并未提及如何配置游戏资源服务器,如需配置资源服务器请参考[XX](https://example.com)。
:::
## 方式一:使用二进制程序
### 下载二进制程序
从[XX](https://example.com)下载适用于Windows的二进制文件。
### 运行ew
在当前目录下打开CMD或者PowerShell以下是一个典型的运行示例
```
ew.exe --port 8080 --path ./data/ --max_time 1736076211
```
::: tip 注意
具体的命令行参数可以在[环境变量和命令行参数](https://example.com)或者使用
```
ew.exe --help
```
查看。
:::
## 方式二:从源代码编译
### 下载源代码
从[XX](https://example.com)下载或git克隆源代码。
### 编译源代码
#### 构建说明
1. 安装以下依赖
- [Perl (StrawberryPerl)](https://strawberryperl.com/)
- [Rust](https://www.rust-lang.org/)
- [Node.js](https://nodejs.org/)
1. 构建WebUI
```
cd webui
npm install
npm run build
```
1. 构建ew服务器
- Debug模式
```
cargo build
```
- Release模式
```
cargo build --release
```
构建完成的二进制文件`ew.exe`在源代码根目录下的`target/debug``target/release`中。可以将其移动到你想存储的位置。
### 运行ew
在当前目录下打开CMD或者PowerShell以下是一个典型的运行示例
```
ew.exe --port 8080 --path ./data/ --max_time 1736076211
```
::: tip 注意
具体的命令行参数可以在[环境变量和命令行参数](../variable-argument.md)或者使用
```
ew.exe --help
```
查看。
:::