From dfe2096dd7ded098432ac3150bfb22d1b6296221 Mon Sep 17 00:00:00 2001 From: Mmx <1624045573@qq.com> Date: Mon, 20 Sep 2021 09:41:48 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5ad3e8..9da9055 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,38 @@ 登录逻辑来自 https://github.com/coffeehat/BIT-srun-login-script -首次运行将生成Config.json文件 +## :hammer_and_wrench:构建 + +建议安装使用最新版golang + +直接编译本系统可执行程序: + +```shell +go build +``` + +交叉编译(Linux): + +```shell +export GOGGC=0 +export GOOS=windows #系统 +export GOARCH=amd64 #架构 +go build +``` + +golang支持的系统与架构请自行查询 + +## :hammer_and_wrench:运行 + +编译结果为可执行文件,直接启动即可 + +可以通过添加启动参数`--config`指定配置文件路径,默认为当前目录 + +```shell +./autoLogin --config=/demo/i.json +``` + +首次运行将自动生成配置文件 Config.json说明: