Skip to content

Commit 0cd7f59

Browse files
authored
Merge pull request #10194 from maximumschmidt/improve-mac-dmg-installer
Improve macOS DMG installer usability
2 parents 52b1727 + 512a950 commit 0cd7f59

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

build/background.png

11 KB
Loading

packaging/electron-builder.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ mac:
3434
extraFiles:
3535
- build/signing-config-mac.yaml
3636
- { from: dist/electron-builder.yaml, to: electron-builder.yml }
37+
dmg:
38+
# title is set programmatically in scripts/package.ts so we can include the
39+
# architecture (electron-builder's title macros don't expose ${arch}).
40+
background: build/background.png
41+
window:
42+
width: 540
43+
height: 380
44+
contents:
45+
- { x: 140, y: 200, type: file }
46+
- { x: 400, y: 200, type: link, path: /Applications }
47+
iconSize: 100
48+
iconTextSize: 14
3749
win:
3850
target: [ zip ]
3951
signtoolOptions:

scripts/package.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ class Builder {
190190
}
191191

192192
_.set(config, 'extraMetadata.version', version);
193+
194+
if (electronPlatform === 'mac') {
195+
_.set(config, 'dmg.title', `Install Rancher Desktop ${ version }-${ buildUtils.arch }`);
196+
}
197+
193198
await fs.promises.writeFile(configPath, yaml.stringify(config), 'utf-8');
194199

195200
config.afterPack = this.afterPack.bind(this);

0 commit comments

Comments
 (0)