Description
Which version of electron-builder are you using?
- 20.44.4:
What target are you building for?
- Mac(dmg):
I'm on MacOs 10.15 (beta2). While trying to build dmg I get following exception:
Error: Exit code: 2. Command failed: /usr/bin/perl /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4/darwin-thread-multi-2level /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4/darwin-thread-multi-2level /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
Possible issue with Perl on new Mac OS?
Activity
[-]Building on macOs 10.15 fails. Can't locate Mac/Memory.pm [/-][+]Building on macOS 10.15 fails. Can't locate Mac/Memory.pm [/+]nielsoo commentedon Jun 25, 2019
I am on macOS beta 2 as well having the same issue here... using electron-builder@20.44.4 / electron@4.2.5
rickythink commentedon Jul 1, 2019
same issue
internetztube commentedon Jul 1, 2019
same here
develar commentedon Jul 1, 2019
Guys, today I am going to setup my Raspberry PI and make snap for ARM working. Then, later this week, I will take a look on this issue. Sorry for delay, if it is important for you, you can send PR or donation.
UdaraJay commentedon Jul 1, 2019
Same issue; pretty sure it's related to Catalina not shipping with Perl installed.
I tried installing it myself, but Mac::Carbon and Mac::Memory don't install on 64bit Perl. Went as far as trying to rebuild Perl for 32bit, but looks liked xCode deprecated building for 32bit altogether.
dotconnor commentedon Jul 2, 2019
Not only xcode but look like the entire operating system doesn't allow 32bit programs. Running
wine
to build for win32 or just usingwine
by itself doesn't work:alchaplinsky commentedon Jul 2, 2019
@dotconnor Yup, you're right macOS Catalina does not Support 32-bit Apps.
UdaraJay commentedon Jul 2, 2019
Also, for anyone that stumbles into this; this is only a problem when trying to package you app into a
dmg
. It works fine if you make apkg
instead (more recommended to distribute apps as packages anyways).*May be different if you're distributing into the mac app store.
develar commentedon Jul 2, 2019
Yes, it is only for DMG, because no official tool and open API to perform customization of DMG. electron-builder uses 3rd-party solution, that written in Perl. Should be ported to Go language (from this perl code or from python).
danielhuoo commentedon Jul 16, 2019
@UdaraJay Thanks a lot.
And to whom don't know how to build
pkg
instead ofdmg
, you could edit thepackage.json
:develar commentedon Jul 18, 2019
All existing solutions, including appdmg, are bad and cannot help to create correctly positioned DMG Windows. Problem — window position is computed from bottom, and not from top. So, as you don't know user display screen height, you cannot correctly set window bounds.
If you will set only size, then Finder will ignore size, and your background image will look ugly.
Apple keep silent and don't provide not only tool to customize DMG, but even docs about DSStore format.
Irony that used by electron-builder solution in Perl is able to set windows position from top because uses deprecated format. And now Apple killed mac carbon 32-bit completely. Enjoy :(
As I don't have time to convert Perl solution in Go (as Go is the only language that should be used for such tools, forget about nodejs or python), for now following solution is implemented:
x
is set to400
(as before), andy
is set to(1440 - backgroundHeight) / 2
wherebackgroundHeight
it is computed automatically height of specified background image. Yes, assumed that1440
it is height of user display (lesser of two evils).I do not have time and plans to implement decent solution (as it was in Perl). First, because Perl solution format is deprecated for ages already, and maybe Apple will drop it sometime. Second, burn in hell, Apple (yes, it seems Apple don't care about developers who don't distribute apps via AppStore).
DropDMG app creates correctly positioned DMG windows. Maybe I will ask ability to reuse DropDMG CLI / support it.
Release will be in 2 days.
55 remaining items