|
| 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 | + { |
0 commit comments