pull/572/head
Michael Black W9MDB 2021-02-14 14:37:06 -06:00
commit 665a6eabc0
5 zmienionych plików z 113 dodań i 90 usunięć

Wyświetl plik

@ -18,8 +18,8 @@ MAN_EXTENSION = .3
CASE_SENSE_NAMES = YES CASE_SENSE_NAMES = YES
FULL_PATH_NAMES = NO FULL_PATH_NAMES = NO
INPUT = @top_srcdir@/doc/index.doxygen \ INPUT = @top_srcdir@/doc/index.doxygen \
@top_srcdir@/include/hamlib/ \ @top_srcdir@/include/hamlib/ \
@top_srcdir@/src/ @top_srcdir@/src/
EXCLUDE = @top_srcdir@/src/amp_conf.h \ EXCLUDE = @top_srcdir@/src/amp_conf.h \
@top_srcdir@/include/hamlib/ampclass.h \ @top_srcdir@/include/hamlib/ampclass.h \
@ -28,7 +28,11 @@ EXCLUDE = @top_srcdir@/src/amp_conf.h \
INCLUDE_PATH = @top_srcdir@/include INCLUDE_PATH = @top_srcdir@/include
EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \ EXAMPLE_PATH = @top_srcdir@/tests/testrig.c \
@top_srcdir@ @top_srcdir@ \
@top_srcdir@/scripts/README.build-Windows \
@top_srcdir@/scripts/build-w32.sh \
@top_srcdir@/scripts/build-w64.sh
QUIET = YES QUIET = YES

Wyświetl plik

@ -10,7 +10,7 @@ Stéphane Fillod, F8CFE, and Frank Singleton, VK3FCS and the Hamlib Group
This document describes the Hamlib library Application Programming Interface This document describes the Hamlib library Application Programming Interface
(API) for this distribution. (API) for this distribution.
We attempt to document the complete API of the core modules of Hamlib, i.e., We attempt to document the complete API of the core modules of Hamlib, i.e.
the API seen by end-user application developers. You may navigate the the API seen by end-user application developers. You may navigate the
documentation through the tabs at the top of this page. documentation through the tabs at the top of this page.
@ -21,9 +21,9 @@ Please report any problems to hamlib-developer@lists.sourceforge.net.
These text files are distributed with the Hamlib package. These text files are distributed with the Hamlib package.
Readme files: \subpage Rdme "General"; Readme files: \subpage Rdme "General";
\subpage Rdmebeta "Beta tester"; \subpage Rdmebeta "Beta Tester";
\subpage Rdmedevel "Developer"; \subpage Rdmedevel "Developer";
\subpage Rdmewin32 "Win32" \subpage Rdmewin "MS Windows"
Other files: \subpage INSTALL; Other files: \subpage INSTALL;
\subpage AUTHORS; \subpage AUTHORS;
@ -33,14 +33,13 @@ Other files: \subpage INSTALL;
\subpage NEWS; \subpage NEWS;
\subpage PLAN; \subpage PLAN;
\subpage THANKS; \subpage THANKS;
\subpage TODO
\section lnks Internet links \section lnks Internet links
\li http://www.hamlib.org -- project Wiki, including list of supported rigs. \li http://hamlib.org — Main project with links to releases, Wiki, and documentation including list of supported equipment.
\li http://sourceforge.net/projects/hamlib/ -- SourceForge.net project page. \li https://github.com/Hamlib/Hamlib — GitHub repository via Web interface.
\li http://hamlib.git.sourceforge.net/git/gitweb-index.cgi -- Git repository via Web \li https://sourceforge.net/projects/hamlib/ — SourceForge.net project page.
\li http://hamlib.svn.sourceforge.net/viewvc/hamlib/ -- SVN repository via Web \li https://sourceforge.net/p/hamlib/code/ — SourceForge Git repository via Web interface.
\section slic Documentation License \section slic Documentation License
@ -65,8 +64,16 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/*! \page Rdmedevel README.developer /*! \page Rdmedevel README.developer
\verbinclude README.developer \verbinclude README.developer
*/ */
/*! \page Rdmewin32 README.win32 /*! \page Rdmewin Cross-compiling Hamlib on Linux for MS Windows
\verbinclude README.win32 This page contains the `scripts/README.build-Windows` instructions and the
`scripts/build-w32.sh` file that describe cross-compiling Hamlib for MS
Windows 32 bit on Debian GNU/Linux.
\section Build README.build-Windows
\verbinclude README.build-Windows
\subsection W32 The build-w32.sh script
\verbinclude build-w32.sh
\subsection W64 The build-w64.sh script
\verbinclude build-w64.sh
*/ */
/*! \page INSTALL INSTALL /*! \page INSTALL INSTALL
\verbinclude INSTALL \verbinclude INSTALL
@ -92,14 +99,11 @@ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/*! \page THANKS THANKS /*! \page THANKS THANKS
\verbinclude THANKS \verbinclude THANKS
*/ */
/*! \page TODO TO DO
\verbinclude TODO
*/
/*! Define groups for Doxygen /*! Define groups for Doxygen
* \defgroup rig Rig (transceiver) API * \defgroup rig Rig (transceiver) API
* \defgroup rotator Rotator API * \defgroup rotator Rotator API
* \defgroup utilities Utility Routines API * \defgroup utilities Utility Routines API
* \defgroup rig_internal Rig Internal API * \defgroup rig_internal Rig Internal API
* \defgroup amplifier Amplifier API * \defgroup amplifier Amplifier API
*/ */

Wyświetl plik

@ -8,30 +8,30 @@ with MS VC++.
Prerequisites Prerequisites
============= =============
In these steps the release or daily snapshot tarball is unpacked in ~/builds In these steps the release or daily snapshot tarball is unpacked in
for the Windows build and all operations are done from there unless $HOME/builds for the Windows build and all operations are done from there
otherwise noted. unless otherwise noted.
Under Linux you need at least the mingw-w64 package to cross-compile it, zip Under Linux you need at least the following packages:
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 mingw-w64 cross-compiler
zip create the archive
tofrodos convert to DOS text format (CR/LF)
groff convert nroff manual pages to HTML
to create the Windows .LIB file (unzip and then install it with Wine in the On Debian 8 (Jessie) and later versions the mingw-w64 package works and is
usual way). being used to build the daily Windows 32/64 snapshots and stable releases.
The release and daily snapshots are built in a Debian 10 (Buster) virtual
machine.
On Debian Jesse the mingw-w64 package works and is being used to build Finally, the Windows version of libusb 1.0 must be available for the USB
the daily Windows 32/64 snapshots and releases. backends to be built. Download the latest libusb-1.0 from:
Finally, the Windows version of libusb 1.0 must be available for the USB backends
to be built. Download the latest libusb-1.0 from:
https://sourceforge.net/projects/libusb/files/libusb-1.0/ https://sourceforge.net/projects/libusb/files/libusb-1.0/
:nd unzip the archive in ~/builds and unzip the archive in $HOME/builds.
Libusb 1.0.20 is known to work. Presumably any 1.X.X version should work. libusb 1.0.20 is known to work. Presumably, any 1.X.X version should work.
Several variables may need to be set differently at the top of the script file Several variables may need to be set differently at the top of the script file
depending on your system. depending on your system.
@ -40,28 +40,27 @@ The script now relies on a pair of environment variables to locate the needed
libusb files. libusb files.
The script generates HTML documents for the included .EXE files using groff The script generates HTML documents for the included .EXE files using groff
to convert the nroff formatted man pages. On Debian and derivatives, the groff to convert the nroff formatted man pages.
package is likely already installed.
Build for Windows 32/64, cross-compile on Linux: Build for Windows 32/64, cross-compile on Linux:
================================================ ================================================
Extract the Hamlib tarball into ~/builds (if you prefer another directory Extract the Hamlib tarball into $HOME/builds (if you prefer another directory
be sure to edit the BUILD_DIR variable in the build-w[32|64].sh script): be sure to edit the BUILD_DIR variable in the build-w[32|64].sh script):
$ tar xvfz ~/Downloads/hamlib-3.3~git-???????-20180527.tar.gz $ tar xvfz $HOME/Downloads/hamlib-4.2~git-???????-20210214.tar.gz
Invoke the build-w[32|64].sh script (it requires a Bash shell) with the Invoke the build-w[32|64].sh script (either requires a Bourne compatible
name of the directory/Hamlib version to build (you need not cd into the hamlib shell, e.g. bash, dash, etc.) with the name of the directory/Hamlib version to
directory, although it won't hurt. The build-w[32|64].sh script uses absolute build (you need not cd into the hamlib directory, although it won't hurt. The
paths): build-w[32|64].sh script uses absolute paths):
$ build-w32.sh hamlib-3.3~git $ build-w32.sh hamlib-4.2~git
or: or:
$ build-w64.sh hamlib-3.3~git $ build-w64.sh hamlib-4.2~git
Release Info Release Info

Wyświetl plik

@ -2,11 +2,10 @@
# Builds Hamlib 4.x W32 binary distribution. # Builds Hamlib 4.x W32 binary distribution.
# A script to build a set of W32 binary DLLs from a Hamlib tarball. This # A script to build a set of W32 binary DLLs and executables from a Hamlib
# script assumes that the Hamlib tarball has been extracted to the directory # source tarball. This script assumes that the Hamlib source tarball has been
# specified in $BUILD_DIR and that libusb-1.x.y has also been extracted to # extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has
# $BUILD_DIR. The MS VC++ Toolkit must also be installed and working with # also been extracted to $BUILD_DIR.
# Wine.
# See README.build-Windows for complete details. # See README.build-Windows for complete details.
@ -29,7 +28,8 @@ EX_NOINPUT=66
# Pass name of Hamlib archive extracted in $BUILD_DIR # Pass name of Hamlib archive extracted in $BUILD_DIR
if [ $# -ne 1 ]; then if test $# -ne 1
then
echo echo
echo "Usage: $(basename $0) hamlib-version" echo "Usage: $(basename $0) hamlib-version"
echo "See README.build-Windows for more information." echo "See README.build-Windows for more information."
@ -39,7 +39,8 @@ if [ $# -ne 1 ]; then
fi fi
# Make sure the Hamlib archive is where we expect # Make sure the Hamlib archive is where we expect
if [ -d ${BUILD_DIR}/$1 ]; then if test -d ${BUILD_DIR}/$1
then
echo echo
echo "Building W32 binaries in ${BUILD_DIR}/$1" echo "Building W32 binaries in ${BUILD_DIR}/$1"
echo echo
@ -196,9 +197,7 @@ NOTE: feedback is requested on the previous two command examples!
The published Hamlib API may be found at: The published Hamlib API may be found at:
http://hamlib.sourceforge.net/manuals/3.0.1/index.html http://hamlib.sourceforge.net/manuals/4.1/index.html
(The 4.0 API/ABI is changed and new documentation will be forthcoming.)
Thank You! Thank You!
@ -229,26 +228,35 @@ END_OF_README
make -j 4 install make -j 4 install
mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc
cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.
todos ${ZIP_DIR}/include/hamlib/*.h
# C++ binding is useless on w32 because of ABI # C++ binding is useless on w32 because of ABI
for f in *class.h ; do \ for f in *class.h
do
rm ${ZIP_DIR}/include/hamlib/${f} rm ${ZIP_DIR}/include/hamlib/${f}
done done
for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS ; do \ for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done do
cp -a ${f} ${ZIP_DIR}/${f}.txt
todos ${ZIP_DIR}/${f}.txt
done
# Generate HTML documents from nroff formatted man files # Generate HTML documents from nroff formatted man files
for f in doc/man1/*.1 doc/man7/*.7; do \ for f in doc/man1/*.1 doc/man7/*.7
do
/usr/bin/groff -mandoc -Thtml >${f}.html ${f} /usr/bin/groff -mandoc -Thtml >${f}.html ${f}
cp -a ${f}.html ${ZIP_DIR}/doc/. ; done cp -a ${f}.html ${ZIP_DIR}/doc/.
done
cd ${BUILD_DIR}/$1 cd ${BUILD_DIR}/$1
# Copy build files into specific locations for Zip file # Copy build files into specific locations for Zip file
for f in *.exe ; do \ for f in *.exe
do
cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/. cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/.
done done
@ -264,13 +272,15 @@ cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW32/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.
# Required for MinGW with GCC 6.3 (Debian 9) # Required for MinGW with GCC 6.3 (Debian 9)
FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll" FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll"
if test -f "$FILE"; then if test -f "$FILE"
then
cp -a ${FILE} ${ZIP_DIR}/bin/. cp -a ${FILE} ${ZIP_DIR}/bin/.
fi fi
# Required for MinGW with GCC 8.3 (Debian 10) # Required for MinGW with GCC 8.3 (Debian 10)
FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll" FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll"
if test -f "$FILE"; then if test -f "$FILE"
then
cp -a ${FILE} ${ZIP_DIR}/bin/. cp -a ${FILE} ${ZIP_DIR}/bin/.
fi fi

Wyświetl plik

@ -2,11 +2,10 @@
# Builds Hamlib 4.x W64 binary distribution. # Builds Hamlib 4.x W64 binary distribution.
# A script to build a set of W64 binary DLLs from a Hamlib tarball. This # A script to build a set of W64 binary DLLs and executables from a Hamlib
# script assumes that the Hamlib tarball has been extracted to the directory # source tarball. This script assumes that the Hamlib source tarball has been
# specified in $BUILD_DIR and that libusb-1.x.y has also been extracted to # extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has
# $BUILD_DIR. The MS VC++ Toolkit must also be installed and working with # also been extracted to $BUILD_DIR.
# Wine.
# See README.build-Windows for complete details. # See README.build-Windows for complete details.
@ -29,7 +28,8 @@ EX_NOINPUT=66
# Pass name of Hamlib archive extracted in $BUILD_DIR # Pass name of Hamlib archive extracted in $BUILD_DIR
if [ $# -ne 1 ]; then if test $# -ne 1
then
echo echo
echo "Usage: $(basename $0) hamlib-version" echo "Usage: $(basename $0) hamlib-version"
echo "See README.build-Windows for more information." echo "See README.build-Windows for more information."
@ -39,7 +39,8 @@ if [ $# -ne 1 ]; then
fi fi
# Make sure the Hamlib archive is where we expect # Make sure the Hamlib archive is where we expect
if [ -d ${BUILD_DIR}/$1 ]; then if test -d ${BUILD_DIR}/$1
then
echo echo
echo "Building W64 binaries in ${BUILD_DIR}/$1" echo "Building W64 binaries in ${BUILD_DIR}/$1"
echo echo
@ -70,9 +71,6 @@ This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE
cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 10 cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 10
(nice, heh!). (nice, heh!).
NB: This Windows 64 bit release is EXPERIMENTAL! Please report bugs,
failures, and success to the Hamlib mailing list below.
This software is copyrighted. The library license is LGPL, and the *.EXE files This software is copyrighted. The library license is LGPL, and the *.EXE files
licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the LICENSE.txt, licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the LICENSE.txt,
COPYING.txt, and COPYING.LIB.txt files. COPYING.txt, and COPYING.LIB.txt files.
@ -200,9 +198,7 @@ not appear to be correct to generate a 64 bit libhamlib-4.lib file!
The published Hamlib API may be found at: The published Hamlib API may be found at:
http://hamlib.sourceforge.net/manuals/3.0.1/index.html http://hamlib.sourceforge.net/manuals/4.1/index.html
(The 4.0 API/ABI is changed and new documentation will be forthcoming.)
Thank You! Thank You!
@ -233,27 +229,35 @@ END_OF_README
make -j 4 install make -j 4 install
mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc
cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-4.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h todos ${ZIP_DIR}/lib/msvc/libhamlib-4.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.
todos ${ZIP_DIR}/include/hamlib/*.h
# C++ binding is useless on w64 because of ABI # C++ binding is useless on w64 because of ABI
for f in *class.h ; do \ for f in *class.h
do
rm ${ZIP_DIR}/include/hamlib/${f} rm ${ZIP_DIR}/include/hamlib/${f}
done done
for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS ; do \ for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt do
cp -a ${f} ${ZIP_DIR}/${f}.txt
todos ${ZIP_DIR}/${f}.txt
done done
# Generate HTML documents from nroff formatted man files # Generate HTML documents from nroff formatted man files
for f in doc/man1/*.1 doc/man7/*.7 ; do \ for f in doc/man1/*.1 doc/man7/*.7
do
/usr/bin/groff -mandoc -Thtml >${f}.html ${f} /usr/bin/groff -mandoc -Thtml >${f}.html ${f}
cp -a ${f}.html ${ZIP_DIR}/doc/. ; done cp -a ${f}.html ${ZIP_DIR}/doc/.
done
cd ${BUILD_DIR}/$1 cd ${BUILD_DIR}/$1
# Copy build files into specific locations for Zip file # Copy build files into specific locations for Zip file
for f in *.exe ; do \ for f in *.exe
do
cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/. cp -a ${INST_DIR}/bin/${f} ${ZIP_DIR}/bin/.
done done
@ -269,13 +273,15 @@ cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.
# Required for MinGW with GCC 6.3 (Debian 9) # Required for MinGW with GCC 6.3 (Debian 9)
FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll" FILE="/usr/lib/gcc/i686-w64-mingw32/6.3-posix/libgcc_s_sjlj-1.dll"
if test -f "$FILE"; then if test -f "$FILE"
then
cp -a ${FILE} ${ZIP_DIR}/bin/. cp -a ${FILE} ${ZIP_DIR}/bin/.
fi fi
# Required for MinGW with GCC 8.3 (Debian 10) # Required for MinGW with GCC 8.3 (Debian 10)
FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll" FILE="/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll"
if test -f "$FILE"; then if test -f "$FILE"
then
cp -a ${FILE} ${ZIP_DIR}/bin/. cp -a ${FILE} ${ZIP_DIR}/bin/.
fi fi