B4J Question Using B4JPackager - Bundler "DMG Installer" (dmg) failed to produce a bundle

Eric Baker

Member
Licensed User
Trying to use B4JPackager on Mac OS High Sierra

In the end I get the following error:

B4X:
Erics-MacBook-Air:Desktop Eric$ java -jar B4JPackager.jar
App identifier: xxxx.asap.main
Success: true
StdOut: No base JDK. Package will use system JRE.
No base JDK. Package will use system JRE.
Building DMG package for XXXX
Did not find a key matching 'Developer ID Application: '

StdErr: Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.

ExitCode: 255
Some googling indicates, that this seems to be some code signing, or gatekeeper issue?

Any ideas how to do this the easy way?

Eric
 

Eric Baker

Member
Licensed User
Tried it with 1.50

Had to install xcode as i needed to agree to its terms and conditions according to the previous logs

Here is my current log:

B4X:
Erics-MacBook-Air:Desktop Eric$ java -jar B4JPackager.jar
App identifier: poco.asap.main
No base JDK. Package will use system JRE.

Skip jar copy to itself: PocoASAP.jar

No base JDK. Package will use system JRE.

Building DMG package for POCOASAP

Preparing Info.plist: /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/macosx/Info.plist

  Using default package resource [Bundle config file]  (add package/macosx/Info.plist to the class path to customize)

   Using custom package resource [icon]  (loaded from file /Users/Eric/Desktop/Poco-Icon.png.icns)

Running [security, find-certificate, -c, Developer ID Application: , -a]

Did not find a key matching 'Developer ID Application: '

  Config files are saved to /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/macosx. Use them to customize package.

  Using default package resource [dmg background]  (add package/macosx/POCOASAP-background.png to the class path to customize)

   Using custom package resource [volume icon]  (loaded from file /Users/Eric/Desktop/Poco-Icon.png.icns)

Using default package resource [script to run after application image is populated]  (add package/macosx/POCOASAP-post-image.sh to the class path to customize)

Preparing dmg setup: /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/macosx/POCOASAP-dmg-setup.scpt

  Using default package resource [DMG setup script]  (add package/macosx/POCOASAP-dmg-setup.scpt to the class path to customize)

 Creating DMG file: /Users/Eric/Desktop/bundles/POCOASAP-1.0.dmg

Running [/usr/bin/hdiutil, create, -quiet, -srcfolder, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/image-6769592963993175810, -volname, POCOASAP, -ov, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/POCOASAP-tmp.dmg, -format, UDRW]

Running [/usr/bin/hdiutil, attach, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/POCOASAP-tmp.dmg, -quiet, -mountroot, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images]

Running [osascript, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/macosx/POCOASAP-dmg-setup.scpt]

Running [/usr/bin/SetFile, -c, icnC, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/POCOASAP/.VolumeIcon.icns]

ERROR: File Not Found. (-43)  on file: /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/POCOASAP/.VolumeIcon.icns

java.io.IOException: Exec failed with code 2 command [[/usr/bin/SetFile, -c, icnC, /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/images/POCOASAP/.VolumeIcon.icns] in unspecified directory

    at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:165)

    at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:138)
    at com.oracle.tools.packager.IOUtils.exec(IOUtils.java:132)

    at com.oracle.tools.packager.mac.MacDmgBundler.buildDMG(MacDmgBundler.java:391)
    at com.oracle.tools.packager.mac.MacDmgBundler.bundle(MacDmgBundler.java:92)

    at com.oracle.tools.packager.mac.MacDmgBundler.execute(MacDmgBundler.java:549)
    at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:352)
    at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)

    at com.sun.javafx.tools.packager.Main.main(Main.java:476)

  Config files are saved to /var/folders/1y/nnnjzt152t75cp8sbmdk0qs80000gp/T/fxbundler7769525567310914391/macosx. Use them to customize package.

Exception in thread "main"
com.sun.javafx.tools.packager.PackagerException: Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.
    at com.sun.javafx.tools.packager.PackagerLib.generateNativeBundles(PackagerLib.java:354)
    at com.sun.javafx.tools.packager.PackagerLib.generateDeploymentPackages(PackagerLib.java:319)
    at com.sun.javafx.tools.packager.Main.main(Main.java:476)

Success: true
ExitCode: 1
 

Eric Baker

Member
Licensed User
It looks like it failed to find the icon file.
It does seem so. There is no ".VolumeIcon.icns" in that directory indicated.

B4JPackager seems to find it, as during the process a dmg file gets generated and mounted, asking me to drag my app icon onto the applications folder.
 

Erel

Administrator
Staff member
Licensed User

Eric Baker

Member
Licensed User
You can also try to change the packageExtension (in B4JPackager) from dmg to pkg. I haven't tried it.
We Have a Winner!!

I changed the package extension to pkg, and it ran without error and I got a nice installer.

B4X:
packageExtension = "pkg"
Thank you very much, Erel! :)
 
Top