mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 01:05:30 +08:00
微信机器人回复剥离引用编号、列表改用空行分隔,失败通知补失败时刻 问问微信关键词检索在索引落后时按单会话直读原始记录兜底 关闭窗口支持记住选择并在设置中修改 退群监控刷新列表
18 lines
558 B
TypeScript
18 lines
558 B
TypeScript
import { app } from 'electron'
|
|
import { existsSync } from 'fs'
|
|
import { join } from 'path'
|
|
|
|
export function isPackagedRuntime(): boolean {
|
|
if (app.isPackaged) return true
|
|
|
|
// 非 Electron 进程(例如单元/集成测试)里 process.resourcesPath 不存在,
|
|
// 此时 join 会抛错。没有 resources 目录就必然不是打包运行时。
|
|
const resourcesPath = process.resourcesPath
|
|
if (!resourcesPath) return false
|
|
|
|
return (
|
|
existsSync(join(resourcesPath, 'app.asar')) &&
|
|
existsSync(join(resourcesPath, 'app-update.yml'))
|
|
)
|
|
}
|