XSane-Logo

Building XSane 0.96 for OS/2


Here some information how to build XSane 0.96 for OS/2.
First of all you need the sources of XSane 0.96
You need the same tools / environement / libs as described in my page for building SANE 1.0.14 and you need a libsane.a (which you will have if you managed to build scanimage).
For TIFF-support you need a ported tiff-library. I used tiff34.zip

xsane.exe

I used the following steps to build xsane.exe :
  1. In /XFree86/lib   convert /libgimp122.lib   to libginp122.a   with
    emximp -o libgimp122.a libgimp122.lib
  2. sh configure --disable-sanetest --disable-gtktest --disable-gimptest --with-sane-prefix=/usr --enable-gimp --disable-gtk2 --prefix=/XFree86
  3. In xsane-0.96/src/Makefile
    change
    LIBS = -lgimp -LG:/XFree86/lib .... -lz -lm
    to
    LIBS = -llibgimp122 -LG:/XFree86/lib .... -lz /usr/lib/libsane.a -lpthreads -liconv
  4. In line 9027 of xsane-0.96/src/xsane.c
    change
    #if 0
    to
    #if 1
  5. make
  6. make install
  7. Copy
    src/xsane.exe
    to
    /XFree86/bin/xsane.exe
  8. Delete
    /XFree86/bin/xsane
    and
    /XFree86/lib/X11/.gimp-1.2/plug-ins/sbin
  9. If you don't have allready, manually create the directory ~/.sane
    ~ has to be replaced with the value of your HOME environement variable.
Hardware that is known to work with this version: Hardware that is known to work with previous versions: Scan, Copy and OCR   work. I did not try/use Mail or Fax. If you find a way to make Fax work, please tell me.

XSane works here standalone and also as GIMP-Plugin.

If you don't have the time/wish to build XSane yourself, you can DOWNLOAD THE BINARY PACKAGE.
Here's the link to the Xsane-0.96-README for OS/2
You need a working version of SANE an X11-server and some additional dll's in /XFree86/lib or somewhere else in your libpath (if you don't have them allready installed) to run XSane.

dllavailable for example at
gtk12.dll, gdk12.dllhttp://os2ports.com/ftp/pub/os2/unix/xfree86/ports/Gnome/gtk128.zip
gmodule.dll, glib12.dllhttp://os2ports.com/ftp/pub/os2/unix/xfree86/ports/Gnome/glib128.zip
intl.dllhttp://os2ports.com/ftp/pub/os2/unix/xfree86/ports/libs/gettext.zip
png.dllhttp://os2ports.com/ftp/pub/os2/unix/xfree86/ports/graphic_libs/libpng103.zip
tiff.dllhttp://os2ports.com/ftp/pub/os2/unix/xfree86/ports/graphic_libs/tiff34.zip
jpeg.dllhttp://www.os2site.com/leo/devtools/libraries/jpeg6b.zip
z.dllhttp://www.os2site.com/sw/dev/zlib/zlib114.zip

Tell me if I missed one.
I use my own build of SANE 1.0.14 (but it should also work with other SANE's which have a libsane.dll like the 1.05 version provided by Paul Smedley).
It works here with both XFree86 for OS/2 Version 4.3.0 and also with HOBLink X11. It should with other XServers too.
But be careful and allways have a backup, You might get TRAPs. It runs fine with my hardware (without TRAPs now), but is not much tested elsewhere.
Tell me whether it works for you.
Thanks to Oliver Rauch who helped me to make this work and included the OS/2 specific changes, which were necessary to build this release, into the source-code. Thanks also to Christian Hennecke for the first positive feedback, James for the pointer to z.dll and Dave for the info how to convert libgimp122.lib to libgimp122.a
I hope, I did not miss something important. Feel free to send me your comments.

Last modified 20 October 2008, Franz Bakan

Valid HTML 4.01