[sane-devel] Newbie questions
stef.dev at free.fr
Thu Jul 26 09:19:58 UTC 2012
On 07/24/2012 09:20 PM, Paul Newall wrote:
> I have been through the process of writing a backend myself in the
> last year.
> The things that I found particularly difficult were:
> 1. The sane build system, using automake. I'd never seen automake
> before and found it totally baffling. To get your new backend to
> compile with all the others requires a lot of edits to a lot of files.
> 2. Getting other users to test my backend. I tried distributing a
> patch for the last official release of sane. This was generally a
> failure, maybe because I'd never made a patch before, or because most
> potential users have never compiled anything, never mind patching it
> first. Sane also requires a number of setup actions as root,
> particularly to set permissions for usb scanners.
> It was a long time before I got enough reports of sucessful users to
> feel confident enough to propose adding my backend to sane git.
> Having said that, I certainly learnt an awful lot in a short time! I'm
> not really trying to put anyone off.
> I think it would help beginner backend writers significantly to have
> one of the following:
> a. A special empty backend distributed with sane backends that
> beginners could tinker with. It would already be included in the build
> system, so they can concentrate on writing the actual code. Then, when
> it's all working, they should rename it to a unique name before
> b. A patch, that adds a new backend to the build system. You would
> have to edit the patch to give this backend a unique name.
> c. A script, that adds a new backend to the build system with an
> arbitrary name.
> I think the best approach to distributing test versions is to
> distribute a complete version of sane.
> You still have to provide a lot of support to users on compiling and
> setting up sane.
having a template backend and a script that adds it to sources
would be helpful. I started one (USB only) long ago, and didn't
completed it due to lack of time. This would help (for instance it could
have proper plugging/unplugging handling) starting a backend, but only
for the easiest part which is SANE. Same result could be obtained by
cloning an existing backend.
More information about the sane-devel