Re: [Gtk2forpascal-devel] central configuration file
Brought to you by:
mgaertner
From: Olaf L. <le...@ne...> - 2004-03-15 19:45:57
|
Hello! In order to create the configuration include file we could use some kind of configure script to which you pass e.g. a gdk-target. At the moment, there are only win32, x11, linux-fb and perhaps directfb. Or this script could try to find out which version to compile. ( call pkg-config on linux) ///// GTK2_FOR_PASCAL config file // included by all units {$define GDK_TARGET_LINUX_FB} {$define USE_GTK_2_4} // end of config file And in gtk2.pas {$ifdef linux} gtklib = ''; {$else} {$ifdef GDK_TARGET_LINUX_FB} gtklib = 'libgtk-linux-fb-2.0.so'; {$else} {$ifdef GDK_TARGET_X11} gtklib = 'libgtk-x11-2.0.so'; {$endif} {$endif} {$endif} In gtkincludes.inc ... {$include gtkradiomenuitem.inc} {$include gtkscrolledwindow.inc} {$ifdef GDK_TARGET_X11} {$include gtkplug.inc} {$include gtksocket.inc} {$endif} {$include gtkselection.inc} {$include gtkseparatormenuitem.inc} {$include gtksignal.inc} {$include gtksizegroup.inc} ... That's it. Ciao, Olaf Am Don, den 11.03.2004 schrieb Mattias Gaertner um 23:19: > On Thu, 11 Mar 2004 16:05:15 +0100 Olaf Leidinger <le...@ne...> > wrote: > > > Hello! > > > > I just linked the samples against a gtk version, which uses the > > linux-framebuffer backend. The only things I changed where not including > > gtksocket.inc and gtkplug.inc (undefined references: perhaps they aren't > > supported on linux-fb?) and setting the right PKG_CONFIG_PATH (gdklib, > > gtklib aren't set when compiling for linux). > > > > Perhaps we could add linux-fb support to the standart distribution. The > > changes are minimal. I think of a file called config.inc or setup.inc in > > which you can define the gdk-backend to be used. We could also define > > the gtk version compatibility (use new gtk-2.4 widgets or not) in this > > file . > > This configuration file has to be included on top of every unit. > > According to the decisions made the library names are set and some parts > > are compiled, others not. > > Right. The configuration can't be done only by IFDEFs. > How are these include files created exactly? |