summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-11-16 21:54:50 +0100
committerChristoph Berg <myon@debian.org>2020-11-16 21:54:50 +0100
commit77922fa33547ce24535f2e514c9a112dcb496f18 (patch)
tree9f82b0ee01281b315f43a4c60d678927b4c6ca59 /doc
parent7aa3c56b01768ba7d38fccedc17b30a4046b3fbb (diff)
New upstream version 2.3.0~rc2+repackupstream/2.3.0_rc2+repack
Diffstat (limited to 'doc')
-rw-r--r--doc/building on MS Windows.txt169
-rw-r--r--doc/building-Boost-libs.txt240
-rw-r--r--doc/common/links.adoc4
3 files changed, 411 insertions, 2 deletions
diff --git a/doc/building on MS Windows.txt b/doc/building on MS Windows.txt
new file mode 100644
index 00000000..9e954285
--- /dev/null
+++ b/doc/building on MS Windows.txt
@@ -0,0 +1,169 @@
+Building WSJT-X on MS Windows
+=============================
+
+Here I describe my set up, you may have other preferences due to your
+favoured file system layout for tools, utilities, and libraries. Many
+variations are possible, use this guide as a template. The aim is to
+provide an environment suitable for general development.
+
+Prerequisite Tools and Libraries
+================================
+
+Here is an overview list, details are filled out below:
+
+ * Qt Open Source Framework
+ * Cmake build system generator
+ * FFTW v3 DFT library
+ * libusb usb device library
+ * MSYS2 *nix like command line environment
+ * Hamlib rig control library
+ * Pkg Config Lite
+ * Boost C++ libraries
+
+Qt Framework
+------------
+
+At the time of writing I recommend using Qt v5.15.0 64-bit, v5.15.1
+has a defect that affects us so is best avoided. You need the MinGW
+version as we do not support the MSVC version due to lack of a
+suitable FOSS Fortran complier. To install the Qt developer SDK you
+should download the official Qt on-line installer, this allows you to
+install one or more variants of the Qt SDK and also to maintain and
+update the installation at a later date. There are many versions and
+components within versions available, you only need the base 64-bit
+MinGW framework for Qt v5.15.0 and the matching MinGW 8.1.0 64-bit
+developer tools, other components can be unchecked within the on-line
+installer. The default install location is C:\Qt which is fine, do
+not attempt to move the location of the installed libraries if you
+decide you want it elsewhere, the installer patches the libraries for
+the installed location and it is easier to un-install and re-install
+if you wish to change the installed location.
+
+CMake
+-----
+
+Download and install a recent version from the official CMake web
+site. A default installation is fine. I am currently using v3.18.3,
+versions as old as v3.9 should work.
+
+Other tools and libraries without installers
+--------------------------------------------
+
+For small libraries that don't have a Windows installer and change
+often I locate them under a directory C:\Tools. This location is
+arbitrary and just used to aggregate such items in one place, but this
+document assumes that location so you may need to adjust paths etc. if
+you use a different location.
+
+FFTW v3 DFT library
+-------------------
+
+The MS Windows builds of FFTW3 can be downloaded from
+http://www.fftw.org/install/windows.html and unzipped into C:\Tools.
+You only need the 64-bit package.
+
+libusb library
+--------------
+
+This library is available from https://libusb.info/, download the .7z
+archive as the .zip archive does not contain the libraries we
+require. Unzip this package into C:\Tools.
+
+MSYS2
+-----
+
+This utility is available from https://www.msys2.org/. Follow the
+download, installation, and initial upgrading instructions there. Once
+installed and updated you will need to install some packages, these
+are needed to provide the necessary *nix tools and utilities to build
+Hamlib from sources.
+
+ pacman -S autoconf automake libtool make
+
+Hamlib
+------
+
+Currently we statically link Hamlib to avoid clashes with
+pre-installed DLLs that may be older versions than we support. Once
+Hamlib v1.4 is officially released and commonly available we will move
+to dynamic linking. Until then Hamlib must be built from
+sources. There is a fork of the official Hamlib project which we keep
+up to date with the official project master branch, we recommend
+building from the 'integration' branch of that fork. The fork is a git
+repository which can be cloned with this command:
+
+ mkdir -p ~/src/sf/bsomervi
+ cd !$
+ git clone git://git.code.sf.net/u/bsomervi/hamlib hamlib
+ cd hamlib
+ git checkout integration
+
+Next you must build Hamlib using the MinGW compiler tools bundled with
+Qt. As you will build Hamlib again when there are updates you should
+set up you Msys2 command line environment for this. I use a
+$HOME/.bash_profile file containing these lines:
+
+ dll_paths_64bit=/c/Tools/libusb-1.0.23/MinGW64/dll
+ export PATH=/c/Qt/Tools/mingw810_64/bin:$dll_paths_64bit:$PATH
+
+Test the amended ~/.bash_profile file by opening a new Msys2 shell and
+typing:
+
+ which gcc
+ which libusb-1.0.dll
+
+The first time you checkout the Hamlib sources you must bootstrap the
+configuration script, this is done with a script at the root of the
+Hamlib sources:
+
+ cd ~/src/sf/bsomervi/hamlib
+ ./bootstrap
+
+Now you need to configure and build Hamlib from an Msys2 shell. Create
+a build directory outside of the Hamlib sources you have just cloned,
+then change working directory to that build directory.
+
+ mkdir -p ~/build/hamlib/release
+ cd !$
+ ~/src/sf/bsomervi/hamlib/configure --disable-shared \
+ --prefix=$HOME/local/hamlib/mingw64/release \
+ CFLAGS="-DNDEBUG -g -O2 -fdata-sections -ffunction-sections -I/c/Tools/libusb-1.0.23/include" \
+ CXXFLAGS="-DNDEBUG -g -O2 -fdata-sections -ffunction-sections" \
+ LDFLAGS="-Wl,--gc-sections" \
+ LIBUSB_LIBS="-L/c/Tools/libusb-1.0.23/MinGW64/dll -lusb-1.0"
+
+Then build and install the Hamlib package into a local directory:
+
+ make & make install-strip
+
+If you wish you can make a debug configuration build of Hamlib which
+can be useful if you intended to contribute to the Hamlib project, or
+for tracking down issues:
+
+ mkdir -p ~/build/hamlib/debug
+ cd !$
+ ~/src/sf/bsomervi/hamlib/configure --disable-shared \
+ --prefix=$HOME/local/hamlib/mingw64/debug \
+ CFLAGS="-g -O0 -I/c/Tools/libusb-1.0.23/include" \
+ CXXFLAGS="-g -O0" \
+ LIBUSB_LIBS="-L/c/Tools/libusb-1.0.23/MinGW64/dll -lusb-1.0"
+ make && make install
+
+To update the Hamlib sources to the latest commit and rebuild:
+
+ cd ~/src/sf/bsomervi/hamlib
+ git pull
+ cd ~/build/hamlib/release
+ make & make install-strip
+ cd ~/build/hamlib/debug
+ make && make install
+
+Pkg Config Lite
+---------------
+
+This package allows the WSJT-X CMake configuration to locate and learn
+the options needed to consume the Hamlib package. You can download it
+from https://sourceforge.net/projects/pkgconfiglite/files/0.28-1/ and
+unzip it into a convenient location, as with other ancillary tools and
+libraries I put these under C:\Tools\.
+
diff --git a/doc/building-Boost-libs.txt b/doc/building-Boost-libs.txt
new file mode 100644
index 00000000..8f913a90
--- /dev/null
+++ b/doc/building-Boost-libs.txt
@@ -0,0 +1,240 @@
+Linux
+=====
+
+Debian style:
+
+sudo apt install libboost-all-dev
+
+RPM style:
+
+sudo dnf install boost-devel
+
+
+macOS
+=====
+
+Download the latest Boost sources from here: boost.org
+
+Currently v 1.74.0 -
+https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2
+
+cd ~/Downloads
+curl -L -O https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2
+mkdir src
+cd !$
+tar --bzip2 -xf ~/Downloads/boost_1_74_0.tar.bz2
+cd boost_1_74_0/tools/build
+./bootstrap.sh
+./b2 toolset=clang --prefix=$HOME/local/boost-build install
+cd ../..
+~/local/boost-build/bin/b2 -j8 toolset=clang cflags=-mmacosx-version-min=10.12 \
+ cxxflags=-mmacosx-version-min=10.12 mflags=-mmacosx-version-min=10.12 \
+ mmflags=-mmacosx-version-min=10.12 mflags=-mmacosx-version-min=10.12 \
+ linkflags=-mmacosx-version-min=10.12 \
+ architecture=x86 address-model=64 --prefix=$HOME/local/boost install
+
+That will take a while, once successful (warnings can be ignored) you
+can clean the build tree to save some space:
+
+~/local/boost-build/bin/b2 toolset=clang cflags=-mmacosx-version-min=10.12 \
+ cxxflags=-mmacosx-version-min=10.12 mflags=-mmacosx-version-min=10.12 \
+ mmflags=-mmacosx-version-min=10.12 mflags=-mmacosx-version-min=10.12 \
+ linkflags=-mmacosx-version-min=10.12 \
+ architecture=x86 address-model=64 --prefix=$HOME/local/boost clean
+
+All that remains is to reconfigure your WSJT-X build trees to include
+~/local/boost in your CMAKE_PREFIX_PATH, maybe something like these
+(one each for Debug and Release configuration builds and assumes the
+Macports GCC v7 tool-chain is being used):
+
+FC=gfortran-mp-7 \
+ cmake \
+ -D CMAKE_PREFIX_PATH:PATH=~/local/boost\;~/Qt/5.15.0/clang_64\;~/local/hamlib/release\;/opt/local \
+ -D CMAKE_INSTALL_PREFIX=~/local/wsjtx/release \
+ -D CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk \
+ -D CMAKE_BUILD_TYPE=Release \
+ -B ~/build/wsjtx-release \
+ ~/src/bitbucket.org/k1jt/wsjtx
+
+FC=gfortran-mp-7 \
+ cmake \
+ -D CMAKE_PREFIX_PATH:PATH=~/local/boost\;~/Qt/5.15.0/clang_64\;~/local/hamlib/debug\;/opt/local \
+ -D CMAKE_INSTALL_PREFIX=~/local/wsjtx/debug \
+ -D CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk \
+ -D CMAKE_BUILD_TYPE=Debug \
+ -B ~/build/wsjtx-debug \
+ ~/src/bitbucket.org/k1jt/wsjtx
+
+Substitute you installed SDK version, Qt version and location, and
+Hamlib install locations.
+
+
+MS Windows
+==========
+
+Because 32-bit and 64-bit builds are possible and each use different
+tool-chains, two separate builds are necessary if both architectures
+are required.
+
+Common steps
+------------
+
+Download and extract the latest Boost library sources, at the time of
+writing that was
+https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.7z
+. Extract to some convenient location, I use %HOME%\src .
+
+Download and extract the libbacktrace sources from
+https://github.com/ianlancetaylor/libbacktrace as follows.
+
+cd %HOME%\src
+mkdir github.com
+cd github.com
+mkdir ianlancetaylor
+cd ianlancetaylor
+git clone git@github.com:ianlancetaylor/libbacktrace.git
+
+I install third-party tools under the C:\Tools directory, the
+following assumes that, adjust to taste. Note that it is OK to install
+both 32- and 64-bit builds of Boost to the same path as the library
+names are unique per architecture and tool-chain. This saves a lot of
+space as the boost header files are quite big, and there's no need to
+install multiple copies.
+
+Create a new file %HOME%\src\boost_1_74_0\project-config.jam with the
+following three lines to specify how Boost.Build finds the
+libbacktrace library matched to your relevant C++ compliers:
+
+import toolset ;
+
+using gcc : : C:\\Qt\\Tools\\mingw730_32\\bin\\g++ : <compileflags>-I"C:\\Tools\\libbacktrace-1.0\\MinGW32\\include" <linkflags>-L"C:\\Tools\\libbacktrace-1.0\\MinGW32\\lib" ;
+
+using gcc : 8~64 : C:\\Qt\\Tools\\mingw810_64\\bin\\g++ : <compileflags>-I"C:\\Tools\\libbacktrace-1.0\\MinGW64\\include" <linkflags>-L"C:\\Tools\\libbacktrace-1.0\\MinGW64\\lib" ;
+
+Note that it may need some local adjustment of the C++ compiler
+version and path depending on the exact tool-chains from your Qt
+installation. Above I am using the Qt v5.12.9 MinGW32 v7 tool-chain
+for 32-bit (toolset=gcc), and Qt v5.15.0 MinGW64 v8 tool-chain for
+64-bit (toolchain=gcc-8~64).
+
+32-bit
+------
+
+Start an MSys or MSys2 shell with the 32-bit C/C++ tool-chain from
+your Qt installation on the PATH environment variable.
+
+cd ~/src/github.com/ianlancetaylor/libbacktrace
+./configure --prefix=/c/Tools/libbacktrace-1.0/MinGW32
+make && make install
+make clean
+
+Start a CMD window suitably configured for use of the 32-bit MinGW
+tool-chain bundled with your Qt binary installation. Verify the
+correct compiler is in the PATH. i.e. it identifies (g++ --version) as
+i686-posix-dwarf-rev0.
+
+cd %HOME%\src\boost_1_74_0\tools\build
+bootstrap.bat mingw
+.\b2 --prefix=C:\Tools\boost-build\MinGW32 install
+cd ..\..
+C:\Tools\boost-build\MinGW32\bin\b2 -j8 toolset=gcc ^
+ --build-dir=%HOME%\build\boost ^
+ --build-type=complete --prefix=C:\Tools\boost install
+
+If all is well you should see the following line about a 1/3 of the
+way through the initial configuration steps.
+
+ - libbacktrace builds : yes
+
+After some time it should complete with something like:
+
+...failed updating 1574 targets...
+...skipped 1112 targets...
+...updated 3924 targets...
+
+warnings can usually be ignored. If successful; you can release some
+space by cleaning the build tree:
+
+C:\Tools\boost-build\MinGW32\bin\b2 toolset=gcc ^
+ --build-dir=%HOME%\build\boost ^
+ --build-type=complete clean
+
+64-bit
+======
+
+Start an MSys or MSys2 shell with the 64-bit C/C++ tool-chain from
+your Qt installation on the PATH environment variable.
+
+cd ~/src/github.com/ianlancetaylor/libbacktrace
+./configure --prefix=/c/Tools/libbacktrace-1.0/MinGW64
+make && make install
+make clean
+
+Start a CMD window suitably configured for use of the 64-bit MinGW
+tool-chain bundled with your Qt binary installation. Verify the
+correct compiler is in the PATH. i.e. it identifies (g++ --version) as
+x86_64-posix-seh-rev0. Note the toolchain specified must match your
+compilers and the project-config.jam file you created above. With a v7
+64-bit C++ compiler use gcc-7~64, with a v8 64-bit C++ compiler use
+gcc-8~64. My example matches my 64-bit Qt v5.15.0 with the bundled
+MinGW64 v8.1.0.
+
+cd %HOME%\src\boost_1_74_0\tools\build
+bootstrap.bat
+.\b2 --prefix=C:\Tools\boost-build\MinGW64 install
+cd ..\..
+C:\Tools\boost-build\MinGW64\bin\b2 -j8 toolset=gcc-8~64 ^
+ address-model=64 --build-dir=%HOME%\build\boost ^
+ --build-type=complete --prefix=C:\Tools\boost install
+
+If all is well you should see the following line about a 1/3 of the
+way through the initial configuration steps.
+
+ - libbacktrace builds : yes
+
+After some time it should complete with something like:
+
+...failed updating 108 targets...
+...skipped 32 targets...
+...updated 3648 targets...
+
+warnings can usually be ignored. If successful; you can release some
+space by cleaning the build tree:
+
+C:\Tools\boost-build\MinGW32\bin\b2 toolset=gcc-8~64 ^
+ address-model=64 --build-dir=%HOME%\build\boost ^
+ --build-type=complete clean
+
+Run-time Environment
+--------------------
+
+You will need to add C:\Tools\boost\lib to your PATH environment
+variable in order to run installed Debug configurations of WSJT-X, or
+to execute build artefacts from a build tree. It is also needed for
+teh install target of release configuration builds. Installed Release
+configurations will move any required DLLs to the installation bin
+directory automatically.
+
+Setting up WSJT-X builds
+------------------------
+
+All that remains is to add C:\Tools\boost\ to your 32- and 64-bit
+build configurations CMAKE_PREFIX_PATH variables. I use tool-chain
+files for my WSJT-X builds on Windows, an extract from my 32-bit Debug
+configuration tool-chain file:
+
+# ...
+
+set (BOOSTDIR C:/Tools/boost)
+set (QTDIR C:/Qt/5.12.9/mingw73_32)
+# set (QTDIR C:/Qt/5.15.0/mingw81_32)
+set (FFTWDIR C:/Tools/fftw-3.3.5-dll32)
+set (HAMLIBDIR C:/test-install/hamlib/mingw32/debug)
+set (LIBUSBDIR C:/Tools/libusb-1.0.23)
+set (PYTHONDIR C:/Python27)
+set (ASCIIDOCDIR C:/Tools/asciidoc-master)
+
+# where to find required packages
+set (CMAKE_PREFIX_PATH ${BOOSTDIR} ${QTDIR} ${FFTWDIR} ${HAMLIBDIR} ${HAMLIBDIR}/bin ${LIBUSBDIR} ${PYTHONDIR} ${ASCIIDOCDIR})
+
+# ...
diff --git a/doc/common/links.adoc b/doc/common/links.adoc
index ff03ebd0..c9473c39 100644
--- a/doc/common/links.adoc
+++ b/doc/common/links.adoc
@@ -93,8 +93,8 @@ d). Edit lines as needed. Keeping them in alphabetic order help see dupes.
:sourceforge-jtsdk: https://sourceforge.net/projects/jtsdk[SourceForge JTSDK]
:ubuntu_sdk: https://launchpad.net/~ubuntu-sdk-team/+archive/ppa[Ubuntu SDK Notice]
:win_openssl_packages: https://slproweb.com/products/Win32OpenSSL.html[Windows OpenSSL Packages]
-:win32_openssl: https://slproweb.com/download/Win32OpenSSL_Light-1_1_1g.msi[Win32 OpenSSL Light Package]
-:win64_openssl: https://slproweb.com/download/Win64OpenSSL_Light-1_1_1g.msi[Win64 OpenSSL Light Package]
+:win32_openssl: https://slproweb.com/download/Win32OpenSSL_Light-1_1_1h.msi[Win32 OpenSSL Light Package]
+:win64_openssl: https://slproweb.com/download/Win64OpenSSL_Light-1_1_1h.msi[Win64 OpenSSL Light Package]
:writelog: https://writelog.com/[Writelog]
:wsjtx_group: https://groups.io/g/WSJTX[WSJTX Group]
:wsjtx: https://physics.princeton.edu/pulsar/K1JT/wsjtx.html[WSJT-X]