jpackage custom resources not found
Kustaa Nyholm
kustaa.nyholm at sparetimelabs.com
Tue Jan 15 14:23:18 UTC 2019
> On 15 Jan 2019, at 16.11, Andy Herrick <andy.herrick at oracle.com> wrote:
>
> You can do this all in one step "${PACKAGER} create-installer dmg <options>"
Thank you for you help, I appreciate it.
I tested above and it fails with what looks suspiciously same error I was experiencing with
javapackager and jpackager, see below. I suspect this is related to High Sierra
as I did not have these problems in my Yosemite machine.
This is really not an issue for me because IIRC the resulting DMG did
not have the version number of the application in the applications name
which is what I prefer so I had to unpack the DMG anyway, change the
file name and recreate the DMD thus I have all that machinery in place
and it is actually simpler to start from the .app and not .dmg.
Also IIRC there was an issue with the volume icon back then, obviously
I've not checked if the is the case with jpackage.
wbr Kusti
[exec] Building DMG package for EazyCNC
[exec] Building PKG package for EazyCNC
[exec] Using custom package resource [icon] (loaded from EazyCNC.icns)
[exec] Preparing Info.plist: /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625/EazyCNC.app/Contents/Info.plist
[exec] Using custom package resource [Application Info.plist] (loaded from Info.plist)
[exec] Using default package resource Runtime-Info.plist.template [Java Runtime Info.plist] (add Runtime-Info.plist to the resource-dir to customize)
[exec] Using custom package resource [pkg background image] (loaded from EazyCNC-background.png)
[exec] Preparing distribution.dist: /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/distribution.dist
[exec] no default package resource [script to run after application image is populated] (add EazyCNC-post-image.sh to the resource-dir to customize)
[exec] Running [pkgbuild, --component, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625/EazyCNC.app, --install-location, /Applications, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/packages/EazyCNC-app.pkg]
[exec] pkgbuild: Adding component at /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625/EazyCNC.app
[exec] pkgbuild: Wrote package to /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/packages/EazyCNC-app.pkg
[exec] Running [productbuild, --resources, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config, --distribution, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/distribution.dist, --package-path, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/packages, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625/EazyCNC-1.0.pkg]
[exec] productbuild: Wrote product to /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625/EazyCNC-1.0.pkg
[exec] Using custom package resource [dmg background] (loaded from EazyCNC-background.png)
[exec] Using custom package resource [volume icon] (loaded from EazyCNC-volume.icns)
[exec] no default package resource [script to run after application image is populated] (add EazyCNC-post-image.sh to the resource-dir to customize)
[exec] Preparing dmg setup: /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/EazyCNC-dmg-setup.scpt
[exec] Using custom package resource [DMG setup script] (loaded from EazyCNC-dmg-setup.scpt)
[exec] Creating DMG file: /Users/nyholku/EazyCNC-Project/./EazyCNC-1.0.dmg
[exec] Running [/usr/bin/hdiutil, create, -quiet, -srcfolder, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/image-15938535375331734625, -volname, EazyCNC, -ov, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/EazyCNC-tmp.dmg, -fs, HFS+, -format, UDRW]
[exec] Running [/usr/bin/hdiutil, attach, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images/EazyCNC-tmp.dmg, -quiet, -mountroot, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/images]
[exec] Running [osascript, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/EazyCNC-dmg-setup.scpt]
[exec] /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/EazyCNC-dmg-setup.scpt:631:738: execution error: Finder got an error: The operation can’t be completed because there is already an item with that name. (-48)
[exec] java.io.IOException: Exec failed with code 1 command [[osascript, /var/folders/p_/pl6_ggsn1l91rhjklbxk__rcs_tcs9/T/jdk.jpackage14173979925146552856/config/EazyCNC-dmg-setup.scpt] in unspecified directory
[exec] at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:245)
[exec] at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:216)
[exec] at jdk.jpackage/jdk.jpackage.internal.IOUtils.exec(IOUtils.java:211)
[exec] at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.buildDMG(MacDmgBundler.java:316)
[exec] at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:83)
[exec] at jdk.jpackage/jdk.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:477)
[exec] at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:738)
[exec] at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:672)
[exec] at jdk.jpackage/jdk.jpackage.main.Main.run(Main.java:90)
[exec] at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
[exec] jdk.jpackage.internal.PackagerException: Error: Bundler "DMG Installer" (dmg) failed to produce a bundle.
[exec] at jdk.jpackage/jdk.jpackage.internal.Arguments.generateBundle(Arguments.java:744)
[exec] at jdk.jpackage/jdk.jpackage.internal.Arguments.processArguments(Arguments.java:672)
[exec] at jdk.jpackage/jdk.jpackage.main.Main.run(Main.java:90)
[exec] at jdk.jpackage/jdk.jpackage.main.Main.main(Main.java:53)
More information about the core-libs-dev
mailing list