Hi All,

this is of relevance mainly to package maintainers who wish to produce 
packages for WSJT-X. It may also be relevant  to anyone who wishes build 
from source on *nix.

Because the current generation of WSJT-X is built with a special version 
of hamlib I have created a small project that automates the correct 
build procedure for WSJT-X. Currently it only works on *nix systems and 
is mainly for use by package maintainers to simplify the process of 
building WSJT-X on a controlled build server.

The issues addressed are:

1) Building everything needed that isn't provided already by a build 
host as standard or via pre-existing official packages,
2) Building a self-contained source package suitable for use on a build 
host with restricted or no Internet access. Combined with the recent 
changes to eliminate kvasd from WSJT-X Linux builds should make this 
option particularly attractive to Linux package maintainers who wish to 
submit packages to mainstream FOSS repositories.

Option (1) builds Hamlib and WSJT-X by first fetching them from source 
control and then building them into an application. This can be used if 
the build server and distribution policies allow Internet access to 
upstream sources during the build process.

Option (1) may also be used by casual builders who want a simplified 
build process for WSJT-X. ALthough it can be used for a "developer" 
build, this is not recommended as it may prove over restrictive when it 
comes to editing and committing any changes. For serious development of 
WSJT-X a piecemeal build approach with or without the aid of the 
JTSDK-QT is still preferred due to the extra flexibility facilitated.

Option (2) is a two phase process, both using the superbuild project. 
The fist phase is similar to option (1) except that a target of 'source' 
is built. This generates a source tarball of the project itself that is 
augmented with the upstream sources that would be fetched from the VCS 
and the WSJT-X User Guide. This source tarball has everything that is 
needed to build WSJT-X without access to the Internet. The second phase 
runs when the unpacked source tarball is built as normal and would 
normally be run on the final target build host.

Here is an example of an type (1) build:

  $ mkdir ~/src
  $ cd ~/src
  $ svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-superbuild
  $ mkdir -p ~/build/wsjtx
  $ cd ~/build/wsjtx
  $ cmake ~/src/wsjtx-superbuild           # configure command
  $ cmake --build .
  $ sudo cmake --build .  --target install

This should build the latest development version of WSJT-X and install 
it in /usr.

If you wish to build a different revision you can specify an option 
WSJTX_TAG to the configure step above, for example to build the latest 
version of the WSJT-X v1.4 branch you would substitute:

  $ cmake -D WSJTX_TAG=branches/wsjtx-1.4 ~/src/wsjtx-superbuild

for the configure command above. You may also specify a tag to build a 
specific revision that has been tagged, e.g.:

  $ cmake -D WSJTX_TAG=tags/wsjtx-1.4.0-rc3 ~/src/wsjtx-superbuild

Now an example of a type (2) build:

The first phase is very similar to a type (1) build with the exception 
that the target built is 'source', you can still build an 'install' 
target as well if you want to test the sources before publishing the 
source tarball. So let's say we want to build a self-contained tarball 
for WSJT-X v1.4.0 (which isn't tagged yet but will be when v1.4 is 
released):

  $ mkdir ~/src
  $ cd ~/src
  $ svn checkout svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-superbuild
  $ mkdir -p ~/build/wsjtx
  $ cd ~/build/wsjtx
  $ cmake -D WSJTX_TAG=tags/wsjtx-1.4.0 ~/src/wsjtx-superbuild
  $ sudo cmake --build .  --target source

This will generate a self-contained source tarball suitable for use on a 
different build host.

For phase two you would transfer the source tarball generated above to 
the build host and proceed along the following lines:

  $ mkdir ~/wsjt
  $ cd wsjt
  $ scp somewhere:build/wsjtx/wsjtx-1.4.0.tgz .
  $ tar xzf wsjtx-1.4.0.tgz
  $ mkdir build
  $ cd build
  $ cmake ../wsjtx-1.4.0
  $ cmake --build .
  $ sudo cmake --build --target install

Which should build and install WSJT-X v1.4.0 into /usr, if you wish to 
install it somewhere else the configure step can include a 
CMAKE_INSTALL_PREFIX option as usual.

Pre-built type (2) source tarballs will be included in future release 
publications ready for use as upstream source tarballs.

Caveat: Type (2) builds with this project require WSJT-X revisions later 
than r4566 since there is a small change to the upstream WSJT-X sources 
to support local builds. This effectively means that this type of build 
is supported from WSJT-X v1.4.0-rc3 and wsjtx-1.5-devel onwards.

73
Bill
G4WJS.

------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to