This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 64612 - [50cat] Branding application: Icon (*.icn) of windows-launcher(*.exe)
Summary: [50cat] Branding application: Icon (*.icn) of windows-launcher(*.exe)
Status: RESOLVED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P3 blocker with 9 votes (vote)
Assignee: Martin Kozeny
URL: http://stackoverflow.com/questions/86...
Keywords:
: 79235 83287 118066 136365 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-18 18:14 UTC by lordy
Modified: 2014-09-03 04:10 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lordy 2005-09-18 18:14:54 UTC
[ BUILD # : 200509151800 ]
[ JDK VERSION : 1.5.0_02 ]

The Icon which set in "Basic Branding" in the Project Properties 
Dialog should also use for the windows-launcher.

I research about the topic a little and found many problems that 
must solve for this issue.

First of all the icn support. I only found Jimi(http://
java.sun.com/products/jimi/) for icn support. But i think the jre 
also must support icn for Java Web Start, so i found 
com.sun.javaws.IcoEncoder in Mustang sources. 

Secound there must be create a lib that can edit the windows 
exe resources. 

Maybe it is more simple to bundle NetBeans with some binary 
programms like windres to set the icon of a .exe.
Comment 1 Jesse Glick 2005-09-19 22:51:32 UTC
Not in 5.0. As you found, it is not easy to do. We have thought about various
options, including just replacing a fixed byte sequence in the *.exe file, but
have not had time to do anything yet.
Comment 2 rmatous 2006-02-24 10:48:36 UTC
*** Issue 70559 has been marked as a duplicate of this issue. ***
Comment 3 Jesse Glick 2006-07-11 23:59:22 UTC
*** Issue 79235 has been marked as a duplicate of this issue. ***
Comment 4 Jesse Glick 2006-08-23 19:06:16 UTC
*** Issue 83287 has been marked as a duplicate of this issue. ***
Comment 5 tomwheeler 2007-12-11 00:39:35 UTC
I need this in my build as well.  I am able to it with "reshacker" (http://www.angusj.com/resourcehacker/) during my
build, at least under Win32.  Still, I'd like a better way and preferably one that other people are using.
Comment 6 Jesse Glick 2008-05-14 20:35:04 UTC
*** Issue 118066 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2008-06-04 17:08:12 UTC
*** Issue 136365 has been marked as a duplicate of this issue. ***
Comment 8 crosati 2011-01-04 10:27:02 UTC
I've found the following workaround (using NetBeans 7.0beta):

1. copy the ${harness.dir}/launchers/app.exe to <your-project>/application/launchers/app.exe

2. follow the instructions at http://wiki.netbeans.org/DevFaqExecutableIcon to change the icon of the just copied app.exe file

3. add the following to <your-project>/build.xml

  <target name="build-launchers" depends="suite.build-launchers">
    <antcall target="replace-windows-launcher"/>
  </target>

  <target name="replace-windows-launcher" description="Replace the Windows launcher exe">
    <copy file="application/launchers/app.exe" tofile="build/launcher/bin/${app.name}.exe" overwrite="true" failonerror="false"/>
  </target>
Comment 9 Antonin Nebuzelsky 2011-08-24 08:46:20 UTC
I don't see a reliable way of implementing this enhancement. None of the exe file icon modification utilities mentioned in the issue and in the FAQ is a component we would like to bundle with NetBeans. Also relying on the user specifying a path to separately installed utility is not the way to go. It is better to let the users follow the how-to in the FAQ which can be updated anytime in future.
Comment 10 Jesse Glick 2011-12-28 17:41:24 UTC
I asked on stackoverflow whether there is a suitable library out there.
Comment 11 Jesse Glick 2014-03-31 22:34:56 UTC
Someone mentioned http://pecoff4j.sourceforge.net/ which might work. Have not tried it myself.
Comment 12 oyarzun 2014-07-02 15:03:59 UTC
Would it not be possible to leverage the Eclipse project's IconExe java application to replace the windows icon in app.exe and app64.exe. This would allow having a branded icon for windows and build the installer on a non-windows platform. 


http://git.eclipse.org/c/equinox/rt.equinox.p2.git/tree/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/pde/internal/swt/tools/IconExe.java


The app.exe and app64.exe in Netbeans seem to have the follow icons in the resource section:
48 x 48 32bit
32 x 31 32bit
48 x 48 8bit
31 x 31 8bit
16 x 16 8bit

I'm guessing the 32 x 31 size is a mistake.

Meanwhile netbeans.exe and netbeans64.exe contains the following icons:
48 x 48 4bit
32 x 32 4bit
24 x 24 4bit
16 x 16 4bit
48 x 48 8bit
32 x 32 8bit
24 x 24 8bit
16 x 16 8bit
256 x 256 32bit
48 x 48 32bit
32 x 32 32bit
24 x 24 32bit
16 x 16 32bit
Comment 13 Jesse Glick 2014-09-03 04:10:10 UTC
(In reply to oyarzun from comment #12)
> Would it not be possible to leverage the Eclipse project's IconExe …

http://stackoverflow.com/questions/8659286/replacing-icon-in-windows-exe-from-open-source-platform-independent-java-code#comment38035274_24519263