JavaFX打包的应用程序在MacOSX“应用程序”文件夹中没有图标

时间:2014-06-11 09:15:55

标签: java macos javafx icons finder

我有一个Java应用程序在MacOSX 10.6上打包的Java应用程序;安装完成后,我在finder栏中有一个漂亮的图标,但不在" Applications"文件夹,图标就像"施工"。

=>如何更改"应用程序"中的图标?文件夹? =>这是一个特殊的" icns"格式,可以支持在启动时显示应用程序图标,但不支持"应用程序"文件夹?

感谢您的帮助......

我的build.xml文件:     

<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
         uri="javafx:com.sun.javafx.tools.ant"
         classpath=".:${java.home}/../lib/ant-javafx.jar" />


<property name="bin" value="my_private_bin"/>
<property name="main.class" value="my.private.MainClass"/>
<property name="application.title" value="my_private_title"/>
<property name="application.vendor" value="my_private_vendor"/>
<property name="application.version" value="1.0.0"/>


<target name="clean">
    <delete dir="target/package-jar"/>
    <delete dir="target/package-deploy"/>
</target>

<target name="jar">
    <fx:jar destfile="target/package-jar/my_app.jar">
        <fx:application mainClass="${main.class}" name ="${bin}"/>
        <fx:resources>
            <fx:fileset dir="target/libs/" includes="*.jar"/>
            <fx:fileset dir="${java.home}/lib/ext/" includes="sunpkcs11.jar"/>
        </fx:resources>

        <fx:platform javafx="2.1+">
            <property name="user.language" value="fr"/>
            <property name="user.country" value="CH"/>
        </fx:platform>

        <fileset dir="target/classes/"/>

        <manifest>
            <attribute name="Implementation-Vendor" value="${application.vendor}"/>
            <attribute name="Implementation-Version" value="${application.version}"/>
        </manifest>
    </fx:jar>
</target>

<target name="deploy">
    <fx:deploy nativeBundles="all" verbose="true" outdir="target/package-deploy" outfile="${bin}">
        <fx:info title="${application.title}" vendor="${application.vendor}"/>
        <fx:application name="${application.title}" mainClass="${main.class}"/>
        <fx:resources>
            <fx:fileset dir="target/package-jar" includes="*.jar"/>
            <fx:fileset dir="target/libs/" includes="*.jar"/>
            <fx:fileset dir="${java.home}/lib/ext/" includes="sunpkcs11.jar"/>
        </fx:resources>
    </fx:deploy>
</target>

我还有一个&#39;包裹&#39;文件夹:

  • 包/ MacOSX的/ Info.plist中
  • 包/ MacOSX的/ MyApp.icns
  • 包/ MacOSX的/ MyApp的-background.png
  • 包/ MacOSX的/ MyApp的-volume.icns
  • 包/窗/ MyApp.ico
  • 包/窗/ MyApp的-设置-icon.bmp

0 个答案:

没有答案