-
Bug
-
Resolution: Fixed
-
P4
-
7u10
-
Win7 64, JDK7u10
According to https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7#7 it should be possible to define custom icon (system dependent) to be used in native packager by passing <fx:icon> to <fx:deploy> task. (Before 7u10 there was an alternative way based on providing drop-in resourced in package/windows (macos..) subdirectory).
To support custom icons with native packager in NetBeans we rely on the <fx:icon> approach, however it seems not to work as expected.
Upon preliminary investigation we found in 2.2.4 FX sources the following. The <fx:deploy> Ant task defined in packager\src\com\sun\javafx\tools\ant\DeployFXTask.java actually calls generateDeploymentPackages(DeployParams deployParams) in packager\src\com\sun\javafx\tools\packager\PackagerLib.java where deployParams does contain the icon related info. Inside generateDeploymentPackages() the following gets called:
BundleParams bp = deployParams.getBundleParams();
if (bp != null) {
generateNativeBundles(deployParams.outdir, bp, deployParams.verbose);
}
so I checked DeployParams.getBundleParams() but here to my surprise (although I could see that the icon reference is passed all the way through to DeployParams) a BundleParams object is constructed but no icon is passed to it from DeployParams, (the setIcon() setter is never called in BundleParams ). So when BundleParams is later passed to the concrete Bundler implementation, there is no trace of any icon in it. This seems incorrect. This observation is supported by the fact that we did not succeed in passing a custom icon to native bundler using <fx:icon>.
To support custom icons with native packager in NetBeans we rely on the <fx:icon> approach, however it seems not to work as expected.
Upon preliminary investigation we found in 2.2.4 FX sources the following. The <fx:deploy> Ant task defined in packager\src\com\sun\javafx\tools\ant\DeployFXTask.java actually calls generateDeploymentPackages(DeployParams deployParams) in packager\src\com\sun\javafx\tools\packager\PackagerLib.java where deployParams does contain the icon related info. Inside generateDeploymentPackages() the following gets called:
BundleParams bp = deployParams.getBundleParams();
if (bp != null) {
generateNativeBundles(deployParams.outdir, bp, deployParams.verbose);
}
so I checked DeployParams.getBundleParams() but here to my surprise (although I could see that the icon reference is passed all the way through to DeployParams) a BundleParams object is constructed but no icon is passed to it from DeployParams, (the setIcon() setter is never called in BundleParams ). So when BundleParams is later passed to the concrete Bundler implementation, there is no trace of any icon in it. This seems incorrect. This observation is supported by the fact that we did not succeed in passing a custom icon to native bundler using <fx:icon>.