Skip to content
Merged
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
Binary file added apps/desktop/build/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/desktop/build/background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/desktop/electron-builder.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ export default {
},
},
dmg: {
title: 'Maka Installer',
// Relative to electron-builder's default buildResources directory (build/).
background: 'background.png',
window: { width: 540, height: 380 },
iconSize: 112,
iconTextSize: 16,
contents: [
{ x: 130, y: 190, type: 'file' },
{ x: 410, y: 190, type: 'link', path: '/Applications' },
],
sign: true,
// Stapling the notarization ticket after electron-builder exits changes the
// DMG bytes. macOS updates use the ZIP, so do not publish a stale DMG hash
Expand Down
13 changes: 13 additions & 0 deletions scripts/product-release.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,19 @@ test('Desktop packaging does not distribute the retired bundled Git runtime', ()
);
});

test('macOS DMG ships correctly sized background assets', async () => {
const backgroundDirectory = join(repoRoot, 'apps', 'desktop', 'build');
const pngSignature = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
for (const [name, dimensions] of [
['background.png', { width: 540, height: 380 }],
['background@2x.png', { width: 1080, height: 760 }],
]) {
const data = await readFile(join(backgroundDirectory, name));
assert.deepEqual(data.subarray(0, pngSignature.length), pngSignature, `${name} must be a PNG`);
assert.deepEqual({ width: data.readUInt32BE(16), height: data.readUInt32BE(20) }, dimensions);
}
});

test('a successful Windows upgrade invalidates stale backup authority before best-effort cleanup', async () => {
const source = await readFile(
join(repoRoot, 'apps', 'desktop', 'build', 'installer.nsh'),
Expand Down