fix(win7): 降到 Electron 22.3.27 —— Windows 7 只支持到 Electron 22
会议室那台电脑是 Windows 7 x64。Electron 从 23 起不再支持 Windows 7/8/8.1
(Chromium 用到了 Win7 没有的 API,典型报错是 GetPackageFamilyName 找不到入口点)。
客观对比(同一份代码、只换 Electron 版本,用 file 读 PE 子系统版本):
Electron 38 → PE32+ executable for MS Windows 10.00 ← 声明需要 Win10
Electron 22 → PE32+ executable for MS Windows 5.02 ← 兼容到 XP 时代
代码零改动(我们只用基础 API:BrowserWindow frame/resizable/setAlwaysOnTop/setBounds、
screen.getAllDisplays、contextBridge、ipcMain/ipcRenderer);152 条测试不受影响。
Electron 22 在 Windows 10/11 上同样能跑,所以这一版两边通吃,只是**不能让 Win7 用 38**。
⚠️ 以后想升级 Electron 的话:23 以上会议室那台就起不来了。
This commit is contained in:
1 parent
9c7081b21d
commit
0daa912ee1
4 files changed
+44
-33