实现图片解密设置页

This commit is contained in:
电摇小子 committed 2026-07-14 11:07:35 +08:00
1 parent 54ebe01fa3
commit 24879a2639
24 files changed
+1541 -42

No files matched your search

@@ -21,3 +21,21 @@ export async function isWindowsWechatRunning(): Promise<boolean> {
}
return false
}
export async function isWechatRunning(): Promise<boolean> {
if (process.platform === 'win32') return isWindowsWechatRunning()
if (process.platform !== 'darwin') return false
for (const args of [
['-x', 'WeChat'],
['-f', 'WeChat.app/Contents/MacOS/WeChat']
]) {
try {
const { stdout } = await execFileAsync('/usr/bin/pgrep', args)
if (stdout.trim()) return true
} catch {
// Try the next macOS process lookup strategy.
}
}
return false
}