From 14b89c42088a383232c06b7da7b4aa304b4ab5af Mon Sep 17 00:00:00 2001 From: roy1994 Date: Sun, 23 Aug 2026 05:39:24 +0800 Subject: [PATCH] docs: simplify portable installation --- README.md | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6f638f0..60add09 100644 --- a/README.md +++ b/README.md @@ -14,38 +14,24 @@ python3 -m pip install --user --no-deps --no-build-isolation . 如果不想安装,也可以直接运行 `python3 run_ictlogin.py ...`。 -## 单文件发布 +## 单文件安装 -构建可直接复制到其他 Linux 服务器的 zipapp: - -```bash -python3 scripts/build_release.py -./dist/ictlogin.pyz --version -(cd dist && sha256sum -c ictlogin.pyz.sha256) -``` - -`dist/` 只用于本地构建,已被 Git 忽略。维护者可以将构建产物上传到 Gitea Release: - -```bash -tea releases assets create --repo mancitrus/ictlogin v0.2.0 \ - dist/ictlogin.pyz dist/ictlogin.pyz.sha256 install.sh -``` - -服务器上可直接从公开仓库获取安装脚本并安装当前 Release: +服务器上可直接从公开 Release 获取并安装单文件程序: ```bash curl --fail --location https://gitx.roy1994.top/mancitrus/ictlogin/raw/branch/main/install.sh | sh ``` -也可以在本地保存 `install.sh` 后执行: +安装脚本默认下载 `v0.2.0` Release 中的 `ictlogin.pyz`,验证对应的 SHA-256 后写入 `~/.local/bin/ictlogin`。需要其他版本时设置 Release 标签: + +```bash +ICTLOGIN_RELEASE_TAG=v0.2.0 ./install.sh +``` + +也可以先保存 `install.sh`,再从已有的本地文件或自定义 URL 安装: ```bash ./install.sh -``` - -安装脚本默认从公开的 `v0.2.0` Release 下载 `ictlogin.pyz` 及其 `.sha256` 校验文件,写入 `~/.local/bin/ictlogin`。可通过 `ICTLOGIN_RELEASE_TAG` 选择其他 Release。也可以从指定文件或 URL 安装: - -```bash ./install.sh --source /path/to/ictlogin.pyz --prefix "$HOME/.local/bin" ICTLOGIN_PYZ_URL="https://example.invalid/ictlogin.pyz" ./install.sh ICTLOGIN_PYZ_URL="https://example.invalid/ictlogin.pyz" \