Skip to content

Commit 9f8c5ec

Browse files
committed
1 parent bd5a321 commit 9f8c5ec

File tree

3 files changed

+205
-1
lines changed

3 files changed

+205
-1
lines changed
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
diff --git a/out/macPackager.js b/out/macPackager.js
2+
index 852f6c4d16f86a7bb8a78bf1ed5a14647a279aa1..60e7f5f16a844541eb1909b215fcda1811e924b8 100644
3+
--- a/out/macPackager.js
4+
+++ b/out/macPackager.js
5+
@@ -423,7 +423,7 @@ class MacPackager extends platformPackager_1.PlatformPackager {
6+
}
7+
appPlist.CFBundleName = appInfo.productName;
8+
appPlist.CFBundleDisplayName = appInfo.productName;
9+
- const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion;
10+
+ const minimumSystemVersion = this.platformSpecificBuildOptions.LSMinimumSystemVersion;
11+
if (minimumSystemVersion != null) {
12+
appPlist.LSMinimumSystemVersion = minimumSystemVersion;
13+
}
14+
diff --git a/out/publish/updateInfoBuilder.js b/out/publish/updateInfoBuilder.js
15+
index 7924c5b47d01f8dfccccb8f46658015fa66da1f7..1a1588923c3939ae1297b87931ba83f0ebc052d8 100644
16+
--- a/out/publish/updateInfoBuilder.js
17+
+++ b/out/publish/updateInfoBuilder.js
18+
@@ -133,6 +133,7 @@ async function createUpdateInfo(version, event, releaseInfo) {
19+
const customUpdateInfo = event.updateInfo;
20+
const url = path.basename(event.file);
21+
const sha512 = (customUpdateInfo == null ? null : customUpdateInfo.sha512) || (await (0, hash_1.hashFile)(event.file));
22+
+ const minimumSystemVersion = customUpdateInfo == null ? null : customUpdateInfo.minimumSystemVersion;
23+
const files = [{ url, sha512 }];
24+
const result = {
25+
// @ts-ignore
26+
@@ -143,9 +144,13 @@ async function createUpdateInfo(version, event, releaseInfo) {
27+
path: url /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,
28+
// @ts-ignore
29+
sha512 /* backward compatibility, electron-updater 1.x - electron-updater 2.15.0 */,
30+
+ minimumSystemVersion,
31+
...releaseInfo,
32+
};
33+
if (customUpdateInfo != null) {
34+
+ if (customUpdateInfo.minimumSystemVersion) {
35+
+ delete customUpdateInfo.minimumSystemVersion;
36+
+ }
37+
// file info or nsis web installer packages info
38+
Object.assign("sha512" in customUpdateInfo ? files[0] : result, customUpdateInfo);
39+
}
40+
diff --git a/out/targets/ArchiveTarget.js b/out/targets/ArchiveTarget.js
41+
index e1f52a5fa86fff6643b2e57eaf2af318d541f865..47cc347f154a24b365e70ae5e1f6d309f3582ed0 100644
42+
--- a/out/targets/ArchiveTarget.js
43+
+++ b/out/targets/ArchiveTarget.js
44+
@@ -69,6 +69,9 @@ class ArchiveTarget extends core_1.Target {
45+
}
46+
}
47+
}
48+
+ if (updateInfo != null && this.packager.platformSpecificBuildOptions.minimumSystemVersion) {
49+
+ updateInfo.minimumSystemVersion = this.packager.platformSpecificBuildOptions.minimumSystemVersion;
50+
+ }
51+
await packager.info.emitArtifactBuildCompleted({
52+
updateInfo,
53+
file: artifactPath,
54+
diff --git a/out/targets/nsis/NsisTarget.js b/out/targets/nsis/NsisTarget.js
55+
index e8bd7bb46c8a54b3f55cf3a853ef924195271e01..f956e9f3fe9eb903c78aef3502553b01de4b89b1 100644
56+
--- a/out/targets/nsis/NsisTarget.js
57+
+++ b/out/targets/nsis/NsisTarget.js
58+
@@ -305,6 +305,9 @@ class NsisTarget extends core_1.Target {
59+
if (updateInfo != null && isPerMachine && (oneClick || options.packElevateHelper)) {
60+
updateInfo.isAdminRightsRequired = true;
61+
}
62+
+ if (updateInfo != null && this.packager.platformSpecificBuildOptions.minimumSystemVersion) {
63+
+ updateInfo.minimumSystemVersion = this.packager.platformSpecificBuildOptions.minimumSystemVersion;
64+
+ }
65+
await packager.info.emitArtifactBuildCompleted({
66+
file: installerPath,
67+
updateInfo,
68+
diff --git a/scheme.json b/scheme.json
69+
index 433e2efc9cef156ff5444f0c4520362ed2ef9ea7..a89c7a9b0b608fef67902c49106a43ebd0fa8b61 100644
70+
--- a/scheme.json
71+
+++ b/scheme.json
72+
@@ -1975,6 +1975,13 @@
73+
],
74+
"description": "The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing."
75+
},
76+
+ "minimumSystemVersion": {
77+
+ "description": "The minimum os kernel version required to install the application.",
78+
+ "type": [
79+
+ "null",
80+
+ "string"
81+
+ ]
82+
+ },
83+
"packageCategory": {
84+
"description": "backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place",
85+
"type": [
86+
@@ -2327,6 +2334,13 @@
87+
"MacConfiguration": {
88+
"additionalProperties": false,
89+
"properties": {
90+
+ "LSMinimumSystemVersion": {
91+
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
92+
+ "type": [
93+
+ "null",
94+
+ "string"
95+
+ ]
96+
+ },
97+
"additionalArguments": {
98+
"anyOf": [
99+
{
100+
@@ -2737,7 +2751,7 @@
101+
"type": "boolean"
102+
},
103+
"minimumSystemVersion": {
104+
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
105+
+ "description": "The minimum os kernel version required to install the application.",
106+
"type": [
107+
"null",
108+
"string"
109+
@@ -2959,6 +2973,13 @@
110+
"MasConfiguration": {
111+
"additionalProperties": false,
112+
"properties": {
113+
+ "LSMinimumSystemVersion": {
114+
+ "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
115+
+ "type": [
116+
+ "null",
117+
+ "string"
118+
+ ]
119+
+ },
120+
"additionalArguments": {
121+
"anyOf": [
122+
{
123+
@@ -3369,7 +3390,7 @@
124+
"type": "boolean"
125+
},
126+
"minimumSystemVersion": {
127+
- "description": "The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.",
128+
+ "description": "The minimum os kernel version required to install the application.",
129+
"type": [
130+
"null",
131+
"string"
132+
@@ -6507,6 +6528,13 @@
133+
"string"
134+
]
135+
},
136+
+ "minimumSystemVersion": {
137+
+ "description": "The minimum os kernel version required to install the application.",
138+
+ "type": [
139+
+ "null",
140+
+ "string"
141+
+ ]
142+
+ },
143+
"protocols": {
144+
"anyOf": [
145+
{
146+
@@ -7376,6 +7404,13 @@
147+
],
148+
"description": "MAS (Mac Application Store) development options (`mas-dev` target)."
149+
},
150+
+ "minimumSystemVersion": {
151+
+ "description": "The minimum os kernel version required to install the application.",
152+
+ "type": [
153+
+ "null",
154+
+ "string"
155+
+ ]
156+
+ },
157+
"msi": {
158+
"anyOf": [
159+
{

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@
219219
"pkce-challenge@npm:^4.1.0": "patch:pkce-challenge@npm%3A4.1.0#~/.yarn/patches/pkce-challenge-npm-4.1.0-fbc51695a3.patch",
220220
"app-builder-lib@npm:26.0.13": "patch:app-builder-lib@npm%3A26.0.13#~/.yarn/patches/app-builder-lib-npm-26.0.13-a064c9e1d0.patch",
221221
"shiki": "3.2.2",
222-
"openai@npm:^4.87.3": "patch:openai@npm%3A4.96.0#~/.yarn/patches/openai-npm-4.96.0-0665b05cb9.patch"
222+
"openai@npm:^4.87.3": "patch:openai@npm%3A4.96.0#~/.yarn/patches/openai-npm-4.96.0-0665b05cb9.patch",
223+
"app-builder-lib@npm:26.0.15": "patch:app-builder-lib@npm%3A26.0.15#~/.yarn/patches/app-builder-lib-npm-26.0.15-360e5b0476.patch"
223224
},
224225
"packageManager": "[email protected]",
225226
"lint-staged": {

yarn.lock

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4786,6 +4786,50 @@ __metadata:
47864786
languageName: node
47874787
linkType: hard
47884788

4789+
"app-builder-lib@patch:app-builder-lib@npm%3A26.0.15#~/.yarn/patches/app-builder-lib-npm-26.0.15-360e5b0476.patch":
4790+
version: 26.0.15
4791+
resolution: "app-builder-lib@patch:app-builder-lib@npm%3A26.0.15#~/.yarn/patches/app-builder-lib-npm-26.0.15-360e5b0476.patch::version=26.0.15&hash=b02ae9"
4792+
dependencies:
4793+
"@develar/schema-utils": "npm:~2.6.5"
4794+
"@electron/asar": "npm:3.4.1"
4795+
"@electron/fuses": "npm:^1.8.0"
4796+
"@electron/notarize": "npm:2.5.0"
4797+
"@electron/osx-sign": "npm:1.3.3"
4798+
"@electron/rebuild": "npm:3.7.2"
4799+
"@electron/universal": "npm:2.0.3"
4800+
"@malept/flatpak-bundler": "npm:^0.4.0"
4801+
"@types/fs-extra": "npm:9.0.13"
4802+
async-exit-hook: "npm:^2.0.1"
4803+
builder-util: "npm:26.0.13"
4804+
builder-util-runtime: "npm:9.3.2"
4805+
chromium-pickle-js: "npm:^0.2.0"
4806+
config-file-ts: "npm:0.2.8-rc1"
4807+
debug: "npm:^4.3.4"
4808+
dotenv: "npm:^16.4.5"
4809+
dotenv-expand: "npm:^11.0.6"
4810+
ejs: "npm:^3.1.8"
4811+
electron-publish: "npm:26.0.13"
4812+
fs-extra: "npm:^10.1.0"
4813+
hosted-git-info: "npm:^4.1.0"
4814+
is-ci: "npm:^3.0.0"
4815+
isbinaryfile: "npm:^5.0.0"
4816+
js-yaml: "npm:^4.1.0"
4817+
json5: "npm:^2.2.3"
4818+
lazy-val: "npm:^1.0.5"
4819+
minimatch: "npm:^10.0.0"
4820+
plist: "npm:3.1.0"
4821+
resedit: "npm:^1.7.0"
4822+
semver: "npm:^7.3.8"
4823+
tar: "npm:^6.1.12"
4824+
temp-file: "npm:^3.4.0"
4825+
tiny-async-pool: "npm:1.3.0"
4826+
peerDependencies:
4827+
dmg-builder: 26.0.15
4828+
electron-builder-squirrel-windows: 26.0.15
4829+
checksum: 10c0/616072842c01f9f65283c95bf5642106c32bc3c6679672955f57b48bae9c28de10e18f2005d0e6e46cb2cb560dda3869ebf1412d3db50b7872c5f660581ad6db
4830+
languageName: node
4831+
linkType: hard
4832+
47894833
"applescript@npm:^1.0.0":
47904834
version: 1.0.0
47914835
resolution: "applescript@npm:1.0.0"

0 commit comments

Comments
 (0)