Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 102028 - Launcher icon ignored in product export for RC4
Summary: Launcher icon ignored in product export for RC4
Status: RESOLVED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-28 11:06 EDT by Patrick Paulin CLA
Modified: 2011-02-17 09:01 EST (History)
12 users (show)

See Also:


Attachments
The icon I try to attach to the generated exe file (24.62 KB, application/octet-stream)
2005-10-13 16:59 EDT, Jose M Beleta CLA
no flags Details
ICO which does not become part of "exclipse.exe" file after exporting (3.19 KB, application/octet-stream)
2005-11-30 14:27 EST, Jason Miller CLA
no flags Details
3 ico files that allows to brand eclipse.exe (22.84 KB, application/octet-stream)
2005-11-30 16:34 EST, Pascal Rapicault CLA
no flags Details
Sample plugin used to test (21.81 KB, application/octet-stream)
2005-12-13 16:18 EST, Andrew Niefer CLA
no flags Details
Workspace dir that shows problem on my machine (428.32 KB, application/zip)
2005-12-21 10:46 EST, Jason Miller CLA
no flags Details
The problematic project (12.35 KB, application/zip)
2005-12-21 20:40 EST, Jose M Beleta CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Paulin CLA 2005-06-28 11:06:29 EDT
Launcher icon is defaulting to Eclipse icon when using product export under 3.1 
RC4 / Windows XP. I tried specifying both an icon and a set of bitmaps. The 
Eclipse icon was used in both cases.

I know this is close to the wire, but it would be sad to see this new 
functionality get released with a hole like this.
Comment 1 Nick Edgar CLA 2005-06-30 13:31:30 EDT
In the rcp newsgroup topic "Executable icon", Bob Foster says this works for him
using RC2.  However, see bug 102259.

 
Comment 2 Patrick Paulin CLA 2005-07-01 13:18:09 EDT
It turned out to be a image format issue. I was supplying 16-color and 256-
color images, but not the 32-bit image that Windows XP was expecting.

This was a little confusing, given the help text in the product config editor:

"Provide BMP images for low (16-color) and high (256-color) graphics"


Comment 3 Michal Tkacz CLA 2005-07-04 05:07:15 EDT
Do you mean that images should in all cases be 32-bit bitmaps? But that would
mean that each size has to be provided twice (once for "Low" and once for
"High"). I don't think it was supposed to work this way. And even if it's only a
help text being wrong, I still consider it to be a bug. Can anyone from PDE team
investigate it further, please?
Comment 4 Nick Edgar CLA 2005-07-04 09:57:53 EDT
Reopening to allow the PDE team to consider this.
Comment 5 Patrick Paulin CLA 2005-07-04 13:11:37 EDT
I don't mean that all images must be 32-bit images, only that a 32-bit image
must be included for display on Windows XP.

I think the issue may be that there needs to be 9 slots for bitmaps instead of
6. I've switched to using an icon file, and it now has 9 images in it:

48x48 (32-bit)
48x48 (256 color)
48x48 (16 color)
32x32 (32-bit)
32x32 (256 color)
32x32 (16 color)
16x16 (32-bit)
16x16 (256 color)
16x16 (16 color)

When using bitmaps, I could get things to work by specifying the 32-bit image as
the "high" version, but I imagine this would break for older versions of windows
that would expect a 256 color image to be included.
Comment 6 James Willans CLA 2005-07-11 07:08:56 EDT
I'm having this problem as well.  I only seem to be able to increase the colours
of my BMP icons to 24 bit, how do you go about increasing the colour to 32 bit?
Comment 7 Patrick Paulin CLA 2005-07-13 00:23:38 EDT
(In reply to comment #6)
> I'm having this problem as well.  I only seem to be able to increase the colours
> of my BMP icons to 24 bit, how do you go about increasing the colour to 32 bit?

It depends on what tool you're using. I use Photoshop to create bitmaps, and
when I save a file it asks me what bit-depth to use.
Comment 8 James Willans CLA 2005-07-19 08:36:53 EDT
Patrick - Thanks for your response.  What program did you use to create the icon
file consisting of the 9 images?  I have the 9 icons with the appropriate sizes
and colour depths, but the software to create a single icon resource does not
support 32-bit icons.
Comment 9 Patrick Paulin CLA 2005-07-19 13:54:02 EDT
(In reply to comment #8)
> Patrick - Thanks for your response.  What program did you use to create the icon
> file consisting of the 9 images?  I have the 9 icons with the appropriate sizes
> and colour depths, but the software to create a single icon resource does not
> support 32-bit icons.

I used Microangelo Studio. They offer 5 choices for bit-depth:

16 color
256 color
Windows XP (32 bit)
True Color (24 bit)
Monochrome

I used 16 color, 256 color and Windows XP as my three bit-depths. The
Microangelo Help suggests that True Color images can be used in place of 256
color images for older versions of Windows, but not for Windows NT. I target
both platforms, so I'm sticking with the 256 color bit-depth.
Comment 10 James Willans CLA 2005-07-21 10:43:42 EDT
Thanks Patrick that worked.  I must say it has been hard work getting this icon
to work.
Comment 11 Stephanie CLA 2005-09-19 14:42:36 EDT
I am having this problem in Eclipse 3.1 release and was wondering if there are
any other solutions.  Using Microangelo, I created an icon file with the
suggested images:

48x48 (32-bit color)
48x48 (256 color)
48x48 (16 color)

32x32 (32-bit color)
32x32 (256 color)
32x32 (16 color)

16x16 (32-bit color)
16x16 (256 color)
16x16 (16 color)

and the eclipse icon is still being used as the icon for the executable.  

I am also having a problem with the icon in linux.  I am using White Box
Enterprise Linux 3.  I am using the .xpm icon file I created and the default
linux icon shows as the icon for the launcher instead of the icon I specified.
Comment 12 Pascal Rapicault CLA 2005-09-20 17:43:40 EDT
Stephanie, could you please attach your icons to this bug so we can investigate?
Comment 13 Jose M Beleta CLA 2005-10-08 20:15:46 EDT
I am having the same problem too. I have tried with the nine image icon with no
result. In my case the generated exe file is equal - with the name changed - to
the original eclipse.exe. 
Comment 14 Pascal Rapicault CLA 2005-10-11 11:45:11 EDT
Please attach icons allowing us to reproduce the problem. So far I have an ico
file which does the work just fine.
Comment 15 Jose M Beleta CLA 2005-10-13 16:59:29 EDT
Created attachment 28258 [details]
The icon I try to attach to the generated exe file
Comment 16 Jose M Beleta CLA 2005-11-09 15:05:32 EST
(In reply to comment #14)
> Please attach icons allowing us to reproduce the problem. So far I have an ico
> file which does the work just fine.

Did you make any test with my icons?
Comment 17 Jason Miller CLA 2005-11-30 14:27:50 EST
Created attachment 30886 [details]
ICO which does not become part of "exclipse.exe" file after exporting
Comment 18 Jason Miller CLA 2005-11-30 14:30:16 EST
(In reply to comment #17)
> Created an attachment (id=30886) [edit]
> ICO which does not become part of "exclipse.exe" file after exporting
> 

Sorry, I mis-spelled eclipse above.  Anyway, I am having this same problem with that ico file not getting used/embedded into the eclipse.exe I export.  I am sure that ico only has a few images in it, but at least eclipse could give me more details on what type of ICO is required.  I have not tried the individual bitmaps route yet, since no one seems to have had that work on here (and it failed for me on eclipse 3.2M2 a few weeks ago).

I just tried that ico with this version of eclipse:
Version: 3.2.0
Build id: I20051102-1600
Comment 19 Pascal Rapicault CLA 2005-11-30 16:33:16 EST
To properly brand eclipse you need an ico file that contains 6 frames/images.
Yours only contain one.

To see if your ico file has the proper shape, you can use the imageAnalyser application provided in the SWT examples (to get it install: go the intro page of eclipse, pick the samples section, click SWT, follow the steps)
Once the smaple code has been downloaded, find the imageanalyser package in the org.eclipse.swt.examples project and run it as an SWT app.
Comment 20 Pascal Rapicault CLA 2005-11-30 16:34:46 EST
Created attachment 30900 [details]
3 ico files that allows to brand eclipse.exe

Here are 3 ico files that allow to brand the exe with success.
Comment 21 Pascal Rapicault CLA 2005-11-30 16:34:59 EST
Closing
Comment 22 Jason Miller CLA 2005-12-07 21:13:31 EST
(In reply to comment #20)
> Created an attachment (id=30900) [edit]
> 3 ico files that allows to brand eclipse.exe
> 
> Here are 3 ico files that allow to brand the exe with success.
> 

I never could make this work when starting from scratch (tried all kinds of different 6 and 9 image ico's).  But when I used the attached, working sample (mail.ico) as a starting point I finally made it work.  Not a fun hour, but at least it works now, on XP.
Comment 23 Pascal Rapicault CLA 2005-12-07 22:05:49 EST
We are exploring the idea of providing more usefull messages in the product editor (see bug #118811).
Comment 24 Jason Miller CLA 2005-12-12 10:39:04 EST
Thanks for the other bug that talks about creating a validator, that will help.  

I just tried to export an application using the mail.ico and, later, RcpMailAllDepth.ico (from previously attached zip) using eclipse:

Version: 3.2.0
Build id: I20051102-1600

Neither icon would show in on the resulting .exe file after the export.  It continued to be created with the default eclipse purple circle icon.
Comment 25 Chris Audley CLA 2005-12-13 15:06:04 EST
I've also been trying to get this branding feature to work with no success.  I've tried exporting a product with the mail.ico and RcpMailAllDepth.ico on Windows XP with Eclipse 3.1.1, it does not work.

This is still a bug.  Please leave it open until it is resolved.
Comment 26 Andrew Niefer CLA 2005-12-13 16:18:46 EST
Created attachment 31687 [details]
Sample plugin used to test

Using both 3.1.1 M20050929-0840 and 3.2.0 I20051102-1600 on XP, I had no problems exporting a product using the attached icons: 
polux.ico, mail.ico, and RcpMailAllDepth.ico

Attached is the plugin I created to test this.
Comment 27 Kristoffer Peterhänsel CLA 2005-12-19 09:32:24 EST
How can this be marked as RESOLVED when people are obviously having the problem?

I have a workspace with a bunch of plugins and a feature. I have a feature-based product file. Let's call the project I have with my feature.xml and my .project file 'SomeGUI App'. I have also imported the Ico project into the same workspace.

The project with my feature.xml and .product file is a simple project. Not a java project.

Here are my observations:

1) I can export the Ico product with any of the icons along with it
2) I cannot export my own product with any icons inside it's own project
3) I CAN export my own product with any of the icons inside the Ico project (including my own icon file)
4) I CANNOT export the Ico product with icon files from my 'SomeGUI App' project.
5) Renaming my project to 'SomeGUI-App' don't change anything. (in the off chance it was the space in the project that stops me)
6) Adding java nature to my project don't change anything.

Well. I'm run out of environment changes to try. But it seems pretty obvious to me it is NOT the icon file that's at fault here. 

This is on 3.1.1 on Windows XP (SP2) btw.
Comment 28 Jose M Beleta CLA 2005-12-19 15:28:42 EST
It simply does not work. I tried with the mail.ico provided in attachment 30900 [details] with no success.

I am using 3.1.1.

Please reopen this bug.
Comment 29 Jason Miller CLA 2005-12-19 15:33:01 EST
FYI: I have just started to use Resource Hacker (http://www.angusj.com/resourcehacker/) to put my ico into the generated EXE.

Since this exe does not change often (with each eclipse release at most), it is an OK solution until the PDE can offer more flexible exe icon support. 
Comment 30 Ed Burnette CLA 2005-12-19 16:30:31 EST
FYI, 3.2M4 added some more diagnostics in the product editor branding section.
Comment 31 Jose M Beleta CLA 2005-12-20 13:51:35 EST
In my opinion the problem has nothing to do with icons (ico files). If you provide in the branding page bmp's instead of the icon file it does not work either.
Comment 32 Pascal Rapicault CLA 2005-12-20 16:27:37 EST
From Kristoffer's comment, I've been able to track the problem down and it is coming from the fact that any file used to brand the exe has to be stored into a plug-in or a feature project.
Comment 33 Pascal Rapicault CLA 2005-12-20 16:27:51 EST
I opened bug #121630.
Comment 34 Jason Miller CLA 2005-12-20 16:40:14 EST
My most recent tests (2005-12-12 10:39), which were failing, had the ico in the same project as the .product file (everything was in one plugin project).
Comment 35 Pascal Rapicault CLA 2005-12-20 16:45:52 EST
Please attach them here so I can test.
Comment 36 Jason Miller CLA 2005-12-20 16:51:16 EST
It was the mail.ico from the attachment (2005-11-30 16:34).  

I just tried it again to verify that the mail.ico will still not work (it is still failing).  I had the mail.ico in an "images" subdirectory of the project that I am exporting.  
Comment 37 Jose M Beleta CLA 2005-12-20 19:38:54 EST
(In reply to comment #32)
> From Kristoffer's comment, I've been able to track the problem down and it is
> coming from the fact that any file used to brand the exe has to be stored into
> a plug-in or a feature project.
> 

I am afraid that you will have to look somewhere else. My ico and bmp files are stored in a plugin project - the same project as the .product file too - but the branding does not work.
Comment 38 Pascal Rapicault CLA 2005-12-21 10:28:11 EST
Since the opening of this bug, Andrew and I have spent several hours to try to catch the problem but still we have not been able to reproduce the problem where images are located inside the same project (for the case caught by Kristoffer, the problem has been captured in another bug report).

So please if you have a problem branding where
- you are trying to brand using an ico file
- the ico file is in a plug-in or feature projectjust attach to this bug a problem 

Then attach a workspace allowing to reproduce the problem here.
Comment 39 Jason Miller CLA 2005-12-21 10:46:35 EST
Created attachment 32084 [details]
Workspace dir that shows problem on my machine

This is the project I have had problems exporting with mail.ico.

I did create a new project, and got it to export with mail.ico just fine, after dodging bug 102259.  I don't think 102259 is a problem for this attached workspace though.

Keep in mind that I removed most of the intro/help content for this project before zipping it up, but it was still failing to export with the mail.ico icon after I deleted those html/image files.
Comment 40 Jason Miller CLA 2005-12-21 10:49:20 EST
BTW, I am running eclipse:
Version: 3.2.0
Build id: I20051102-1600

And thanks to you folks that are looking into this, I can imagine it is difficult to debug.  This issue is not affecting me too badly, since I have started using Resource Hacker to set the ico instead, but I know it will trip people up (or worse).
Comment 41 Jim Adams CLA 2005-12-21 12:02:38 EST
I have debugged into the icon code and found that the documentation for the format that eclipse desires and the format that it actually uses seems to be the root of the problem. In 3.1 the icon passed in must have the same formats as the executable that it is being replaced in. For eclipse.exe the relvant icon formats are (depth, width, height) (8,48,48), (8, 32, 32) (8, 24, 24) 
(8, 16, 16) (32, 48, 48) (32, 32, 32) (32, 16, 16). If the passed in icon does not conform to those formats then it will not get used. The documentation in the code seems to imply a depth of 4 instead of 8.
Comment 42 Jose M Beleta CLA 2005-12-21 20:40:33 EST
Created attachment 32107 [details]
The problematic project

This is a project showing the problem. The ico file has the seven images as stated in the last comment.
Comment 43 Marko Tomljenovic CLA 2011-02-17 09:01:53 EST
Here is a tool for creating the ico file or 32 bit bms images: http://www.icofx.ro