Page 1 of 2
gtk 2.x not supported ?
Posted: Tue Jul 19, 2005 2:54 pm
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 ?
Posted: Tue Jul 19, 2005 3:39 pm
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.
Posted: Wed Jul 20, 2005 3:03 am
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.

Posted: Wed Jul 20, 2005 7:12 am
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.
Posted: Sun Jul 24, 2005 12:30 pm
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
- wrong menbers of some structs, like no more 'font' in a GtkStyle
- 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

Posted: Sun Jul 24, 2005 6:29 pm
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)
Posted: Mon Jul 25, 2005 7:12 am
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.
Posted: Mon Jul 25, 2005 8:10 am
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.
Posted: Mon Jul 25, 2005 3:29 pm
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.
Posted: Sun Jul 31, 2005 6:19 pm
by bencha
stopped it.
it appears CVS files have changed _a lot_.
so, i'll see it after holiday.