Compare commits

..
2 Commits
Author SHA1 Message Date
AskaEth 4c61b9f1ec docs: 同步 README 与开发文档(来自 main)
两份文档是分支无关的:说明两个分支各是什么、怎么判断 Win7 兼容性、怎么构建。
win7 分支只多一行 Electron 版本差异。
2026-09-15 15:43:38 +08:00
AskaEth 0daa912ee1 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 以上会议室那台就起不来了。
2026-09-15 14:58:54 +08:00
2 changed files with 19 additions and 26 deletions

No files matched your search

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