1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-21 18:02:35 +01:00

upgrade electron-builder

This commit is contained in:
Mikael Finstad 2024-08-06 23:00:03 +02:00
parent 1d03b38eb2
commit 4dad1e34c3
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26
4 changed files with 67 additions and 162 deletions

View File

@ -1,60 +0,0 @@
diff --git a/out/macPackager.js b/out/macPackager.js
index 30787ba358acb9277a63df05c839a0caeea8ad91..a9e5efe7e442607f1a44c658cbf6f78093387f40 100644
--- a/out/macPackager.js
+++ b/out/macPackager.js
@@ -276,7 +276,7 @@ class MacPackager extends platformPackager_1.PlatformPackager {
await this.doFlat(appPath, artifactPath, masInstallerIdentity, keychainFile);
await this.dispatchArtifactCreated(artifactPath, null, builder_util_1.Arch.x64, this.computeSafeArtifactName(artifactName, "pkg", arch, true, this.platformSpecificBuildOptions.defaultArch));
}
- await this.notarizeIfProvided(appPath);
+ if (!isMas) await this.notarizeIfProvided(appPath);
return true;
}
async getOptionsForFile(appPath, isMas, customSignOptions) {
@@ -407,24 +407,36 @@ class MacPackager extends platformPackager_1.PlatformPackager {
builder_util_1.log.info({ reason: "`notarizeOptions` is explicitly set to false" }, "skipped macOS notarization");
return;
}
+
+ let options;
+ // option 1: app-specific password
const appleId = process.env.APPLE_ID;
const appleIdPassword = process.env.APPLE_APP_SPECIFIC_PASSWORD;
- if (!appleId && !appleIdPassword) {
+ // option 2: API key
+ const appleApiKey = process.env.APPLE_API_KEY;
+ const appleApiKeyId = process.env.APPLE_API_KEY_ID;
+ const appleApiIssuer = process.env.APPLE_API_ISSUER;
+ if (appleId || appleIdPassword) {
+ if (!appleId) {
+ throw new builder_util_1.InvalidConfigurationError(`APPLE_ID env var needs to be set`);
+ }
+ if (!appleIdPassword) {
+ throw new builder_util_1.InvalidConfigurationError(`APPLE_APP_SPECIFIC_PASSWORD env var needs to be set`);
+ }
+
+ options = this.generateNotarizeOptions({ appPath, appleId, appleIdPassword });
+ } else if (appleApiKey || appleApiKeyId || appleApiIssuer) {
+ options = this.generateNotarizeOptions({ appPath, appleApiKey, appleApiKeyId, appleApiIssuer });
+ } else {
// if no credentials provided, skip silently
return;
}
- if (!appleId) {
- throw new builder_util_1.InvalidConfigurationError(`APPLE_ID env var needs to be set`);
- }
- if (!appleIdPassword) {
- throw new builder_util_1.InvalidConfigurationError(`APPLE_APP_SPECIFIC_PASSWORD env var needs to be set`);
- }
- const options = this.generateNotarizeOptions(appPath, appleId, appleIdPassword);
await (0, notarize_1.notarize)(options);
+
builder_util_1.log.info(null, "notarization successful");
}
- generateNotarizeOptions(appPath, appleId, appleIdPassword) {
- const baseOptions = { appPath, appleId, appleIdPassword };
+ generateNotarizeOptions({ appPath, appleId, appleIdPassword, appleApiKey, appleApiKeyId, appleApiIssuer }) {
+ const baseOptions = { appPath, appleId, appleIdPassword, appleApiKey, appleApiKeyId, appleApiIssuer };
const options = this.platformSpecificBuildOptions.notarize;
if (typeof options === "boolean") {
const proj = {

View File

@ -35,20 +35,20 @@ yarn dev
This will sign using the development provisioning profile: This will sign using the development provisioning profile:
``` ```bash
yarn pack-mas-dev yarn pack-mas-dev
``` ```
MAS builds have some restrictions, see `isMasBuild` variable in code. In particular, any file cannot be read without the user's consent. MAS builds have some restrictions, see `isMasBuild` variable in code. In particular, any file cannot be read without the user's consent.
NOTE: when MAS (dev) build, Application Support will instead be here: NOTE: when MAS (dev) build, Application Support will instead be located here:
``` ```
~/Library/Containers/no.mifi.losslesscut-mac/Data/Library/Application Support ~/Library/Containers/no.mifi.losslesscut-mac/Data/Library/Application Support
``` ```
### Starting over fresh ### Starting over fresh
``` ```bash
rm -rf ~/Library/Containers/no.mifi.losslesscut-mac rm -rf ~/Library/Containers/no.mifi.losslesscut-mac
``` ```
@ -100,7 +100,7 @@ yarn pack-mas-dev
cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist cat dist/mas-dev-arm64/LosslessCut.app/Contents/Info.plist
``` ```
``` ```xml
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.13</string> <string>10.13</string>
``` ```
@ -122,19 +122,21 @@ Links:
- `package.json` - `package.json`
### i18n ### i18n
`yarn scan-i18n` ```bash
yarn scan-i18n
```
### Licenses ### Licenses
#### Generate summary #### Generate summary
``` ```bash
npx license-checker --summary npx license-checker --summary
``` ```
#### Regenerate licenses file #### Regenerate licenses file
``` ```bash
yarn generate-licenses yarn generate-licenses
#cp licenses.txt losslesscut.mifi.no/public/ #cp licenses.txt losslesscut.mifi.no/public/
``` ```

View File

@ -70,7 +70,7 @@
"csv-stringify": "^5.6.2", "csv-stringify": "^5.6.2",
"data-uri-to-buffer": "^4.0.0", "data-uri-to-buffer": "^4.0.0",
"electron": "^31.3.1", "electron": "^31.3.1",
"electron-builder": "^24.6.4", "electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^3.2.0",
"electron-vite": "^2.3.0", "electron-vite": "^2.3.0",
"eslint": "^8.2.0", "eslint": "^8.2.0",
@ -455,8 +455,5 @@
] ]
} }
}, },
"packageManager": "yarn@4.0.2", "packageManager": "yarn@4.0.2"
"resolutions": {
"app-builder-lib@24.8.0": "patch:app-builder-lib@npm%3A24.8.0#./.yarn/patches/app-builder-lib-npm-24.8.0-51e1f5cd3f.patch"
}
} }

146
yarn.lock
View File

@ -5,10 +5,10 @@ __metadata:
version: 8 version: 8
cacheKey: 10 cacheKey: 10
"7zip-bin@npm:~5.1.1": "7zip-bin@npm:~5.2.0":
version: 5.1.1 version: 5.2.0
resolution: "7zip-bin@npm:5.1.1" resolution: "7zip-bin@npm:5.2.0"
checksum: 853e636745131719b85650df93d1a3a9af0b0db1c0e2a0884451ec87e14c8b0f4fb911c04805984ece1211ff1235f7869547b780e06939469410f2da9b5e0da6 checksum: 5339c7a56f57f8d7d16ac8d15f588d155e5705cd4822e0d161ea45e6fbfe4a5226b464a331ec555a1ec9376ad04e5f61c125656cf3a1507900c1968ccbcfe80b
languageName: node languageName: node
linkType: hard linkType: hard
@ -393,14 +393,14 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@electron/notarize@npm:2.1.0": "@electron/notarize@npm:2.2.1":
version: 2.1.0 version: 2.2.1
resolution: "@electron/notarize@npm:2.1.0" resolution: "@electron/notarize@npm:2.2.1"
dependencies: dependencies:
debug: "npm:^4.1.1" debug: "npm:^4.1.1"
fs-extra: "npm:^9.0.1" fs-extra: "npm:^9.0.1"
promise-retry: "npm:^2.0.1" promise-retry: "npm:^2.0.1"
checksum: 0509c3bd922dd1ed6d1a2042dd78cefd3bd1530000b79c1b9983effb5d3816d5da7d22cfd1ec4d2191d536b1b9cd25f3bfb5202a6ffe58543b22fdf3b468c69f checksum: 6d5bb78a0ba0af59a07daf01ace17a33869893641639c94d0f74ca060698d8cf61fca4002c61592a70f6f20e03987fc1138625853d947394749b1bd46ed2db3c
languageName: node languageName: node
linkType: hard linkType: hard
@ -430,9 +430,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@electron/universal@npm:1.4.1": "@electron/universal@npm:1.5.1":
version: 1.4.1 version: 1.5.1
resolution: "@electron/universal@npm:1.4.1" resolution: "@electron/universal@npm:1.5.1"
dependencies: dependencies:
"@electron/asar": "npm:^3.2.1" "@electron/asar": "npm:^3.2.1"
"@malept/cross-spawn-promise": "npm:^1.1.0" "@malept/cross-spawn-promise": "npm:^1.1.0"
@ -441,7 +441,7 @@ __metadata:
fs-extra: "npm:^9.0.1" fs-extra: "npm:^9.0.1"
minimatch: "npm:^3.0.4" minimatch: "npm:^3.0.4"
plist: "npm:^3.0.4" plist: "npm:^3.0.4"
checksum: 41c03ff5a1928c49c0f05e5f4a17278f1d7142f72530a2a7b9c4a49308dd4a280d7576f4961315ee9d45755a772f0d7fdff2d67f5f2e61e962b7c1aa94c40185 checksum: 9e6cd5dbc05350c1a0e9a947651171de5d5e36976094f9dd2267451b872cd6b6759cb40cf222bf8b4383a7d86103cacb5eeeeb532f27c64c439c77ba50fa61f1
languageName: node languageName: node
linkType: hard linkType: hard
@ -2701,25 +2701,24 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"app-builder-lib@npm:24.8.0": "app-builder-lib@npm:24.13.3":
version: 24.8.0 version: 24.13.3
resolution: "app-builder-lib@npm:24.8.0" resolution: "app-builder-lib@npm:24.13.3"
dependencies: dependencies:
7zip-bin: "npm:~5.1.1"
"@develar/schema-utils": "npm:~2.6.5" "@develar/schema-utils": "npm:~2.6.5"
"@electron/notarize": "npm:2.1.0" "@electron/notarize": "npm:2.2.1"
"@electron/osx-sign": "npm:1.0.5" "@electron/osx-sign": "npm:1.0.5"
"@electron/universal": "npm:1.4.1" "@electron/universal": "npm:1.5.1"
"@malept/flatpak-bundler": "npm:^0.4.0" "@malept/flatpak-bundler": "npm:^0.4.0"
"@types/fs-extra": "npm:9.0.13" "@types/fs-extra": "npm:9.0.13"
async-exit-hook: "npm:^2.0.1" async-exit-hook: "npm:^2.0.1"
bluebird-lst: "npm:^1.0.9" bluebird-lst: "npm:^1.0.9"
builder-util: "npm:24.8.0" builder-util: "npm:24.13.1"
builder-util-runtime: "npm:9.2.2" builder-util-runtime: "npm:9.2.4"
chromium-pickle-js: "npm:^0.2.0" chromium-pickle-js: "npm:^0.2.0"
debug: "npm:^4.3.4" debug: "npm:^4.3.4"
ejs: "npm:^3.1.8" ejs: "npm:^3.1.8"
electron-publish: "npm:24.8.0" electron-publish: "npm:24.13.1"
form-data: "npm:^4.0.0" form-data: "npm:^4.0.0"
fs-extra: "npm:^10.1.0" fs-extra: "npm:^10.1.0"
hosted-git-info: "npm:^4.1.0" hosted-git-info: "npm:^4.1.0"
@ -2733,43 +2732,10 @@ __metadata:
semver: "npm:^7.3.8" semver: "npm:^7.3.8"
tar: "npm:^6.1.12" tar: "npm:^6.1.12"
temp-file: "npm:^3.4.0" temp-file: "npm:^3.4.0"
checksum: 2f0d3c744790202a1cef26b43b7d88ee805266f82a2d473dd8c548addb5c4b6b6ca4de53b138d6d37390bf82b978e42c1614dbff6caa10348f319ac97da6e00f peerDependencies:
languageName: node dmg-builder: 24.13.3
linkType: hard electron-builder-squirrel-windows: 24.13.3
checksum: 4379dc87e0e037a8e11eead68195673680fb4f90570bdc19fffa301d4c5bf5dcac2d38738885fed2cae5eeb5be9be0c93d682ee25e376322a25d0767dec4a415
"app-builder-lib@patch:app-builder-lib@npm%3A24.8.0#./.yarn/patches/app-builder-lib-npm-24.8.0-51e1f5cd3f.patch::locator=lossless-cut%40workspace%3A.":
version: 24.8.0
resolution: "app-builder-lib@patch:app-builder-lib@npm%3A24.8.0#./.yarn/patches/app-builder-lib-npm-24.8.0-51e1f5cd3f.patch::version=24.8.0&hash=eaba3b&locator=lossless-cut%40workspace%3A."
dependencies:
7zip-bin: "npm:~5.1.1"
"@develar/schema-utils": "npm:~2.6.5"
"@electron/notarize": "npm:2.1.0"
"@electron/osx-sign": "npm:1.0.5"
"@electron/universal": "npm:1.4.1"
"@malept/flatpak-bundler": "npm:^0.4.0"
"@types/fs-extra": "npm:9.0.13"
async-exit-hook: "npm:^2.0.1"
bluebird-lst: "npm:^1.0.9"
builder-util: "npm:24.8.0"
builder-util-runtime: "npm:9.2.2"
chromium-pickle-js: "npm:^0.2.0"
debug: "npm:^4.3.4"
ejs: "npm:^3.1.8"
electron-publish: "npm:24.8.0"
form-data: "npm:^4.0.0"
fs-extra: "npm:^10.1.0"
hosted-git-info: "npm:^4.1.0"
is-ci: "npm:^3.0.0"
isbinaryfile: "npm:^5.0.0"
js-yaml: "npm:^4.1.0"
lazy-val: "npm:^1.0.5"
minimatch: "npm:^5.1.1"
read-config-file: "npm:6.3.2"
sanitize-filename: "npm:^1.6.3"
semver: "npm:^7.3.8"
tar: "npm:^6.1.12"
temp-file: "npm:^3.4.0"
checksum: 41e29a3390bb6137f00b9bddacf578ee970f5d7e89439c8c7e91c71e07a2cefa8727b9d4b0a923ae09b6322272107b969bfd0bbf63b678b68dd2aedd487a9a41
languageName: node languageName: node
linkType: hard linkType: hard
@ -3279,25 +3245,25 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"builder-util-runtime@npm:9.2.2": "builder-util-runtime@npm:9.2.4":
version: 9.2.2 version: 9.2.4
resolution: "builder-util-runtime@npm:9.2.2" resolution: "builder-util-runtime@npm:9.2.4"
dependencies: dependencies:
debug: "npm:^4.3.4" debug: "npm:^4.3.4"
sax: "npm:^1.2.4" sax: "npm:^1.2.4"
checksum: 09f667b802e9660015f4426fa99b5f0942845818e94caf6ac959b2c0a726e2aa79a505781862cf1b69e02ba9c3fd0bbe8f6fd865f4721ca7e5cbbe0e28ba417d checksum: 6b4b6518f8859a90cd6b49ff8053134d731438a588496e5f517ec6d12baef3f1a1c74aaa3142f9d4c61979fca1addc3e47432a956c122cfad582b2145a3df077
languageName: node languageName: node
linkType: hard linkType: hard
"builder-util@npm:24.8.0": "builder-util@npm:24.13.1":
version: 24.8.0 version: 24.13.1
resolution: "builder-util@npm:24.8.0" resolution: "builder-util@npm:24.13.1"
dependencies: dependencies:
7zip-bin: "npm:~5.1.1" 7zip-bin: "npm:~5.2.0"
"@types/debug": "npm:^4.1.6" "@types/debug": "npm:^4.1.6"
app-builder-bin: "npm:4.0.0" app-builder-bin: "npm:4.0.0"
bluebird-lst: "npm:^1.0.9" bluebird-lst: "npm:^1.0.9"
builder-util-runtime: "npm:9.2.2" builder-util-runtime: "npm:9.2.4"
chalk: "npm:^4.1.2" chalk: "npm:^4.1.2"
cross-spawn: "npm:^7.0.3" cross-spawn: "npm:^7.0.3"
debug: "npm:^4.3.4" debug: "npm:^4.3.4"
@ -3309,7 +3275,7 @@ __metadata:
source-map-support: "npm:^0.5.19" source-map-support: "npm:^0.5.19"
stat-mode: "npm:^1.0.0" stat-mode: "npm:^1.0.0"
temp-file: "npm:^3.4.0" temp-file: "npm:^3.4.0"
checksum: e90087845702f255781920d790591d07627257557aa8f6b9c75ef438e594f63812be7990d9f04dffc2f7c3ffd8d211980f8fdb8236ff7ab0c495792506e3e4f4 checksum: e63836c92010868e9ec8f06e7bfed9b4029915f4375e5173a46f14189204d2eacc1043495208f31d762ef519bcaaf70af625dc5db74290c551654afbb2aad0fd
languageName: node languageName: node
linkType: hard linkType: hard
@ -4237,13 +4203,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"dmg-builder@npm:24.8.0": "dmg-builder@npm:24.13.3":
version: 24.8.0 version: 24.13.3
resolution: "dmg-builder@npm:24.8.0" resolution: "dmg-builder@npm:24.13.3"
dependencies: dependencies:
app-builder-lib: "npm:24.8.0" app-builder-lib: "npm:24.13.3"
builder-util: "npm:24.8.0" builder-util: "npm:24.13.1"
builder-util-runtime: "npm:9.2.2" builder-util-runtime: "npm:9.2.4"
dmg-license: "npm:^1.0.11" dmg-license: "npm:^1.0.11"
fs-extra: "npm:^10.1.0" fs-extra: "npm:^10.1.0"
iconv-lite: "npm:^0.6.2" iconv-lite: "npm:^0.6.2"
@ -4251,7 +4217,7 @@ __metadata:
dependenciesMeta: dependenciesMeta:
dmg-license: dmg-license:
optional: true optional: true
checksum: bd000f8ba0697c5a719e118ca1d6fdb3e9a815e8a02f194868975863a1994ffde42ae263dd7d11769676ca9d4c7198feca5f16ae96a02d4c64de9de71e02a90e checksum: 091914493a94a63fd6ba6359c1c1b6b74b42c923b9bc89560d2685e8095e08399ea204ab9abb0bfbfa842d3c14b258e5a60391f3482920348edc57c59da0299f
languageName: node languageName: node
linkType: hard linkType: hard
@ -4401,15 +4367,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"electron-builder@npm:^24.6.4": "electron-builder@npm:^24.13.3":
version: 24.8.0 version: 24.13.3
resolution: "electron-builder@npm:24.8.0" resolution: "electron-builder@npm:24.13.3"
dependencies: dependencies:
app-builder-lib: "npm:24.8.0" app-builder-lib: "npm:24.13.3"
builder-util: "npm:24.8.0" builder-util: "npm:24.13.1"
builder-util-runtime: "npm:9.2.2" builder-util-runtime: "npm:9.2.4"
chalk: "npm:^4.1.2" chalk: "npm:^4.1.2"
dmg-builder: "npm:24.8.0" dmg-builder: "npm:24.13.3"
fs-extra: "npm:^10.1.0" fs-extra: "npm:^10.1.0"
is-ci: "npm:^3.0.0" is-ci: "npm:^3.0.0"
lazy-val: "npm:^1.0.5" lazy-val: "npm:^1.0.5"
@ -4419,7 +4385,7 @@ __metadata:
bin: bin:
electron-builder: cli.js electron-builder: cli.js
install-app-deps: install-app-deps.js install-app-deps: install-app-deps.js
checksum: c1c8b42d0c7f84ef7a9dd590e3d290cfa1acc310b6394cd7ca08119df0016e77589da9e52efda81cba687f0e1ae480088e501a1206c904819e68e0765316a838 checksum: d210e787cd1763c108f4600184a02860a3d00553278ef7c9d3a23b46d1646cdbcfa7514f774effb917de17f037a53773b5a6159819fc19da764ad2a3235b1c0f
languageName: node languageName: node
linkType: hard linkType: hard
@ -4442,18 +4408,18 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"electron-publish@npm:24.8.0": "electron-publish@npm:24.13.1":
version: 24.8.0 version: 24.13.1
resolution: "electron-publish@npm:24.8.0" resolution: "electron-publish@npm:24.13.1"
dependencies: dependencies:
"@types/fs-extra": "npm:^9.0.11" "@types/fs-extra": "npm:^9.0.11"
builder-util: "npm:24.8.0" builder-util: "npm:24.13.1"
builder-util-runtime: "npm:9.2.2" builder-util-runtime: "npm:9.2.4"
chalk: "npm:^4.1.2" chalk: "npm:^4.1.2"
fs-extra: "npm:^10.1.0" fs-extra: "npm:^10.1.0"
lazy-val: "npm:^1.0.5" lazy-val: "npm:^1.0.5"
mime: "npm:^2.5.2" mime: "npm:^2.5.2"
checksum: 6a5f6a8a6ac1f39dbecb318d437d4761885f46a9b40fa90c99b69accd8252c36e78c78b2d47f4dec23ea64f4ed0742bdadfefe1819dde0c458a183f16c2fde65 checksum: 60133b51bf186a70f710d6f656901d0ec358bcd688294c675711107d947fe961ebaf99fee7108f3a48270b09e0ef71568b0148df363de2dfb09a3c7bb1475c62
languageName: node languageName: node
linkType: hard linkType: hard
@ -7549,7 +7515,7 @@ __metadata:
cue-parser: "npm:^0.3.0" cue-parser: "npm:^0.3.0"
data-uri-to-buffer: "npm:^4.0.0" data-uri-to-buffer: "npm:^4.0.0"
electron: "npm:^31.3.1" electron: "npm:^31.3.1"
electron-builder: "npm:^24.6.4" electron-builder: "npm:^24.13.3"
electron-devtools-installer: "npm:^3.2.0" electron-devtools-installer: "npm:^3.2.0"
electron-store: "npm:5.1.1" electron-store: "npm:5.1.1"
electron-unhandled: "npm:^5.0.0" electron-unhandled: "npm:^5.0.0"