diff --git a/scripts/README.build-JTSDK.txt b/scripts/README.build-JTSDK.txt new file mode 100644 index 000000000..b70dd9464 --- /dev/null +++ b/scripts/README.build-JTSDK.txt @@ -0,0 +1,90 @@ +============================================================== +JTSDK DLL Qt MinGW/MSYS2 Supplementary Notes +============================================================== + +This assumes you have an environment set up that conforms with +instructions in the WSJT-X Install notes that will build Hamlib + +Before you start.... RTFM at /scripts/README.build-Windows-JTSDK.txt + + +1. Update Environ +================= + +pacman -Syuu + + +2. Deploy MinGW +=============== + +Ensure that the ZIP, DOS2UNIX and GROFF packages are deployed +to and owrking in the MSYS2 Environment + +pacman -S zip +pacman -S dos2unix +alias unix2dos='todos' +pacman -S groff + +The next step is possibly redudnant as it has been incorporated +into build-w64-jtsdk.sh + +export PATH=$PATH:$GCCD_F:. + + +3. Create a dir $HOME/Builds +============================ + +Open a MSYS2 Terminal fro a jtsdk64.ps1 environment + +In a JTSDK63 ENvironment type: + +msys2 + +In the msys2 enviro nment type: + +cd ~ <== ensure you at home +mkdir builds +cd builds + + +4. Locate and unzip LibUSB matching version deployed above into builds +====================================================================== + +These steps in the original build-w64.sh script are redundant. + +You may skip this step. + +JTSDK 3.2.0 (and later) points the environment to the libusb +deployment in X:\JTSDK64-Tools\tools\libusb through +environment variable $libusb_dir_f . + +If you need the source for LinUSB use steps similar to those +below to obtain source: + +wget https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.tar.bz2 +tar -xvf libusb-1.0.24.tar.bz2 + +[ This creates a subdirectory libusb-1.0.24 ] + + +5. Obtain latest Hamlib sourceforge +=================================== + +git clone git://git.code.sf.net/p/hamlib/code hamlib-4.2~git + + +6. Start the Process Rolling +============================ + +cd ./hamlib-4.2~git +./bootstrap <== Not included in Nate's notes ! +./scripts/build-w64-jtsdk.sh hamlib-4.2~git + + +7. Tadaa - Drumroll ! +===================== + +==> Package in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git as hamlib-w64-4.2~git.zip +==> Headers in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/include +==> Library in ~/build/hamlib-4.2~git/hamlib-w64-4.2~git/lib/gcc as libhamlib.dll.a (rename to libhamlib.dll for application) + diff --git a/scripts/build-w64-jtsdk.sh b/scripts/build-w64-jtsdk.sh index 714b75398..c57a1f747 100755 --- a/scripts/build-w64-jtsdk.sh +++ b/scripts/build-w64-jtsdk.sh @@ -1,14 +1,17 @@ #!/bin/sh -# Builds Hamlib 4.x W64 binary distribution. +# Builds Hamlib 4.x W64 dl binary distribution under Windows Qt MinGW/MSYS2 +# Customised for >= JTSDK 3.2.0 B3 stream(s) -# A script to build a set of W64 binary DLLs and executables from a Hamlib -# source tarball. This script assumes that the Hamlib source tarball has been -# extracted to the directory specified in $BUILD_DIR and that libusb-1.x.y has -# also been extracted to $BUILD_DIR. +# A script to compile a set of W64 binary DLLs, executables and compiler +# packages from a Hamlib source tarball. This script assumes uses the +# JTSDK's previously deployed LibUSB (pointed to by JTSDK environment +# variable $libusb_dir_f) -# See README.build-Windows for complete details. +# See future README.build-JTSDK for complete details. +#Ensure that the Qt-supplied GCC compilers and tools can be found +export PATH=$PATH:$GCCD_F:. # Set this to a desired directory BUILD_DIR=~/builds @@ -22,6 +25,9 @@ HOST_ARCH=x86_64-w64-mingw32 # Set to the strip name for your version of minGW HOST_ARCH_STRIP=strip.exe +# Set to the name of the utility to provide Unix to DOS translation +UNIX_TO_DOS_TOOL=unix2dos.exe + # Error return codes. See /usr/include/sysexits.h EX_USAGE=64 EX_NOINPUT=66 @@ -68,7 +74,7 @@ What is it? =========== 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 +native compiled for MS Windows 64 bit using MinGW under Windows JTSDK 3.2.0 (nice, heh!). This software is copyrighted. The library license is LGPL, and the *.EXE files @@ -82,8 +88,8 @@ included after being converted to HTML. Installation and Configuration ============================== -Extract the ZIP archive into a convenient location, C:\Program Files is a -reasonable choice. +Extract the ZIP archive into a convenient location, C:\Program Files (being x64) +is a reasonable choice. Make sure *all* the .DLL files are in your PATH (leave them in the bin directory and set the PATH). To set the PATH environment variable in Windows @@ -211,6 +217,7 @@ Please report problems or success to hamlib-developer@lists.sourceforge.net Cheers, Stephane Fillod - F8CFE Nate Bargmann - N0NB +JTSDK Maintenance Team - JTSDK@GROUPS.IO http://www.hamlib.org END_OF_README @@ -230,9 +237,9 @@ make -j 4 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-4.def -unix2dos ${ZIP_DIR}/lib/msvc/libhamlib-4.def +${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/lib/msvc/libhamlib-4.def cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/. -unix2dos ${ZIP_DIR}/include/hamlib/*.h +${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/include/hamlib/*.h # C++ binding is useless on w64 because of ABI for f in *class.h @@ -243,7 +250,7 @@ done for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS do cp -a ${f} ${ZIP_DIR}/${f}.txt - unix2dos ${ZIP_DIR}/${f}.txt + ${UNIX_TO_DOS_TOOL} ${ZIP_DIR}/${f}.txt done # Generate HTML documents from nroff formatted man files @@ -271,8 +278,8 @@ ${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll cp -a ${QTD_F}/libwinpthread-1.dll ${ZIP_DIR}/bin/. cp -a ${libusb_dir_f}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll -# Set for MinGW build -FILE="${QTD_F}/libgcc_s_sjlj-1.dll" +# Set for MinGW build - To Be safe ! +FILE="${QTD_F}/libgcc_s_seh-1.dll" if test -f "$FILE" then cp -a ${FILE} ${ZIP_DIR}/bin/.