docs: 增加下载说明(源码包不含 exe / Gitee 分卷说明)

This commit is contained in:
TianXiaRi
2026-12-02 08:52:48 +08:00
parent bb60ba4a24
commit 14efa1bed1
2 changed files with 36 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const fs = require('fs')
const p = 'C:/Users/ASUS/Documents/deepseek-harness/default-workspace/desktop-pet/README.md'
let text = fs.readFileSync(p, 'utf8')
const section = `## 下载(Windows 直接可运行)
> ⚠️ **不要点仓库右上角的 "Code → Download ZIP"**:那是**源代码**,里面没有 exe(\`out/\`、\`release/\` 都不入库)。要能直接运行的版本,请从 **Releases** 下载。
- **GitHub(推荐)**:<https://github.com/Tian-XiaRi/SodiumPet/releases/latest>
- 下载 \`SodiumPet-0.1.0-win64.zip\`(约 171MB)→ 解压 → 双击里面的 \`SodiumPet.exe\`
- **Gitee 国内镜像**:<https://gitee.com/TianXiaRi/sodium-pet/releases>
- 下载 \`SodiumPet-0.1.0-win64.7z.001\` 和 \`.002\` **两个分卷**(单个附件限 100MB)→ 放在同一个文件夹 → 用 [7-Zip](https://www.7-zip.org/) 右键 \`.001\` → 解压 → 双击 \`SodiumPet.exe\`
运行环境:Windows 10/11 x64。首次启动若弹出 SmartScreen「Windows 已保护你的电脑」,点「更多信息 → 仍要运行」(未做代码签名,正常现象)。
`
if (!text.includes('## 下载(Windows 直接可运行)')) {
const idx = text.indexOf('## 功能一览')
text = text.slice(0, idx) + section + text.slice(idx)
fs.writeFileSync(p, text, 'utf8')
console.log('download section added')
} else {
console.log('already present')
}