diff --git a/CMake/Modules/VersionInfo.h.in b/CMake/Modules/VersionInfo.h.in new file mode 100644 index 000000000..1fb09c766 --- /dev/null +++ b/CMake/Modules/VersionInfo.h.in @@ -0,0 +1,94 @@ +#pragma once + +#ifndef VERSION_INFO_@PRODUCT_NAME@_H__ +#define VERSION_INFO_@PRODUCT_NAME@_H__ + +#include "scs_version.h" + +#ifndef PRODUCT_VERSION_MAJOR +#define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@ +#endif + +#ifndef PRODUCT_VERSION_MINOR +#define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@ +#endif + +#ifndef PRODUCT_VERSION_PATCH +#define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@ +#endif + +#ifndef PRODUCT_VERSION_TWEAK +#define PRODUCT_VERSION_TWEAK @PRODUCT_VERSION_TWEAK@ +#endif + +#ifndef PRODUCT_VERSION_REVISION +#define PRODUCT_VERSION_REVISION @PRODUCT_VERSION_REVISION@ +#endif + +#ifndef FILE_VERSION_MAJOR +#define FILE_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@ +#endif + +#ifndef FILE_VERSION_MINOR +#define FILE_VERSION_MINOR @PRODUCT_VERSION_MINOR@ +#endif + +#ifndef FILE_VERSION_PATCH +#define FILE_VERSION_PATCH @PRODUCT_VERSION_PATCH@ +#endif + +#ifndef FILE_VERSION_TWEAK +#define FILE_VERSION_TWEAK @PRODUCT_VERSION_TWEAK@ +#endif + +#ifndef TO_STRING__ +#define TO_STRING_IMPL__(x) #x +#define TO_STRING__(x) TO_STRING_IMPL__(x) +#endif + +#define PRODUCT_VERSION_MAJOR_MINOR_STR TO_STRING__ (PRODUCT_VERSION_MAJOR) "." TO_STRING__(PRODUCT_VERSION_MINOR) +#define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR PRODUCT_VERSION_MAJOR_MINOR_STR "." TO_STRING__ (PRODUCT_VERSION_PATCH) +#define PRODUCT_VERSION_FULL_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR TO_STRING__ (PRODUCT_VERSION_REVISION) +#define PRODUCT_VERSION_RESOURCE PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,PRODUCT_VERSION_TWEAK +#define PRODUCT_VERSION_RESOURCE_STR PRODUCT_VERSION_FULL_STR " " SCS_VERSION_STR "\0" + +#define FILE_VERSION_MAJOR_MINOR_STR TO_STRING__ (FILE_VERSION_MAJOR) "." TO_STRING__ (FILE_VERSION_MINOR) +#define FILE_VERSION_MAJOR_MINOR_PATCH_STR FILE_VERSION_MAJOR_MINOR_STR "." TO_STRING__ (FILE_VERSION_PATCH) +#define FILE_VERSION_FULL_STR FILE_VERSION_MAJOR_MINOR_PATCH_STR TO_STRING__ (PRODUCT_VERSION_REVISION) +#define FILE_VERSION_RESOURCE FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,FILE_VERSION_TWEAK +#define FILE_VERSION_RESOURCE_STR FILE_VERSION_FULL_STR "\0" + +#ifndef PRODUCT_ICON +#define PRODUCT_ICON "@PRODUCT_ICON@" +#endif + +#ifndef PRODUCT_COMMENTS +#define PRODUCT_COMMENTS "@PRODUCT_COMMENTS@\0" +#endif + +#ifndef PRODUCT_VENDOR_NAME +#define PRODUCT_VENDOR_NAME "@PRODUCT_VENDOR_NAME@\0" +#endif + +#ifndef PRODUCT_LEGAL_COPYRIGHT +#define PRODUCT_LEGAL_COPYRIGHT "@PRODUCT_LEGAL_COPYRIGHT@\0" +#endif + +#ifndef PRODUCT_FILE_DESCRIPTION +#define PRODUCT_FILE_DESCRIPTION "@PRODUCT_FILE_DESCRIPTION@\0" +#endif + +#ifndef PRODUCT_INTERNAL_NAME +#define PRODUCT_INTERNAL_NAME "@PRODUCT_NAME@\0" +#endif + +#ifndef PRODUCT_ORIGINAL_FILENAME +#define PRODUCT_ORIGINAL_FILENAME "@PRODUCT_ORIGINAL_FILENAME@\0" +#endif + +#ifndef PRODUCT_BUNDLE +#define PRODUCT_BUNDLE "@PRODUCT_BUNDLE@\0" +#endif + +#endif + diff --git a/CMake/Modules/VersionResource.rc.in b/CMake/Modules/VersionResource.rc.in new file mode 100644 index 000000000..ded4b0cdc --- /dev/null +++ b/CMake/Modules/VersionResource.rc.in @@ -0,0 +1,73 @@ +#include "VersionInfo_@PRODUCT_NAME@.h" + +#ifdef RC_INVOKED + +#if defined (__MINGW64__) || defined (__MINGW32__) + /* MinGW-w64 or MinGW */ + #if defined (__has_include) && __has_include () + #include + #else + #include + #include + #endif +#else + /* MSVC, Windows SDK */ + #include +#endif + +#ifndef _NDEBUG +#define PRODUCT_DEBUGFLAG 0x0L +#else +#define PRODUCT_DEBUGFLAG VS_FF_DEBUG +#endif + +#ifdef SCS_VERSION_IS_DIRTY +#define PRODUCT_SPECIALFLAG VS_FF_SPECIALBUILD +#else +#define PRODUCT_SPECIALFLAG 0x0L +#endif + +#if PRODUCT_PRERELEASE +#define PRODUCT_PRERELEASEFLAG VS_FF_PRERELEASE +#else +#define PRODUCT_PRERELEASEFLAG 0x0L +#endif + +IDI_ICON1 ICON DISCARDABLE PRODUCT_ICON + +LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL + +VS_VERSION_INFO VERSIONINFO +FILEVERSION FILE_VERSION_RESOURCE +PRODUCTVERSION PRODUCT_VERSION_RESOURCE +FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +FILEFLAGS (PRODUCT_DEBUGFLAG | PRODUCT_SPECIALFLAG | PRODUCT_PRERELEASEFLAG) +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", PRODUCT_COMMENTS + VALUE "CompanyName", PRODUCT_VENDOR_NAME + VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION + VALUE "FileVersion", FILE_VERSION_RESOURCE_STR + VALUE "LegalCopyright", PRODUCT_LEGAL_COPYRIGHT + VALUE "ProductName", PRODUCT_BUNDLE + VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR + VALUE "InternalName", PRODUCT_INTERNAL_NAME + VALUE "OriginalFileName", PRODUCT_ORIGINAL_FILENAME +#if SCS_VERSION_IS_DIRTY + VALUE "SpecialBuild", SCS_VERSION_STR "\0" +#endif + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04b /* en-US Unicode */ + END +END + +#endif diff --git a/CMake/Modules/generate_version_info.cmake b/CMake/Modules/generate_version_info.cmake new file mode 100644 index 000000000..885921f5f --- /dev/null +++ b/CMake/Modules/generate_version_info.cmake @@ -0,0 +1,167 @@ +include (CMakeParseArguments) + +set (_THIS_MODULE_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}") + +# generate_product_version() function +# +# This function uses VersionInfo.in template file and VersionResource.rc file +# to generate WIN32 resource with version information and general resource strings. +# +# Usage: +# generate_product_version( +# SomeOutputResourceVariable +# NAME MyVersinedTarget +# ICON ${PATH_TO_ICON} +# VERSION_MAJOR 2 +# VERSION_MINOR 3 +# VERSION_PATCH 1 +# VERSION_REVISION sha1 +# ) +# +# You can use generated resource for your executable targets: +# add_executable(target-name ${target-files} ${SomeOutputResourceVariable}) +# add_library (target-name SHARED ${target-files} ${SomeOutputResourceVariable}) +# +# You can specify resource strings in arguments: +# NAME - name of executable (no defaults, ex: Microsoft Word) +# BUNDLE - bundle (${PROJECT_NAME} or ${NAME} is default, ex: Microsoft Office) +# ICON - path to application icon, default: ${CMAKE_SOURCE_DIR}/icons/windows-icons/${NAME}.ico +# VERSION_MAJOR - default: 1 +# VERSION_MINOR - deafult: 0 +# VERSION_PATCH - deafult: 0 +# VERSION_REVISION - deafult: 0 +# VENDOR_NAME - your vendor name, default: ${PROJECT_VENDOR} +# LEGAL_COPYRIGHT - default: ${PROJECT_COPYRIGHT} +# COMMENTS - default: ${PROJECT_DESCRIPTION} +# ORIGINAL_FILENAME - default: ${NAME} +# INTERNAL_NAME - default: ${NAME} +# FILE_DESCRIPTION - default: ${COMMENTS} +function(generate_version_info outfiles) + set (options) + set (oneValueArgs + NAME + BUNDLE + ICON + VERSION_MAJOR + VERSION_MINOR + VERSION_PATCH + VERSION_REVISION + VENDOR_NAME + LEGAL_COPYRIGHT + COMMENTS + ORIGINAL_FILENAME + INTERNAL_NAME + FILE_DESCRIPTION) + set (multiValueArgs) + cmake_parse_arguments(PRODUCT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (NOT PRODUCT_BUNDLE) + if (PROJECT_NAME) + set (PRODUCT_BUNDLE "${PROJECT_NAME}") + else () + set (PRODUCT_BUNDLE "${PRODUCT_NAME}") + endif () + endif() + + if (NOT PRODUCT_ICON) + set (PRODUCT_ICON "${CMAKE_SOURCE_DIR}/icons/windows-icons/${PRODUCT_NAME}.ico") + endif () + + if (NOT PRODUCT_VERSION_MAJOR) + if (PROJECT_VERSION_MAJOR) + set (PRODUCT_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) + else () + set (PRODUCT_VERSION_MAJOR 1) + endif () + else () + if (NOT ${PRODUCT_VERSION_MAJOR} MATCHES "^[0-9]+$") + message (FATAL_ERROR "Numeric major version number required") + endif () + endif () + + if (NOT PRODUCT_VERSION_MINOR) + if (PROJECT_VERSION_MINOR) + set (PRODUCT_VERSION_MINOR ${PROJECT_VERSION_MINOR}) + else () + set (PRODUCT_VERSION_MINOR 0) + endif () + else () + if (NOT ${PRODUCT_VERSION_MINOR} MATCHES "^[0-9]+$") + message (FATAL_ERROR "Numeric minor version number required") + endif () + endif() + + if (NOT PRODUCT_VERSION_PATCH) + if (PROJECT_VERSION_PATCH) + set (PRODUCT_VERSION_PATCH ${PROJECT_VERSION_PATCH}) + else () + set (PRODUCT_VERSION_PATCH 0) + endif () + else () + if (NOT ${PRODUCT_VERSION_PATCH} MATCHES "^[0-9]+$") + message (FATAL_ERROR "Numeric patch version number required") + endif () + endif() + + if (NOT PRODUCT_VERSION_TWEAK) + if (PROJECT_VERSION_TWEAK) + set (PRODUCT_VERSION_TWEAK ${PROJECT_VERSION_TWEAK}) + else () + set (PRODUCT_VERSION_TWEAK 0) + endif () + else() + if (NOT ${PRODUCT_VERSION_TWEAK} MATCHES "^[0-9]+$") + message (FATAL_ERROR "Numeric tweak version number required") + endif() + endif() + + if (NOT PROJECT_VERSION_REVISION AND BUILD_TYPE_REVISION) + set (PRODUCT_VERSION_REVISION ${BUILD_TYPE_REVISION}) + endif () + + if (NOT PRODUCT_VENDOR_NAME AND PROJECT_VENDOR) + set (PRODUCT_VENDOR_NAME ${PROJECT_VENDOR}) + endif () + + if (NOT PRODUCT_LEGAL_COPYRIGHT) + if (PROJECT_COPYRIGHT) + set (PRODUCT_LEGAL_COPYRIGHT ${PROJECT_COPYRIGHT}) + else () + string(TIMESTAMP PRODUCT_CURRENT_YEAR "%Y") + set(PRODUCT_LEGAL_COPYRIGHT "${PRODUCT_VENDOR_NAME} (C) Copyright ${PRODUCT_CURRENT_YEAR}") + endif () + endif() + + if (NOT PRODUCT_COMMENTS) + if (PROJECT_DESCRIPTION) + set(PRODUCT_COMMENTS ${PROJECT_DESCRIPTION}) + else () + set(PRODUCT_COMMENTS "${PRODUCT_NAME} v${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.${PRODUCT_VERSION_PATCH}") + endif () + endif() + + if (NOT PRODUCT_ORIGINAL_FILENAME) + set(PRODUCT_ORIGINAL_FILENAME "${PRODUCT_NAME}") + endif() + + if (NOT PRODUCT_INTERNAL_NAME) + set(PRODUCT_INTERNAL_NAME "${PRODUCT_NAME}") + endif() + + if (NOT PRODUCT_FILE_DESCRIPTION) + set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_COMMENTS}") + endif() + + set (_VersionInfoFile VersionInfo_${PRODUCT_NAME}.h) + set (_VersionResourceFile VersionResource_${PRODUCT_NAME}.rc) + configure_file( + ${_THIS_MODULE_BASE_DIR}/VersionInfo.h.in + ${_VersionInfoFile} + @ONLY) + configure_file( + ${_THIS_MODULE_BASE_DIR}/VersionResource.rc.in + ${_VersionResourceFile} + @ONLY) + list(APPEND ${outfiles} ${CMAKE_CURRENT_BINARY_DIR}/${_VersionInfoFile} ${CMAKE_CURRENT_BINARY_DIR}/${_VersionResourceFile}) + set (${outfiles} ${${outfiles}} PARENT_SCOPE) +endfunction() diff --git a/CMake/Modules/set_build_type.cmake b/CMake/Modules/set_build_type.cmake new file mode 100644 index 000000000..1f1f12731 --- /dev/null +++ b/CMake/Modules/set_build_type.cmake @@ -0,0 +1,42 @@ +include (CMakeParseArguments) + +# set_build_type() function +# +# Configure the output artefacts and their names for development, +# Release Candidate (RC), or General Availability (GA) build type. +# +# Usage: +# set_build_type () +# set_build_type (RC n) +# set_build_type (GA) +# +# With no arguments or with RC 0 a development is specified. The +# variable BUILD_TYPE_REVISION is set to "-devel". +# +# With RC n with n>0 specifies a Release Candidate build. The +# variable BUIlD_TYPE_REVISION is set to "-rcn". +# +# With GA a General Availability release is specified and the +# variable BUIlD_TYPE_REVISION is unset. +# +macro (set_build_type) + set (options GA) + set (oneValueArgs RC) + set (multiValueArgs) + cmake_parse_arguments (BUILD_TYPE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + if (BUILD_TYPE_UNPARSED_ARGUMENTS) + message (FATAL_ERROR "Unrecognized macro arguments: \"${BUILD_TYPE_UNPARSED_ARGUMENTS}\"") + endif () + if (BUILD_TYPE_GA AND BUILD_TYPE_RC) + message (FATAL_ERROR "Only specify one build type from RC or GA.") + endif () + if (NOT BUILD_TYPE_GA) + if (BUILD_TYPE_RC) + set (BUILD_TYPE_REVISION "-rc${BUILD_TYPE_RC}") + else () + set (BUILD_TYPE_REVISION "-devel") + endif () + endif () + message (STATUS "Building ${PROJECT_NAME} v${PROJECT_VERSION}${BUILD_TYPE_REVISION}") +endmacro () diff --git a/CMake/VersionCompute.cmake b/CMake/VersionCompute.cmake deleted file mode 100644 index b69bbfc88..000000000 --- a/CMake/VersionCompute.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# Load version number components. -include (${CMAKE_SOURCE_DIR}/Versions.cmake) - -# Compute the full version string. -if (WSJTX_RC AND NOT WSJTX_VERSION_IS_RELEASE) - set (WSJTX_VERSION_PATCH ${WSJTX_VERSION_PATCH}-rc${WSJTX_RC}) -elseif (NOT WSJTX_VERSION_IS_RELEASE) - set (WSJTX_VERSION_PATCH ${WSJTX_VERSION_PATCH}-devel) -endif (WSJTX_RC AND NOT WSJTX_VERSION_IS_RELEASE) - -set (wsjtx_VERSION ${WSJTX_VERSION_MAJOR}.${WSJTX_VERSION_MINOR}.${WSJTX_VERSION_PATCH}) diff --git a/CMake/getsvn.cmake b/CMake/getsvn.cmake index af149a496..92b5b4156 100644 --- a/CMake/getsvn.cmake +++ b/CMake/getsvn.cmake @@ -1,4 +1,6 @@ message (STATUS "Checking for revision information") +set (__scs_header_file ${BINARY_DIR}/scs_version.h.txt) +file (WRITE ${__scs_header_file} "/* SCS version information */\n\n") if (EXISTS "${SOURCE_DIR}/.svn") message (STATUS "Checking for Subversion revision information") find_package (Subversion QUIET REQUIRED) @@ -14,16 +16,18 @@ if (EXISTS "${SOURCE_DIR}/.svn") file (STRINGS "${BINARY_DIR}/svn_status.txt" __svn_changes REGEX "^[^?].*$" ) + set (SCS_VERSION "r${MY_WC_LAST_CHANGED_REV}") if (__svn_changes) - message (STATUS "Source tree based on revision ${MY_WC_LAST_CHANGED_REV} appears to have local changes") - set (MY_WC_LAST_CHANGED_REV "${MY_WC_LAST_CHANGED_REV}-dirty") + message (STATUS "Source tree based on revision ${SCS_VERSION} appears to have local changes") + file (APPEND ${__scs_header_file} "#define SCS_VERSION_IS_DIRTY 1\n") + set (SCS_VERSION_STR "${SCS_VERSION}-dirty") foreach (__svn_change ${__svn_changes}) message (STATUS "${__svn_change}") endforeach (__svn_change ${__svn_changes}) - endif (__svn_changes) - message (STATUS "${SOURCE_DIR} contains a .svn and is revision ${MY_WC_LAST_CHANGED_REV}") - # write a file with the SCS_VERSION define - file (WRITE "${BINARY_DIR}/scs_version.h.txt" "#define SCS_VERSION r${MY_WC_LAST_CHANGED_REV}\n") + else () + set (SCS_VERSION_STR "${SCS_VERSION}") + endif () + message (STATUS "${SOURCE_DIR} contains a .svn and is revision ${SCS_VERSION}") elseif (EXISTS "${SOURCE_DIR}/.git") if (EXISTS "${SOURCE_DIR}/.git/svn/.metadata") # try git-svn message (STATUS "Checking for Subversion revision information using git-svn") @@ -31,6 +35,7 @@ elseif (EXISTS "${SOURCE_DIR}/.git") # extract working copy information for SOURCE_DIR into MY_XXX variables GitSubversion_WC_INFO (${SOURCE_DIR} MY) message ("${MY_WC_INFO}") + set (SCS_VERSION "r${MY_WC_LAST_CHANGED_REV}") # try and determine if the working copy has outstanding changes execute_process (COMMAND ${GIT_EXECUTABLE} --git-dir=${SOURCE_DIR}/.git --work-tree=${SOURCE_DIR} svn dcommit --dry-run RESULT_VARIABLE __git_svn_status @@ -42,10 +47,11 @@ elseif (EXISTS "${SOURCE_DIR}/.git") ) if ((NOT ${__git_svn_status} EQUAL 0) OR __svn_changes) message (STATUS "Source tree based on revision ${MY_WC_LAST_CHANGED_REV} appears to have local changes") - set (MY_WC_LAST_CHANGED_REV "${MY_WC_LAST_CHANGED_REV}-dirty") + file (APPEND ${__scs_header_file} "#define SCS_VERSION_IS_DIRTY 1\n") + set (SCS_VERSION_STR "${SCS_VERSION}-dirty") + else () + set (SCS_VERSION_STR "${SCS_VERSION}") endif () - # write a file with the SVNVERSION define - file (WRITE "${BINARY_DIR}/scs_version.h.txt" "#define SCS_VERSION r${MY_WC_LAST_CHANGED_REV}\n") else () # # try git @@ -53,23 +59,27 @@ elseif (EXISTS "${SOURCE_DIR}/.git") message (STATUS "Checking for gitrevision information") include (${SOURCE_DIR}/CMake/Modules/GetGitRevisionDescription.cmake) get_git_head_revision (${SOURCE_DIR} GIT_REFSPEC GIT_SHA1) - git_local_changes (${SOURCE_DIR} GIT_DIRTY) - string (SUBSTRING "${GIT_SHA1}" 0 6 GIT_SHA1) - if ("${GIT_DIRTY}" STREQUAL "DIRTY") - message (STATUS "Source tree based on revision ${GIT_REFSPEC} ${GIT_SHA1} appears to have local changes") - set (GIT_SHA1 "${GIT_SHA1}-dirty") + git_local_changes (${SOURCE_DIR} GIT_SANITARY) + string (SUBSTRING "${GIT_SHA1}" 0 6 SCS_VERSION) + if ("${GIT_SANITARY}" STREQUAL "DIRTY") + message (STATUS "Source tree based on revision ${GIT_REFSPEC} ${SCS_VERSION} appears to have local changes") + file (APPEND ${__scs_header_file} "#define SCS_VERSION_IS_DIRTY 1\n") + set (SCS_VERSION_STR "${SCS_VERSION}-dirty") execute_process (COMMAND ${GIT_EXECUTABLE} --git-dir=${SOURCE_DIR}/.git --work-tree=${SOURCE_DIR} status ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + else () + set (SCS_VERSION_STR "${SCS_VERSION}") endif () - message (STATUS "refspec: ${GIT_REFSPEC} - SHA1: ${GIT_SHA1}") - file (WRITE "${BINARY_DIR}/scs_version.h.txt" "#define SCS_VERSION ${GIT_SHA1}\n") + message (STATUS "refspec: ${GIT_REFSPEC} - SHA1: ${SCS_VERSION}") endif () else() message (STATUS "No SCS found") - file (WRITE "${BINARY_DIR}/scs_version.h.txt" "#define SCS_VERSION\n") endif () +file (APPEND ${__scs_header_file} "#define SCS_VERSION ${SCS_VERSION}\n") +file (APPEND ${__scs_header_file} "#define SCS_VERSION_STR \"${SCS_VERSION_STR}\"\n") # copy the file to the final header only if the version changes # reduces needless rebuilds -execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different "${BINARY_DIR}/scs_version.h.txt" "${OUTPUT_DIR}/scs_version.h") +execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${__scs_header_file} "${OUTPUT_DIR}/scs_version.h") +file (REMOVE ${__scs_header_file}) diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 6980c6141..eceae4edf 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -4,7 +4,6 @@ set (CPACK_PACKAGE_VENDOR "@PROJECT_VENDOR@") set (CPACK_PACKAGE_CONTACT "@PROJECT_CONTACT@") -set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PROJECT_SUMMARY_DESCRIPTION@") set (CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING") set (CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) set (CPACK_PACKAGE_EXECUTABLES wsjtx "@PROJECT_NAME@") @@ -43,6 +42,19 @@ if (CPACK_GENERATOR MATCHES "NSIS") set (CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}") set (CPACK_NSIS_MUI_FINISHPAGE_RUN "wsjtx.exe") set (CPACK_NSIS_MODIFY_PATH ON) + + # Setup the installer and uninstall VersionInfo resource + set (CPACK_NSIS_EXTRA_DEFINES + "VIProductVersion @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.@PROJECT_VERSION_TWEAK@ +VIFileVersion @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.@PROJECT_VERSION_TWEAK@ +VIAddVersionKey /LANG=0 \"ProductName\" \"@PROJECT_NAME@\" +VIAddVersionKey /LANG=0 \"ProductVersion\" \"v@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@@BUILD_TYPE_REVISION@\" +VIAddVersionKey /LANG=0 \"Comments\" \"@PROJECT_DESCRIPTION@\" +VIAddVersionKey /LANG=0 \"CompanyName\" \"@PROJECT_VENDOR@\" +VIAddVersionKey /LANG=0 \"LegalCopyright\" \"@PROJECT_COPYRIGHT@\" +VIAddVersionKey /LANG=0 \"FileDescription\" \"@PROJECT_NAME@ Installer\" +VIAddVersionKey /LANG=0 \"FileVersion\" \"v@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@@BUILD_TYPE_REVISION@\"" + ) endif () if ("${CPACK_GENERATOR}" STREQUAL "PackageMaker") @@ -52,7 +64,7 @@ if ("${CPACK_GENERATOR}" STREQUAL "PackageMaker") endif () if ("${CPACK_GENERATOR}" STREQUAL "DragNDrop") - set (CPACK_DMG_VOLUME_NAME "@PROJECT_NAME@") + set (CPACK_DMG_VOLUME_NAME "@PROJECT_BUNDLE_NAME@") set (CPACK_DMG_BACKGROUND_IMAGE "@PROJECT_SOURCE_DIR@/icons/Darwin/DragNDrop Background.png") set (CPACK_DMG_DS_STORE "@PROJECT_SOURCE_DIR@/Darwin/wsjtx_DMG.DS_Store") set (CPACK_BUNDLE_NAME "@WSJTX_BUNDLE_NAME@") diff --git a/CMakeLists.txt b/CMakeLists.txt index 91f971b5f..e8993f6dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR) +cmake_minimum_required (VERSION 3.9 FATAL_ERROR) if (APPLE) # @@ -14,117 +14,73 @@ if (APPLE) CACHE STRING "Earliest version of macOS supported Earliest version we can support with Qt 5.12, C++11 & libc++ is 10.13. -Do not override this if you intend to build an official deployable installer.") - set (CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk - CACHE STRING "Mac OS X SDK to build with - -Change this to the newest SDK available that you can install on your system (>10.14 preferred). Do not override this if you intend to build an official deployable installer.") endif (APPLE) -project (wsjtx C CXX Fortran) - # # CMake policies # if (POLICY CMP0020) cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows -endif (POLICY CMP0020) +endif () if (POLICY CMP0043) cmake_policy (SET CMP0043 NEW) # ignore COMPILE_DEFINITIONS_ -endif (POLICY CMP0043) +endif () + +if (POLICY CMP0048) + cmake_policy (SET CMP0048 NEW) # clear PROJECT_Version_* vriables if not set in project() command +endif () if (POLICY CMP0063) cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types -endif (POLICY CMP0063) +endif () if (POLICY CMP0071) cmake_policy (SET CMP0071 NEW) # run automoc and autouic on generated sources -endif (POLICY CMP0071) +endif () -include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake) -message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}") +project (wsjtx + VERSION 2.4.0.0 + DESCRIPTION "WSJT-X: Digital Modes for Weak Signal Communications in Amateur Radio" + LANGUAGES C CXX Fortran + ) + +# +# Local CMake modules and support files +# +set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules ${CMAKE_MODULE_PATH}) + +set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") +if (NOT PROJECT_ARCHITECTURE) + # This is supposed to happen already on Windows + if (CMAKE_SIZEOF_VOID_P MATCHES 8) + set (PROJECT_ARCHITECTURE "x64") + else () + set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}") + endif () +endif () +message (STATUS "******************************************************") +message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}") +message (STATUS "******************************************************") + +include (set_build_type) +# RC 0 or omitted is a development build, GA is a General Availability release build +set_build_type (RC 0) +set (wsjtx_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${BUILD_TYPE_REVISION}") # # project information # -set (PROJECT_NAME "WSJT-X") +set (PROJECT_BUNDLE_NAME "WSJT-X") set (PROJECT_VENDOR "Joe Taylor, K1JT") set (PROJECT_CONTACT "Joe Taylor ") -set (PROJECT_COPYRIGHT "Copyright (C) 2001-2019 by Joe Taylor, K1JT") -set (PROJECT_HOMEPAGE http://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html) +set (PROJECT_COPYRIGHT "Copyright (C) 2001-2020 by Joe Taylor, K1JT") +set (PROJECT_HOMEPAGE https://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html) set (PROJECT_MANUAL wsjtx-main) -set (PROJECT_MANUAL_DIRECTORY_URL http://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/) +set (PROJECT_MANUAL_DIRECTORY_URL https://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/) set (PROJECT_SAMPLES_URL http://downloads.sourceforge.net/project/wsjt/) set (PROJECT_SAMPLES_UPLOAD_DEST frs.sourceforge.net:/home/frs/project/wsjt/) -set (PROJECT_SUMMARY_DESCRIPTION "${PROJECT_NAME} - Digital Modes for Weak Signal Communications in Amateur Radio.") -set (PROJECT_DESCRIPTION "${PROJECT_SUMMARY_DESCRIPTION} - ${PROJECT_NAME} is a computer program designed to facilitate basic amateur - radio communication using very weak signals. The first four letters in - the program name stand for `(W)eak (S)ignal communication by - K1(JT),` while the suffix `-X` indicates that ${PROJECT_NAME} started as - an extended and experimental branch of the program - WSJT. - . - ${PROJECT_NAME} Version 1.8 offers nine different protocols or modes: FT8, - JT4, JT9, JT65, QRA64, ISCAT, MSK144, WSPR, and Echo. - The first five are designed for making reliable QSOs under extreme - weak-signal conditions. They use nearly identical message structure - and source encoding. JT65 and QRA64 were designed for EME - (`moonbounce`) on the VHF/UHF bands and have also proven very - effective for worldwide QRP communication on the HF bands. QRA64 has - a number of advantages over JT65, including better performance on the - very weakest signals. We imagine that over time it may replace JT65 - for EME use. JT9 was originally designed for the LF, MF, and lower HF - bands. Its submode JT9A is 2 dB more sensitive than JT65 while using - less than 10% of the bandwidth. JT4 offers a wide variety of tone - spacings and has proven highly effective for EME on microwave bands up - to 24 GHz. These four `slow` modes use one-minute timed sequences - of alternating transmission and reception, so a minimal QSO takes four - to six minutes — two or three transmissions by each station, one - sending in odd UTC minutes and the other even. FT8 is operationally - similar but four times faster (15-second T/R sequences) and less - sensitive by a few dB. On the HF bands, world-wide QSOs are possible - with any of these modes using power levels of a few watts (or even - milliwatts) and compromise antennas. On VHF bands and higher, QSOs - are possible (by EME and other propagation types) at signal levels 10 - to 15 dB below those required for CW. - . - ISCAT, MSK144, and optionally submodes JT9E-H are `fast` - protocols designed to take advantage of brief signal enhancements from - ionized meteor trails, aircraft scatter, and other types of scatter - propagation. These modes use timed sequences of 5, 10, 15, or 30 s - duration. User messages are transmitted repeatedly at high rate (up - to 250 characters per second, for MSK144) to make good use of the - shortest meteor-trail reflections or `pings`. ISCAT uses free-form - messages up to 28 characters long, while MSK144 uses the same - structured messages as the slow modes and optionally an abbreviated - format with hashed callsigns. - . - WSPR (pronounced `whisper`) stands for (W)eak (S)ignal - (P)ropagation (R)eporter. The WSPR protocol was designed for probing - potential propagation paths using low-power transmissions. WSPR - messages normally carry the transmitting station’s callsign, grid - locator, and transmitter power in dBm, and they can be decoded at - signal-to-noise ratios as low as -28 dB in a 2500 Hz bandwidth. WSPR - users with internet access can automatically upload reception - reports to a central database called wsprnet that provides a mapping - facility, archival storage, and many other features. - . - Echo mode allows you to detect and measure your own station's echoes - from the moon, even if they are far below the audible threshold. - . - ${PROJECT_NAME} provides spectral displays for receiver passbands as wide as - 5 kHz, flexible rig control for nearly all modern radios used by - amateurs, and a wide variety of special aids such as automatic Doppler - tracking for EME QSOs and Echo testing. The program runs equally well - on Windows, Macintosh, and Linux systems, and installation packages - are available for all three platforms. - . - Be sure to read the online ${PROJECT_NAME} User's Guide.") - -set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules ${CMAKE_MODULE_PATH}) # make sure that the default configuration is a RELEASE if (NOT CMAKE_BUILD_TYPE) @@ -182,19 +138,6 @@ If you just want to see the debug output from the application then the easiest w attach a debugger which will then receive the console output inside its console." ON "WIN32" OFF) -set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") -if (NOT PROJECT_ARCHITECTURE) - # This is supposed to happen already on Windows - if (CMAKE_SIZEOF_VOID_P MATCHES 8) - set (PROJECT_ARCHITECTURE "x64") - else () - set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}") - endif () -endif (NOT PROJECT_ARCHITECTURE) -message (STATUS "******************************************************") -message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}") -message (STATUS "******************************************************") - # # install locations # @@ -806,6 +749,8 @@ if (APPLE) DEPENDS ${ICONSRCS} COMMENT "Building Icons" ) +else () + set (WSJTX_ICON_FILE icons/windows-icons/wsjtx.ico) endif (APPLE) set_source_files_properties (${WSJTX_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) @@ -868,11 +813,30 @@ endif (APPLE) # # find some useful tools # +include (CheckCSourceCompiles) include (CheckSymbolExists) +include (generate_version_info) find_program(CTAGS ctags) find_program(ETAGS etags) +# +# Standard C Math Library +# +set (LIBM_TEST_SOURCE "#include\nfloat f; int main(){sqrt(f);return 0;}") +check_c_source_compiles ("${LIBM_TEST_SOURCE}" HAVE_MATH) +if (HAVE_MATH) + set (LIBM_LIBRARIES) +else () + set (CMAKE_REQUIRED_LIBRARIES m) + check_c_source_compiles ("${LIBM_TEST_SOURCE}" HAVE_LIBM_MATH) + unset (CMAKE_REQUIRED_LIBRARIES) + if (NOT HAVE_LIBM_MATH) + message (FATAL_ERROR "Unable to use C math library functions") + endif () + set (LIBM_LIBRARIES m) +endif () + # # Boost # @@ -1093,6 +1057,139 @@ query_qmake (QT_INSTALL_IMPORTS QT_IMPORTS_DIR) query_qmake (QT_HOST_DATA QT_DATA_DIR) set (QT_MKSPECS_DIR ${QT_DATA_DIR}/mkspecs) +# project definitions +add_definitions (-DQT5 -DCMAKE_BUILD -DBIGSYM=1) +if (CMAKE_HOST_UNIX) + add_definitions (-DUNIX) +elseif (CMAKE_HOST_WIN32) + add_definitions (-DWIN32) +endif () + +# build a library of package functionality (without and optionally with OpenMP support) +add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS}) +target_link_libraries (wsjt_cxx ${LIBM_LIBRARIES}) + +# build an OpenMP variant of the Fortran library routines +add_library (wsjt_fort STATIC ${wsjt_FSRCS}) +target_link_libraries (wsjt_fort ${FFTW3_LIBRARIES}) +if (${OPENMP_FOUND} OR APPLE) + add_library (wsjt_fort_omp STATIC ${wsjt_FSRCS}) + target_link_libraries (wsjt_fort_omp ${FFTW3_LIBRARIES}) + if (OpenMP_C_FLAGS) + set_target_properties (wsjt_fort_omp + PROPERTIES + COMPILE_FLAGS "${OpenMP_C_FLAGS}" + ) + endif () + set_target_properties (wsjt_fort_omp + PROPERTIES + Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp + ) + file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp) + if (APPLE) + # On Mac we don't have working OpenMP support in the C/C++ + # compilers so we have to manually set the correct flags to get + # OpenMP support in jt9. + target_compile_options (wsjt_fort_omp + PRIVATE + $<$:-fopenmp> # assumes GNU style Fortran compiler + ) + endif (APPLE) +endif (${OPENMP_FOUND} OR APPLE) + +if(WSJT_BUILD_UTILS) + +add_executable (jt4sim lib/jt4sim.f90) +target_link_libraries (jt4sim wsjt_fort wsjt_cxx) + +add_executable (jt65sim lib/jt65sim.f90) +target_link_libraries (jt65sim wsjt_fort wsjt_cxx) + +add_executable (sumsim lib/sumsim.f90) +target_link_libraries (sumsim wsjt_fort wsjt_cxx) + +add_executable (qra64sim lib/qra/qra64/qra64sim.f90) +target_link_libraries (qra64sim wsjt_fort wsjt_cxx) + +add_executable (jt49sim lib/jt49sim.f90) +target_link_libraries (jt49sim wsjt_fort wsjt_cxx) + +add_executable (allsim lib/allsim.f90) +target_link_libraries (allsim wsjt_fort wsjt_cxx) + +add_executable (rtty_spec lib/rtty_spec.f90) +target_link_libraries (rtty_spec wsjt_fort wsjt_cxx) + +add_executable (jt65code lib/jt65code.f90) +target_link_libraries (jt65code wsjt_fort wsjt_cxx) + +add_executable (qra64code lib/qra64code.f90) +target_link_libraries (qra64code wsjt_fort wsjt_cxx) + +add_executable (jt9code lib/jt9code.f90) +target_link_libraries (jt9code wsjt_fort wsjt_cxx) + +add_executable (wsprcode lib/wsprcode/wsprcode.f90 lib/wsprcode/nhash.c) +target_link_libraries (wsprcode wsjt_fort wsjt_cxx) + +add_executable (encode77 lib/77bit/encode77.f90) +target_link_libraries (encode77 wsjt_fort wsjt_cxx) + +add_executable (wsprsim ${wsprsim_CSRCS}) +target_link_libraries (wsprsim ${LIBM_LIBRARIES}) + +add_executable (jt4code lib/jt4code.f90) +target_link_libraries (jt4code wsjt_fort wsjt_cxx) + +add_executable (msk144code lib/msk144code.f90) +target_link_libraries (msk144code wsjt_fort wsjt_cxx) + +add_executable (ft8code lib/ft8/ft8code.f90) +target_link_libraries (ft8code wsjt_fort wsjt_cxx) + +add_executable (ft4code lib/ft4/ft4code.f90) +target_link_libraries (ft4code wsjt_fort wsjt_cxx) + +add_executable (ft8sim lib/ft8/ft8sim.f90) +target_link_libraries (ft8sim wsjt_fort wsjt_cxx) + +add_executable (msk144sim lib/msk144sim.f90) +target_link_libraries (msk144sim wsjt_fort wsjt_cxx) + +add_executable (ft4sim lib/ft4/ft4sim.f90) +target_link_libraries (ft4sim wsjt_fort wsjt_cxx) + +add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90) +target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) + +add_executable (fst4sim lib/fst4/fst4sim.f90) +target_link_libraries (fst4sim wsjt_fort wsjt_cxx) + +add_executable (ldpcsim240_101 lib/fst4/ldpcsim240_101.f90) +target_link_libraries (ldpcsim240_101 wsjt_fort wsjt_cxx) + +add_executable (ldpcsim240_74 lib/fst4/ldpcsim240_74.f90) +target_link_libraries (ldpcsim240_74 wsjt_fort wsjt_cxx) + +endif(WSJT_BUILD_UTILS) + +add_executable (fmtave lib/fmtave.f90) + +add_executable (fcal lib/fcal.f90) + +add_executable (fmeasure lib/fmeasure.f90) + +# build the wsprd WSPR mode decoder driver +generate_version_info (wsprd_VERSION_RESOURCES + NAME wsprd + BUNDLE ${PROJECT_BUNDLE_NAME} + ICON ${WSJTX_ICON_FILE} + FILE_DESCRIPTION "WSPR mode decoder" + ) +add_executable (wsprd ${wsprd_CSRCS} lib/indexx.f90 lib/wsprd/osdwspr.f90 ${wsprd_VERSION_RESOURCES}) +target_include_directories (wsprd PRIVATE ${FFTW3_INCLUDE_DIRS}) +target_link_libraries (wsprd ${FFTW3_LIBRARIES} ${LIBM_LIBRARIES}) + # Tell CMake to run moc when necessary set (CMAKE_AUTOMOC ON) include_directories (${CMAKE_CURRENT_BINARY_DIR}) @@ -1106,14 +1203,6 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR}) # look for includes there: set (CMAKE_INCLUDE_CURRENT_DIR ON) -# project definitions -add_definitions (-DQT5 -DCMAKE_BUILD -DBIGSYM=1) -if (CMAKE_HOST_UNIX) - add_definitions (-DUNIX) -elseif (CMAKE_HOST_WIN32) - add_definitions (-DWIN32) -endif () - # # source navigation # @@ -1197,7 +1286,6 @@ add_resources (wsjtx_RESOURCES /Translations ${QM_FILES}) configure_file (wsjtx.qrc.in wsjtx.qrc @ONLY) - # UI generation qt5_wrap_ui (wsjt_qt_GENUISRCS ${wsjt_qt_UISRCS}) qt5_wrap_ui (wsjtx_GENUISRCS ${wsjtx_UISRCS}) @@ -1215,39 +1303,11 @@ if (WIN32) endif (WIN32) # -# targets +# targets dependent on Qt # -# build a library of package functionality (without and optionally with OpenMP support) -add_library (wsjt_cxx STATIC ${wsjt_CSRCS} ${wsjt_CXXSRCS}) - -# build an OpenMP variant of the Fortran library routines -add_library (wsjt_fort STATIC ${wsjt_FSRCS}) -target_link_libraries (wsjt_fort ${FFTW3_LIBRARIES}) -if (${OPENMP_FOUND} OR APPLE) - add_library (wsjt_fort_omp STATIC ${wsjt_FSRCS}) - target_link_libraries (wsjt_fort_omp ${FFTW3_LIBRARIES}) - if (OpenMP_C_FLAGS) - set_target_properties (wsjt_fort_omp - PROPERTIES - COMPILE_FLAGS "${OpenMP_C_FLAGS}" - ) - endif () - set_target_properties (wsjt_fort_omp - PROPERTIES - Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp - ) - file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/fortran_modules_omp) - if (APPLE) - # On Mac we don't have working OpenMP support in the C/C++ - # compilers so we have to manually set the correct flags to get - # OpenMP support in jt9. - target_compile_options (wsjt_fort_omp - PRIVATE - $<$:-fopenmp> # assumes GNU style Fortran compiler - ) - endif (APPLE) -endif (${OPENMP_FOUND} OR APPLE) +add_executable (record_time_signal Audio/tools/record_time_signal.cpp) +target_link_libraries (record_time_signal wsjt_cxx wsjt_qtmm wsjt_qt) # build a library for the QCustomPlot widget add_library (qcp STATIC ${qcp_CXXSRCS}) @@ -1272,18 +1332,15 @@ target_link_libraries (fort_qt Qt5::Core) add_library (wsjt_qtmm STATIC ${wsjt_qtmm_CXXSRCS} ${wsjt_qtmm_GENUISRCS}) target_link_libraries (wsjt_qtmm Qt5::Multimedia) -# Always build these: -add_executable (wsprd ${wsprd_CSRCS} lib/indexx.f90 lib/wsprd/osdwspr.f90) -target_include_directories (wsprd PRIVATE ${FFTW3_INCLUDE_DIRS}) -target_link_libraries (wsprd ${FFTW3_LIBRARIES}) +# build the jt9 slow mode decoder driver +generate_version_info (jt9_VERSION_RESOURCES + NAME jt9 + BUNDLE ${PROJECT_BUNDLE_NAME} + ICON ${WSJTX_ICON_FILE} + FILE_DESCRIPTION "Slow mode decoder" + ) -add_executable (fmtave lib/fmtave.f90 wsjtx.rc) - -add_executable (fcal lib/fcal.f90 wsjtx.rc) - -add_executable (fmeasure lib/fmeasure.f90 wsjtx.rc) - -add_executable (jt9 ${jt9_FSRCS} wsjtx.rc) +add_executable (jt9 ${jt9_FSRCS} ${jt9_VERSION_RESOURCES}) if (${OPENMP_FOUND} OR APPLE) if (APPLE) # On Mac we don't have working OpenMP support in the C/C++ @@ -1321,91 +1378,19 @@ else (${OPENMP_FOUND} OR APPLE) target_link_libraries (jt9 wsjt_fort wsjt_cxx fort_qt) endif (${OPENMP_FOUND} OR APPLE) -if(WSJT_BUILD_UTILS) -add_executable (jt4sim lib/jt4sim.f90 wsjtx.rc) -target_link_libraries (jt4sim wsjt_fort wsjt_cxx) - -add_executable (jt65sim lib/jt65sim.f90 wsjtx.rc) -target_link_libraries (jt65sim wsjt_fort wsjt_cxx) - -add_executable (sumsim lib/sumsim.f90 wsjtx.rc) -target_link_libraries (sumsim wsjt_fort wsjt_cxx) - -add_executable (qra64sim lib/qra/qra64/qra64sim.f90 wsjtx.rc) -target_link_libraries (qra64sim wsjt_fort wsjt_cxx) - -add_executable (jt49sim lib/jt49sim.f90 wsjtx.rc) -target_link_libraries (jt49sim wsjt_fort wsjt_cxx) - -add_executable (allsim lib/allsim.f90 wsjtx.rc) -target_link_libraries (allsim wsjt_fort wsjt_cxx) - -add_executable (rtty_spec lib/rtty_spec.f90 wsjtx.rc) -target_link_libraries (rtty_spec wsjt_fort wsjt_cxx) - -add_executable (jt65code lib/jt65code.f90 wsjtx.rc) -target_link_libraries (jt65code wsjt_fort wsjt_cxx) - -add_executable (qra64code lib/qra64code.f90 wsjtx.rc) -target_link_libraries (qra64code wsjt_fort wsjt_cxx) - -add_executable (jt9code lib/jt9code.f90 wsjtx.rc) -target_link_libraries (jt9code wsjt_fort wsjt_cxx) - -add_executable (wsprcode lib/wsprcode/wsprcode.f90 lib/wsprcode/nhash.c - wsjtx.rc) -target_link_libraries (wsprcode wsjt_fort wsjt_cxx) - -add_executable (encode77 lib/77bit/encode77.f90 wsjtx.rc) -target_link_libraries (encode77 wsjt_fort wsjt_cxx) - -add_executable (wsprsim ${wsprsim_CSRCS}) - -add_executable (jt4code lib/jt4code.f90 wsjtx.rc) -target_link_libraries (jt4code wsjt_fort wsjt_cxx) - -add_executable (msk144code lib/msk144code.f90 wsjtx.rc) -target_link_libraries (msk144code wsjt_fort wsjt_cxx) - -add_executable (ft8code lib/ft8/ft8code.f90 wsjtx.rc) -target_link_libraries (ft8code wsjt_fort wsjt_cxx) - -add_executable (ft4code lib/ft4/ft4code.f90 wsjtx.rc) -target_link_libraries (ft4code wsjt_fort wsjt_cxx) - -add_executable (ft8sim lib/ft8/ft8sim.f90 wsjtx.rc) -target_link_libraries (ft8sim wsjt_fort wsjt_cxx) - -add_executable (msk144sim lib/msk144sim.f90 wsjtx.rc) -target_link_libraries (msk144sim wsjt_fort wsjt_cxx) - -add_executable (ft4sim lib/ft4/ft4sim.f90 wsjtx.rc) -target_link_libraries (ft4sim wsjt_fort wsjt_cxx) - -add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc) -target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) - -add_executable (record_time_signal Audio/tools/record_time_signal.cpp) -target_link_libraries (record_time_signal wsjt_cxx wsjt_qtmm wsjt_qt) - -add_executable (fst4sim lib/fst4/fst4sim.f90 wsjtx.rc) -target_link_libraries (fst4sim wsjt_fort wsjt_cxx) - -add_executable (ldpcsim240_101 lib/fst4/ldpcsim240_101.f90 wsjtx.rc) -target_link_libraries (ldpcsim240_101 wsjt_fort wsjt_cxx) - -add_executable (ldpcsim240_74 lib/fst4/ldpcsim240_74.f90 wsjtx.rc) -target_link_libraries (ldpcsim240_74 wsjt_fort wsjt_cxx) - -endif(WSJT_BUILD_UTILS) - # build the main application +generate_version_info (wsjtx_VERSION_RESOURCES + NAME wsjtx + BUNDLE ${PROJECT_BUNDLE_NAME} + ICON ${WSJTX_ICON_FILE} + ) + add_executable (wsjtx MACOSX_BUNDLE ${wsjtx_CXXSRCS} ${wsjtx_GENUISRCS} - wsjtx.rc ${WSJTX_ICON_FILE} ${wsjtx_RESOURCES_RCC} + ${wsjtx_VERSION_RESOURCES} ) if (WSJT_CREATE_WINMAIN) @@ -1414,12 +1399,12 @@ endif (WSJT_CREATE_WINMAIN) set_target_properties (wsjtx PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Darwin/Info.plist.in" - MACOSX_BUNDLE_INFO_STRING "${WSJTX_DESCRIPTION_SUMMARY}" + MACOSX_BUNDLE_INFO_STRING "${PROJECT_DESCRIPTION}" MACOSX_BUNDLE_ICON_FILE "${WSJTX_ICON_FILE}" - MACOSX_BUNDLE_BUNDLE_VERSION ${wsjtx_VERSION} - MACOSX_BUNDLE_SHORT_VERSION_STRING "v${wsjtx_VERSION}" - MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${wsjtx_VERSION}" - MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}" + MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + MACOSX_BUNDLE_SHORT_VERSION_STRING "v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" + MACOSX_BUNDLE_LONG_VERSION_STRING "Version ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${SCS_VERSION_STR}" + MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_BUNDLE_NAME}" MACOSX_BUNDLE_BUNDLE_EXECUTABLE_NAME "${PROJECT_NAME}" MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT}" MACOSX_BUNDLE_GUI_IDENTIFIER "org.k1jt.wsjtx" @@ -1427,9 +1412,9 @@ set_target_properties (wsjtx PROPERTIES target_include_directories (wsjtx PRIVATE ${FFTW3_INCLUDE_DIRS}) if (APPLE) - target_link_libraries (wsjtx Qt5::SerialPort wsjt_fort wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES}) + target_link_libraries (wsjtx wsjt_fort) else () - target_link_libraries (wsjtx Qt5::SerialPort wsjt_fort_omp wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES}) + target_link_libraries (wsjtx wsjt_fort_omp) if (OpenMP_C_FLAGS) set_target_properties (wsjtx PROPERTIES COMPILE_FLAGS "${OpenMP_C_FLAGS}" @@ -1445,6 +1430,7 @@ else () ) endif () endif () +target_link_libraries (wsjtx Qt5::SerialPort wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES} ${LIBM_LIBRARIES}) # make a library for WSJT-X UDP servers # add_library (wsjtx_udp SHARED ${UDP_library_CXXSRCS}) @@ -1467,9 +1453,21 @@ target_compile_definitions (wsjtx_udp-static PUBLIC UDP_STATIC_DEFINE) target_link_libraries (wsjtx_udp-static Qt5::Network Qt5::Gui) generate_export_header (wsjtx_udp-static BASE_NAME udp) -add_executable (udp_daemon UDPExamples/UDPDaemon.cpp UDPExamples/udp_daemon.rc ${WSJTX_ICON_FILE}) +generate_version_info (udp_daemon_VERSION_RESOURCES + NAME udp_daemon + BUNDLE ${PROJECT_BUNDLE_NAME} + ICON ${WSJTX_ICON_FILE} + FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol daemon" + ) +add_executable (udp_daemon UDPExamples/UDPDaemon.cpp ${udp_daemon_VERSION_RESOURCES}) target_link_libraries (udp_daemon wsjtx_udp-static) +generate_version_info (message_aggregator_VERSION_RESOURCES + NAME message_aggregator + BUNDLE ${PROJECT_BUNDLE_NAME} + ICON ${WSJTX_ICON_FILE} + FILE_DESCRIPTION "Example WSJT-X UDP Message Protocol application" + ) add_resources (message_aggregator_RESOURCES /qss ${message_aggregator_STYLESHEETS}) configure_file (UDPExamples/message_aggregator.qrc.in message_aggregator.qrc @ONLY) qt5_add_resources (message_aggregator_RESOURCES_RCC @@ -1478,9 +1476,8 @@ qt5_add_resources (message_aggregator_RESOURCES_RCC ) add_executable (message_aggregator ${message_aggregator_CXXSRCS} - ${WSJTX_ICON_FILE} - UDPExamples/message_aggregator.rc ${message_aggregator_RESOURCES_RCC} + ${message_aggregator_VERSION_RESOURCES} ) target_link_libraries (message_aggregator Qt5::Widgets wsjtx_udp-static) @@ -1569,7 +1566,6 @@ install (FILES AUTHORS THANKS NEWS - INSTALL BUGS DESTINATION ${CMAKE_INSTALL_DOCDIR} #COMPONENT runtime @@ -1613,13 +1609,16 @@ add_custom_target (revisiontag -D BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR} -D OUTPUT_DIR=${PROJECT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/getsvn.cmake - COMMENT "Generating Subversion revision information" VERBATIM + BYPRODUCTS scs_version.h + COMMENT "Getting source control system revision information" ) # explicitly say that the wsjt_qt depends on custom target, this is # done indirectly so that the revisiontag target gets built exactly # once per build -add_dependencies(wsjt_qt revisiontag) +add_dependencies (wsjt_qt revisiontag) +add_dependencies (jt9 revisiontag) +add_dependencies (wsprd revisiontag) # @@ -1819,11 +1818,12 @@ endif (NOT is_debug_build) # # packaging # +set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/package_description.txt") set (CPACK_MONOLITHIC_INSTALL 1) set (CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}") -set (CPACK_PACKAGE_VERSION_MAJOR ${WSJTX_VERSION_MAJOR}) -set (CPACK_PACKAGE_VERSION_MINOR ${WSJTX_VERSION_MINOR}) -set (CPACK_PACKAGE_VERSION_PATCH ${WSJTX_VERSION_PATCH}) +set (CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set (CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) if (WIN32) set (CPACK_GENERATOR "NSIS") @@ -1856,13 +1856,12 @@ else () endif (RPMBUILDER) endif () -set (CPACK_DEBIAN_PACKAGE_DESCRIPTION "${PROJECT_DESCRIPTION}") set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PROJECT_HOMEPAGE}") -set (CPACK_DEBIAN_PACKAGE_DEPENDS "libgfortran5 (>=10), libfftw3-single3 (>=3.3.8), libgomp1 (>=10), libqt5serialport5 (>=5.12.8), libqt5multimedia5-plugins (>=5.12.8), libqt5widgets5 (>=5.12.8), libqt5network5 (>=5.12.8), libqt5printsupport5 (>=5.12.8), libqt5sql5-sqlite (>=5.12.8), libusb-1.0-0 (>=1.0.23)") +set (CPACK_DEBIAN_PACKAGE_DEPENDS "libgfortran5 (>=8.3) | libgfortran4 (>=7.3) | libgfortran3 (>=6.3), libfftw3-single3 (>=3.3), libgomp1 (>=6), libqt5serialport5 (>=5.7), libqt5multimedia5-plugins (>=5.7), libqt5widgets5 (>=5.7), libqt5network5 (>=5.7), libqt5printsupport5 (>=5.7), libqt5sql5-sqlite (>=5.7), libusb-1.0-0 (>=1.0.21), libboost-log1.65.1 (>=1.62.0) | libboost-log1.65.1 (>=1.65.1) | libboost-log1.67.0 (>=1.67.0) | libboost-log1.71.0 (>=1.71.0)") set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set (CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) -set (CPACK_RPM_PACKAGE_REQUIRES "qt5-qtbase >= 5.13.2, qt5-qtserialport >= 5.13.2, qt5-qtmultimedia >= 5.13.2, qt5-qtsvg >= 5.13.2, libusbx >= 1.0.23, libgfortran >= 10.0.1, libgomp >= 10.0.1, fftw-libs-single >= 3.3.8") +set (CPACK_RPM_PACKAGE_REQUIRES "qt5-qtbase >= 5.9, qt5-qtserialport >= 5.9, qt5-qtmultimedia >= 5.9, qt5-qtsvg >= 5.9, libusbx >= 1.0.22, libgfortran >= 7, libgomp >= 7, fftw-libs-single >= 3.3") set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/share/pixmaps /usr/share/applications /usr/share/man /usr/share/man1) configure_file ("${PROJECT_SOURCE_DIR}/CMakeCPackOptions.cmake.in" diff --git a/UDPExamples/message_aggregator.rc b/UDPExamples/message_aggregator.rc deleted file mode 100644 index faf73f803..000000000 --- a/UDPExamples/message_aggregator.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "../icons/windows-icons/wsjtx.ico" diff --git a/UDPExamples/udp_daemon.rc b/UDPExamples/udp_daemon.rc deleted file mode 100644 index faf73f803..000000000 --- a/UDPExamples/udp_daemon.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "../icons/windows-icons/wsjtx.ico" diff --git a/Versions.cmake b/Versions.cmake deleted file mode 100644 index 5b6707739..000000000 --- a/Versions.cmake +++ /dev/null @@ -1,6 +0,0 @@ -# Version number components -set (WSJTX_VERSION_MAJOR 2) -set (WSJTX_VERSION_MINOR 4) -set (WSJTX_VERSION_PATCH 0) -set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions -set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt index 27656d7fc..07faeb2c7 100644 --- a/debian/CMakeLists.txt +++ b/debian/CMakeLists.txt @@ -13,7 +13,7 @@ math (EXPR __index "${__month_index} - 1") list (GET __months "${__index}" __month) string (REPLACE "[${__month_index}]" "${__month}" ts ${ts}) -set (deb_changelog changelog.Debian) +set (deb_changelog changelog) configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/${deb_changelog}.in" "${CMAKE_CURRENT_BINARY_DIR}/${deb_changelog}" diff --git a/debian/changelog.Debian.in b/debian/changelog.in similarity index 100% rename from debian/changelog.Debian.in rename to debian/changelog.in diff --git a/debian/copyright.in b/debian/copyright.in index 110219a91..b27020a4c 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -1,10 +1,11 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: @CMAKE_PROJECT_NAME@ -Upstream-Maintainer: @PROJECT_CONTACT@ -Upstream-Source: @PROJECT_HOMEPAGE@ +Upstream-Contact: @PROJECT_CONTACT@ +Source: @PROJECT_HOMEPAGE@ Files: * Copyright: @PROJECT_COPYRIGHT@. -License: GPL v3 - The full text of the GPL is distributed in - /usr/share/common-licenses/GPL-3 on Debian systems. +License: GPL-3+ + On Debian systems, the full text of the GNU General Public + License version 3 can be found in the file + `/usr/share/common-licenses/GPL-3'. diff --git a/main.cpp b/main.cpp index 7d5d6103a..4c30f615c 100644 --- a/main.cpp +++ b/main.cpp @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) a.setApplicationVersion (version ()); QCommandLineParser parser; - parser.setApplicationDescription ("\n" PROJECT_SUMMARY_DESCRIPTION); + parser.setApplicationDescription ("\n" PROJECT_DESCRIPTION); auto help_option = parser.addHelpOption (); auto version_option = parser.addVersionOption (); diff --git a/manpages/CMakeLists.txt b/manpages/CMakeLists.txt index 7ab7c7646..2c2fe59ee 100644 --- a/manpages/CMakeLists.txt +++ b/manpages/CMakeLists.txt @@ -1,4 +1,8 @@ set (ASCIIDOC_MANS + man1/fcal.1.txt + man1/fmeasure.1.txt + man1/fmtave.1.txt + man1/fst4sim.1.txt man1/wsjtx.1.txt man1/wsprd.1.txt man1/jt65code.1.txt diff --git a/manpages/man1/fcal.1.txt b/manpages/man1/fcal.1.txt new file mode 100644 index 000000000..d650ece73 --- /dev/null +++ b/manpages/man1/fcal.1.txt @@ -0,0 +1,42 @@ +:doctype: manpage +:man source: AsciiDoc +:man version: {VERSION} +:man manual: WSJT-X Manual += fcal(1) + +== NAME + +fcal - Calculates a best-fit straight line for calibration data + +== SYNOPSIS + +*fcal* ['FILE'] + +== DESCRIPTION + +*fcal* is one of suite of command line tools designed to aid frequency +measurement. These tools are aimed at those taking part in the ARRL +FMT, but are also useful for general frequency measurement and +calibration. They are included within the *WSJT-X* package for use +with the FreqCal mode of WSJT-X. + +The input FILE is normally the output of the *fmtavg*(1) tool, after +adjusting to remove bad sources. + +Refer to https://physics.princeton.edu/pulsar/k1jt/FMT_User.pdf for +detailed instructions. + +== AUTHOR + +Joe Taylor, K1JT. + +== COPYING + +*fcal* is Copyright (C) 2001 - 2019 by Joseph H. Taylor, Jr., K1JT, +with contributions from additional authors. WSJT-X is Open Source +software, licensed under the GNU General Public License (GPLv3). + +This program 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. diff --git a/manpages/man1/fmeasure.1.txt b/manpages/man1/fmeasure.1.txt new file mode 100644 index 000000000..d6d2b5169 --- /dev/null +++ b/manpages/man1/fmeasure.1.txt @@ -0,0 +1,43 @@ +:doctype: manpage +:man source: AsciiDoc +:man version: {VERSION} +:man manual: WSJT-X Manual += fmeasure(1) + +== NAME + +fmeasure - Calculates the properly calibrated frequency of a series of test signals + +== SYNOPSIS + +*fmeasure* ['FILE'] + +== DESCRIPTION + +*fmeasure* is one of suite of command line tools designed to aid +frequency measurement. These tools are aimed at those taking part in +the ARRL FMT, but are also useful for general frequency measurement +and calibration. They are included within the *WSJT-X* package for use +with the FreqCal mode of WSJT-X. + +The input FILE is normally the output of the *fmtavg*(1) tool, after +adjusting to remove bad sources. Results are saved in 'fmeasure.out' +and are suitable for entry to the ARRL Frequency Measuring Test (FMT). + +Refer to https://physics.princeton.edu/pulsar/k1jt/FMT_User.pdf for +detailed instructions. + +== AUTHOR + +Joe Taylor, K1JT. + +== COPYING + +*fcal* is Copyright (C) 2001 - 2019 by Joseph H. Taylor, Jr., K1JT, +with contributions from additional authors. WSJT-X is Open Source +software, licensed under the GNU General Public License (GPLv3). + +This program 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. diff --git a/manpages/man1/fmtave.1.txt b/manpages/man1/fmtave.1.txt new file mode 100644 index 000000000..6da8f4201 --- /dev/null +++ b/manpages/man1/fmtave.1.txt @@ -0,0 +1,44 @@ +:doctype: manpage +:man source: AsciiDoc +:man version: {VERSION} +:man manual: WSJT-X Manual += fmtave(1) + +== NAME + +fmtave - Averages raw measurement data + +== SYNOPSIS + +*fmtave* ['FILE'] + +== DESCRIPTION + +*fmtave* is one of suite of command line tools designed to aid +frequency measurement. These tools are aimed at those taking part in +the ARRL FMT, but are also useful for general frequency measurement +and calibration. They are included within the *WSJT-X* package for use +with the FreqCal mode of WSJT-X. + +The input FILE is normally the output of a WSJT-X FreqCal run or the +*fmt* tool (not bundled with WSJT-X). Results are saved in +'fmtave.out'.and are suitable for entry to the ARRL Frequency +Measuring Test (FMT). + +Refer to https://physics.princeton.edu/pulsar/k1jt/FMT_User.pdf for +detailed instructions. + +== AUTHOR + +Joe Taylor, K1JT. + +== COPYING + +*fcal* is Copyright (C) 2001 - 2019 by Joseph H. Taylor, Jr., K1JT, +with contributions from additional authors. WSJT-X is Open Source +software, licensed under the GNU General Public License (GPLv3). + +This program 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. diff --git a/manpages/man1/fst4sim.1.txt b/manpages/man1/fst4sim.1.txt new file mode 100644 index 000000000..7c4dbaf05 --- /dev/null +++ b/manpages/man1/fst4sim.1.txt @@ -0,0 +1,93 @@ +:doctype: manpage +:man source: AsciiDoc +:man version: {VERSION} +:man manual: WSJT-X Manual += fst4sim(1) + +== NAME + +fst4sim, qra64sim - Generate simulated QRA64, FST4, and FST4W mode signals. + +== SYNOPSIS + +*qra64sim* msg A-E Nsigs fDop DT Nfiles SNR + +*fst4sim* msg TRsec f0 DT h fDop del Nfiles SNR W + +== DESCRIPTION + +*fst4sim* can be used to generate FST4 and FST4W signals with +user-specified message content, mode parameters, and SNR values. + +== ARGS + +*msg*:: + + A valid QRA64, FST4, or FST4W message enclosed in quotation marks. + +*A-E*:: + +QRA64 sub-mode designator. + +*Nsigs*:: + + Number of signals to simulate, distributed even across a 2000 Hz + bandwidth. + +*TRsec*:: + + A valid T/R period duration (s). + +*f0*:: + + Integer signal frequency offset (Hz). + +*DT*:: + + Decimal signal time offset (s). + +*h*:: + + A valid modulation index. + +*fDop*:: + + Decimal Doppler frequency spread (Hz). + +*del*:: + + Decimal Watterson model delay (ms). + +*nfiles*:: + + Number of files to generate. + +*snr*:: + + Add Guassian noise to simulate SNR in 2500 Hz bandwidth. + +*W*:: + + Hint to break ties between ambiguous messages '0' as 77-bit (FST4), + '1' as 50-bit (FST4W). + +Generated files are 12000 Hz sample rate, 16-bit unsigned format, mono +PCM .WAV files suitable for replay using WSJT-X either vie the GUI +*wsjtx*(1) or using the command line slow mode decoder *jt9*(1). Files +are named 000000_nnnnnn.wav (000000_nnnn.wav for QRA64), where +'nnnnnn' or 'nnnn' increments from zero. + +== AUTHOR + +Joe Taylor, K1JT. + +== COPYING + +*fcal* is Copyright (C) 2001 - 2019 by Joseph H. Taylor, Jr., K1JT, +with contributions from additional authors. WSJT-X is Open Source +software, licensed under the GNU General Public License (GPLv3). + +This program 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. diff --git a/manpages/man1/jt65code.1.txt b/manpages/man1/jt65code.1.txt index ef3bf74ea..087d1f4cc 100644 --- a/manpages/man1/jt65code.1.txt +++ b/manpages/man1/jt65code.1.txt @@ -6,7 +6,7 @@ == NAME -jt65code, jt9code, jt4code - Weak signal communications encoding support utility. +jt65code, jt9code, jt4code, qra64code, ft8code, msk144code - Weak signal communications encoding support utilities. == SYNOPSIS @@ -22,18 +22,32 @@ jt65code, jt9code, jt4code - Weak signal communications encoding support utility *jt4code* ['OPTIONS'] +*qra64code* "'MESSAGE'" + +*qra64code* ['OPTIONS'] + +*ft8code* "'MESSAGE'" + +*ft8code* ['OPTIONS'] + == OPTIONS *-t*:: - Prints a selection of messages alongside their corresponding - decoded form and types. + + Prints a selection of messages alongside their corresponding decoded + form and types. With *ft8code* prints a selection of short format + messages + +*-T*:: + + As *-T* but for *ft8code* prints long format messages. == DESCRIPTION -*jt65code*, *jt9code* and *jt4code* are utility programs that let you -explore the conversion of user-level messages into channel symbols or -“tone numbers.” These programs can be useful to someone designing a -beacon generator for JT9 or JT65, or for studying behavior of the -error-control codes for each of the protocols. +*jt65code*, *jt9code*, *jt4code*, and *ft8code* are utility programs +that let you explore the conversion of user-level messages into +channel symbols or “tone numbers.” These programs can be useful to +someone designing a beacon generator for JT9 or JT65, or for studying +behavior of the error-control codes for each of the protocols. Channel-symbol values for JT9 run from 0 to 8, with 0 representing the sync tone. The total number of symbols in a transmitted message is @@ -92,10 +106,61 @@ You will discover that every possible JT65 message differs from every other possible JT65 message in at least 52 of the 63 information-carrying channel symbols. -WSJT-X home page:: http://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html +..... +$ qra64code "G0XYZ K1ABC FN43" + Message Decoded Err? Type +-------------------------------------------------------------------------- + 1 G0XYZ K1ABC FN43 G0XYZ K1ABC FN43 1: Std Msg + +Packed message, 6-bit symbols 61 36 45 30 3 55 3 2 14 5 33 41 + +Information-carrying channel symbols + 61 36 45 30 3 55 3 2 14 5 33 41 14 28 2 7 58 45 9 43 20 48 29 55 43 24 3 13 18 21 + 40 3 17 28 59 62 2 50 26 24 2 1 2 61 10 9 16 40 1 18 28 30 33 39 60 45 16 21 60 11 + 9 40 14 + +Channel symbols including sync + 20 50 60 0 40 10 30 61 36 45 30 3 55 3 2 14 5 33 41 14 28 2 7 58 45 9 43 20 48 29 + 55 43 24 3 13 18 21 40 3 20 50 60 0 40 10 30 17 28 59 62 2 50 26 24 2 1 2 61 10 9 + 16 40 1 18 28 30 33 39 60 45 16 21 60 11 9 40 14 20 50 60 0 40 10 30 +..... + +..... +$ msk144code "G0XYZ K1ABC FN43" + Message Decoded Err i3.n3 +---------------------------------------------------------------------------------------------------- + 1. G0XYZ K1ABC FN43 G0XYZ K1ABC FN43 1. Standard msg + +Channel symbols +110000110100110001010010011100110010010110000011011001001100001101111010 +110010110111111100001101001111000111101011111011100001110000011101110110 +..... + +..... +$ ft8code "G0XYZ K1ABC FN43" + Message Decoded Err i3.n3 +---------------------------------------------------------------------------------------------------- + 1. G0XYZ K1ABC FN43 G0XYZ K1ABC FN43 1. Standard msg + +Source-encoded message, 77 bits: +00001000111111010001110111010000010011011110111100011010100010100001100111001 + +14-bit CRC: +00110001001011 + +83 Parity bits: +10000110000001010101100000100110100110100000111000101110000110001001110000000110011 + +Channel symbols (79 tones): + Sync Data Sync Data Sync +3140652 03174526450547670460602143205 3140652 64040136505454507064041140042 3140652 +..... + + +WSJT-X home page:: https://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html WSJT-X User's Guide:: -http://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/wsjtx-main-{VERSION}.html +https://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/wsjtx-main-{VERSION}.html == AUTHOR @@ -103,10 +168,10 @@ Joe Taylor, K1JT. == COPYING -*jt65code*, *jt9code* and *jt4code* are Copyright (C) 2001 - 2015 by -Joseph H. Taylor, Jr., K1JT, with contributions from additional -authors. WSJT-X is Open Source software, licensed under the GNU -General Public License (GPLv3). +*jt65code*, *jt9code*, *jt4code*, and *ft8code* are Copyright (C) 2001 +- 2020 by Joseph H. Taylor, Jr., K1JT, with contributions from +additional authors. WSJT-X is Open Source software, licensed under +the GNU General Public License (GPLv3). These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/manpages/man1/wsprd.1.txt b/manpages/man1/wsprd.1.txt index 8a9523508..51c2a5f1a 100644 --- a/manpages/man1/wsprd.1.txt +++ b/manpages/man1/wsprd.1.txt @@ -10,12 +10,12 @@ wsprd - is a decoder for K1JT's Weak Signal Propagation Reporter (WSPR) mode. == SYNOPSIS -*wsprd* ['OPTIONS'] +*wsprd* ['OPTIONS'] ['FILE'] == DESCRIPTION *wsprd* - The program is written in C and is a command-line program that reads -from a .c2 file or .wav file and writes output to the console. It is used by +from a .c2 FILE or .wav FILE and writes output to the console. It is used by WSJT-X for wspr-mode decoding. @@ -42,7 +42,7 @@ WSJT-X for wspr-mode decoding. *-z x*:: x is fano metric table bias, default is 0.42 -The Infile can be either .wav or .c2, for example: +The FILE can be either .wav or .c2, for example: ----- ./wsprd -wf 14.0956 140709_2258.wav diff --git a/package_description.txt b/package_description.txt new file mode 100644 index 000000000..12aae6d6a --- /dev/null +++ b/package_description.txt @@ -0,0 +1,67 @@ +WSJT-X is a computer program designed to facilitate basic amateur +radio communication using very weak signals. The first four letters in +the program name stand for `(W)eak (S)ignal communication by K1(JT),` +while the suffix `-X` indicates that WSJT-X started as an extended and +experimental branch of the program WSJT. +. +WSJT-X Version 2.0 offers twelve different protocols or modes: FST4, +FST4W, FT4, FT8, JT4, JT9, JT65, QRA64, ISCAT, MSK144, WSPR, and Echo. +The first eight are designed for making reliable QSOs under extreme +weak-signal conditions. They use nearly identical message structure +and source encoding. JT65 and QRA64 were designed for EME +(`moonbounce`) on the VHF/UHF bands and have also proven very +effective for worldwide QRP communication on the HF bands. QRA64 has +a number of advantages over JT65, including better performance on the +very weakest signals. We imagine that over time it may replace JT65 +for EME use. JT9 was originally designed for the LF, MF, and lower HF +bands. Its submode JT9A is 2 dB more sensitive than JT65 while using +less than 10% of the bandwidth. FST4, and its quasi-beacon companion +mode FST4W (see below), are designed for LF and MF and offer +significant advantages over JT9 and WSPR on those bands. JT4 offers a +wide variety of tone spacings and has proven highly effective for EME +on microwave bands up to 24 GHz. These four `slow` modes use +one-minute timed sequences of alternating transmission and reception, +so a minimal QSO takes four to six minutes — two or three +transmissions by each station, one sending in odd UTC minutes and the +other even. FT8 is operationally similar but four times faster +(15-second T/R sequences) and less sensitive by a few dB. On the HF +bands, world-wide QSOs are possible with any of these modes using +power levels of a few watts (or even milliwatts) and compromise +antennas. On VHF bands and higher, QSOs are possible (by EME and +other propagation types) at signal levels 10 to 15 dB below those +required for CW. +. +ISCAT, MSK144, and optionally submodes JT9E-H are `fast` protocols +designed to take advantage of brief signal enhancements from ionized +meteor trails, aircraft scatter, and other types of scatter +propagation. These modes use timed sequences of 5, 10, 15, or 30 s +duration. User messages are transmitted repeatedly at high rate (up +to 250 characters per second, for MSK144) to make good use of the +shortest meteor-trail reflections or `pings`. ISCAT uses free-form +messages up to 28 characters long, while MSK144 uses the same +structured messages as the slow modes and optionally an abbreviated +format with hashed callsigns. +. +WSPR (pronounced `whisper`) stands for (W)eak (S)ignal (P)ropagation +(R)eporter. The WSPR protocol was designed for probing potential +propagation paths using low-power transmissions. WSPR messages +normally carry the transmitting station’s callsign, grid locator, and +transmitter power in dBm, and they can be decoded at signal-to-noise +ratios as low as -28 dB in a 2500 Hz bandwidth. WSPR users with +internet access can automatically upload reception reports to a +central database called wsprnet that provides a mapping facility, +archival storage, and many other features. WSPR has a new companion +FST4W which has a similar message content but offers up to 30 minute +transmission periods for greater sensitivity on LF and MF. +. +Echo mode allows you to detect and measure your own station's echoes +from the moon, even if they are far below the audible threshold. +. +WSJT-X provides spectral displays for receiver passbands as wide as 5 +kHz, flexible rig control for nearly all modern radios used by +amateurs, and a wide variety of special aids such as automatic Doppler +tracking for EME QSOs and Echo testing. The program runs equally well +on Windows, Macintosh, and Linux systems, and installation packages +are available for all three platforms. +. +Be sure to read the online WSJT-X User's Guide. diff --git a/qmake_only/scs_version.h b/qmake_only/scs_version.h new file mode 100644 index 000000000..3712dbb51 --- /dev/null +++ b/qmake_only/scs_version.h @@ -0,0 +1,4 @@ +/* This is a dummy file required to make the qmake build compatible + with the CMake build. */ + +#define STRINGIZE__(X) diff --git a/revision_utils.cpp b/revision_utils.cpp index 8108b202c..c80e07993 100644 --- a/revision_utils.cpp +++ b/revision_utils.cpp @@ -30,7 +30,7 @@ QString revision (QString const& scs_rev_string) auto revision_from_scs = revision_extract_number (scs_rev_string); #if defined (CMAKE_BUILD) - QString scs_info {":Rev: " WSJTX_STRINGIZE (SCS_VERSION) " $"}; + QString scs_info {":Rev: " SCS_VERSION_STR " $"}; auto revision_from_scs_info = revision_extract_number (scs_info); if (!revision_from_scs_info.isEmpty ()) @@ -66,14 +66,10 @@ QString revision (QString const& scs_rev_string) QString version (bool include_patch) { #if defined (CMAKE_BUILD) - QString v {WSJTX_STRINGIZE (WSJTX_VERSION_MAJOR) "." WSJTX_STRINGIZE (WSJTX_VERSION_MINOR)}; + QString v {TO_STRING__ (PROJECT_VERSION_MAJOR) "." TO_STRING__ (PROJECT_VERSION_MINOR)}; if (include_patch) { - v += "." WSJTX_STRINGIZE (WSJTX_VERSION_PATCH) -# if defined (WSJTX_RC) - + "-rc" WSJTX_STRINGIZE (WSJTX_RC) -# endif - ; + v += "." TO_STRING__ (PROJECT_VERSION_PATCH) + QString {BUILD_TYPE_REVISION}; } #else QString v {"Not for Release"}; diff --git a/widgets/about.cpp b/widgets/about.cpp index c8b630823..b8e0fab43 100644 --- a/widgets/about.cpp +++ b/widgets/about.cpp @@ -26,7 +26,7 @@ CAboutDlg::CAboutDlg(QWidget *parent) : "VE1SKY, VK3ACF, VK4BDJ, VK7MO, W4TI, W4TV, and W9MDB.

" "WSJT-X is licensed under the terms of Version 3
" "of the GNU General Public License (GPL)

" - "" + "" "" "" "
" diff --git a/wsjtx.rc b/wsjtx.rc deleted file mode 100644 index d54bf4ffa..000000000 --- a/wsjtx.rc +++ /dev/null @@ -1 +0,0 @@ -IDI_ICON1 ICON DISCARDABLE "icons/windows-icons/wsjtx.ico" diff --git a/wsjtx_config.h.in b/wsjtx_config.h.in index 7da6a4cdd..2ded8e1cf 100644 --- a/wsjtx_config.h.in +++ b/wsjtx_config.h.in @@ -5,19 +5,29 @@ extern "C" { #endif -#define WSJTX_VERSION_MAJOR @WSJTX_VERSION_MAJOR@ -#define WSJTX_VERSION_MINOR @WSJTX_VERSION_MINOR@ -#define WSJTX_VERSION_PATCH @WSJTX_VERSION_PATCH@ +#ifndef TO_STRING__ +#define TO_STRING_IMPL__(x) #x +#define TO_STRING__(x) TO_STRING_IMPL__(x) +#endif + +#define PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define PROJECT_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define PROJECT_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define PROJECT_VERSION_TWEAK @PROJECT_VERSION_TWEAK@ +#define BUILD_TYPE_REVISION "@BUILD_TYPE_REVISION@" #cmakedefine CMAKE_INSTALL_DATAROOTDIR "@CMAKE_INSTALL_DATAROOTDIR@" #cmakedefine CMAKE_INSTALL_DOCDIR "@CMAKE_INSTALL_DOCDIR@" #cmakedefine CMAKE_INSTALL_DATADIR "@CMAKE_INSTALL_DATADIR@" #cmakedefine CMAKE_PROJECT_NAME "@CMAKE_PROJECT_NAME@" +#cmakedefine PROJECT_VENDOR "@PROJECT_VENDOR@" +#cmakedefine PROJECT_NAME "@PROJECT_NAME@" +#cmakedefine PROJECT_COPYRIGHT "@PROJECT_COPYRIGHT@" #cmakedefine PROJECT_MANUAL "@PROJECT_MANUAL@" #cmakedefine PROJECT_HOMEPAGE "@PROJECT_HOMEPAGE@" #cmakedefine PROJECT_MANUAL_DIRECTORY_URL "@PROJECT_MANUAL_DIRECTORY_URL@" #cmakedefine PROJECT_SAMPLES_URL "@PROJECT_SAMPLES_URL@" -#cmakedefine PROJECT_SUMMARY_DESCRIPTION "@PROJECT_SUMMARY_DESCRIPTION@" +#cmakedefine PROJECT_DESCRIPTION "@PROJECT_DESCRIPTION@" #cmakedefine01 HAVE_HAMLIB_OLD_CACHING #cmakedefine01 HAVE_HAMLIB_CACHING @@ -34,9 +44,6 @@ extern "C" { #cmakedefine01 WSJT_RIG_NONE_CAN_SPLIT #cmakedefine01 WSJT_TRACE_UDP -#define WSJTX_STRINGIZE1(x) #x -#define WSJTX_STRINGIZE(x) WSJTX_STRINGIZE1(x) - /* consistent UNICODE behaviour */ #ifndef UNICODE # undef _UNICODE