diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db98a558..12b38b76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: run: npm run webpack:prod - name: Package run: | - node release-automation/build.mjs --mac --universal + node release-automation/build.mjs --mac --mac-legacy-11 --universal node release-automation/build.mjs --mac-legacy-10.13-10.14 --mac-legacy-10.15 --x64 - name: Print file tree run: node scripts/print-file-tree.mjs dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7590e8a8..1945306c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -76,7 +76,7 @@ jobs: python3 -c "import os; open(os.getenv('APPLE_API_KEY_NAME'), 'w').write(os.getenv('APPLE_API_KEY_DATA'))" >/dev/null 2>&1 # @electron/notaraize documentation says key should be an absolute path export APPLE_API_KEY="$(pwd)/$APPLE_API_KEY_NAME" - node release-automation/build.mjs --mac --universal --production + node release-automation/build.mjs --mac --mac-legacy-11 --universal --production # These macOS versions never ran on an Apple Silicon device, so only need x64 node release-automation/build.mjs --mac-legacy-10.13-10.14 --mac-legacy-10.15 --x64 --production # for safety diff --git a/package-lock.json b/package-lock.json index 0622d1dd..01cad383 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "copy-webpack-plugin": "^6.4.1", "cross-env": "^10.1.0", "css-loader": "^1.0.1", - "electron": "^37.6.1", + "electron": "^38.2.2", "electron-builder": "^26.0.20", "file-loader": "^6.2.0", "postcss": "^8.4.13", @@ -7119,9 +7119,9 @@ } }, "node_modules/electron": { - "version": "37.6.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-37.6.1.tgz", - "integrity": "sha512-aHtJVNjqf0lk7dlPoc1X+fMBpZtLn+XGvP6IYc3gooTwsD1D/Ic2SBRC9SnIk6LkWTsDaSF9jgH1d9Q7eABy/Q==", + "version": "38.2.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-38.2.2.tgz", + "integrity": "sha512-OXSaVNXDlonXDjMRsFNQo1j5tzTKwKXh5/m46IjAFccBcZJZMISI+EjSI07oexIuhvKM8AZLuFuihVn4YjWWrA==", "dev": true, "hasInstallScript": true, "license": "MIT", diff --git a/package.json b/package.json index d5396eee..7b8e8599 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "copy-webpack-plugin": "^6.4.1", "cross-env": "^10.1.0", "css-loader": "^1.0.1", - "electron": "^37.6.1", + "electron": "^38.2.2", "electron-builder": "^26.0.20", "file-loader": "^6.2.0", "postcss": "^8.4.13", diff --git a/release-automation/README.md b/release-automation/README.md index f14b0408..d182aa88 100644 --- a/release-automation/README.md +++ b/release-automation/README.md @@ -39,6 +39,9 @@ You must specify which platform to build for: --mac-legacy-10.15 Create app for macOS 10.15 (less secure than --mac). +--mac-legacy-11 + Create app for macOS 11 (less secure than --mac). + --mac-dir Generate executables for macOS 10.15 and later but don't package into a complete DMG installer. Primarily for debugging. diff --git a/release-automation/build.mjs b/release-automation/build.mjs index 33835400..dd28fab1 100644 --- a/release-automation/build.mjs +++ b/release-automation/build.mjs @@ -18,6 +18,10 @@ const ELECTRON_26_FINAL = '26.6.10'; // Electron 32 is the last version to support macOS 10.15 const ELECTRON_32_FINAL = '32.3.3'; +// Electron 37 is the last version to support macOS 11 +// TODO: 37 is still being updates, we should keep bumping this +const ELECTRON_37_FINAL = '37.6.1'; + /** * @returns {Date} */ @@ -294,6 +298,19 @@ const buildMacLegacy1015 = () => build({ } }); +const buildMacLegacy11 = () => build({ + platformName: 'MAC', + platformType: 'dmg', + manageUpdates: true, + legacy: true, + extraConfig: { + mac: { + artifactName: '${productName}-Legacy-11-Setup-${version}.${ext}' + }, + electronVersion: ELECTRON_37_FINAL + } +}); + const buildMacDir = () => build({ platformName: 'MAC', platformType: 'dir', @@ -357,6 +374,7 @@ const run = async () => { '--mac': buildMac, '--mac-legacy-10.13-10.14': buildMacLegacy10131014, '--mac-legacy-10.15': buildMacLegacy1015, + '--mac-legacy-11': buildMacLegacy11, '--mac-dir': buildMacDir, '--debian': buildDebian, '--tarball': buildTarball, diff --git a/src-main/migrate.js b/src-main/migrate.js index 65fa1739..8a60ab15 100644 --- a/src-main/migrate.js +++ b/src-main/migrate.js @@ -78,7 +78,9 @@ const migrate = async () => { // Legacy build for macOS 10.13 and 10.14 uses Electron 26 (getElectronMajorVersion() === 26 && getKernelMajorVersion() >= 19) || // Legacy build for macOS 10.15 uses Electron 32 - (getElectronMajorVersion() === 32 && getKernelMajorVersion() >= 20) + (getElectronMajorVersion() === 32 && getKernelMajorVersion() >= 20) || + // Legacy build for macOS 11 uses Electron 37 + (getElectronMajorVersion() === 37 && getKernelMajorVersion() >= 21) )) )) { const result = dialog.showMessageBoxSync({