<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hello,<br>
<br>
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.<br>
<br>
Some caveats:<br>
1. I ripped out all backends except for "fujitsu" as this is the
scanner I have. The "fujitsu" code required no modifications to compile.<br>
2. Signals, threading, and scsi are also obviously not available. I put
#ifdef 32 or #ifndef WIN32 around the problem areas.<br>
3. I changed sleep() calls to usleep() calls or used the Windows method
of sleep.<br>
4. getpass() is used?!?<br>
<br>
In retrospect:<br>
1. The rest of the backends seemed to need extensive rework as they use
signals and ioctl calls that do not translate at all.<br>
2. Threading and scsi could be made available quite easily by adding
Windows equivalents.<br>
3. Platform independent sleep calls should be put in.<br>
4. Obsolete function! This should be replaced with similar
functionality.<br>
<br>
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?<br>
<br>
If anyone is interested in the changes I've made, I'd be interested in
making them available.<br>
<br>
Regards,<br>
Michael<br>
</font></font>
</body>
</html>