Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Ship the macOS app as a zip instead of a dmg

Fei241134bd5f928d3d
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f86d175e..dc162e1d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,7 +1,7 @@
name: Release
# Publishes ds-bot to npm when a GitHub release is published, then attaches the desktop app's
-# Windows installer and macOS DMGs to the release. Windows updates from latest.yml; macOS opens
+# Windows installer and macOS zips to the release. Windows updates from latest.yml; macOS opens
# the release page for a manual download.
#
# npm Trusted Publishing: npm trusts this workflow through GitHub's OIDC token, so the
@@ -141,7 +141,7 @@ jobs:
gh release upload "$TAG" "$installer" "$installer.blockmap" dist-pack/latest.yml --clobber
app-macos:
- name: Desktop app dmg (macOS ${{ matrix.arch }})
+ name: Desktop app zip (macOS ${{ matrix.arch }})
needs: publish
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
@@ -164,20 +164,20 @@ jobs:
- run: npm run dist
- name: Check the packaged app
run: node scripts/check-packed.mjs
- - name: Keep the dmg for real-device checks
+ - name: Keep the zip for real-device checks
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: DeepSeek-Bot-mac-${{ matrix.arch }}
- path: app/dist-pack/DeepSeek-Bot-*-mac-${{ matrix.arch }}.dmg
+ path: app/dist-pack/DeepSeek-Bot-*-mac-${{ matrix.arch }}.zip
retention-days: 7
if-no-files-found: error
compression-level: 0
- - name: Attach the dmg to the release
+ - name: Attach the zip to the release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: |
- dmg="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.dmg"
- gh release upload "$TAG" "$dmg" --clobber
+ zip="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.zip"
+ gh release upload "$TAG" "$zip" --clobber
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 6ef88358..4864a541 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -202,19 +202,16 @@ jobs:
env:
# Ad-hoc identity '-' uses no certificate or secret, so PR signing is safe; otherwise electron-builder skips signing and leaves an unsealed bundle.
CSC_FOR_PULL_REQUEST: 'true'
- - name: Check the DMG
+ - name: Check the zip
run: |
- dmg="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.dmg"
- test -f "$dmg"
+ zip="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.zip"
+ test -f "$zip"
- name: Check the packaged app
run: node scripts/check-packed.mjs
- - name: Install from the dmg and check
+ - name: Install from the zip and check
run: |
- mkdir -p "$RUNNER_TEMP/dmg"
- dmg="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.dmg"
- hdiutil attach -nobrowse -readonly -mountpoint "$RUNNER_TEMP/dmg" "$dmg"
- ditto "$RUNNER_TEMP/dmg/DeepSeek Bot.app" "/Applications/DeepSeek Bot.app"
- hdiutil detach "$RUNNER_TEMP/dmg"
+ zip="dist-pack/DeepSeek-Bot-$(node -p "require('./package.json').version")-mac-${{ matrix.arch }}.zip"
+ ditto -x -k "$zip" /Applications
app="/Applications/DeepSeek Bot.app"
exe="$app/Contents/MacOS/DeepSeek Bot"
codesign --verify --deep --strict "$app"
diff --git a/app/README.md b/app/README.md
index 4b8240a6..bbdb3a69 100644
--- a/app/README.md
+++ b/app/README.md
@@ -19,7 +19,7 @@ npm installs `ds-bot` from `../ds-bot` as a copy of its package files (`install-
| `DS_BOT_HOME` | The data location: the `DSH_HOME` of the app. When it is set, the app asks nothing at its first start and imports nothing | The folder chosen at the first start |
| `DS_BOT_WORKSPACE` | With `DS_BOT_HOME`: the folder for the files that Bots make | `bot/workspace` in the data location |
| `DS_BOT_SHELL_DATA` | The app's own data (window, Chromium storage, `locations.json`) | Electron's `userData` (Windows: `%APPDATA%\DeepSeek Bot`; macOS: `~/Library/Application Support/DeepSeek Bot`) |
-| `DS_BOT_UPDATE_URL` | Windows: a folder URL with `latest.yml` and its installer. macOS: a URL returning a JSON list like GitHub's `releases` API; a release counts only when this Mac's DMG is attached. Prereleases count only for prerelease installs (see [Updates](#updates)). With `DS_BOT_HOME`, the app checks only when this is set | The newest GitHub release |
+| `DS_BOT_UPDATE_URL` | Windows: a folder URL with `latest.yml` and its installer. macOS: a URL returning a JSON list like GitHub's `releases` API; a release counts only when this Mac's zip is attached. Prereleases count only for prerelease installs (see [Updates](#updates)). With `DS_BOT_HOME`, the app checks only when this is set | The newest GitHub release |
On macOS, Electron's default `userData` directory for `productName` "DeepSeek Bot" is `~/Library/Application Support/DeepSeek Bot`.
@@ -63,11 +63,11 @@ Never point `DS_BOT_HOME` at `~/.dsh` or at the data of an app that you use.
```sh
npm run pack # the app without an installer: dist-pack/win-unpacked/ (Windows), dist-pack/mac*/ (macOS)
-npm run dist # the installer: dist-pack/DeepSeek-Bot-<version>-win-x64.exe (Windows), a .dmg (macOS)
+npm run dist # the installer: dist-pack/DeepSeek-Bot-<version>-win-x64.exe (Windows), a .zip (macOS)
npm run check-packed # starts the packaged app on throwaway folders with the mock model, chats once, closes it
```
-macOS produces one DMG per architecture. Build arm64 on an Apple chip Mac and x64 on an Intel Mac, or under Rosetta with an x64 Node that also ran `npm ci`. Do not cross-build: it packages native modules from `node_modules`; a combined build put 12 arm64-only native modules in its x64 app. `scripts/before-pack.mjs` stops a build whose architecture is not the one of the Node that runs it. The app is ad-hoc signed so downloaded copies are sealed. On first open, use System Settings → Privacy & Security → Open Anyway. Do not disable Gatekeeper.
+macOS produces one zip per architecture. Build arm64 on an Apple chip Mac and x64 on an Intel Mac, or under Rosetta with an x64 Node that also ran `npm ci`. Do not cross-build: it packages native modules from `node_modules`; a combined build put 12 arm64-only native modules in its x64 app. `scripts/before-pack.mjs` stops a build whose architecture is not the one of the Node that runs it. The app is ad-hoc signed so downloaded copies are sealed. It ships as a zip, not a dmg: macOS 26 calls a downloaded unsigned dmg damaged and does not open it, and an ad-hoc signature on the dmg does not help (#351). Safari unzips the download; move DeepSeek Bot to Applications. On first open, use System Settings → Privacy & Security → Open Anyway. Do not disable Gatekeeper.
`check-packed` takes another executable as its first argument, and a file for a screenshot of the window as its second. It runs an app that lies inside this checkout from a copy in its throwaway folder: from inside the checkout, Node would find a module that the package left out in the checkout's own `node_modules`.
@@ -81,9 +81,9 @@ The installed app on Windows updates itself with electron-updater (`src/updates.
The checks start before the Host (after a first start's import), so that a version whose Host does not start can still update. When the start fails, the app waits up to 15 seconds for the newest check. When it found a newer version, the error box says so; after the box the app waits for the download, then installs it and opens again.
-On macOS, the app checks GitHub's releases at start and every 4 hours. It asks once per version, after that release's DMG for this Mac is attached. Stable installs ignore prereleases; prerelease installs can see them. Download opens the release page; Later closes the dialog. The app does not install the update itself. `DS_BOT_UPDATE_URL` on macOS points to a JSON list like the `releases` API response. A release needs `tag_name`, an HTTPS `html_url`, and the matching architecture's DMG in `assets`.
+On macOS, the app checks GitHub's releases at start and every 4 hours. It asks once per version, after that release's zip for this Mac is attached. Stable installs ignore prereleases; prerelease installs can see them. Download opens the release page; Later closes the dialog. The app does not install the update itself. `DS_BOT_UPDATE_URL` on macOS points to a JSON list like the `releases` API response. A release needs `tag_name`, an HTTPS `html_url`, and the matching architecture's zip in `assets`.
-On Windows, `app-update.yml` tells the app where its releases are; `npm run dist` writes it from `publish` in `electron-builder.yml`, together with `latest.yml` beside the installer (`npm run pack` writes neither). Neither command publishes. The release workflow (`.github/workflows/release.yml`) builds the installer when a release is published and attaches the installer, its `.blockmap` and `latest.yml` to the release. The release tag is the version of `ds-bot`, and `npm test` checks that the app has the same version. The macOS release job builds each DMG on a matching-architecture runner and attaches only the DMG.
+On Windows, `app-update.yml` tells the app where its releases are; `npm run dist` writes it from `publish` in `electron-builder.yml`, together with `latest.yml` beside the installer (`npm run pack` writes neither). Neither command publishes. The release workflow (`.github/workflows/release.yml`) builds the installer when a release is published and attaches the installer, its `.blockmap` and `latest.yml` to the release. The release tag is the version of `ds-bot`, and `npm test` checks that the app has the same version. The macOS release job builds each zip on a matching-architecture runner and attaches only the zip.
On throwaway folders (`DS_BOT_HOME`) the app checks for updates only from `DS_BOT_UPDATE_URL`, and it never asks: the update waits until the app quits. `scripts/check-update.mjs` checks the update of a packaged app with such a feed:
@@ -100,7 +100,7 @@ On macOS, pass the app executable and a version to mock a newer release:
node scripts/check-update.mjs "<app executable>" 99.0.0
```
-The script serves a releases list with one release of that version that has this Mac's DMG, starts the app on throwaway folders with it, waits until the app logs the new version, and closes the window. It does not open a browser.
+The script serves a releases list with one release of that version that has this Mac's zip, starts the app on throwaway folders with it, waits until the app logs the new version, and closes the window. It does not open a browser.
## Layout
diff --git a/app/electron-builder.yml b/app/electron-builder.yml
index 9e18a61b..34c1699f 100644
--- a/app/electron-builder.yml
+++ b/app/electron-builder.yml
@@ -30,7 +30,8 @@ nsis:
installerLanguages: [zh_CN, en_US]
multiLanguageInstaller: true
mac:
- target: dmg
+ # A zip, not a dmg: macOS 26 calls a downloaded unsigned dmg damaged and will not open it (#351).
+ target: zip
# Ad-hoc signing seals the bundle; no Developer ID or notarization.
identity: '-'
hardenedRuntime: false
diff --git a/app/scripts/check-update.mjs b/app/scripts/check-update.mjs
index 042e678b..f66b0f8f 100644
--- a/app/scripts/check-update.mjs
+++ b/app/scripts/check-update.mjs
@@ -33,7 +33,7 @@ const server = createServer((request, response) => {
html_url: `https://github.com/Fei2411/DeepSeek-Bot/releases/tag/v${version}`,
draft: false,
prerelease: false,
- assets: [{ name: `DeepSeek-Bot-${version}-mac-${process.arch}.dmg` }],
+ assets: [{ name: `DeepSeek-Bot-${version}-mac-${process.arch}.zip` }],
}]))
return
}
diff --git a/app/src/updates.mjs b/app/src/updates.mjs
index 7321a715..97a34484 100644
--- a/app/src/updates.mjs
+++ b/app/src/updates.mjs
@@ -99,7 +99,7 @@ export function watchReleases({ current, arch, fetch = globalThis.fetch, ask, op
|| (release.prerelease === true && !allowPrerelease)) continue
const version = typeof release.tag_name === 'string' ? release.tag_name.replace(/^v/u, '') : ''
if (!isNewer(version, current)) continue
- if (!Array.isArray(release.assets) || !release.assets.some(asset => asset?.name === `DeepSeek-Bot-${version}-mac-${arch}.dmg`)) continue
+ if (!Array.isArray(release.assets) || !release.assets.some(asset => asset?.name === `DeepSeek-Bot-${version}-mac-${arch}.zip`)) continue
if (!isHttpsPage(release.html_url)) {
log.error('DeepSeek Bot: update check failed: release page URL is not HTTPS')
continue
diff --git a/app/test/updates.test.mjs b/app/test/updates.test.mjs
index 26145192..27a7bc30 100644
--- a/app/test/updates.test.mjs
+++ b/app/test/updates.test.mjs
@@ -39,7 +39,7 @@ const release = (version, options = {}) => {
html_url: options.page ?? `https://github.com/Fei2411/DeepSeek-Bot/releases/tag/v${version}`,
draft: options.draft ?? false,
prerelease: options.prerelease ?? false,
- assets: options.assets ?? [{ name: `DeepSeek-Bot-${version}-mac-${arch}.dmg` }],
+ assets: options.assets ?? [{ name: `DeepSeek-Bot-${version}-mac-${arch}.zip` }],
}
}
@@ -186,7 +186,7 @@ describe('watchReleases', () => {
assert.deepEqual(log.lines, ['DeepSeek Bot: update check failed: releases response is not an array'])
})
- test('waits for the matching-architecture DMG before asking', async (t) => {
+ test('waits for the matching-architecture zip before asking', async (t) => {
t.mock.timers.enable({ apis: ['setInterval'] })
let attached = false
const asked = []
@@ -244,7 +244,7 @@ describe('watchReleases', () => {
assert.equal(await updates.latest(), null)
})
- test('chooses the highest newer release with a matching DMG', async (t) => {
+ test('chooses the highest newer release with a matching zip', async (t) => {
const updates = watchReleases({
current: '0.1.7', arch: 'arm64',
fetch: async () => releaseResponse([release('0.1.9'), release('0.1.10'), release('0.1.8')]),
diff --git a/docs/dev/release-checklist.md b/docs/dev/release-checklist.md
index b0ced1e5..29e3de01 100644
--- a/docs/dev/release-checklist.md
+++ b/docs/dev/release-checklist.md
@@ -10,7 +10,7 @@ CI 只跑单元测试和 Linux 上的测试台。窗口外框、输入法、高
- 官方的 DSH Desktop,版本和 README 里写的一致(现在是 `0.2.1-rc.2`)。只从 DeepSeek Harness 官方渠道下载。
- 要发的包:在 `ds-bot/` 里运行 `npm pack`,得到 `ds-bot-<版本>.tgz`。
- 桌面应用的安装包:在 `app/` 里运行 `npm run dist`,得到 `app/dist-pack/DeepSeek-Bot-<版本>-win-x64.exe`。`app/package.json` 和 `ds-bot/package.json` 的版本号要一样。
-- 也可以用发版工作流的试运行:在 GitHub 的 Actions 里选 Release → Run workflow,勾着 dry run 运行。跑完后在这次运行的页面下载 Windows 安装包和两个 DMG(保留 7 天)。它们和 Release 里的文件在同样的 runner 上、用同样的方法打包,不发布任何东西。
+- 也可以用发版工作流的试运行:在 GitHub 的 Actions 里选 Release → Run workflow,勾着 dry run 运行。跑完后在这次运行的页面下载 Windows 安装包和两个 Mac 的 zip(保留 7 天)。它们和 Release 里的文件在同样的 runner 上、用同样的方法打包,不发布任何东西。
- 一个能用的模型(DeepSeek API key 或账号)。测试里要填的密钥都用**假值**。
- 想保留现有数据,先备份数据目录:Windows 是 `C:\Users\<用户名>\.dsh\`,macOS 是 `~/.dsh/`。最好用一台没有自己团队数据的机器或账户来测。
@@ -153,12 +153,12 @@ CI 只跑单元测试和 Linux 上的测试台。窗口外框、输入法、高
## 13. 桌面应用(macOS)
-13.2–13.5 在 Apple 芯片和 Intel Mac 上分别做一次。13.5 要上一个发布版本有这台 Mac 的 DMG;没有时跳过。
+13.2–13.5 在 Apple 芯片和 Intel Mac 上分别做一次。13.5 要上一个发布版本有这台 Mac 的 zip;没有时跳过。
| # | 步骤 | 期望 | 结果 |
|---|---|---|---|
-| 13.1 | 发布 Release,等工作流传完文件 | Release 里有 arm64 和 x64 两个 DMG | |
-| 13.2 | 用浏览器从 Release 页下载这台 Mac 的 DMG,打开,把 DeepSeek Bot 拖到「应用程序」,第一次打开 | Gatekeeper 拦下,不说「已损坏」;到「系统设置 → 隐私与安全性」点「仍要打开」后能打开 | |
+| 13.1 | 发布 Release,等工作流传完文件 | Release 里有 arm64 和 x64 两个 zip | |
+| 13.2 | 用 Safari 从 Release 页下载这台 Mac 的 zip(Safari 会自动解压),把 DeepSeek Bot 拖到「应用程序」,第一次打开 | Gatekeeper 拦下,不说「已损坏」;到「系统设置 → 隐私与安全性」点「仍要打开」后能打开 | |
| 13.3 | 第一次打开:选数据位置和 Bot 工作文件夹;有 DSH 团队时选复制;给一个 Bot 发消息 | 团队、对话、模型设置都在;收到回复;关于页写「随 DeepSeek Bot 应用一起更新。」 | |
| 13.4 | 关闭窗口 | 应用退出,Dock 里不留着 | |
| 13.5 | 装上一个发布版本的 App 并打开,等新版提示后点「下载」 | 打开这次 Release 的发布页;应用不自己安装新版 | |
diff --git a/docs/plans/2026-10-16-desktop-app.md b/docs/plans/2026-10-16-desktop-app.md
index 091f1e67..eb605efb 100644
--- a/docs/plans/2026-10-16-desktop-app.md
+++ b/docs/plans/2026-10-16-desktop-app.md
@@ -80,7 +80,7 @@
- 引擎起不来时也能更新:检查在引擎启动前开始(首次启动的导入之后)。启动失败时,错误框里说有新版本,关掉错误框后等下载完,装上并重新打开。
- 应用里的 ds-bot 和 DSH 随应用一起更新:插件不自己查这两项的更新,关于页写「随 DeepSeek Bot 应用一起更新」。
- 发版:发布 Release 时,工作流打 Windows 安装包,把它、它的 `.blockmap` 和 `latest.yml` 传到 Release。应用和 ds-bot 用同一个版本号,Release 的标签就是这个版本号。
-- macOS(Apple 芯片和 Intel):dmg;不能自动更新,有新版时提示下载。
+- macOS(Apple 芯片和 Intel):zip;不能自动更新,有新版时提示下载。不用 dmg:macOS 26 上下载的未签名 dmg 显示「已损坏」,打不开。
- 安装包带着锁定的 DSH 装上的全部文件,不按 profile 删减。
- 不用开发者证书签名,也不公证;macOS 包只做 ad-hoc 签名。macOS 第一次打开会被拦下,要到「系统设置 → 隐私与安全性」点「仍要打开」。
@@ -120,3 +120,4 @@
- 2026-10-19:复制团队前用锁定版把每段对话读一遍,有新版 DSH 写的对话时停下来,PR #340。
- 2026-10-20:首次启动没走完就退出时什么都不记,下次从头再问;欢迎框加「退出」;复制停在安全的地方,不留半个团队,PR #360。
- 2026-10-20:Windows 上窗口无边框,Windows 11 上侧栏用 Mica;macOS 仍用系统标题栏,Issue #362。
+- 2026-10-20:macOS 改发 zip,不再发 dmg:macOS 26 上用 Safari 下载的未签名 dmg(arm64、x64,本机和 CI 打的都一样)显示「已损坏」,打不开;dmg 做 ad-hoc 签名也不行;zip 只被 Gatekeeper 拦下,可以「仍要打开」,Issue #351。