mirror of
https://github.com/yshtcn/heartbeat.git
synced 2025-12-15 02:30:26 +08:00
Update README.md
- 打包exe,简化运行方法
This commit is contained in:
parent
ab51343f96
commit
d7ed62b5a4
38
README.md
38
README.md
@ -7,45 +7,13 @@
|
||||
## 使用方法
|
||||
|
||||
### 下载程序:
|
||||
1. 下载并安装[python](https://python.org/downloads/release/)环境。
|
||||
2. 下载[本项目](https://github.com/yshtcn/heartbeat/archive/refs/heads/main.zip)并且释放到任意目录下。
|
||||
|
||||
### 安装所有涉及到的库:
|
||||
|
||||
#### 方法一:手动安装:
|
||||
尝试运行py和pip是否正常工作,然后安装所需的库。
|
||||
```
|
||||
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pystray pillow requests configparser PySocks
|
||||
```
|
||||
|
||||
#### 方法二:自动安装
|
||||
解压Auto-installer-package.zip,得到Auto-installer-package.bat,双击运行。批处理会先检查python和pip的安装情况。如果正确安装会自动继续安装所需的库,正常安装时,输出显示如下:
|
||||
```
|
||||
echo Pip detected!
|
||||
echo Python detected!
|
||||
...(pip的安装信息)...
|
||||
All Done
|
||||
```
|
||||
如果提示以下任意一种情况,建议重新安装(修复安装)python:
|
||||
```
|
||||
pip is not installed.
|
||||
```
|
||||
```
|
||||
Python is not installed.
|
||||
```
|
||||
1. 下载[最新的版本](https://github.com/yshtcn/heartbeat/releases)。
|
||||
2. 解压缩到任意目录
|
||||
|
||||
### 编辑配置文件:
|
||||
运行前,记得打开把[config.Exsample.ini配置文件](https://github.com/yshtcn/heartbeat/blob/main/config.Exsample.ini)复制一份改名为config.ini,并打开配置接收心跳包的服务器地址.
|
||||
运行前,记得打开把[config.Exsample.ini配置文件](https://github.com/yshtcn/heartbeat/blob/main/config.Exsample.ini)复制一份改名为config.ini,并打开配置接收心跳包的服务器地址。
|
||||
如果不存在config.ini直接运行程序,程序会将config.Exsample.ini范例配置自动复制一份。
|
||||
|
||||
### 前台运行:
|
||||
双击运行heartbeat.bat,检查是否正常工作。正常工作时会显示一个命令行窗口,并将日志回显在窗口,任务栏托盘会有小图标,可以右键退出。
|
||||
因为会持续打开一个命令行窗口,不便于日常使用,一般只用于初次检查和排错。
|
||||
|
||||
### 后台运行:
|
||||
双击运行heartbeat_with_pythonw.bat,任务栏托盘会有小图标,可以右键退出。
|
||||
可以把heartbeat_with_pythonw.bat加入开机自动启动(例如windows启动文件夹、计划任务等),便于开机自启。
|
||||
|
||||
### 日志文件
|
||||
心跳日志会存放在:heartbeat.log,包括时间和返回值。例如下面是一个返回200(正常值)的日志:
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user