DMG 背景的自定义插入图标,用于 MacOSX 上的应用程序打包
2022-09-02 22:46:59
我在 MacOSX 上构建的独立程序包中为 DMG 背景添加自定义图标时遇到问题。我已经在项目的根目录中添加了一个包。自定义图标正在从中加载,但 DMG 背景图标不是。我正在使用Java fx 2.2.3和jdk1.7.0_09。下面是为相同内容生成的详细输出。
Detected JavaFX Ant API version 1.2 Launching <fx:jar> task from
/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/lib/ant-javafx.jar
Launching <fx:deploy> task from
/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home/lib/ant-javafx.jar
Copying 102 files to
/Users/apple/NetBeansProjects/JavaFXApplication2/dist Using base JDK
at: /Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk 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/apple/NetBeansProjects/JavaFXApplication2/package/macosx/javaFXApplication2.icns)
Creating app bundle:
/Users/apple/NetBeansProjects/JavaFXApplication2/dist/bundles/JavaFXApplication2.app
Config files are saved to
/var/folders/vd/nyxf14z53tx56g2_lbqcnfrr0000gn/T/build1722966263281326253.fxbundler/macosx.
Use them to customize package. Building DMG package for
JavaFXApplication2 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/apple/NetBeansProjects/JavaFXApplication2/package/macosx/javaFXApplication2.icns)
Config files are saved to
/var/folders/vd/nyxf14z53tx56g2_lbqcnfrr0000gn/T/build1722966263281326253.fxbundler/macosx.
Use them to customize package. Using default package resource [dmg
background] (add package/macosx/JavaFXApplication2-background.png to
the class path to customize) Using custom package resource [volume
icon] (loaded from file
/Users/apple/NetBeansProjects/JavaFXApplication2/package/macosx/javaFXApplication2.icns)
Using default package resource [script to run after application
image is populated] (add
package/macosx/JavaFXApplication2-post-image.sh to the class path to
customize) Using default package resource [DMG setup script] (add
package/macosx/JavaFXApplication2-dmg-setup.scpt to the class path
to customize) Result DMG installer for JavaFXApplication2:
/Users/apple/NetBeansProjects/JavaFXApplication2/dist/bundles/JavaFXApplication2.dmg
Config files are saved to
/var/folders/vd/nyxf14z53tx56g2_lbqcnfrr0000gn/T/build1722966263281326253.fxbundler/macosx.
Use them to customize package.
以下是列出我所有图标文件的目录:-
Apples-MacBook-Pro-2:~ apple$ ls -l /Users/apple/NetBeansProjects/JavaFXApplication2/package/macosx/
total 136
-rw-r--r--@ 1 apple staff 1251 Nov 1 19:02 Info.plist
-rw-r--r-- 1 apple staff 18017 Nov 1 18:22 JavaFXApplication2-background.png
-rw-r--r--@ 1 apple staff 902 Nov 2 13:55 JavaFXApplication2-dmg-setup.scpt
-rw-r--r-- 1 apple staff 38115 Jan 19 2006 JavaFXApplication2.icns
如您所见,图标是从包中加载的,但DMG背景文件不是,即使我也在同一目录中添加了该文件。