Skip to content

Commit 07d7b75

Browse files
committed
fix: separate file association icons for Windows and macOS
1 parent 40cdc33 commit 07d7b75

6 files changed

Lines changed: 48 additions & 12 deletions

File tree

‎README.en.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CodexAuth Switch
22

3+
## 0.1.24: Fix multiplatform releases
4+
5+
Credential file associations now use platform-specific configuration: Windows keeps its dedicated ICO, while macOS uses the generated application icon. This fixes the missing ICNS resource during Mac packaging. Includes the countdown, cancellation, automatic recovery and batch credential migration updates from 0.1.23. Automatic recovery remains Windows only.
6+
37
## 0.1.23: Countdown and cancellation before switching
48

59
The long explanation is now behind a hover/focus information icon. Before every automatic switch, including fallback accounts, an always-on-top reminder beside the floating widget shows the target account and a 15-second countdown. Cancel, close, or Escape skips this batch of interrupted turns without disabling recovery for new failures. Cancellation persists across application restarts.

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CodexAuth Switch
22

3+
## 0.1.24:修复多平台发布
4+
5+
凭证文件关联按平台配置:Windows 保留独立 ICO 图标,macOS 使用打包生成的应用图标,修复 Mac 打包时缺少 ICNS 文件的问题。包含 0.1.23 的倒计时、取消、自动恢复与批量凭证迁移功能;自动恢复目前仅支持 Windows。
6+
37
## 0.1.23:切换前倒计时与取消
48

59
长说明收进开关旁的感叹号,悬停或键盘聚焦可查看。每次自动切换(含尝试下一个账号)之前,浮窗旁会显示置顶的 15 秒倒计时与目标账号;点击“取消本次”、关闭弹窗或按 Esc,都不再自动重试这一批中断,新的额度中断仍会监听,取消记录在重启工具后仍有效。

‎docs/releases/v0.1.24.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CodexAuth Switch v0.1.24
2+
3+
- 修复多平台发布:Windows 凭证文件保留独立 ICO 图标,macOS 改用生成的应用图标,避免 Mac 打包寻找不存在的 ICNS 文件。
4+
- 新增可选的“额度耗尽后自动切换并继续”:检测额度中断,按 Plus → 有五小时限制的 Business → 仅有周额度的 Business 顺序选择账号,重启并核验额度后向原任务发送继续指令,支持批量恢复。此功能目前仅支持 Windows,默认关闭。
5+
- 每次自动切换前显示目标账号及 15 秒倒计时,可取消本次;取消记录持久保存,同一次中断不再重试。长说明收进感叹号悬浮提示。
6+
- 倒计时后重新检查账号和任务状态;窗口异常、休眠或关闭开关均阻止切换,其他本地任务运行时等待。
7+
- 凭证迁移支持导出当前或全部账号;导入先选文件再输入共用密码,支持最多 100 个文件、密码重试和失败回滚。
8+
- 提供 Windows x64 安装器、macOS Intel x64 与 Apple Silicon arm64 DMG。macOS 保留账号管理、手动切换和凭证迁移功能。
9+
10+
已验证模拟恢复、倒计时取消与凭证迁移;真实额度耗尽后的完整续跑流程仍未实测。

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codexauth-switch",
3-
"version": "0.1.23",
3+
"version": "0.1.24",
44
"private": true,
55
"description": "Local Windows and macOS account switcher for Codex App.",
66
"author": "GboyCode",
@@ -75,24 +75,32 @@
7575
"!debug.log"
7676
],
7777
"asar": true,
78-
"fileAssociations": [
79-
{
80-
"ext": "codexauth",
81-
"name": "CodexAuth.Credential",
82-
"description": "CodexAuth 加密凭证",
83-
"icon": "src/ui/assets/codex-color.ico",
84-
"role": "Viewer"
85-
}
86-
],
8778
"win": {
8879
"icon": "src/ui/assets/codex-color.ico",
80+
"fileAssociations": [
81+
{
82+
"ext": "codexauth",
83+
"name": "CodexAuth.Credential",
84+
"description": "CodexAuth 加密凭证",
85+
"icon": "src/ui/assets/codex-color.ico",
86+
"role": "Viewer"
87+
}
88+
],
8989
"signAndEditExecutable": false,
9090
"target": [
9191
"nsis"
9292
]
9393
},
9494
"mac": {
9595
"icon": "src/ui/assets/codex-color.png",
96+
"fileAssociations": [
97+
{
98+
"ext": "codexauth",
99+
"name": "CodexAuth.Credential",
100+
"description": "CodexAuth 加密凭证",
101+
"role": "Viewer"
102+
}
103+
],
96104
"category": "public.app-category.utilities",
97105
"target": [
98106
{

‎scripts/validate-platform-support.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,14 @@ assert.equal(isEncryptedCredentialBackup("auth-before-switch.json.keychain"), tr
2222
assert.equal(isEncryptedCredentialBackup("auth-before-switch.json"), false);
2323
assert.deepEqual(MAC_CODEX_APP_NAMES, ["ChatGPT", "Codex"]);
2424

25+
const { build } = require("../package.json");
26+
for (const platform of ["win", "mac"]) {
27+
// electron-builder concatenates global and platform file associations.
28+
const associations = [...(build.fileAssociations ?? []), ...(build[platform].fileAssociations ?? [])];
29+
const credentialFiles = associations.filter((item) => item.ext === "codexauth");
30+
assert.equal(credentialFiles.length, 1, `${platform}: register the credential extension once`);
31+
if (platform === "win") assert.match(credentialFiles[0].icon, /\.ico$/);
32+
else assert.equal(credentialFiles[0].icon, undefined, "macOS must use its generated app icon instead of a Windows ICO resource");
33+
}
34+
2535
console.log("Windows and macOS platform support validation passed.");

0 commit comments

Comments
 (0)