2011-06-20 01:12:35 +00:00
|
|
|
|
|
|
|
This file is a HOWTO for the cross-compiling of Win32 binary DLLs built from
|
|
|
|
a tarball generated by 'make dist' in a Git checkout. The resulting DLLs
|
|
|
|
are built with a cdecl interface compatible with MS VC++.
|
|
|
|
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
=============
|
|
|
|
|
|
|
|
In these steps the release or daily snapshot tarball is unpacked in ~/builds
|
|
|
|
for the Win32 build and all operations are done from there unless otherwise
|
|
|
|
noted.
|
|
|
|
|
|
|
|
Under Linux you need the mingw32 package to cross-compile it, an internal
|
|
|
|
copy of libltdl (configured and built as below), zip to create the archive,
|
|
|
|
the tofrodos or dos2unix package installed to convert to DOS text format,
|
|
|
|
and Wine plus the free MVC++Toolkit available from:
|
|
|
|
|
|
|
|
http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html
|
|
|
|
|
|
|
|
to create the Win32 .LIB file (unzip and then install it with Wine in the
|
|
|
|
usual way).
|
|
|
|
|
|
|
|
NB: Debian Squeeze and later users will need at least the mingw32-runtime
|
2011-06-21 18:38:39 +00:00
|
|
|
3.15 package as the 3.13 package is broken. You can manually install the
|
2011-06-20 01:12:35 +00:00
|
|
|
Ubuntu version from:
|
|
|
|
|
|
|
|
http://packages.ubuntu.com/maverick/devel/mingw32-runtime
|
|
|
|
|
|
|
|
Finally, the Win32 version of libusb must be available for the USB backends to
|
|
|
|
be built. Download the latest libusb-win32-bin-1.2.4.0.zip from:
|
|
|
|
|
|
|
|
https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.4.0/
|
|
|
|
|
|
|
|
and unzip the archive in ~/builds/libusb-win32-bin-1.2.4.0 and then copy the
|
|
|
|
following into libusb-win32-bin-1.2.4.0/lib/pkgconfig/libusb.pc (the
|
|
|
|
pkgconfig directory will need to be created):
|
|
|
|
|
|
|
|
---------------CUT-----------------------------
|
|
|
|
prefix=/home/USER/builds/libusb-win32-bin-1.2.4.0
|
|
|
|
exec_prefix=${prefix}
|
|
|
|
libdir=${exec_prefix}/lib/gcc
|
|
|
|
bindir=${exec_prefix}/bin
|
|
|
|
includedir=${prefix}/include
|
|
|
|
|
|
|
|
Name: libusb
|
|
|
|
Description: USB access library
|
|
|
|
Version: 1.2.4.0
|
|
|
|
Libs: -L${libdir} -L${bindir} -lusb
|
|
|
|
Cflags: -I${includedir}
|
|
|
|
---------------CUT-----------------------------
|
|
|
|
|
2011-06-21 18:38:39 +00:00
|
|
|
Any version of libusb from 1.2.3.0 is known to work.
|
|
|
|
|
|
|
|
The script generates PDF documents for the included .EXE files using the
|
|
|
|
groff and ps2pdf utilities to convert the nroff formatted man pages. On
|
|
|
|
Debian and derivatives, installing the groff and ghostscript packages will
|
|
|
|
provide them.
|
2011-06-20 01:12:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
Build for Win32, cross-compile on Linux:
|
|
|
|
========================================
|
|
|
|
|
|
|
|
Extract the Hamlib tarball into ~/builds (if you prefer another directory
|
|
|
|
be sure to edit the BUILD_DIR variable in the build-win32.sh script):
|
|
|
|
|
|
|
|
$ tar xvfz ~/Downloads/hamlib-1.2.14~git-72c52d6-20110618.tar.gz
|
|
|
|
|
|
|
|
Invoke the build-win32.sh script (it requires a Bash shell) with the name
|
|
|
|
of the directory/Hamlib version to build (you need not cd into the hamlib
|
|
|
|
directory, although it won't hurt. The script uses absolute paths):
|
|
|
|
|
|
|
|
build-win32.sh hamlib-1.2.14~git
|
|
|
|
|
|
|
|
Note: At this time (18 Jun 2011) the build will fail on Debian Unstable due
|
|
|
|
to a libtool version mismatch between libtool 2.2.6b included in the
|
|
|
|
mingw32/gcc-mingw32 packages and the later libtool 2.4 installed on Unstable
|
|
|
|
and Testing. Users of Debian Stable (Squeeze) and Ubuntu 10.10 (Maverick)
|
|
|
|
should be able to build the Win32 DLLs.
|
|
|
|
|
2011-06-21 02:35:06 +00:00
|
|
|
|
|
|
|
Release Info
|
|
|
|
============
|
|
|
|
|
|
|
|
The structure of the archive is:
|
|
|
|
|
|
|
|
$ tree -d
|
|
|
|
.
|
|
|
|
|-- bin
|
|
|
|
|-- include
|
|
|
|
| `-- hamlib
|
2011-06-21 18:38:39 +00:00
|
|
|
|-- lib
|
|
|
|
| |-- gcc
|
|
|
|
| `-- msvc
|
|
|
|
`-- pdf
|
2011-06-21 02:35:06 +00:00
|
|
|
|
2011-06-21 18:38:39 +00:00
|
|
|
7 directories
|
2011-06-21 02:35:06 +00:00
|
|
|
|
|
|
|
The bin directory is were the executables and DLL files are placed. Header
|
|
|
|
files are under include/Hamlib and compiler specific files are under lib/*.
|
2011-06-21 18:38:39 +00:00
|
|
|
PDF documents for the .EXE programs are in pdf/ while text documents
|
|
|
|
(READMEs and such) are in the main archive directory. The embedded
|
|
|
|
README.win32-bin file generated by the build-win32.sh script describes
|
|
|
|
setting the PATH environment variable in Windows 2000 and Windows XP.
|
2011-06-21 02:35:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
73, Nate, N0NB
|