From b65a39db539605ce179b41b59037e250d3bb9e3d Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Sun, 29 Jul 2018 21:56:55 -0500 Subject: [PATCH] Update to current Windows build scripts Scripts for both 32 and 64 bit build on MS Windows platforms and associated information. --- scripts/Makefile.am | 4 +- scripts/README.build-Windows | 94 +++++++++ scripts/README.build-win32 | 98 ---------- scripts/README.scripts | 10 +- scripts/build-w32.sh | 232 +++++++++++++++++++++++ scripts/{build-win32.sh => build-w64.sh} | 95 +++++----- 6 files changed, 380 insertions(+), 153 deletions(-) create mode 100644 scripts/README.build-Windows delete mode 100644 scripts/README.build-win32 create mode 100644 scripts/build-w32.sh rename scripts/{build-win32.sh => build-w64.sh} (71%) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 0f7ef5d51..b62041da0 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,2 +1,2 @@ -EXTRA_DIST = README.scripts build-win32.sh README.build-win32 \ - build-VB.NET.sh README.build-VB.NET +EXTRA_DIST = README.scripts build-w32.sh build-w64.sh README.build-Windows \ + build-VB.NET.sh README.build-VB.NET astylerc diff --git a/scripts/README.build-Windows b/scripts/README.build-Windows new file mode 100644 index 000000000..f3dc95da4 --- /dev/null +++ b/scripts/README.build-Windows @@ -0,0 +1,94 @@ + +This file is a HOWTO for the cross-compiling of Windows 32 and 64 bit +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 Windows build and all operations are done from there unless +otherwise noted. + +Under Linux you need at least the mingw-w64 package to cross-compile it, 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 Windows .LIB file (unzip and then install it with Wine in the +usual way). + +On Debian Jesse the mingw-w64 package works and is being used to build +the daily Windows 32/64 snapshots and releases. + +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/ + +and unzip the archive in ~/builds + +Any version of libusb from 1.0.20 is known to work. + +Several variables may need to be set differently at the top of the script file +depending on your system. + +The script now relies on a pair of environment variables to locate the needed +libusb files. + +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 +package is likely already installed. + + +Build for Windows 32/64, 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-w[32|64].sh script): + + $ tar xvfz ~/Downloads/hamlib-3.3~git-???????-20180527.tar.gz + +Invoke the build-w[32|64].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 build-w[32|64].sh script uses absolute +paths): + + $ build-w32.sh hamlib-3.3~git + +or: + + $ build-w64.sh hamlib-3.3~git + + +Release Info +============ + +The structure of the archive is: + +$ tree -d +. +|-- bin +|-- doc +|-- include +| `-- hamlib +|-- lib + |-- gcc + `-- msvc + +8 directories + +The bin/ directory is where the executables and DLL files are placed. Header +files are under include/Hamlib/ and compiler specific files are under lib/*. +HTML documents for the .EXE programs are in doc/ while text documents +(READMEs and such) are in the main archive directory. The doc/ directory +also contains the generated HTML texinfo manual. The embedded +README.w[32|64]-bin.txt file generated by the build-w[32|64].sh script +describes setting the PATH environment variable in Windows 2000, Windows XP, +and Windows 7. + + +73, Nate, N0NB diff --git a/scripts/README.build-win32 b/scripts/README.build-win32 deleted file mode 100644 index f0ed232e5..000000000 --- a/scripts/README.build-win32 +++ /dev/null @@ -1,98 +0,0 @@ - -This file is a HOWTO for the cross-compiling of Windows 32 bit 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 Windows 32 build and all operations are done from there unless -otherwise noted. - -Under Linux you need at least the mingw32 package to cross-compile it (although -mingw-w64-i696 is being used to build the daily snapshots) 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 Windows 32 .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 -3.15 package as the 3.13 package is broken. You can manually install the -Ubuntu version from: - -http://packages.ubuntu.com/maverick/devel/mingw32-runtime - -On Debian Jesse the mingw-w64-i686 pacakge works and is being used to build -the daily Windows 32 snapshots. - -Finally, the Windows 32 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 - -Any version of libusb from 1.2.3.0 is known to work. - -Several variables may need to be set differently at the top of the script file -depending on your system. - -The script now relies on a pair of environment variables to locate the needed -libusb files and the third party pkg-config utility is no longer used for -libusb. - -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. - - -Build for Windows 32, 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-3.0~git-???????-20121007.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 build-win32 script uses absolute -paths): - - $ build-win32.sh hamlib-3.0~git - - -Release Info -============ - -The structure of the archive is: - -$ tree -d -. -|-- bin -|-- doc -|-- include -| `-- hamlib -|-- lib -| |-- gcc -| `-- msvc -`-- pdf - -8 directories - -The bin directory is where the executables and DLL files are placed. Header -files are under include/Hamlib and compiler specific files are under lib/*. -PDF documents for the .EXE programs are in pdf/ while text documents -(READMEs and such) are in the main archive directory. The doc/ directory -contains the generated HTML manual. The embedded README.win32-bin file -generated by the build-win32.sh script describes setting the PATH -environment variable in Windows 2000, Windows XP, and Windows 7. - - -73, Nate, N0NB diff --git a/scripts/README.scripts b/scripts/README.scripts index 80b3defcd..5b6eb8a72 100644 --- a/scripts/README.scripts +++ b/scripts/README.scripts @@ -1,11 +1,13 @@ The scripts/ directory will contain helper scripts for building Hamlib -binary releases for Win32 and possibly other target platforms. EAch -script should be accompanied by a companion README file with information -on the script and build requirements. +binary releases for Microsoft Windows 32 and 64 bit architectures and +possibly other target platforms. Each script should be accompanied by +a companion README file with information on the script and build +requirements. Scripts: -build-win32.sh for building Win32 DLLs and EXEs for use with MS VC++. +build-w32.sh and build-w64.sh for building Microsoft Windows 32 and 64 bit +DLLs and EXEs for use with MS VC++. build-VB.NET.sh for building Win32 DLLs and EXEs for use with MS VB.NET 2002 Framework 1.1 diff --git a/scripts/build-w32.sh b/scripts/build-w32.sh new file mode 100644 index 000000000..d18efd65c --- /dev/null +++ b/scripts/build-w32.sh @@ -0,0 +1,232 @@ +#!/bin/bash + +# Builds Hamlib 3.x W32 binary distribution. + +# A script to build a set of W32 binary DLLs from a Hamlib tarball. +# This script assumes that the Hamlib tarball has been extracted to the +# directory specified in $BUILD_DIR and that libusb-1.x.y has also +# been extracted to $BUILD_DIR. The MS VC++ Toolkit must also be installed +# and working with Wine. +# +# See README.build-win32 for complete details. + + +# Set this to a desired directory +BUILD_DIR=~/builds + +# Set this to LibUSB archive extracted in $BUILD_DIR +LIBUSB_VER=libusb-1.0.20 + +# uncomment the correct HOST_ARCH= line for your minGW installation +HOST_ARCH=i686-w64-mingw32 + +# Set to the strip name for your version of minGW +HOST_ARCH_STRIP=i686-w64-mingw32-strip + +# Error return codes. See /usr/include/sysexits.h +EX_USAGE=64 +EX_NOINPUT=66 + + +# Pass name of Hamlib archive extracted in $BUILD_DIR +if [ $# -ne 1 ]; then + echo -e "\nUsage: `basename $0` hamlib-version\n" + echo -e "See README.build-win32 for more information.\n" + exit ${EX_USAGE} +fi + +# Make sure the Hamlib archive is where we expect +if [ -d ${BUILD_DIR}/$1 ]; then + echo -e "\nBuilding W32 binaries in ${BUILD_DIR}/$1\n\n" + cd ${BUILD_DIR}/$1 +else + echo -e "\nBuild directory, ${BUILD_DIR}/$1 not found!\nCheck path for $1 or correct the version number.\n" + exit ${EX_NOINPUT} +fi + +RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2;exit}' ./configure.ac` +HL_FILENAME=hamlib-w32-${RELEASE} +INST_DIR=`pwd`/mingw32-inst +ZIP_DIR=`pwd`/${HL_FILENAME} +LIBUSB_1_0_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER} + + +# Create W32 specific README.w32-bin file +cat > README.w32-bin < Radio model 120, or Yaesu FT-817 (use 'rigctl -l' for a list) + -r -> Radio device, in this case COM1 + -v -> Verbosity level. For testing four or five v characters are required. + Five 'v's set a debug level of TRACE which generates a lot of screen + output showing communication to the radio and values of important + variables. These traces are vital information for Hamlib rig backend + development. + +To run rigctl or rotctl open a cmd window (Start|Run|enter 'cmd' in the +dialog). If text scrolls off the screen, you can scroll back with the mouse. +To copy output text into a mailer or editor (I recommend Notepad++, a free +editor also licensed under the GPL), highlight the text as a rectangle in the +cmd window, press (or right-click the window icon in the upper left +corner and select Edit, then Copy), and paste it into your editor with Ctl-V +(or Edit|Paste from the typical GUI menu). + +All feedback is welcome to the mail address below. + + +Uninstall +========= + +To uninstall, simply delete the Hamlib directory. You may wish to edit the +PATH as above to remove the Hamlib bin path, if desired. + + +Information for w32 Programmers +================================= + +There is a .LIB import library for MS-VC++ in lib/msvc. Simply #include + (add directory to include path), include the .LIB in your +project and you are done. Note: MS-VC++ cannot compile all the Hamlib code, but +the API defined by rig.h has been made MSVC friendly :-) + +As the source code for the library DLLs is licensed under the LGPL, your +program is not considered a "derivative work" when using the published Hamlib +API and normal linking to the front-end library, and may be of a license of +your choosing. The published Hamlib API may be found at: + +http://hamlib.sourceforge.net/manuals/3.0.1/index.html + + +Thank You! +========== + +Patches, feedback, and contributions are welcome. + +Please report problems or success to hamlib-developer@lists.sourceforge.net + +Cheers, +Stephane Fillod - F8CFE +Nate Bargmann - N0NB +http://www.hamlib.org + +END_OF_README + + +# Configure and build hamlib for mingw32, with libusb-win32 + +./configure --host=${HOST_ARCH} \ + --prefix=${INST_DIR} \ + --without-cxx-binding \ + --disable-static \ + CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \ + LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW32/dll" + + +make install + +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-2.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-2.def +cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h +cp -a doc/Hamlib_design.png ${ZIP_DIR}/doc +cp -a doc/hamlib.html ${ZIP_DIR}/doc + +# C++ binding is useless on w32 because of ABI +rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h + +for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS ; do \ + cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done + +# Generate HTML documents from nroff formatted man files +for f in doc/man1/*.1; do \ + /usr/bin/groff -mandoc -Thtml >${f}.html ${f} + cp -a ${f}.html ${ZIP_DIR}/doc/. ; done + +cd ${BUILD_DIR}/$1 + +# Copy build files into specific locations for Zip file +cp -a ${INST_DIR}/bin/{rigctld.exe,rigctl.exe,rigmem.exe,rigsmtr.exe,rigswr.exe,rotctld.exe,rotctl.exe} ${ZIP_DIR}/bin/. +cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/. +cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/. + +# NB: Strip Hamlib DLLs and EXEs +${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll + +# Copy needed third party DLLs +cp -a /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/. +cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW32/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll + +# Required for MinGW with GCC 4.9 +cp -a /usr/lib/gcc/i686-w64-mingw32/4.9-posix/libgcc_s_sjlj-1.dll ${ZIP_DIR}/bin/libgcc_s_sjlj-1.dll + +## Need VC++ free toolkit installed (default Wine directory installation shown) +( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def ) + +/usr/bin/zip -r ${HL_FILENAME}.zip `basename ${ZIP_DIR}` diff --git a/scripts/build-win32.sh b/scripts/build-w64.sh similarity index 71% rename from scripts/build-win32.sh rename to scripts/build-w64.sh index 7f52e3b6c..7b8648fce 100644 --- a/scripts/build-win32.sh +++ b/scripts/build-w64.sh @@ -1,29 +1,29 @@ #!/bin/bash -# Builds Hamlib 3.x Win32 binary distribution. +# Builds Hamlib 3.x W64 binary distribution. -# A script to build a set of Win32 binary DLLs from a Hamlib tarball. +# A script to build a set of W64 binary DLLs from a Hamlib tarball. # This script assumes that the Hamlib tarball has been extracted to the # directory specified in $BUILD_DIR and that libusb-win32-bin-1.x.y.z has also # been extracted to $BUILD_DIR. The MS VC++Toolkit must also be installed # and working with Wine. # -# See README.build-win32 for complete details. +# Requires libusb-1.0 to be accessible for USB backends to be built. + +# See README.build-w64 for complete details. # Set this to a desired directory BUILD_DIR=~/builds # Set this to LibUSB archive extracted in $BUILD_DIR -LIBUSB_VER=libusb-win32-bin-1.2.4.0 +LIBUSB_VER=libusb-1.0.20 # uncomment the correct HOST_ARCH= line for your minGW installation -# HOST_ARCH=i586-mingw32msvc -HOST_ARCH=i686-w64-mingw32 +HOST_ARCH=x86_64-w64-mingw32 # Set to the strip name for your version of minGW -# HOST_ARCH_STRIP=i586-mingw32msvc-strip -HOST_ARCH_STRIP=i686-w64-mingw32-strip +HOST_ARCH_STRIP=x86_64-w64-mingw32-strip # Error return codes. See /usr/include/sysexits.h EX_USAGE=64 @@ -33,35 +33,38 @@ EX_NOINPUT=66 # Pass name of Hamlib archive extracted in $BUILD_DIR if [ $# -ne 1 ]; then echo -e "\nUsage: `basename $0` hamlib-version\n" - echo -e "See README.build-win32 for more information.\n" - exit $EX_USAGE + echo -e "See README.build-w64 for more information.\n" + exit ${EX_USAGE} fi # Make sure the Hamlib archive is where we expect if [ -d ${BUILD_DIR}/$1 ]; then - echo -e "\nBuilding Win32 binaries in ${BUILD_DIR}/$1\n\n" + echo -e "\nBuilding w64 binaries in ${BUILD_DIR}/$1\n\n" cd ${BUILD_DIR}/$1 else echo -e "\nBuild directory, ${BUILD_DIR}/$1 not found!\nCheck path for $1 or correct the version number.\n" exit $EX_NOINPUT fi -RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2}' ./configure.ac` -INST_DIR=`pwd`/mingw-inst -ZIP_DIR=`pwd`/hamlib-win32-${RELEASE} -LIBUSB_WIN32_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER} +RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2;exit}' ./configure.ac` +HL_FILENAME=hamlib-w64-${RELEASE} +INST_DIR=`pwd`/mingw64-inst +ZIP_DIR=`pwd`/${HL_FILENAME} +LIBUSB_1_0_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER} -# Create Win32 specific README.win32_bin file -cat > README.win32-bin < README.w64-bin < (add directory to include path), include the .LIB in your -project and you are done. Note: MS-VC++ cannot compile all the Hamlib code, -but the API defined by rig.h has been made MSVC friendly :-) - As the source code for the library DLLs is licensed under the LGPL, your program is not considered a "derivative work" when using the published Hamlib API and normal linking to the front-end library, and may be of a license of your choosing. The published Hamlib API may be found at: -http://sourceforge.net/apps/mediawiki/hamlib/index.php?title=Documentation +http://hamlib.sourceforge.net/manuals/1.2.15/index.html + +(The 3.0 API is unchanged although new documentation will be forthcoming.) Thank You! @@ -180,36 +180,34 @@ http://www.hamlib.org END_OF_README -# Configure and build hamlib for mingw32, with libusb-win32 +# Configure and build hamlib for x86_64-w64-mingw32, with libusb-1.0 ./configure --host=${HOST_ARCH} \ - --prefix=`pwd`/mingw-inst \ + --prefix=${INST_DIR} \ --without-cxx-binding \ --disable-static \ - CPPFLAGS="-I${LIBUSB_WIN32_BIN_PATH}/include" \ - LDFLAGS="-L${LIBUSB_WIN32_BIN_PATH}/lib/gcc" + CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \ + LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW64/dll" make install -mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/pdf ${ZIP_DIR}/doc +mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc ${ZIP_DIR}/lib/msvc # ${ZIP_DIR}/pdf cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-2.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-2.def cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h cp -a doc/Hamlib_design.png ${ZIP_DIR}/doc cp -a doc/hamlib.html ${ZIP_DIR}/doc -# C++ binding is useless on win32 because of ABI +# C++ binding is useless on w64 because of ABI rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h -for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.win32-bin THANKS ; do \ +for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS ; do \ cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done -# Generate PDF documents from nroff formatted man files -cd tests - -for f in rigmem.1 rigsmtr.1 rigswr.1; do \ - groff -mandoc >${f}.ps ${f} ; ps2pdf ${f}.ps ; rm ${f}.ps ; \ - cp -a ${f}.pdf ${ZIP_DIR}/pdf/. ; done +# Generate HTML documents from nroff formatted man files +for f in doc/man1/*.1; do \ + /usr/bin/groff -mandoc -Thtml >${f}.html ${f} + cp -a ${f}.html ${ZIP_DIR}/doc/. ; done cd ${BUILD_DIR}/$1 @@ -222,14 +220,13 @@ cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/. ${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll # Copy needed third party DLLs -cp -a /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/. -cp -a ${LIBUSB_WIN32_BIN_PATH}/bin/x86/libusb0_x86.dll ${ZIP_DIR}/bin/libusb0.dll +cp -a /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/. +cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll -# Required for MinGW with GCC 4.8 -cp -a /usr/lib/gcc/i686-w64-mingw32/4.8/libgcc_s_sjlj-1.dll ${ZIP_DIR}/bin/libgcc_s_sjlj-1.dll +# Required for MinGW with GCC 4.9 +cp -a /usr/lib/gcc/x86_64-w64-mingw32/4.9-posix/libgcc_s_seh-1.dll ${ZIP_DIR}/bin/libgcc_s_seh-1.dll -# Need VC++ free toolkit installed (default Wine directory installation shown) -( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def ) - -zip -r hamlib-win32-${RELEASE}.zip `basename ${ZIP_DIR}` +## Need VC++ free toolkit installed (default Wine directory installation shown) +( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:amd64 /def:libhamlib-2.def ) +zip -r ${HL_FILENAME}.zip `basename ${ZIP_DIR}`