On Mon, Aug 08, 2011 at 04:55:36PM +1000, Peter Hutterer wrote: > On Fri, Aug 05, 2011 at 09:29:41PM +1200, Jason alavaliant wrote: > > I've just finished rewriting a lot of the wacom-config ( > > http://wacom-config.sourceforge.net/) code to directly access the xinput > > properties of wacom devices rather than using xsetwacom. The only thing > > I've got left at this point that I don't think I'm doing the ideal way is > > getting the version of the wacom driver. (I'm currently reading > > /var/log/Xorg.0.log and using a regex to find the first version line after > > the line showing the load of wacom_drv.so) > > > > What is the recommended method for application authors to find the driver > > version on the system? > > Provided you have the wacom devel pkgs installed, > pkg-config --modversion xorg-wacom > will tell you the version at compile/configure-time. That's probably the > best for an application that really requires wacom but it has the drawback > that you need the wacom devel header installed at configure time and > (in the case of a distribution) if the driver is updated, the application > may lag behind. > > Assuming that xsetwacom is always the one from the driver package, xsetwacom > --version should tell you the correct version. > > But really, we don't have a useful version export mainly because it wasn't > really needed so far, the other drivers don't change enough that it matters > whether you're running x.y or x.y+1. Suggestions appreciated, I've been > thinking of adding a modversion property for a while now anyway.
Now I remembered why I started and discarded previous attempts at this: The main issue with getting the driver version is that it does not accommodate for backported patches. Upstream version x.y may have a required new feature (or bugfix) but if a distribution backports those patches without bumping the version, your client may reduce functionality. e.g. the wacom driver in RHEL6 is quite different to 0.10.5, even though that is the version it would report. Distributions can work around that at build-time but a client shouldn't do any run-time driver version detection. Thus, it is usually better to focus on the feature you need and determine how to find out if that feature is available or not rather than relying on a single version. Cheers, Peter ------------------------------------------------------------------------------ uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
