1. Overview

The WSJT family of programs for weak-signal amateur radio communication includes WSJT, WSPR, MAP65, WSJT-X, and WSPR-X. User interfaces for WSJT and WSPR are written in Python, and build procedures for these two programs are similar. User interfaces for MAP65, WSJT-X, and WSPR-X are written in C++ and use the Qt framework, and they share most build procedures. Most number-crunching in all of the WSJT programs is done in Fortran.

The WSJT Developers Guide is a work in progress. Instructions for the Python-based programs are still to come, but we do currently provide instructions for compiling WSJT-X in Linux and we outline the prerequisites for compiling it in Windows. Similar procedures to these can be used for building MAP65 and WSPR-X.

2. Communication

The following are established General & Development communication channels for the WSJT Group.

General Information
Development Related
Community Related

3. Base Environment

Before you can start developing WSJT applications, you must first set up your environment. The WSJT Developers Guide environment will use WSJT-ENV as the containment area for all activity. Reason(s) for this containment are:

  • Establish a fixed structure to work from

  • Isolate the WSJT Developers Guide examples from host system installations

  • Produce repeatable results from application builds

  • Create an experimental area to test installation configurations

  • Minimize the installation footprint & complexity v.s. Virtual Environments

  • Provide a functional environment for non-developer application testing

3.1. Language & Terms

The follwoing language is used throughout the WSJT Developers Guide

WSJT Env Terminal

Windows CMD Terminal set up specifically for WSJT work

Windows CMD Terminal

Standard Windows Command Terminal

XTerm

X-Terminal in Linux, BSD and OS X

Setup Script

Batch or Bash script used to set up WSJT environment

Build Script

Batch or Bash Script used to build applications

Tool Chain File

CMake configuration file used by build scripts

3.2. Path Configuration

All WSJT Developers Guide examples use the same (path) configuration throughout the guide:

  • LINUX, all scripts and build locations will be in:

    • /home/$USER/wsjt-env ⇐ recommended location

    • /home/$USER/Projects/wsjt-env - (alternative example)

  • WINDOWS, all scripts, build and package installations will be in:

    • C:\wsjt-env ⇐ recommended location

    • C:\Tools\wsjt-env - (alternative example)

Important The WSJT Developers Guide will use the recommended install locations for both Windows and Linux.

3.3. Windows Base Setup

The WSJT Developers Guide will be using SlikSVN 32bit as the example. If you already have Subversion installed, ensure that it is in your %PATH% and reachable from a Windows CMD Terminal, otherwise continue:

  • Open Windows CMD Terminal, then:

# CHANGE DIRVE TO
c:

# MAKE DIRECTORY - (copy & paste)
mkdir wsjt-env wsjt-env\subversion wsjt-env\downloads

# CLOSE Windows CMD Terminal and CONTINUE
  • Download Subversion to C:\wsjt-env\downloads

  • Run the Installer

  • End User Agreement: Agree to Terms

  • Change Install Path to: C:\wsjt-env\subversion

  • Choose Setup Type: Typical

  • Then Install, then Finish

Important Each SVN installer tested, added itself to the users %PATH%, without an option to select Yes or No. Be sure it is in your %PATH%
  • Open Windows CMD Terminal, then:

# CHECK SUBVERSION
svn --version

# IF SUCESSFUL
svn, version 1.8.5-SlikSvn-1/8/5-WIN32 .. .. ..

# CLOSE CMD and PROCEED TO APPLICATION BUILD

3.4. Linux Base Setup

Most all Linux distributions have Subversion in their repositories. If SVN is already installed, ensure you can use it via X-Term with: svn --version, otherwise continue with setup:

  • Open X-Term Windows, Ctrl+Alt+T

# DEBIAN, UBUNTU, MINT and FRIENDS
# Note: Adjust install command to your particular pkg manager
sudo apt-get install subversion

# CHECK SVN IS FUNCTIONAL
svn --version

# SUCESSFUL RETURN - Note: Versions may very slightly
svn, 1.7.14

# EXIT X-TERM and PROCEED TO APPLICATION BUILD

4. Source Code

All source code for the WSJT programs is available at the open-source repository known as berliOS, under control of the version-control program Subversion. For installing Subversion, see Windows Base Setup and for Linux, see Linux Base Setup.

You can browse the organization of files in the repository here. Code for program WSJT lies in the trunk directory, while code for the other programs is found in …/branches/map65, …/branches/wsjtx, and …/branches/wsprx. Various experimental branches may also exist, and snapshots of code for certain released program versions may be obtained from the …/tags directory.

You can do an anonymous checkout of source code for a specific program with a command of the following form:

svn co svn://svn.berlios.de/wsjt/branches/wsjtx

If you are a member of the WSJT Development Group and have commit privileges to the repository, use a command like this one:

svn co https://user@svn.berlios.de/svnroot/repos/wsjt/branches/wsjtx

substituting your Berlios username for user.

Caution Please note: the HEAD of the SVN repository for any of these programs is likely to be an active development branch. There is no guarantee that a build from every revision will be successful, nor that it will provide a stable executable program.

5. Package Matrix

The following matrix outlines the development package requirments for each application, including documentation. Application details are contained within each of the respective sections.

Table 1. Package Matrix: x = Required, o = Optional
Package Docs WSJT WSJT-X WSPR WSPR-X MAP65

CMake

o

FFTW3F

x

x

x

x

x

GNU SH

x

Hamlib

x

x

x

x

MinGW

x

x

x

x

x

Portaudio

x

x

x

x

x

Python

x

x

x

x

Qt5

x

Qt4

x

x

Qwt

x

x

Subversion

x

x

x

x

x

x

Package Comments
Python

Version 2.7+

MinGW

GNU Tools 4.8.0+ (gfortran, make, gcc, g++)

GNU SH

Source Highlighting for Documentation

6. WSJT-X

6.1. Linux Makefile Example

This example uses Qmake and Makefile.Linux. In order to build WSJT-X form source, install the following packages:

# DEBIAN, UBUNTU, MINT and FRIENDS
# Note: Adjust the install method to your distribution package manager.

sudo apt-get install gcc g++ gfortran make libfftw3-dev \
libpulse-dev libhamlib-dev qtbase5-dev  pulseaudio subversion \
libgfortran3:i386 libc6-i386 libqt5multimedia5-plugins \
qtmultimedia5-dev

6.1.1. WSJT-X Dependencies

gcc

GNU C Compiler

g++

GNU C++ Compiler

gfortran

GNU Fortran or F90

make

GNU Make

libqt5multimedia5-plugins

QT5 Media Plugins

libfftw3-dev

Fast Fourier Transforms

libpulse-dev

Headers and Files for Pulse AUdio

libhamlib-dev

Headers and Files for Hamlib

qtbase5-dev

QT5 Base Dev Files

qtmultimedia5-dev

Qt5 Multimedia Dev Files

pulseaudio

Pulse Audio Sound Driver

subversion

Version Control Software

libgfortran.so.3

Fortran Library

libc.so.6

GCC C Library

libm.so.6

GCC C Library

libgcc_s.so.1libm.so.6

GCC C Library

libquadmath.so.0

Quad-Precision Math Library

6.1.2. Build Methods

Important You can perform the steps manually if desired. Using the script automates the steps.
  • Open a terminal session, Ctrl+Alt+T

  • Checkout the build script from SVN:

SVN export wsjtx-build.sh
# SVN CHECKOUT WSJTX-COMPILE.SH
# Use Export to prevent .svn folder from downloading
# Use Force to ensure that, if wsjtx-comple.sh exists, it gets updated

svn export --force svn://svn.berlios.de/wsjt/branches/doc/dev-guide/source/wsjtx-compile.sh
Using the Script
  • Using The Build Script, Change Permission and Run

# CHANGE PERMISSION
chmod +x ./wsjtx-compile.sh

# RUN SCRIPT
./wsjtx-compile.sh
Manual Entry
  • For manual entry, start at BUILD_DIR=~/wsjt-env/wsjtx-build and perform each step that does not start with start with "#" sign. Use Copy & Paste.

wsjtx-compile.sh
#!/usr/bin/env bash

# Part of the WSJT Documentation Project
# Usage:  chmod +x ./wsjtx-compile.sh && ./wsjtx-compile.sh

# EXIT IF ERRORS
set -e

# SET WSJT-ENV DIRECTORY
BUILD_DIR=~/wsjt-env/wsjtx-build
mkdir -p $BUILD_DIR
cd $BUILD_DIR

# CHECKOUT WSJT-X
clear && echo 'Getting Latest WSJT-X Version'
svn co svn://svn.berlios.de/wsjt/branches/wsjtx
cd ./wsjtx
rev_num=$(grep -i "rev=" mainwindow.cpp |awk '{print $3}')

# MAIKEFILE
cd ./lib
make -f Makefile.linux

# QMAKE && MAKE
cd ../
export QT_SELECT=qt5
qmake
j_c=$(grep -c ^processor /proc/cpuinfo)
make -j$j_c

# MOVE WSJT-X FOLDER
cd ../

# Test for mutiple builds of same $rev_num
# For manual entry, Copy & Paste from if .. fi as one command, then [ENTER]
if test -d ./wsjtx-$rev_num
then
mv ./wsjtx-$rev_num ./wsjtx-$rev_num-$(date +%F-%H%M)
fi

mv ./wsjtx_install ./wsjtx-$rev_num
cd ./wsjtx-$rev_num

# COPY FILES
cp ../wsjtx/*.dat ../wsjtx/*.txt ./
cp -R ../wsjtx/Palettes/ ../wsjtx/samples/ ./
rm ./CMake*

# DOWNLOAD KVASD
wget http://www.physics.princeton.edu/pulsar/K1JT/kvasd
chmod +x ./kvasd

# CLEAN-UP
rm -rf ../wsjtx
clear
echo WSJTX-$rev_num Build Complete
echo
exit 0

6.1.3. Test KVASD

Before you launch WSJT-X, ensure KVASD can run.

# CHANGE DIRECTORY and RUN KVASD
cd wsjtx-$rev_num
./kvasd -v

# SUCESSFUL RETURN
KVASD version 1.11

# VIEW COPYRGHT
./kvasd

6.1.4. Run WSJT-X

Run WSJT-X from the terminal

# When running from a terminal [ ./wsjtx ], the xterm remains open.
# This is good for testing and chasing errors. Run WSJT-X with:

./wsjtx

# You can also use a file manager. Browse to WSJT-X dir, and open
# as you would any other program. Using this method to launch, you
# should not see the terminal window.

6.2. Windows CMake Example

This example will build WSJT-X using CMake. If you have not performed the Windows Base Setup, do so now or WSJT-X build will fail.

You can build both Debuug and Release Versions with the script. If no command line option is given, default is Releasae

  • Open a WSJT ENV Terminal and perform the following steps:

# CHANGE DIRECTORY TO INSTALL LOCATION
c:

# CD TO WSJT-ENV
cd wsjt-env

# MAKE REQUIRED DIRECTORIES
mkdir cmake fftw3f hamlib qt5 src

# CLOSE WSJT ENV Terminal

6.2.1. Download Development Packages

  • Save the following packages to C:\wsjt-env\downloads

  • Then follow each section for installation

    Qt5 SDK

    Download - Qt 5.2.1 Windows-32, (MinGW 4.8, OpenGL)

    CMake

    Download - Win32 Installer

    Hamlib

    Download - Hamlib 1.2.15.3.zip

    FFTW3

    Download - 32-bit version: fftw-3.3.3-dll32.zip

    SVN

    Subversion - SlikSVN 1.8.5.x 32-bit

    MS Tools

    Download - Microsoft Tool Kit

QT5.2.1 Install
  • Run the Installer

  • Change Install Path to: C:\wsjt-env\Qt5

  • Check: Associate common files types with Qt Creator

  • Select Components: Use Default Selections

  • License Agreement, read and select

  • Start Menu: Use default selections, select next, then install

  • Go grab a coffee, this takes about 5 minutes to install

  • At Finish, launch Qt Creator to verify it works, then exit

CMake Install
  • Run the Installer

  • Agree to Terms

  • Select: Do not add to system PATH

  • Change Install Path to: C:\wsjt-env\CMake

Extract Hamlib
  • Unzip hamlib-1.2.15.3.zip

  • Copy the contents of hamlib-win32-1.2.15.3 into \hamlib. You should end up with: c:\wsjt-env\hamlib\bin hamlib\lib hamlib\include ..

Extract FFTW3
  • Caution: FFTW3 does not have a top level folder

  • Copy fftw-3.3.3-dll32.zip ⇒ C:\wsjt-env\fftw3f

  • Extract in C:\wsjt-env\fftw3f into c:\wsjt-env\fftw3f\

  • Delete fftw-3.3.3-dll32.zip

MS Tools - Win-XP
  • Windows Vista and beyond should not need this

  • In a Windows CMD Terminal: c:\robocopy /?

  • If not installed, Download

  • Run the installer

6.2.2. Building WSJT-X with CMake

  • Check out the latest wsjt-env.bat file

  • Open WIndows CMD Terminal. As this is the frst checkout, We need the Windows CMD Terminal, subsequent pull can be done from the WSJT Env Terminal.

# CHANGE DRIVE and DIRECTORIES
c:
cd wsjt-env

# CHECK OUT LATEST WSJT-ENV FILE
svn export --force svn://svn.berlios.de/wsjt/branches/doc/dev-guide/source/wsjt-env.bat

# CHECKOUT LATEST WSJTX-BUILD-CMAKE.BAT FILE
svn export --force svn://svn.berlios.de/wsjt/branches/doc/dev-guide/source/wsjtx-build-cmake.bat

# CLOSE TERMINAL
  • Browse to C:\wsjt-env, Double-Click or Right-Click & Open WSJT Env Terminal (wsjt-env.bat).

  • In the terminal, type:

Important When WSJT-X Build Script runs, if it cannot find one of the tools, an error will be displayed.
Build Release version
wsjtx-build-cmake.bat -r
  • Location: C:\wsjt-env\wsjtx\wsjtx-install\Release\bin

Build Debug version
wsjtx-build-cmake.bat -d
  • Location: C:\wsjt-env\wsjtx\wsjtx-install\Debug\bin

License

The WSJTX Developers Guide is free software: you can redistribute it and/or modify under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The WSJTX Developers Guide is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this documentation. If not, see GNU GPL

Copyright © 2001-2014 Joseph H Taylor, Jr, K1JT.