[sane-devel] where to put firmware files?

Henning Meier-Geinitz henning@meier-geinitz.de
Sat, 5 Oct 2002 20:26:29 +0200


Hi,

On Sat, Oct 05, 2002 at 10:11:31PM +0400, Sergey Vlasov wrote:
> The previous solution allows to keep the same file name as in Windows
> drivers, so just copying the file is enough. (However, this will not
> solve all problems - Windows filesystems are not case-sensitive, so the
> character case in file names is often messed up.)

In the latest (not yet released) gt68xx backend I use the following
approach:

The name of the firmware file is hard-wired in a variable in the code.
This variable is set per scanner (e.g. "SBfw.usb"). The default can be
overwritten in the config file.

If the file name contains no leading "/", SANE_DATA_DIR "/sane/gt68xx/"
is prepended, resulting in /usr/local/share/sane/gt68xx/SBfw.usb in
this case.

The backend tries to read the read the file. If that doesn't work, it
tries to read the all-lowercase version of the file resulting in 
/usr/local/share/sane/gt68xx/sbfw.usb. If this also fails, an error
message is printed.

Bye,
  Henning