gtk 2.x not supported ?

Requests for assistance and other HOWTOs.

Moderator: Board moderators

User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

gtk 2.x not supported ?

Post by bencha »

compiling the gcfclient with gtk+ 2.4 ( and the dev package ), I have :
checking for GTK - version >= 1.0.0... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
but from http://freshmeat.net/projects/gtk/ :
gtk-config was part of gtk+-1.x. gtk+-2.x uses pkg-
config instead. if your app wants gtk-config, it wants
gtk+-1.x and its devel packages.
So, does anyone need to install gtk+ 1.x to have the gcfclient ?
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Yes, gtkclient (under Linux) uses GTK 1.

You can try tweaking configuration files, and checking Windows (which does use GTK 2, not 1) defines, to compile with GTK 2.
bort
Forum Junkie
Posts: 607
Joined: Sun Jun 20, 2004 9:40 pm
Location: LG

Post by bort »

I believe that GTK2 has backwards compatibility in some aspects. You may just have to grab the GTK1 gtk-config script and mod it to use gtk2.0-x11 libraries.
:)
lordyoukai.DA
My wraith is cooler than your dragon.
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

I could compile under Windows with just the GTK2 headers & things. But client will *not* work with version 2.6, only with 2.2 or 2.4. Probably something that was broken in deprecated stuff.
User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

Post by bencha »

bort wrote:I believe that GTK2 has backwards compatibility in some aspects. You may just have to grab the GTK1 gtk-config script and mod it to use gtk2.0-x11 libraries.
:)
no, there's no backwards compatibility, at least for gcf.

I've done a fake gtk-config :

Code: Select all

#! /bin/sh
# --version gives pkg-config ver, not the gtk one
if [ "$1" = "--version" >/dev/null 2>&1 ]
then
    opt="--modversion"
else
    opt=$1
fi
pkg-config gtk+-2.0 $opt
chmod +x, check $PKG_CONFIG_PATH is well defined and ./configure will do it.
but then you get a lot of errors :
- undefined obsolete macros, but you can declare it :wink:
- wrong menbers of some structs, like no more 'font' in a GtkStyle :cry:
- function prototype who have changed ...

i can add or modify gtk windows, but for now i can't rewrite it in gtk2. it has to be done one day... but this week i'll install gtk1 'cause basic x11 client is too hard to use :roll:
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

Well a gtk2 client is in the works in CVS though it isn't complete yet (basic parts work, still missing some notable things)
Ryo
Forum Fanatic
Posts: 752
Joined: Mon May 19, 2003 9:16 pm
Location: Paris, France

Post by Ryo »

Sure there is backward compatibility (at least under Windows).

Windows uses some specific defines, i can think of GTK_ENABLE_BROKEN which enables deprecated things.
Some are in include/win32.h file, others are somewhere in crossfire.dsp file (grep for -Dxxx, xxx gives the define).

I can guarantee current GTK client CVS compiles with GTK2 with just some defines & tweaks. I see no reason it's not the same under Linux.
Rednaxela
Senior member
Posts: 434
Joined: Wed Jan 26, 2005 5:13 am

Post by Rednaxela »

Yes, it probably can work under linux if certain parts of win32 ifdefs and such that are related to GTK are used. I do see that as significant work though compared to just plain installing gtk1.
User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

Post by bencha »

don't know about gtk & win32, but there's some functions who have disapear and others who have changed their prototype between gtk 1.2 and 2.0 under linux. see http://developer.gnome.org/doc/API/2.2/ ... s-2-0.html for details.

after reading this, code and the ugly configure.in, i've decided i can port gcfclient to gtk2, keeping gtk1 compatibility (i.e. use gtk2 if found, else gtk1 like now). seems to me better than compiling gtk1 source :) .

please, if someone else (knows someone who) do it now, let me know.
User avatar
bencha
Junior member
Posts: 110
Joined: Tue Feb 22, 2005 3:24 pm
Location: Paris

Post by bencha »

stopped it.

it appears CVS files have changed _a lot_.
so, i'll see it after holiday.
Post Reply