sane-project-website/old-archive/1998-12/0067.html

122 wiersze
5.5 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Mon Dec 7 04:34:17 1998 PST" -->
<!-- sent="Mon, 07 Dec 1998 14:33:52 +0200" -->
<!-- name="Milon Firikis" -->
<!-- email="milonf@ariadne-t.gr" -->
<!-- subject="Re: SANE standard," -->
<!-- id="" -->
<!-- inreplyto="SANE standard," -->
<title>sane-devel: Re: SANE standard,</title>
<h1>Re: SANE standard,</h1>
<b>Milon Firikis</b> (<a href="mailto:milonf@ariadne-t.gr"><i>milonf@ariadne-t.gr</i></a>)<br>
<i>Mon, 07 Dec 1998 14:33:52 +0200</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#67">[ date ]</a><a href="index.html#67">[ thread ]</a><a href="subject.html#67">[ subject ]</a><a href="author.html#67">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0068.html">Milon Firikis: "Re: USB scanners?"</a>
<li> <b>Previous message:</b> <a href="0066.html">Kaare Rasmussen: "HP1100A ?"</a>
<li> <b>Maybe in reply to:</b> <a href="0042.html">Robert Schwebel: "SANE standard,"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0071.html">Robert Schwebel: "Re: SANE standard,"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Robert Schwebel wrote:<br>
<i>&gt; </i><br>
<i>&gt; Hello!</i><br>
<p>
[snip]<br>
<p>
<i>&gt; </i><br>
<i>&gt; A few questions:</i><br>
<i>&gt; </i><br>
<i>&gt; - Is there more information about how to write a backend? I looked threw</i><br>
<i>&gt; the SANE coding standard V1.0 and found it still difficult to write a</i><br>
<i>&gt; backend myself with what I found there. I played around with the pnm</i><br>
<i>&gt; driver which seems to be a sample implementation, but it is very</i><br>
<i>&gt; poorly</i><br>
<i>&gt; documented and other drivers seem to follow completely different</i><br>
<i>&gt; strategies and style guides. Something like a "How to start writing a</i><br>
<i>&gt; SANE backend" would be nice.</i><br>
<p>
That's the only thing AFAIK. However you did the right moves. PNM<br>
backend is difficult to understand and the scanners backend are way too<br>
different from your needs but still is an invaluable "source" of<br>
knowledge. I recommend mustek.c I started with that. You can also try<br>
apple.c. apple.c has a define<br>
#if 0<br>
#define NEUTRALIZE_BACKEND<br>
#define APPLE_MODEL_SELECT APPLESCANNER<br>
#endif<br>
<p>
in the apple.h. If you turn the zero to one then you will be able to use<br>
the backend even without scanner. You can't do anything useful with it<br>
but it will let you see the options handling and all these...<br>
<p>
<i>&gt; </i><br>
<i>&gt; - How do I compile my own backend? At the moment I copied my source into</i><br>
<i>&gt; the sane-1.0/backends directory as root, compiled it there and</i><br>
<i>&gt; installed</i><br>
<i>&gt; the libraries by hand in /usr/local/lib/sane/ (because make install</i><br>
<i>&gt; installs always all libraries found, no matter if they already were</i><br>
<i>&gt; installed). Is this really the right way? Any possibility of making</i><br>
<i>&gt; the source with user permissions and only installing it as root?</i><br>
<p>
untar the SANE source<br>
chown -R user.group sane-XXX<br>
always edit source code as user (not root)<br>
always do make as user<br>
If you are a developer you should try ./configure with --static-libs or<br>
something, otherwise you won't be able to debug your backend.<br>
<p>
When you want to install, you install as root.<br>
<p>
In order to make your backend part of the building procedure you should<br>
edit Makefile.in and add your backend to the proper places.<br>
<p>
<i>&gt; - A few samples of how to deal with all these options defined in the</i><br>
<i>&gt; option</i><br>
<i>&gt; descriptor would be nice as well. I tried to setup a string_list, but</i><br>
<i>&gt; if I run xscanimage and select one of the list entries it stops with</i><br>
<i>&gt; xscanimage: can't resolve symbol 'sanei_constrain_value'</i><br>
<p>
Give more info... <br>
<p>
<i>&gt; - Is there a separation between the API part of the SANE backend and the</i><br>
<i>&gt; hardware dependend routines?</i><br>
<p>
SANE hides out scsi interface. You should use sanei_scsi routines and<br>
not direct scsi calls. Unfortunately this isn't true for other kind of<br>
interfaces. Especially for the scanners that have a proprietary ISA card<br>
one should use direct hardware port access giving up both compatibility<br>
(PC only) and security (SANE should be setuid root). For the parallel<br>
ports and serial ports I don't have a clear idea what is the status qwo<br>
right now. Maybe somebody else could clarify further?<br>
<p>
<i>&gt;Am I simply allowed to access hardware</i><br>
<i>&gt; ports from my backend and are there any guidelines dealing with</i><br>
<i>&gt; compatiblity (what system libraries am I allowed to use) and</i><br>
<i>&gt; portability?</i><br>
<p>
Give some more info (Hardware, interface, libraries) for a more proper<br>
advise and not a general conversation...<br>
<p>
MF<br>
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0068.html">Milon Firikis: "Re: USB scanners?"</a>
<li> <b>Previous message:</b> <a href="0066.html">Kaare Rasmussen: "HP1100A ?"</a>
<li> <b>Maybe in reply to:</b> <a href="0042.html">Robert Schwebel: "SANE standard,"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0071.html">Robert Schwebel: "Re: SANE standard,"</a>
<!-- reply="end" -->
</ul>