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

Discussion in 'B4J Questions' started by Eric Baker, Jan 3, 2018.

  1. Eric Baker

    Eric Baker Member Licensed User

    Trying to use B4JPackager on Mac OS High Sierra

    In the end I get the following error:

    Code:
    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Test it with v1.50: UI apps packaging - self contained installers
    It might show more information in the logs.

    I tested the new version on a Mac. The dmg was created successfully although it did show a different error in the logs.
     
  3. Eric Baker

    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:

    Code:
    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
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    It looks like it failed to find the icon file.
     
  5. Eric Baker

    Eric Baker Member Licensed User

    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.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Eric Baker likes this.
  7. Eric Baker

    Eric Baker Member Licensed User

    We Have a Winner!!

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

    Code:
    packageExtension = "pkg"
    Thank you very much, Erel! :)
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice