Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » PNG Splash Screen(How to configure a RCP project to launch a PNG Splash Screen)
PNG Splash Screen [message #539617] Fri, 11 June 2010 14:06 Go to next message
parmy Missing name is currently offline parmy Missing nameFriend
Messages: 14
Registered: July 2009
Junior Member
Hi

This should be quite easy to do, but I'm struggling to configure my RCP project to launch use a png splash screen icon, rather than using the default bmp splash screen image format.

The reason I want to use PNG, is the Splash Screen I've designed has a transparent background.

I've seen examples of other RCP projects which have managed to do this (example Adobe Flash Builder).

I believe the call to launch the .bmp splash screen is somewhere in the .exe used to launch the RCP App, but I'm not sure how to configure this.

There may also be a way to force .bmp images to have transparent backgrounds; but I've not found a reliable way to do this.

Any suggestions or thoughts?

Thanks in advance.

Parmy
Re: PNG Splash Screen [message #539656 is a reply to message #539617] Fri, 11 June 2010 17:01 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
On 11/06/10 7:36 PM, parmy wrote:
> Hi
>
> This should be quite easy to do, but I'm struggling to configure my RCP
> project to launch use a png splash screen icon, rather than using the
> default bmp splash screen image format.
>
> The reason I want to use PNG, is the Splash Screen I've designed has a
> transparent background.
>
> I've seen examples of other RCP projects which have managed to do this
> (example Adobe Flash Builder).
>
> I believe the call to launch the .bmp splash screen is somewhere in the
> .exe used to launch the RCP App, but I'm not sure how to configure this.
>
> There may also be a way to force .bmp images to have transparent
> backgrounds; but I've not found a reliable way to do this.
>
> Any suggestions or thoughts?
>
> Thanks in advance.
>
> Parmy

I don't think you can make a bmp to be transparent. Try setting the
osgi.splashLocation property to the png file. See:
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/reference/misc/runtime-options.html

- Prakash
Platform UI Team, IBM

www.eclipse-tips.com
Re: PNG Splash Screen [message #539688 is a reply to message #539617] Fri, 11 June 2010 20:51 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
I found these two related bugs:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=114567
https://bugs.eclipse.org/bugs/show_bug.cgi?id=208954

Look here http://wiki.eclipse.org/Equinox_Launcher
for some details on the -showsplash argument which controls the initial
displaying of the splash screen in the launcher.

There are really three phases to the splash screen when eclipse starts:
1) Native code, before java starts
2) Java calling out to Native code from Main, before OSGi starts
3) Java code working through SWT, after workbench starts

For (1) and (2) some platforms may be able to display png, but not all.
Each plaform has different native implementations, you'll need to see which
ones support png:
- win32 - uses LoadImage with IMAGE_BITMAP
- gtk - uses gdk_pixbuf_new_from_file, gdk_image_new_from_pixbuf.
- cocoa - uses NSImage
- carbon - uses CGImageSourceRef (or custom bmp code on older systems)
- motif uses custom bmp code

If the platform(s) you are developing for can show png, then you might just
be able to name your png as "splash.bmp" and be happy.

Otherwise, you will need to wait until SWT is up and running for part (3)
and do your magic with SWT code.

-Andrew



parmy wrote:

> Hi
>
> This should be quite easy to do, but I'm struggling to configure my RCP
> project to launch use a png splash screen icon, rather than using the
> default bmp splash screen image format.
>
> The reason I want to use PNG, is the Splash Screen I've designed has a
> transparent background.
>
> I've seen examples of other RCP projects which have managed to do this
> (example Adobe Flash Builder).
>
> I believe the call to launch the .bmp splash screen is somewhere in the
> .exe used to launch the RCP App, but I'm not sure how to configure this.
>
> There may also be a way to force .bmp images to have transparent
> backgrounds; but I've not found a reliable way to do this.
>
> Any suggestions or thoughts?
>
> Thanks in advance.
>
> Parmy
Re: PNG Splash Screen [message #539981 is a reply to message #539656] Mon, 14 June 2010 13:57 Go to previous messageGo to next message
parmy Missing name is currently offline parmy Missing nameFriend
Messages: 14
Registered: July 2009
Junior Member
HI Prakash

Thanks for your response.

I tried using osgi.splashLocation property in my config.ini file without success.

I tried a number of approaches, including completely removing the .bmp from the project as this was the one that was always being used.

I ensured I updated the "configuration file" setting in Products document under the Configuration tab.

Do you have a sample project where you have managed to updated the splash screen to a .png, that I can take a look at?

I'm building my RCP project on Windows Vista, and ultimately it will be aimed at Windows XP, Vista, 7, Mac Lepoard and Snow Lepoard - all of which should support .png

In the meanwhile I'm going to give Andrew's solution a try.

Thanks for your support in advance.

Regards

Parmy

[Updated on: Mon, 14 June 2010 13:58]

Report message to a moderator

Re: PNG Splash Screen [message #539996 is a reply to message #539688] Mon, 14 June 2010 14:25 Go to previous message
parmy Missing name is currently offline parmy Missing nameFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Andrew

Thanks for your response.

I have tried renaming my .png to a .bmp; which works (but without transparency on a Mac); however on Windows XP and Vista I had no luck.

I'm hoping Prakash will come back with a working example of using the config.ini file and the osgi.splashLocation setting.

My only concern here is the full path may be required, which means I can't package my build in the normal way.

Will update this forum with a working example as soon as I get any joy.

Thanks again.

Parmy
Previous Topic:Overriding TreeViewer Find action
Next Topic:RCP plugins directory
Goto Forum:
  


Current Time: Tue Dec 23 03:55:49 GMT 2014

Powered by FUDForum. Page generated in 0.01744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software