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.
Summary: | [50cat] Branding application: Icon (*.icn) of windows-launcher(*.exe) | ||
---|---|---|---|
Product: | apisupport | Reporter: | lordy <lordy> |
Component: | Harness | Assignee: | Martin Kozeny <mkozeny> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | anebuzelsky, bleonard, ecerulm, geertjan, jglick, oyarzun, tomwheeler |
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows ME/2000 | ||
URL: | http://stackoverflow.com/questions/8659286/replacing-icon-in-windows-exe-from-open-source-platform-independent-java-code | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
lordy
2005-09-18 18:14:54 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. *** Issue 70559 has been marked as a duplicate of this issue. *** *** Issue 79235 has been marked as a duplicate of this issue. *** *** Issue 83287 has been marked as a duplicate of this issue. *** 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. *** Issue 118066 has been marked as a duplicate of this issue. *** *** Issue 136365 has been marked as a duplicate of this issue. *** 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> 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. I asked on stackoverflow whether there is a suitable library out there. Someone mentioned http://pecoff4j.sourceforge.net/ which might work. Have not tried it myself. 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 (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 |