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
No files matched your search
Generated
+17
-24
@@ -9,8 +9,8 @@ importers:
|
||||
.:
|
||||
devDependencies:
|
||||
electron:
|
||||
specifier: 38.2.2
|
||||
version: 38.2.2(supports-color@7.1.0)
|
||||
specifier: 22.3.27
|
||||
version: 22.3.27(supports-color@7.1.0)
|
||||
electron-builder:
|
||||
specifier: 26.16.1
|
||||
version: 26.16.1(electron-builder-squirrel-windows@26.16.1)(supports-color@7.1.0)
|
||||
@@ -130,8 +130,8 @@ packages:
|
||||
'@types/ms@2.1.0':
|
||||
resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==}
|
||||
|
||||
'@types/node@22.20.2':
|
||||
resolution: {integrity: sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw==}
|
||||
'@types/node@16.11.26':
|
||||
resolution: {integrity: sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ==}
|
||||
|
||||
'@types/node@26.5.1':
|
||||
resolution: {integrity: sha512-CzNm2FezW4VR/LjG6yUdiEgLE/rAQ9Slj5gCu/C2VrdcW7I0ahNZ8DRbHT7zOZ6r3ONgd/bsQIeSaoDGrd1C6g==}
|
||||
@@ -411,8 +411,8 @@ packages:
|
||||
resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
||||
electron@38.2.2:
|
||||
resolution: {integrity: sha512-OXSaVNXDlonXDjMRsFNQo1j5tzTKwKXh5/m46IjAFccBcZJZMISI+EjSI07oexIuhvKM8AZLuFuihVn4YjWWrA==}
|
||||
electron@22.3.27:
|
||||
resolution: {integrity: sha512-7Rht21vHqj4ZFRnKuZdFqZFsvMBCmDqmjetiMqPtF+TmTBiGne1mnstVXOA/SRGhN2Qy5gY5bznJKpiqogjM8A==}
|
||||
engines: {node: '>= 12.20.55'}
|
||||
hasBin: true
|
||||
|
||||
@@ -1035,9 +1035,6 @@ packages:
|
||||
resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
undici-types@6.21.0:
|
||||
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
||||
|
||||
undici-types@8.9.0:
|
||||
resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
|
||||
|
||||
@@ -1279,7 +1276,7 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/http-cache-semantics': 4.2.0
|
||||
'@types/keyv': 3.1.4
|
||||
'@types/node': 22.20.2
|
||||
'@types/node': 26.5.1
|
||||
'@types/responselike': 1.0.3
|
||||
|
||||
'@types/debug@4.1.13':
|
||||
@@ -1300,18 +1297,16 @@ snapshots:
|
||||
|
||||
'@types/keyv@3.1.4':
|
||||
dependencies:
|
||||
'@types/node': 22.20.2
|
||||
'@types/node': 26.5.1
|
||||
|
||||
'@types/minimatch@6.0.0':
|
||||
dependencies:
|
||||
minimatch: 3.1.5
|
||||
minimatch: 10.2.6
|
||||
optional: true
|
||||
|
||||
'@types/ms@2.1.0': {}
|
||||
|
||||
'@types/node@22.20.2':
|
||||
dependencies:
|
||||
undici-types: 6.21.0
|
||||
'@types/node@16.11.26': {}
|
||||
|
||||
'@types/node@26.5.1':
|
||||
dependencies:
|
||||
@@ -1319,11 +1314,11 @@ snapshots:
|
||||
|
||||
'@types/responselike@1.0.3':
|
||||
dependencies:
|
||||
'@types/node': 22.20.2
|
||||
'@types/node': 26.5.1
|
||||
|
||||
'@types/yauzl@2.10.3':
|
||||
dependencies:
|
||||
'@types/node': 22.20.2
|
||||
'@types/node': 26.5.1
|
||||
optional: true
|
||||
|
||||
'@xmldom/xmldom@0.8.15': {}
|
||||
@@ -1686,10 +1681,10 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
electron@38.2.2(supports-color@7.1.0):
|
||||
electron@22.3.27(supports-color@7.1.0):
|
||||
dependencies:
|
||||
'@electron/get': 2.0.0(supports-color@7.1.0)
|
||||
'@types/node': 22.20.2
|
||||
'@types/node': 16.11.26
|
||||
extract-zip: 2.0.1(supports-color@7.1.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@@ -2052,11 +2047,11 @@ snapshots:
|
||||
|
||||
node-abi@4.35.0:
|
||||
dependencies:
|
||||
semver: 7.7.4
|
||||
semver: 7.8.5
|
||||
|
||||
node-api-version@0.2.1:
|
||||
dependencies:
|
||||
semver: 7.7.4
|
||||
semver: 7.8.5
|
||||
|
||||
node-gyp@12.4.0:
|
||||
dependencies:
|
||||
@@ -2065,7 +2060,7 @@ snapshots:
|
||||
graceful-fs: 4.2.11
|
||||
nopt: 9.0.0
|
||||
proc-log: 6.0.0
|
||||
semver: 7.7.4
|
||||
semver: 7.8.5
|
||||
tar: 7.5.22
|
||||
tinyglobby: 0.2.17
|
||||
undici: 6.28.1
|
||||
@@ -2333,8 +2328,6 @@ snapshots:
|
||||
type-fest@0.13.1:
|
||||
optional: true
|
||||
|
||||
undici-types@6.21.0: {}
|
||||
|
||||
undici-types@8.9.0: {}
|
||||
|
||||
undici@6.28.1: {}
|
||||
|
||||
Reference in new issue
Block a user