Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directories.output is ignored when building .dmg for a prepackaged app #1308

Closed
dperetti opened this issue Feb 27, 2017 · 15 comments · May be fixed by qcif/data-curator#563
Closed

directories.output is ignored when building .dmg for a prepackaged app #1308

dperetti opened this issue Feb 27, 2017 · 15 comments · May be fixed by qcif/data-curator#563

Comments

@dperetti
Copy link

14.2.0

mac

The build works but the resulting dmg is found at the same level as the .app, not in the /dist folder.

@debelop13
Copy link

Same problem.

The .exe is building in correct output. But .dmg not.

With "./node_modules/.bin/build --prepackaged "

@develar develar added the bug label Feb 27, 2017
@develar develar added the mac label Feb 27, 2017
@develar
Copy link
Member

develar commented Feb 27, 2017

Fixed in 14.5.1.

@dperetti
Copy link
Author

Sorry but something's wrong !

  electron-builder Spawning hdiutil convert /var/folders/ml/vzf66qnx2b714sj5dg02wddh0000gn/T/electron-builder-wgczwm/0-1-dmg/temp.dmg -format UDBZ -imagekey zlib-level=9 -o /Users/dom/Dropbox/dev/codestory/dist/darwin/mac/Code Story-1.0.4.dmg +254ms
Preparing imaging engine…
Reading Protective Master Boot Record (MBR : 0)…
Unhandled rejection Error: hdiutil exited with code 1
Error output:

hdiutil: convert failed - Invalid argument

    at ChildProcess.childProcess.once.code (/Users/dom/Dropbox/dev/codestory/node_modules/electron-builder-util/src/util.ts:134:14)
    at Object.onceWrapper (events.js:291:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:192:7)
    at maybeClose (internal/child_process.js:890:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
    at spawn (/Users/dom/Dropbox/dev/codestory/node_modules/electron-builder-util/src/util.ts:97:3)
    at /Users/dom/Dropbox/dev/codestory/node_modules/electron-builder/src/targets/dmg.ts:165:11
    at Generator.next (<anonymous>)
From previous event:

@debelop13
Copy link

I have also same problem.

But is because you have a compiled .dmg in output folder.

If you delete .dmg, works again. Anyway, before was overwritten and was better.

@develar
Copy link
Member

develar commented Feb 28, 2017

@debelop13 Fix will be pushed today.

develar added a commit to develar/electron-builder that referenced this issue Feb 28, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 28, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 28, 2017
@develar
Copy link
Member

develar commented Feb 28, 2017

Fixed in 14.5.2 MAS fixed as well.

@dperetti
Copy link
Author

Nope, still breaks in 14.5.2

In my case it's because /Users/dom/Dropbox/dev/codestory/dist/darwin/mac/ folder doesn't exist.

My directories.output = 'dist/darwin' so that's what should be used, not 'dist/darwin/mac'.

  electron-builder Spawning hdiutil convert /var/folders/ml/vzf66qnx2b714sj5dg02wddh0000gn/T/electron-builder-q5LnAy/0-1-dmg/temp.dmg -ov -format UDZO -imagekey zlib-level=9 -o /Users/dom/Dropbox/dev/codestory/dist/darwin/mac/Code Story-1.0.4.dmg +179ms
Preparing imaging engine…
Reading Protective Master Boot Record (MBR : 0)…
Unhandled rejection Error: hdiutil exited with code 1

@develar
Copy link
Member

develar commented Feb 28, 2017

@dperetti Please try 14.5.3.

My directories.output = 'dist/darwin' so that's what should be used, not 'dist/darwin/mac'.

electron-builder produces a lot of artifacts and directories.output sets not final out path. So, will be in the mac directory. Is it ok for you?

@dperetti
Copy link
Author

dperetti commented Feb 28, 2017

If I set directories: { output: 'dist/linux' } and build for linux, my appImages end up in dist/linux.
If I set directories: { output: 'dist/win32' } and build for win, my installers end up in dist/win32.
If I set directories: { output: 'dist/darwin' } and build for mac, my dmgs should end up in dist/darwin, not dist/darwin/mac !

I mean, I can leave with it a work around it, but it's not consistent.

@develar
Copy link
Member

develar commented Feb 28, 2017

and build for mac

you can build several targets in one build invocation.

@develar
Copy link
Member

develar commented Feb 28, 2017

Win and Linux are generated into the out because targets are unique. But in case of macOS, app can be for mas (App Store). So, we use subdir mac.

@develar
Copy link
Member

develar commented Feb 28, 2017

No doubt — should be a way to specify full path to generated DMG. What do you think if output option will be added to dmg?

@dperetti
Copy link
Author

Win and Linux are generated into the out because targets are unique
??
Linux Target package type: list of AppImage, snap, deb, rpm, freebsd, pacman, p5p, apk, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir.

Win Target package type: list of nsis, nsis-web (Web installer), portable (portable app without installation), appx, squirrel, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir

Mac : dmg, mas. How is this different from Linux / win multiple target options ?

@develar
Copy link
Member

develar commented Feb 28, 2017

How is this different from Linux / win multiple target options ?

Nice question. We don't build dmg for mas, so, why it is in the mac subdir except historical reasons...

@develar develar reopened this Feb 28, 2017
@develar
Copy link
Member

develar commented Feb 28, 2017

If I set directories: { output: 'dist/darwin' } and build for mac, my dmgs should end up in dist/darwin, not dist/darwin/mac !

15.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants