On Tue, Aug 9, 2011 at 3:47 PM, Peter Hutterer <[email protected]>wrote:

> 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.
>

Not really ideal for my use since I can't guarantee a user of wacom-config
will have installed dev packages.


> >
> > Assuming that xsetwacom is always the one from the driver package,
> xsetwacom
> > --version should tell you the correct version.
>

That's handy,  I wasn't aware that output matched the driver version.  I
think I was thinking of
linuxwacom<https://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Linuxwacom>rather
than input-wacom (which as I recall had it's own version number for
xsetwacom)
That looks to be my best option so for besides the log file.

>
> > 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.
>

To me the easiest place to export the driver version would be to add another
device parameter like the existing 'Wacom Serial IDs' which contained the
driver version?


>
> 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.
>
>
Fair enough,  I was trying to avoid dealing with version numbers myself but
there is one thing I couldn't think of a way to work out without using
driver versions.
http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/xf86-input-wacom;a=commit;h=e0354b9fde1e489bd0c87aa7f34b827ce3e27778
(xsetwacom: add PROP_FLAG_INVERTED for Hover Click/TPCButton)
 How would one detect if 'Wacom Hover Click' is turned on or off by setting
1/0 except by checking the driver version since the behavior changes between
versions but the property name stays the same?

Thanks
-J
------------------------------------------------------------------------------
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

Reply via email to