Skip to content

v1.2.1 · 修复自动修复安装失败

Choose a tag to compare

@Azhu9701 Azhu9701 released this 03 Oct 16:33
· 8 commits to main since this release

GT 音量助手 v1.2.1

修复 v1.2.0「音频自动修复」安装失败的问题。

根因

v1.2.0 使用的废弃接口 AuthorizationExecuteWithPrivileges 在新版 macOS 上存在行为变化:若授权引用未真正获取管理员权限,子进程会以普通用户身份静默执行(不弹密码框),导致安装永远失败。

修复

  • 改用系统标准的 osascript do shell script with administrator privileges(公开 API,标准密码弹窗,可靠提权)
  • install 的助手源路径显式传参,不再依赖 argv[0]
  • 增加双侧安装日志(/tmp/gt-fanctl-app.log、/tmp/gt-fanctl-install.log),失败时可直接定位

升级

覆盖安装后,菜单里重新点一次「音频自动修复:未启用」→ 输入管理员密码 → 显示「已启用 ✓」即成功(守护状态可用 launchctl print system/com.sounds.gtfanctl 查看)。

English: Fixes v1.2.0 auto-repair installation — the deprecated AEWP API no longer elevates on recent macOS (child ran as the regular user). Switched to the standard osascript admin-privileges path with full logging.