Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electron 34 #1132

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
# @electron/notaraize documentation says key should be an absolute path
export APPLE_API_KEY="$(pwd)/$APPLE_API_KEY_NAME"
node release-automation/build.js --mac --universal --production
node release-automation/build.js --mac-legacy-10.13-10.14 --x64 --production
# These macOS versions never ran on an Apple Silicon device, so only need x64
node release-automation/build.js --mac-legacy-10.13-10.14 --mac-legacy-10.15 --x64 --production
# for safety
rm "$APPLE_API_KEY_NAME"
env:
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"copy-webpack-plugin": "^6.4.1",
"cross-env": "^7.0.3",
"css-loader": "^1.0.1",
"electron": "^32.3.0",
"electron": "^34.1.0",
"electron-builder": "^26.0.0",
"file-loader": "^6.2.0",
"postcss": "^8.4.13",
Expand Down
3 changes: 3 additions & 0 deletions release-automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ You must specify which platform to build for:
--mac-legacy-10.13-10.14
Create app for macOS 10.13 and 10.14 (less secure than --mac).

--mac-legacy-10.15
Create app for macOS 10.15 (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.
Expand Down
130 changes: 77 additions & 53 deletions release-automation/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ const {Platform, Arch} = builder;

const isProduction = process.argv.includes('--production');

// Electron 22 is the last version to support Windows 7, 8, 8.1
const ELECTRON_22_FINAL = '22.3.27';

// Electron 26 is the last version to support macOS 10.13, 10.14
const ELECTRON_26_FINAL = '26.6.10';

// Electron 32 is the last version to support macOS 10.15
// TODO: Electron 32 is still being supported. There will likely be a 32.3.1 etc.
// before support is dropped. Replace this once that happens.
const ELECTRON_32_FINAL = '32.3.0';

/**
* @param {string} platformName
* @returns {string} a string that indexes into Arch[...]
Expand Down Expand Up @@ -190,33 +201,28 @@ const buildWindows = () => build({
manageUpdates: true
});

const buildWindowsLegacy = async () => {
// This is the last release of Electron 22, which no longer receives updates.
const LEGACY_ELECTRON_VERSION = '22.3.27';

return build({
platformName: 'WINDOWS',
platformType: 'nsis',
manageUpdates: true,
legacy: true,
extraConfig: {
nsis: {
artifactName: '${productName} Legacy Setup ${version} ${arch}.${ext}'
}
},
prepare: async (archName) => {
const electronDist = await downloadElectronArtifact({
version: LEGACY_ELECTRON_VERSION,
platform: 'win32',
artifactName: 'electron',
arch: archName
});
return {
electronDist
};
const buildWindowsLegacy = () => build({
platformName: 'WINDOWS',
platformType: 'nsis',
manageUpdates: true,
legacy: true,
extraConfig: {
nsis: {
artifactName: '${productName} Legacy Setup ${version} ${arch}.${ext}'
}
});
};
},
prepare: async (archName) => {
const electronDist = await downloadElectronArtifact({
version: ELECTRON_22_FINAL,
platform: 'win32',
artifactName: 'electron',
arch: archName
});
return {
electronDist
};
}
});

const buildWindowsPortable = () => build({
platformName: 'WINDOWS',
Expand Down Expand Up @@ -251,34 +257,51 @@ const buildMac = () => build({
}
});

const buildMacLegacy10131014 = () => {
// This is the last release of Electron 26
// Electron 27 dropped support for macOS 10.13 and 10.14
const LEGACY_ELECTRON_VERSION = '26.6.10';

return build({
platformName: 'MAC',
platformType: 'dmg',
manageUpdates: true,
legacy: true,
extraConfig: {
mac: {
artifactName: '${productName} Legacy 10.13 10.14 Setup ${version}.${ext}'
}
},
prepare: async (archName) => {
const electronDist = await downloadElectronArtifact({
version: LEGACY_ELECTRON_VERSION,
platform: 'darwin',
artifactName: 'electron',
arch: archName
});
return {
electronDist
};
const buildMacLegacy10131014 = () => build({
platformName: 'MAC',
platformType: 'dmg',
manageUpdates: true,
legacy: true,
extraConfig: {
mac: {
artifactName: '${productName} Legacy 10.13 10.14 Setup ${version}.${ext}'
}
});
};
},
prepare: async (archName) => {
const electronDist = await downloadElectronArtifact({
version: ELECTRON_26_FINAL,
platform: 'darwin',
artifactName: 'electron',
arch: archName
});
return {
electronDist
};
}
});

const buildMacLegacy1015 = () => build({
platformName: 'MAC',
platformType: 'dmg',
manageUpdates: true,
legacy: true,
extraConfig: {
mac: {
artifactName: '${productName} Legacy 10.15 Setup ${version}.${ext}'
}
},
prepare: async (archName) => {
const electronDist = await downloadElectronArtifact({
version: ELECTRON_32_FINAL,
platform: 'darwin',
artifactName: 'electron',
arch: archName
});
return {
electronDist
};
}
});

const buildMacDir = () => build({
platformName: 'MAC',
Expand Down Expand Up @@ -319,6 +342,7 @@ const run = async () => {
'--microsoft-store': buildMicrosoftStore,
'--mac': buildMac,
'--mac-legacy-10.13-10.14': buildMacLegacy10131014,
'--mac-legacy-10.15': buildMacLegacy1015,
'--mac-dir': buildMacDir,
'--debian': buildDebian,
'--tarball': buildTarball,
Expand Down