Update the Windows build scripts and README

Attempt to make these a bit more readable for future inclusion into the
Doxygen generated documentation.
pull/547/head
Nate Bargmann 2021-02-14 13:38:15 -06:00
rodzic f81d0ca96e
commit bbb4354f2b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F72625E2EDBED598
3 zmienionych plików z 84 dodań i 69 usunięć

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