Skip to content

Commit 4002b72

Browse files
rodrigoB-CBjuliusmarminge
authored andcommitted
feat(desktop): add signal DMG installer background
1 parent 2cb1a26 commit 4002b72

5 files changed

Lines changed: 108 additions & 0 deletions

File tree

183 KB
Loading
Lines changed: 77 additions & 0 deletions
Loading
655 KB
Loading

‎scripts/build-desktop-artifact.test.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,17 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
463463
"**/node_modules/.bin",
464464
"**/node_modules/.bin/**",
465465
]);
466+
assert.deepStrictEqual(mac.dmg, {
467+
title: "T3 Code (Alpha) 1.2.3 Installer",
468+
background: "dmg/dmg-background-signal.png",
469+
window: { width: 540, height: 380 },
470+
contents: [
471+
{ x: 130, y: 220, type: "file" },
472+
{ x: 410, y: 220, type: "link", path: "/Applications" },
473+
],
474+
iconSize: 80,
475+
iconTextSize: 12,
476+
});
466477
// Linux must register the renderer schemes so the generated .desktop
467478
// entry advertises MimeType=x-scheme-handler/t3code; for OAuth deep links.
468479
assert.deepStrictEqual((linux.linux as Record<string, unknown>).protocols, [

‎scripts/build-desktop-artifact.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,26 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
20392039
};
20402040
}
20412041

2042+
if (platform === "mac" && target === "dmg") {
2043+
buildConfig.dmg = {
2044+
// Give the themed installer its own Finder volume name. Finder caches
2045+
// DMG window backgrounds by volume name, so reusing a generic name can
2046+
// make a newly built background look unchanged during testing.
2047+
title: `${resolveDesktopProductName(version)} ${version} Installer`,
2048+
background: "dmg/dmg-background-signal.png",
2049+
window: {
2050+
width: 540,
2051+
height: 380,
2052+
},
2053+
contents: [
2054+
{ x: 130, y: 220, type: "file" },
2055+
{ x: 410, y: 220, type: "link", path: "/Applications" },
2056+
],
2057+
iconSize: 80,
2058+
iconTextSize: 12,
2059+
};
2060+
}
2061+
20422062
if (platform === "linux") {
20432063
buildConfig.linux = {
20442064
target: [target],

0 commit comments

Comments
 (0)