Celestia/GTK+ under Win32.

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Celestia/GTK+ under Win32.

Post #1by suwalski » 30.10.2005, 04:58

So, after a long day of work, I've succeeded: Celestia can now use its GTK+ code under Windows, natively.

The code changes were essentially non-existant. The diff can't be more than 5-10 lines. All of the work was in Makefiles.

More information (and screenshot) here:

http://pat.suwalski.net/log/index.cgi/2005/10/30#1130647813

There was some talk in the past about reducing unifying Celestia's interfaces. Currently, there's a storm of activity to port GTK natively to MacOSX. When that settles, GTK+ might just be the answer.

Did I mention that there is no speed penalty?

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #2by Malenfant » 30.10.2005, 05:02

I'm sure I'd be able to appreciate this more if I knew what GTK+ was and why this was a good thing :). Does this mean that it may be possible to compile the code for Celestia on any platform with the same code, rather than having separate versions of the code for each platform?

The screenshot (to my untrained eye) looks like one from the normal windows Celestia, except there's no Bookmarks menu - is that missing from the Linux version?

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Post #3by suwalski » 30.10.2005, 05:18

Malenfant: You're right, I should explain this a little more.

You're dead-on with all of your assumptions. GTK is the GIMP ToolKit, the same library that sits under GNOME.

It's been a few years now since GTK was ported to Windows. Many programs have taken advantage of this, particularly popular are The Gimp and GAIM. Until recent times, it has not been a very straightforward thing to port a GTK application to Windows.

Celestia, however, is quite unique, in that 90% of the "difficult" code already runs great under Windows. GTK itself is quite simple, so its code is relatively non-problematic.

In the end, this means that the same UI code can run on any platform.

In "true port nature," I try to keep my GTK GUI as close to the native Windows UI as possible. However, there is currently a lack of bookmarks. I will tackle that one day. But the beauty of this is that on Windows, existing Bookmarks and Windows Registry code could potentially just be plugged right in.

Christophe's KDE UI code is leaps and bounds ahead of the Windows UI, but I don't think it's portable to Windows.

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #4by Malenfant » 30.10.2005, 05:22

Ooo. OK, then this is rather good news :).

Bookmarks are kinda handy to have though :)

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Test, anyone?

Post #5by suwalski » 09.11.2005, 18:36

I didn't get much of a response about this, but I guess that's probably because I never put it up anywhere. So, I'm putting it up right now.

As such, I was wondering if anyone might give it a spin, specifically checking for performance issues compared to Chris' last pre-release.

It's pretty simple. You need:

1) GTK (with installer):

http://prdownloads.sourceforge.net/glad ... e?download

2) celestia.exe (should work with data from last pre):

http://pat.suwalski.net/celestia/misc/c ... n32gtk.zip

No, there are no bookmarks or video capture, or preference-saving. But if this works well, I might just implement them in a cross-platform way.

Thanks!

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Test, anyone?

Post #6by t00fri » 09.11.2005, 20:04

suwalski wrote:...
No, there are no bookmarks or video capture, or preference-saving. But if this works well, I might just implement them in a cross-platform way.

Thanks!


There are also no nice colorful galaxies etc like in FT1.x ... ;-)

Pat,

honestly, apart from a certain interest of /principle/, what's the benefit supposed to be?? The main somewhat surprising point I can see is that the gtk version does not seem to be significantly slower than the standard one.

Why should people mess around with installing gtk+ libs, given the fact that most Windows users don't have much of an idea how to deal with libraries and all that...what if there are bugs in certain gtk versions etc? Who is going to help unexperienced users?

In particular, you tend to be VERY elusive in this forum, for example.

Bye Fridger

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Re: Test, anyone?

Post #7by suwalski » 09.11.2005, 20:45

t00fri wrote:There are also no nice colorful galaxies etc like in FT1.x ... ;-)

Oh, I absolutely love those! They're awesome. Better than purple!

t00fri wrote:honestly, apart from a certain interest of /principle/, what's the benefit supposed to be?? The main somewhat surprising point I can see is that the gtk version does not seem to be significantly slower than the standard one.

Well, over the years, there has been quite a bit of discussion about having a single front-end. Some people even suggested an OpenGL GUI (bad idea, IMO). The Windows front-end is hardly ever updated and is way behind the KDE UI. Well, here's a possible solution. GTK runs on all of the platforms Celestia runs on. With a little bit of work, it can maintain the 'local' solutions for preference storage and other functions.

t00fri wrote:Why should people mess around with installing gtk+ libs, given the fact that most Windows users don't have much of an idea how to deal with libraries and all that...what if there are bugs in certain gtk versions etc? Who is going to help unexperienced users?

Well, it has been at least a few years since I have seen a non-working GTK on Windows. It's no harder to install than Celestia, though yes, there is that one step. But it's getting a lot more popular. Many people are downloading applications like GAIM, AbiWord, Ethereal, The Gimp, Inkscape, and Gnumeric for Windows. Even the monster Evolution is being ported to Windows as I type.

Theoretically, the GTK libraries could be bundled with Celestia itself, like we do with libpng anyway. It would only increase the installer by 3 or 4 megs, as we don't use everything in the package I linked to above.

But, in the end, this could benefit users a lot. For me, it's much more compelling to work on a GUI that will be used by more people. I've been holding back to match the somewhat uninteresting UI of the Windows front-end for a long time, so that the two look pretty much the same, all the time hoping that someone will do something nice with the Windows GUI. Since that is not happening, I'm offering a very real solution. If people find it works well, I will grow the GTK UI to the point where it's significantly better than the current Windows UI.

t00fri wrote:In particular, you tend to be VERY elusive in this forum, for example.


Yes, I am elusive from this forum. But you will note that I'm the most active person on the celestia-developers mailing list.

The reason is that I simply abhor HTML interfaces. I hate webmail, I hate forums. I like postings pushed to me like on a mailing list rather than me have to go through piles of forum categories looking for new posts. That's all. It's not that I don't like the people here or anything. :)

I think forums are great for users (like the Gentoo and Ubuntu forums), because users can help users. But I think that mailing lists are much better for development discussion. Better archiving, the ability to have patch attachments, or any attachments for that matter, local topic storage, proper threading, speed, are all plusses.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Test, anyone?

Post #8by t00fri » 09.11.2005, 21:30

suwalski wrote:Well, over the years, there has been quite a bit of discussion about having a single front-end. Some people even suggested an OpenGL GUI (bad idea, IMO). The Windows front-end is hardly ever updated and is way behind the KDE UI. Well, here's a possible solution. GTK runs on all of the platforms Celestia runs on. With a little bit of work, it can maintain the 'local' solutions for preference storage and other functions.

Almost FOUR years ago we had that discussion vividly among the developers of that time. My vote was for Qt, but Chris argued against it (for understandable reasons).
...and then I set out as you know and coded quite a bit of the first GTK-1 Celestia GUI.

In any case,... I tend to routinely compile Celestia-gtk+, Celestia-gnome and Celestia-KDE along with Celestia-Windows during our FT development work.

Comparing the GNOME and notably the KDE flavors to the GTK version for Linux, I think it is fair to insist that the difference is still /VERY/ large. It is simply much more "than just a little bit of work" to get the gtk version to the same standards. Just remember how many more specialized libraries the gnome and KDE versions are linking to compared to Celestia-gtk.

t00fri wrote:In particular, you tend to be VERY elusive from this forum, for example.

Yes, I am elusive from this forum. But you will note that I'm the most active person on the celestia-developers mailing list.

Right, since recently Celestia development tends to take place elsewhere ;-) . Within a short time, our FT1 and FT1.1 release threads exceeded 7000-8000 hits each with 200-300 posts by people, including most valuable testing, bug reports, making interesting suggestions etc...That's where the action was lately.

Celestia-FT1.2 will very probably be released already this weekend.

The reason is that I simply abhor HTML interfaces. I hate webmail, I hate forums. I like postings pushed to me like on a mailing list rather than me have to go through piles of forum categories looking for new posts. That's all. It's not that I don't like the people here or anything. :)

I think forums are great for users (like the Gentoo and Ubuntu forums), because users can help users. But I think that mailing lists are much better for development discussion.


I don't agree with the latter. My experience with this forum (which is RICH indeed ;-) ) taught me other lessons. The forum can become a very inspiring "interface" with lots of coherent excitement about certain new aspects, lots of good ideas, unforseen reactions etc. . Had I NOT found it useful, I guess I'd have contributed "slighly" less than 3323 posts to the forum during the last 4 years, with far above 100 000 readers in total ;-)


Cheers,
Fridger
Last edited by t00fri on 09.11.2005, 22:31, edited 2 times in total.

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Test, anyone?

Post #9by t00fri » 09.11.2005, 22:16

suwalski wrote:...
Yes, I am elusive from this forum. But you will note that I'm the most active person on the celestia-developers mailing list.


;-)

Hmm, couldn't resist checking that claim ...

Here are the results for the developer-list posts in 2005 (with a few small miscountings for sure)

Code: Select all

Fridger:   73
Chris:     47
Pat:       36
Selden:    34
...


Cheers,
Fridger

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Re: Test, anyone?

Post #10by suwalski » 09.11.2005, 23:12

t00fri wrote:Almost FOUR years ago we had that discussion vividly among the developers of that time. My vote was for Qt, but Chris argued against it (for understandable reasons).
...and then I set out as you know and coded quite a bit of the first GTK-1 Celestia GUI.

Well, AFAIK, Qt programs don't run natively under Windows in the non-commercial version. GTK now does, and it looks like it's getting more popular on the MS side.

I didn't know you had a large hand in GTK Celestia. I thought it was all Hank. Good to learn history.

t00fri wrote:In any case,... I tend to routinely compile Celestia-gtk+, Celestia-gnome and Celestia-KDE along with Celestia-Windows during our FT development work.

In terms of the front-ends breaking, I don't see much of a reason why they would.

t00fri wrote:Comparing the GNOME and notably the KDE flavors to the GTK version for Linux, I think it is fair to insist that the difference is still /VERY/ large. It is simply much more "than just a little bit of work" to get the gtk version to the same standards. Just remember how many more specialized libraries the gnome and KDE versions are linking to compared to Celestia-gtk.

Yes, the KDE front-end is far advanced to the GTK front-end. I even said that I try to mimic the Win32 UI as closely as possible. The part about "just a little bit of work" was referring to how much work it would take to let Celestia/GTK use the Windows Registry to save its preferences. The code is already there, it would just need to be hooked up.

The only additional libraries Celestia/GNOME is using is libgconf, with a single libgnomeui function. That's it. The others show up in ldd because of what those two are linked to. In the future, there may be a little more difference, but I will always make sure to maintain a clean GTK UI.

t00fri wrote:Right, since recently Celestia development tends to take place elsewhere ;-) . Within a short time, our FT1 and FT1.1 release threads exceeded 7000-8000 hits each with 200-300 posts by people, including most valuable testing, bug reports, making interesting suggestions etc...That's where the action was lately.

That is apparent. Even if I don't post often, I do read once per week or so. It's too bad it's not a mailing list. People are much less likely to post garbage like this:

8O 8O 8O 8O 8O 8O 8O 8O 8O 8O 8O

... to a mailing list. At least the smileys are not animated here like on other boards.

t00fri wrote:Celestia-FT1.2 will very probably be released already this weekend.

I'll make certain to pick it up.

t00fri wrote:I don't agree with the latter. My experience with this forum (which is RICH indeed ;-) ) taught me other lessons. The forum can become a very inspiring "interface" with lots of coherent excitement about certain new aspects, lots of good ideas, unforseen reactions etc. . Had I NOT found it useful, I guess I'd have contributed "slighly" less than 3323 posts to the forum during the last 4 years, with far above 100 000 readers in total ;-)


That's certainly a lot of posts. But would it not have been the same with a mailing list? I'm on a lot of those, and you know, the same can be said for them. Anyway, I was just giving my reason for avoiding the use of a forum. In the grand scheme of things it does not really matter where the discussion is happening as long as it is happening.

Speaking of which; I wrote a nice long paragraph in my last post about how Celestia/GTK in Windows could benefit users and help development. I was hoping you would respond more to that part than the part about my dislike of HTML interfaces. :)

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Test, anyone?

Post #11by t00fri » 09.11.2005, 23:49

suwalski wrote:I didn't know you had a large hand in GTK Celestia. I thought it was all Hank. Good to learn history.


You are mixing two Ramseys up ;-) . This was all long before Hank (Ramsey) was a member of the development team. The first Ramsey's first name was Deon!
Here is his WEB-page with a photo:
Deon Ramseys Collection of Weirdness
He had started with the gtk-1 interface, and then I took over when he left (which was about when I came in) . His gtk code was very "raw" and I have almost completely recoded it.

But you and I exchanged quite a few mails about Celesltia's gtk-1 history a long time ago in the list...

Bye Fridger

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Re: Test, anyone?

Post #12by t00fri » 09.11.2005, 23:56

suwalski wrote:...
That is apparent. Even if I don't post often, I do read once per week or so. It's too bad it's not a mailing list. People are much less likely to post garbage like this:

8O 8O 8O 8O 8O 8O 8O 8O 8O 8O 8O

... to a mailing list. At least the smileys are not animated here like on other boards.
...


Here we do "better things" instead, like so ;-)

Lovely

or even so

Animated Lovely

and for reasons of Copyright, here is the full-sized

Lovely

Cheers,
Fridger

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Re: Test, anyone?

Post #13by suwalski » 10.11.2005, 03:59

t00fri wrote:You are mixing two Ramseys up ;-) . This was all long before Hank (Ramsey) was a member of the development team. The first Ramsey's first name was Deon!

Yikes! And I was mixing up Grant and Selden earlier. I must be going senile in my tender 20's.

t00fri wrote:But you and I exchanged quite a few mails about Celesltia's gtk-1 history a long time ago in the list...


Yes, I remember that. But I recall it being mostly methodologies and that you had maintained it for a while, and why some things were the way they were. I don't recall history of coding ever being mentioned much. Ah, it's all in the CVS history.

Seriously, though, I'm quite enthusiastic about this Celestia/GTK under Windows. Selden also reports good performance.

alphap1us
Posts: 212
Joined: 17.12.2003
With us: 20 years 11 months
Location: Buenos Aires

Post #14by alphap1us » 10.11.2005, 09:49

Hi Pat,
I believe that Qt, the framework behind KDE, already runs natively under Mac OS X, Windows and X11, and is released under the GPL. I know next to nothing about GUI development, but if the KDE code is really the most advanced GUI for Celestia so far, it may be best to use Qt to port those interfaces to Mac and Windows, to achieve the same kind of cross-platform GUI that you are suggesting.

Best of luck with your noble goal.

Cheers,
Joe

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Re: Test, anyone?

Post #15by Paolo » 10.11.2005, 20:22

suwalski wrote:Well, over the years, there has been quite a bit of discussion about having a single front-end. Some people even suggested an OpenGL GUI (bad idea, IMO).


Hi Pat
Since I was one of the /supporters/ for the unique Celestia UI based on GL, I'm interested in this discussion.

Why do you think that should be a bad idea. The programs that at present time should be considered as /competitors/ of Celestia (like Star strider or Stellarium) have their own UI. So perhaps it is not a so bad idea.

I still belive that managing four different UI's is a waste of time and resources, and the unification should carry a lot of advantages.
I still agree with Chris that would like to keep under control the usage of external libraries.
I still belive that an OpenGL UI with extend usage of transparencies should increase the immersiveness of the Celestia experience.
The problem is that until now there isn't' a really cool lightweight/performing/flexible/cross-platform framework that should be used...

Kind regards.
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Post #16by suwalski » 17.11.2005, 03:41

alphap1us wrote:Hi Pat,
I believe that Qt, the framework behind KDE, already runs natively under Mac OS X, Windows and X11, and is released under the GPL. I know next to nothing about GUI development, but if the KDE code is really the most advanced GUI for Celestia so far, it may be best to use Qt to port those interfaces to Mac and Windows, to achieve the same kind of cross-platform GUI that you are suggesting.

Qt is an option. However, the KDE code will not compile under plain vanilla Qt. It would have to be rewritten. The GTK code does run. One way or another, there would be additional library dependencies. At this time GTK is moving a little faster, so I think it makes more sense. But that's just my opinion.

alphap1us wrote:Best of luck with your noble goal.


Many thanks.

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Re: Test, anyone?

Post #17by suwalski » 17.11.2005, 03:51

Paolo wrote:Since I was one of the /supporters/ for the unique Celestia UI based on GL, I'm interested in this discussion.

Yes, I recall reading about this a year ago or so.

Paolo wrote:Why do you think that should be a bad idea. The programs that at present time should be considered as /competitors/ of Celestia (like Star strider or Stellarium) have their own UI. So perhaps it is not a so bad idea.

There would be a lot of code to rewrite. The UI wouldn't look particularly at home on any environment. It would not benefit from any of the Toolkits' accessibility. The interface would not fit the UI guidelines of any of the OSs Celestia runs on. GTK can still be massaged to look at home on Windows; the way I see a custom GL toolkit it would not. Maybe I don't see it correctly.

Paolo wrote:I still belive that managing four different UI's is a waste of time and resources, and the unification should carry a lot of advantages.
I still agree with Chris that would like to keep under control the usage of external libraries.

I tend to agree, for the most part. Except that GTK is becoming increasingly popular installed system-wide on Windows. Also, as the Celestia binary package grows, adding another 3 megs to the archive is decreasingly an issue. There don't appear to be performance issues. GTK gets released about once every six months so the chance of bitrot is quite small.

Paolo wrote:I still belive that an OpenGL UI with extend usage of transparencies should increase the immersiveness of the Celestia experience.

It could. But I don't think it would ever be as good as classic toolkit. It /could/ be as good, but I just don't see it happening.

Paolo wrote:The problem is that until now there isn't' a really cool lightweight/performing/flexible/cross-platform framework that should be used...


And herein lies the problem. On top of that, I've never seen a menuing/windowing system done in OpenGL that is particularly usable, though I am thinking of the types of UIs that games have. Celestia would obviously need something more advanced.

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Post #18by Paolo » 17.11.2005, 22:45

Hi Pat

Your opinions are quite reasonable.
But do you think that you should change them if a dreamable GL toolkit should be available?
Do you think that you or someone else should be interested in developing or using this toolkit for Celestia?

I can foresee that the features of the toolkit that you would like to have are at least:

- customizable appearing and look & feel (to seamlessly integrate in different OS GUIs).
- UI components loaded from plain text resource files.
- Native Unicode support.
- advanced menu, toolbar and windowing system.
- availability of advanced components such grids and tree views.
- OS abstraction layer better than GLUT with at least filesystem, timer and multithread management capabilities in addition to graphics and user input management.
- plenty of advanced visual effects such transparencies and animations.

Can you list other features that you would like to have in this dreamable toolkit in order to consider it?

Kind regards
Remember: Time always flows, it is the most precious thing that we have.

My Celestia - Celui

Topic author
suwalski
Developer
Posts: 62
Joined: 03.12.2003
With us: 20 years 11 months
Contact:

Post #19by suwalski » 18.11.2005, 00:28

Paolo wrote:But do you think that you should change them if a dreamable GL toolkit should be available?

Not necessarily. I'm really quite skeptical about running a whole gui in GL. Handling multiple windows would be annoying at the very least. If everything were in one window like in a game, it would not be usable unless the resolution were higher than what people typically use.

Paolo wrote:Do you think that you or someone else should be interested in developing or using this toolkit for Celestia?

I don't have the skills. Whoever were to take this on would be accepting an absolutely huge project. It would probably take years to complete.

Paolo wrote:- customizable appearing and look & feel (to seamlessly integrate in different OS GUIs).

This point alone is impractical in GL.

Paolo wrote:- UI components loaded from plain text resource files.

There is such things as a plain resource file?

Paolo wrote:- availability of advanced components such grids and tree views.

It took GTK developers 6 years to get this to a point where these are usable. And even now, there are optimization issues (glyph metric calculations).

Paolo wrote:Can you list other features that you would like to have in this dreamable toolkit in order to consider it?


In the end, it really doesn't matter what I think. If someone is willing to invest the huge amount of time needed to make this happen, I won't discourage them. But I'm skeptical anything would come of it. A toolkit is a *huge* project.

Also, I am highly skeptical that this toolkit could be any smaller than GTK is. It would probably be close to the same size. It makes me wonder whether the rewards would be worth the effort.


Return to “Development”