4

I'm trying to create a native OS X app bundle for a JavaFX app using IntelliJ IDEA 14. I have set up an "Artifact" with the native bundle option set to dmg. This does create a native bundle, but I cannot seem to find a way to change the application icon. How should I go about achieving this?

I have tried placing it in the following directories based on other answers: src/main/deploy/packages/macosx/project_name.icns src/project_package_path/deploy/packages/project_name.icns

I cannot seem to find definitive information on IntelliJ's website on changing the icon either.

Salman Arif
  • 105
  • 5
  • 1
    I am not sure if you can do that by using the `Packaging JavaFX applications` service of IntelliJ. Even if you can, it is not documented. You can try using one of the packaging tools mentioned in [this answer](http://stackoverflow.com/questions/30145772/what-is-the-best-way-to-deploy-javafx-application-create-jar-and-self-contained/30162808#30162808). – ItachiUchiha Jul 16 '15 at 10:42

1 Answers1

0

I am testing an app in the app store and wanted to ensure that I got the icon set up correctly too.

If you are using the javafx ant task library you can do the following:

Place your icns file in your project root directory in package/macosx/project_name.icns

Modify your ant buildfile to include the project root in the classpath.

example:

enable verbose output for the fx:deploy task.

Open a terminal and run ant for your project.

output should contain: Building DMG package for project_name 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 package/macosx/project_name.icns on class path)

madeyejm
  • 472
  • 3
  • 14