electron-userland / electron-installer-dmg

Create DMG installers for your electron apps using appdmg.

Home Page:https://github.com/electron-userland/electron-installer-dmg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't set window size for DMG-Installer

ms4ever7 opened this issue · comments

I am using ember electron to create my app , but i am having problem with macOS installer. To build my app i am using ember electron:make command and it takes options from eletron-forge-config.js file.I was trying to set a background image for dmg-installer, and as my image has size 600x571 , i set same window size.
But somehow it resized my image and my windows became 600x571, but image 450x427.
Then I tried to resize window size to 450x427 , but now it not resizing at all.
Here is my code now for dmg installer:
electronInstallerDMG: { title: 'DyeGraph', background: 'public/assets/images/logo.png', icon: '/Users/roman.blyztsiv/projects/dyegraph/public/assets/images/logo.png', window: { width: 450, height: 427 }, contents: [ { 'x': 94, 'y': 260, 'type': 'file', 'path': '/Users/roman.blyztsiv/projects/dyegraph/electron-out/DyeGraph-darwin-x64/DyeGraph.app' }, { 'x': 355, 'y': 260, 'type': 'link', 'path': '/Applications' } ] },
I was trying to make everything like here , but nothing is happening

same problem, but maybe is an ember-electron issue

@ms4ever7 @debelop13 did you guys figure out how to solve this? i have similar issue #21

i will not propose any PR for patch that but my tricks was to use the exactly same png background proportion 658 × 498

I think this is an ember-electron issue. Looking at the code for electron-installer-dmg, it uses appdmg behind the scenes, but currently only has specific settings enabled (they list them in the README). They have NOT enabled several, including Window (sets the window size) or Contents (sets the location of the icons in the installation window), unfortunately. It would be an easy addition, though it seems there has been no activity on this project for almost a year, so it isn't likely to get in. Currently the only thing one can do is what @sifrah suggested, which is to make your image exactly 658 x 498. Or make your own modification to the library. :)