Skip to content

← Projects

qq-chat-exporter · macOS support

Open source contribution · 2 PRs merged2026Completed

  • Electron
  • macOS
  • Node.js
  • Shell

Problem

Shell mode in qq-chat-exporter did not work at all on macOS. The launcher used child_process.fork() to re-run the QQ binary with napcat.mjs as an argument, which only works with an unpackaged generic Electron. The signed, packaged QQ.app ignores the extra argument, so QQ started normally, NapCat never loaded, and the launcher hung forever without any error. The LD_PRELOAD approach used on Linux cannot be ported to dyld either.

Changes

  • Point main in package.json to a generated loader, so QQ’s own Electron process loads NapCat
  • Only modify a private copy, QQNapCatRuntime.app, inside the package directory, never the user’s /Applications/QQ.app; the copy is rebuilt automatically when the QQ version changes
  • Ad-hoc re-sign without --deep, keeping the original signatures of the nested Frameworks (testing showed that modifying the real QQ.app in place breaks it for daily use)

Result

PR #621 (2026-07-28) and PR #625 (2026-07-29), which fixed a silent fallback in NapCat version detection, were merged upstream. macOS Apple Silicon users can now use the official release directly.