[sane-devel] sane runs in windows without cygwin
Michael Cronenworth
mike at cchtml.com
Tue Jan 13 21:40:27 UTC 2009
Hello,
I've had success in building sane with MinGW, MSYS, and
libusb-win32-0.12. During my initial work I was unable to find much of
anything about such a feat as most people settled for Cygwin.
Some caveats:
1. I ripped out all backends except for "fujitsu" as this is the scanner
I have. The "fujitsu" code required no modifications to compile.
2. Signals, threading, and scsi are also obviously not available. I put
#ifdef 32 or #ifndef WIN32 around the problem areas.
3. I changed sleep() calls to usleep() calls or used the Windows method
of sleep.
4. getpass() is used?!?
In retrospect:
1. The rest of the backends seemed to need extensive rework as they use
signals and ioctl calls that do not translate at all.
2. Threading and scsi could be made available quite easily by adding
Windows equivalents.
3. Platform independent sleep calls should be put in.
4. Obsolete function! This should be replaced with similar functionality.
I have a GTK+2 app that used sane in Linux and it works in Windows
without any modification to the app code. I scanned successfully and my
program rendered a beautiful PNG to the screen. It should be noted that
in order for the scanner to be detected, I had to install the Fujitsu
TWAIN driver. I guess libusb-win32 could not detect the device until the
appropriate driver was installed? Artefact of using Windows inside of
VirtualBox?
If anyone is interested in the changes I've made, I'd be interested in
making them available.
Regards,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20090113/8e17c9bc/attachment.htm
More information about the sane-devel
mailing list