Skip to content

Commit

Permalink
Add legacy build for macOS 10.15
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Feb 6, 2025
1 parent fc4d287 commit e924934
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
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
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
29 changes: 29 additions & 0 deletions release-automation/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ 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 @@ -275,6 +280,29 @@ const buildMacLegacy10131014 = () => build({
}
});

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',
platformType: 'dir',
Expand Down Expand Up @@ -314,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

0 comments on commit e924934

Please sign in to comment.