diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /CMake | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/CompilerFlags.cmake | 6 | ||||
| -rw-r--r-- | CMake/Dependencies.cmake | 5 | ||||
| -rw-r--r-- | CMake/Install.cmake | 46 | ||||
| -rw-r--r-- | CMake/Modules/read_release_state.cmake | 32 | ||||
| -rw-r--r-- | CMake/Modules/read_release_tarballs.cmake | 37 | ||||
| -rw-r--r-- | CMake/Modules/set_build_type.cmake | 77 | ||||
| -rw-r--r-- | CMake/SourceNavigation.cmake | 41 | ||||
| -rw-r--r-- | CMake/Sources.cmake | 34 | ||||
| -rw-r--r-- | CMake/Utils.cmake | 13 | ||||
| -rw-r--r-- | CMake/generate_tags.cmake | 50 | ||||
| -rw-r--r-- | CMake/prerelease_expiry.cmake | 16 | ||||
| -rw-r--r-- | CMake/release-tarballs.txt | 5 |
12 files changed, 285 insertions, 77 deletions
diff --git a/CMake/CompilerFlags.cmake b/CMake/CompilerFlags.cmake index efc6a328..06591435 100644 --- a/CMake/CompilerFlags.cmake +++ b/CMake/CompilerFlags.cmake @@ -99,6 +99,12 @@ if (NOT APPLE) set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Wl,--gc-sections") set (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -Wl,--gc-sections") endif (NOT APPLE) +if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Only some distributions' GCC (Ubuntu's) links --as-needed by default; + # without it a program loads every library its static dependencies link, + # used or not. + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") +endif () # diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake index 302e3196..675c81e4 100644 --- a/CMake/Dependencies.cmake +++ b/CMake/Dependencies.cmake @@ -14,9 +14,6 @@ include (CheckIncludeFiles) include (CheckSymbolExists) include (generate_version_info) -find_program(CTAGS ctags) -find_program(ETAGS etags) - # # Platform checks # @@ -109,7 +106,7 @@ endif () # # Widgets finds its own dependencies. -find_package (Qt5 COMPONENTS Widgets SerialPort Multimedia PrintSupport Sql LinguistTools WebSockets REQUIRED) +find_package (Qt5 COMPONENTS Widgets SerialPort Multimedia PrintSupport Sql LinguistTools WebSockets Concurrent REQUIRED) if (CMAKE_CROSSCOMPILING) if (NOT WSJT_QT_HOST_PATH) diff --git a/CMake/Install.cmake b/CMake/Install.cmake index 7fb8d9d0..7b27d1ec 100644 --- a/CMake/Install.cmake +++ b/CMake/Install.cmake @@ -35,17 +35,36 @@ install (TARGETS udp_daemon message_aggregator wsjtx_app_version BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) -install (TARGETS jt9 wsprd fmtave fcal fmeasure +# build-macos.yml stages /usr/local/wsjtx for the macOS package from +# installed-cli-tools.txt, and collects the programs of the macOS release +# tarballs from cli-tools.txt. cli-tools.txt also lists every program in +# CMake/release-tarballs.txt whatever the build options, so a macOS release +# build that lacks one fails naming it. +set (wsjt_installed_cli_tools jt9 wsprd fmtave fcal fmeasure) +if (WSJT_BUILD_JT9STREAM) + list (APPEND wsjt_installed_cli_tools jt9stream) +endif () +if (WSJT_BUILD_UTILS) + list (APPEND wsjt_installed_cli_tools + ft8code jt65code jt9code jt4code msk144code q65code fst4sim ft8sim q65sim + EchoCallSim testEchoCall echosim hash22calc cablog sjtty rjtty) +endif () +install (TARGETS ${wsjt_installed_cli_tools} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) - -if (WSJT_BUILD_JT9STREAM) - install (TARGETS jt9stream - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime - BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime - ) -endif (WSJT_BUILD_JT9STREAM) +string (JOIN "\n" _wsjt_installed_cli_tools_lines ${wsjt_installed_cli_tools}) +file (WRITE "${CMAKE_BINARY_DIR}/installed-cli-tools.txt" + "${_wsjt_installed_cli_tools_lines}\n") +include ("${CMAKE_SOURCE_DIR}/CMake/Modules/read_release_tarballs.cmake") +set_property (DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${CMAKE_SOURCE_DIR}/CMake/release-tarballs.txt") +wsjt_read_release_tarballs ("${CMAKE_SOURCE_DIR}/CMake/release-tarballs.txt" + _wsjt_tarball_programs) +set (_wsjt_cli_tools ${wsjt_installed_cli_tools} ${_wsjt_tarball_programs}) +list (REMOVE_DUPLICATES _wsjt_cli_tools) +string (JOIN "\n" _wsjt_cli_tools_lines ${_wsjt_cli_tools}) +file (WRITE "${CMAKE_BINARY_DIR}/cli-tools.txt" "${_wsjt_cli_tools_lines}\n") if (NOT WSJT_SKIP_QMAP) install (TARGETS qmap @@ -59,16 +78,6 @@ install (TARGETS map65 BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) -if(WSJT_BUILD_UTILS) -install (TARGETS ft8code jt65code jt9code jt4code msk144code - q65code fst4sim ft8sim q65sim EchoCallSim testEchoCall echosim - hash22calc cablog sjtty rjtty - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime - BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime - ) - -endif(WSJT_BUILD_UTILS) - install (PROGRAMS ${RIGCTL_EXE} DESTINATION ${CMAKE_INSTALL_BINDIR} @@ -238,7 +247,6 @@ endif (WIN32) if (APPLE) install (FILES Darwin/ReadMe.txt - Darwin/com.wsjtx.sysctl.plist DESTINATION . #COMPONENT runtime ) diff --git a/CMake/Modules/read_release_state.cmake b/CMake/Modules/read_release_state.cmake index 5084a0a8..0f258e2c 100644 --- a/CMake/Modules/read_release_state.cmake +++ b/CMake/Modules/read_release_state.cmake @@ -1,4 +1,4 @@ -function (wsjt_read_release_state state_file version_out channel_out rc_out revision_out) +function (wsjt_read_release_state state_file version_out channel_out prerelease_out revision_out) if (NOT EXISTS "${state_file}") message (FATAL_ERROR "Release state file not found: ${state_file}") endif () @@ -10,7 +10,7 @@ function (wsjt_read_release_state state_file version_out channel_out rc_out revi message (FATAL_ERROR "${state_file} must contain four or five metadata lines") endif () - set (_wsjt_release_state_keys version channel rc revision) + set (_wsjt_release_state_keys version channel prerelease revision) set (_wsjt_release_state_allowed_keys ${_wsjt_release_state_keys} windows_signing) foreach (_wsjt_release_state_line IN LISTS _wsjt_release_state_lines) if (NOT _wsjt_release_state_line MATCHES "^([a-z_]+)=(.*)$") @@ -42,15 +42,15 @@ function (wsjt_read_release_state state_file version_out channel_out rc_out revi if (NOT _wsjt_release_state_version MATCHES "^[0-9]+[.][0-9]+[.][0-9]+$") message (FATAL_ERROR "Release version must have the form X.Y.Z") endif () - if (NOT _wsjt_release_state_channel MATCHES "^(DEVEL|RC|GA)$") - message (FATAL_ERROR "Release channel must be DEVEL, RC, or GA") + if (NOT _wsjt_release_state_channel MATCHES "^(DEVEL|BETA|RC|GA)$") + message (FATAL_ERROR "Release channel must be DEVEL, BETA, RC, or GA") endif () - if (_wsjt_release_state_channel STREQUAL "RC") - if (NOT _wsjt_release_state_rc MATCHES "^[1-9][0-9]*$") - message (FATAL_ERROR "RC release state requires a positive rc number") + if (_wsjt_release_state_channel MATCHES "^(BETA|RC)$") + if (NOT _wsjt_release_state_prerelease MATCHES "^[1-9][0-9]*$") + message (FATAL_ERROR "BETA and RC release states require a positive prerelease number") endif () - elseif (NOT _wsjt_release_state_rc STREQUAL "") - message (FATAL_ERROR "The rc value must be empty for DEVEL and GA release states") + elseif (NOT _wsjt_release_state_prerelease STREQUAL "") + message (FATAL_ERROR "The prerelease value must be empty for DEVEL and GA release states") endif () if (NOT _wsjt_release_state_revision STREQUAL "$Format:%H$") @@ -64,7 +64,7 @@ function (wsjt_read_release_state state_file version_out channel_out rc_out revi set (${version_out} "${_wsjt_release_state_version}" PARENT_SCOPE) set (${channel_out} "${_wsjt_release_state_channel}" PARENT_SCOPE) - set (${rc_out} "${_wsjt_release_state_rc}" PARENT_SCOPE) + set (${prerelease_out} "${_wsjt_release_state_prerelease}" PARENT_SCOPE) if (_wsjt_release_state_revision STREQUAL "$Format:%H$") set (${revision_out} "" PARENT_SCOPE) else () @@ -83,3 +83,15 @@ function (wsjt_set_source_default_cache variable source_default description) endif () set (${_previous_default} "${source_default}" CACHE INTERNAL "Previous source default for ${variable}" FORCE) endfunction () + +# An empty WSJT_RELEASE_CHANNEL is no override; the number then follows release-state.txt too. +function (wsjt_set_release_channel_cache source_channel source_prerelease) + if (DEFINED WSJT_RELEASE_CHANNEL AND "${WSJT_RELEASE_CHANNEL}" STREQUAL "") + unset (WSJT_RELEASE_CHANNEL CACHE) + unset (WSJT_PRERELEASE_NUMBER CACHE) + endif () + wsjt_set_source_default_cache (WSJT_RELEASE_CHANNEL "${source_channel}" + "Build release channel: DEVEL, BETA, RC, or GA.") + wsjt_set_source_default_cache (WSJT_PRERELEASE_NUMBER "${source_prerelease}" + "Prerelease number used when WSJT_RELEASE_CHANNEL is BETA or RC.") +endfunction () diff --git a/CMake/Modules/read_release_tarballs.cmake b/CMake/Modules/read_release_tarballs.cmake new file mode 100644 index 00000000..e847e33b --- /dev/null +++ b/CMake/Modules/read_release_tarballs.cmake @@ -0,0 +1,37 @@ +# Reads CMake/release-tarballs.txt by the rules .github/scripts/release-policy.py +# and package-cli-tools.sh apply: fields split on blanks, a line whose first +# field starts with # is a comment, and each tarball is named once and names +# at least one program. +function (wsjt_read_release_tarballs tarball_file programs_out) + if (NOT EXISTS "${tarball_file}") + message (FATAL_ERROR "Release tarball list not found: ${tarball_file}") + endif () + + file (STRINGS "${tarball_file}" _wsjt_tarball_lines ENCODING UTF-8) + set (_wsjt_tarball_names) + set (_wsjt_tarball_programs) + foreach (_wsjt_tarball_line IN LISTS _wsjt_tarball_lines) + string (REGEX MATCHALL "[^ \t\r]+" _wsjt_tarball_fields "${_wsjt_tarball_line}") + list (LENGTH _wsjt_tarball_fields _wsjt_tarball_field_count) + if (_wsjt_tarball_field_count EQUAL 0) + continue () + endif () + list (GET _wsjt_tarball_fields 0 _wsjt_tarball_name) + if (_wsjt_tarball_name MATCHES "^#") + continue () + endif () + if (_wsjt_tarball_field_count LESS 2) + message (FATAL_ERROR "release tarball ${_wsjt_tarball_name} names no programs in ${tarball_file}") + endif () + if (_wsjt_tarball_name IN_LIST _wsjt_tarball_names) + message (FATAL_ERROR "release tarball ${_wsjt_tarball_name} is named twice in ${tarball_file}") + endif () + list (APPEND _wsjt_tarball_names "${_wsjt_tarball_name}") + list (REMOVE_AT _wsjt_tarball_fields 0) + list (APPEND _wsjt_tarball_programs ${_wsjt_tarball_fields}) + endforeach () + if (NOT _wsjt_tarball_names) + message (FATAL_ERROR "no release tarballs named in ${tarball_file}") + endif () + set (${programs_out} "${_wsjt_tarball_programs}" PARENT_SCOPE) +endfunction () diff --git a/CMake/Modules/set_build_type.cmake b/CMake/Modules/set_build_type.cmake index 69dd90b4..edb8dab2 100644 --- a/CMake/Modules/set_build_type.cmake +++ b/CMake/Modules/set_build_type.cmake @@ -3,26 +3,19 @@ include (CMakeParseArguments) # set_build_type() function # # Configure the output artefacts and their names for development, -# Release Candidate (RC), or General Availability (GA) build type. +# Beta (BETA), Release Candidate (RC), or General Availability (GA) build type. # # Usage: -# set_build_type () -# set_build_type (RC n) +# set_build_type () channel and number from WSJT_RELEASE_CHANNEL and WSJT_PRERELEASE_NUMBER +# set_build_type (RC n) RC n, or DEVEL when n is 0 # 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. +# BUILD_TYPE_REVISION is "-devel", "-betaN", "-rcN", or empty for GA. # macro (set_build_type) - set (WSJT_RELEASE_CHANNEL "DEVEL" CACHE STRING "Build release channel: DEVEL, RC, or GA.") - set_property (CACHE WSJT_RELEASE_CHANNEL PROPERTY STRINGS DEVEL RC GA) - set (WSJT_RC_NUMBER "" CACHE STRING "Release candidate number used when WSJT_RELEASE_CHANNEL is RC.") + set (WSJT_RELEASE_CHANNEL "DEVEL" CACHE STRING "Build release channel: DEVEL, BETA, RC, or GA.") + set_property (CACHE WSJT_RELEASE_CHANNEL PROPERTY STRINGS DEVEL BETA RC GA) + set (WSJT_PRERELEASE_NUMBER "" CACHE STRING "Prerelease number used when WSJT_RELEASE_CHANNEL is BETA or RC.") set (options GA) set (oneValueArgs RC) @@ -45,31 +38,59 @@ macro (set_build_type) set (_WSJT_RELEASE_CHANNEL "DEVEL") else () set (_WSJT_RELEASE_CHANNEL "RC") - set (WSJT_RC_NUMBER "${BUILD_TYPE_RC}") + set (WSJT_PRERELEASE_NUMBER "${BUILD_TYPE_RC}") endif () else () set (_WSJT_RELEASE_CHANNEL "DEVEL") endif () endif () - if (NOT _WSJT_RELEASE_CHANNEL MATCHES "^(DEVEL|RC|GA)$") - message (FATAL_ERROR "WSJT_RELEASE_CHANNEL must be DEVEL, RC, or GA; got \"${WSJT_RELEASE_CHANNEL}\".") + if (NOT _WSJT_RELEASE_CHANNEL MATCHES "^(DEVEL|BETA|RC|GA)$") + message (FATAL_ERROR "WSJT_RELEASE_CHANNEL must be DEVEL, BETA, RC, or GA; got \"${WSJT_RELEASE_CHANNEL}\".") endif () set (BUILD_TYPE_REVISION "") - if (_WSJT_RELEASE_CHANNEL STREQUAL "DEVEL") - if (NOT WSJT_RC_NUMBER STREQUAL "") - message (FATAL_ERROR "WSJT_RC_NUMBER must be empty when WSJT_RELEASE_CHANNEL is DEVEL.") + set (BUILD_TYPE_PACKAGE_REVISION "") + if (_WSJT_RELEASE_CHANNEL MATCHES "^(BETA|RC)$") + if (NOT WSJT_PRERELEASE_NUMBER MATCHES "^[1-9][0-9]*$") + message (FATAL_ERROR "WSJT_PRERELEASE_NUMBER must be a positive integer when WSJT_RELEASE_CHANNEL is ${_WSJT_RELEASE_CHANNEL}.") endif () + string (TOLOWER "${_WSJT_RELEASE_CHANNEL}${WSJT_PRERELEASE_NUMBER}" _WSJT_PRERELEASE) + set (BUILD_TYPE_REVISION "-${_WSJT_PRERELEASE}") + # Debian and RPM order a "~" suffix below the release it precedes. + set (BUILD_TYPE_PACKAGE_REVISION "~${_WSJT_PRERELEASE}") + elseif (NOT WSJT_PRERELEASE_NUMBER STREQUAL "") + message (FATAL_ERROR "WSJT_PRERELEASE_NUMBER must be empty when WSJT_RELEASE_CHANNEL is ${_WSJT_RELEASE_CHANNEL}.") + elseif (_WSJT_RELEASE_CHANNEL STREQUAL "DEVEL") set (BUILD_TYPE_REVISION "-devel") - elseif (_WSJT_RELEASE_CHANNEL STREQUAL "RC") - if (NOT WSJT_RC_NUMBER MATCHES "^[1-9][0-9]*$") - message (FATAL_ERROR "WSJT_RC_NUMBER must be a positive integer when WSJT_RELEASE_CHANNEL is RC.") - endif () - set (BUILD_TYPE_REVISION "-rc${WSJT_RC_NUMBER}") - elseif (NOT WSJT_RC_NUMBER STREQUAL "") - message (FATAL_ERROR "WSJT_RC_NUMBER must be empty when WSJT_RELEASE_CHANNEL is GA.") + set (BUILD_TYPE_PACKAGE_REVISION "-devel") endif () - set (WSJT_RELEASE_CHANNEL "${_WSJT_RELEASE_CHANNEL}" CACHE STRING "Build release channel: DEVEL, RC, or GA." FORCE) + set (WSJT_RELEASE_CHANNEL "${_WSJT_RELEASE_CHANNEL}" CACHE STRING "Build release channel: DEVEL, BETA, RC, or GA." FORCE) message (STATUS "Building ${PROJECT_NAME} v${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${BUILD_TYPE_REVISION}") endmacro () + +function (wsjt_prerelease_expiry channel source_dir expiry_out) + if (channel STREQUAL "GA") + set (${expiry_out} 0 PARENT_SCOPE) + return () + endif () + set (build_epoch "$ENV{SOURCE_DATE_EPOCH}") + if (NOT build_epoch MATCHES "^[0-9]*$") + message (FATAL_ERROR "SOURCE_DATE_EPOCH must be a Unix time; got \"${build_epoch}\".") + endif () + if (build_epoch STREQUAL "" AND GIT_EXECUTABLE AND EXISTS "${source_dir}/.git") + execute_process ( + COMMAND "${GIT_EXECUTABLE}" -c "safe.directory=${source_dir}" -C "${source_dir}" log -1 --format=%ct + OUTPUT_VARIABLE build_epoch + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + endif () + if (NOT build_epoch MATCHES "^[0-9]+$" AND ARGC GREATER 3) + set (build_epoch "${ARGV3}") + elseif (NOT build_epoch MATCHES "^[0-9]+$") + string (TIMESTAMP build_epoch "%s" UTC) + endif () + # The last second (UTC) of the 90th day after the build date. + math (EXPR expiry "(${build_epoch} / 86400 + 91) * 86400 - 1") + set (${expiry_out} "${expiry}" PARENT_SCOPE) +endfunction () diff --git a/CMake/SourceNavigation.cmake b/CMake/SourceNavigation.cmake new file mode 100644 index 00000000..eb3888d3 --- /dev/null +++ b/CMake/SourceNavigation.cmake @@ -0,0 +1,41 @@ +find_program (CTAGS NAMES universal-ctags ctags-universal exuberant-ctags ctags-exuberant ctags) +find_program (ETAGS NAMES etags etags.emacs) + +foreach (_tag_target IN ITEMS ctags etags) + string (TOUPPER "${_tag_target}" _tag_variable) + if (NOT ${_tag_variable}) + continue () + endif () + + execute_process ( + COMMAND "${${_tag_variable}}" --version + RESULT_VARIABLE _tag_result + OUTPUT_VARIABLE _tag_version + ERROR_QUIET + ) + if (_tag_result STREQUAL "0" AND _tag_version MATCHES "(Universal|Exuberant) Ctags") + set (_tag_tool_kind ctags) + elseif (_tag_result STREQUAL "0" AND _tag_target STREQUAL "etags" AND _tag_version MATCHES "GNU Emacs") + set (_tag_tool_kind emacs) + else () + message (STATUS "Skipping ${_tag_target} target: unsupported tool ${${_tag_variable}}") + continue () + endif () + + if (_tag_target STREQUAL "ctags") + set (_tag_file tags) + else () + set (_tag_file TAGS) + endif () + add_custom_target (${_tag_target} + COMMAND "${CMAKE_COMMAND}" + "-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" + "-DBINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DTAG_TOOL=${${_tag_variable}}" + "-DTAG_TOOL_KIND=${_tag_tool_kind}" + "-DTAG_FILE=${_tag_file}" + -P "${CMAKE_CURRENT_LIST_DIR}/generate_tags.cmake" + COMMENT "Generating ${_tag_file} for source navigation" + VERBATIM + ) +endforeach () diff --git a/CMake/Sources.cmake b/CMake/Sources.cmake index 32fc5aa1..bd30d0e9 100644 --- a/CMake/Sources.cmake +++ b/CMake/Sources.cmake @@ -4,16 +4,13 @@ # so CMAKE_CURRENT_SOURCE_DIR stays the project root and all paths below # remain relative to it, exactly as when this content was inline. # -set (fort_qt_CXXSRCS - lib/shmem.cpp - ) - set (wsjt_qt_CXXSRCS ActiveStationList.cpp DecDataMutex.cpp helper_functions.cpp qt_helpers.cpp widgets/MessageBox.cpp + widgets/SuggestedFrequenciesDialog.cpp MetaDataRegistry.cpp Network/NetworkServerLookup.cpp Network/DecodedTime.cpp @@ -27,6 +24,7 @@ set (wsjt_qt_CXXSRCS models/Bands.cpp models/Modes.cpp models/FrequencyList.cpp + models/FrequencySuggestions.cpp models/StationList.cpp widgets/FrequencyLineEdit.cpp widgets/FrequencyDeltaLineEdit.cpp @@ -125,6 +123,9 @@ set (wsjt_qtmm_CXXSRCS set (jt9_FSRCS lib/jt9.f90 + lib/shmem.f90 + lib/shmem.cpp + lib/decoder_ipc_layout.f90 lib/jt9a.f90 lib/streaming_io.f90 lib/stream_setmode.c # Windows stdin binary-mode helper (no-op on POSIX) @@ -132,8 +133,7 @@ set (jt9_FSRCS lib/jt9_version.c ) -# jt9stream sources: the Qt-free streaming decoder (B2). Same jt9.f90 main as -# jt9 but ALWAYS the jt9a stub (hard-coded, not jt9a.f90) so it links zero Qt. +# jt9stream uses the same main as jt9 with shared-memory worker mode disabled. set (jt9stream_FSRCS lib/jt9.f90 lib/jt9a_stub.f90 @@ -163,6 +163,7 @@ set (wsjtx_CXXSRCS widgets/signalmeter.cpp widgets/TxDriveSlider.cpp widgets/plotter.cpp + widgets/JttySpectrum.cpp widgets/widegraph.cpp widgets/echograph.cpp widgets/echoplot.cpp @@ -189,6 +190,9 @@ set (wsjtx_CXXSRCS widgets/SpecOpLabel.cpp widgets/mainwindow.cpp widgets/mainwindow_jtty.cpp + widgets/mainwindow_jtty_receive.cpp + JttyReceiveResultController.cpp + JttyRecording.cpp Modulator/JttyTxStream.cpp widgets/mainwindow_settings.cpp widgets/mainwindow_show_messages.cpp @@ -213,6 +217,7 @@ if (WSJT_ENABLE_TESTS) Audio/FixtureSoundOutput.cpp Ft8TxLoopbackTestController.cpp JttyTxLoopbackTestController.cpp + WavDecodeTestController.cpp LiveAudioTestController.cpp ReceiveHandoffTestController.cpp ) @@ -221,6 +226,9 @@ endif () set (wsjt_CXXSRCS Logger.cpp lib/decoder_ipc_control.cpp + lib/decoder_ipc_layout.cpp + lib/NativeSharedMemory.cpp + lib/DecoderWorkerLock.cpp lib/crc10.cpp lib/crc13.cpp lib/crc14.cpp @@ -254,11 +262,11 @@ set (wsjt_FSRCS lib/jt9_input_validation.f90 lib/msk_spectrum.f90 lib/jpl_ephemeris_status.f90 - lib/shmem.f90 lib/crc.f90 lib/fftw3mod.f90 lib/hashing.f90 lib/iso_c_utilities.f90 + lib/streaming_period.f90 lib/streaming_emit.f90 lib/streaming_control.f90 lib/jt9_params_init.f90 @@ -266,11 +274,14 @@ set (wsjt_FSRCS lib/jt4.f90 lib/jt4_decode.f90 lib/jt65_decode.f90 + lib/jt65_host_support.f90 lib/jt65_mod.f90 lib/jt65_mod6.f90 #ft8md lib/ft8_decode.f90 lib/ft4_decode.f90 + lib/fst4/fst4_osd_workspace.f90 lib/fst4_decode.f90 + lib/fst4_host_support.f90 lib/get_q3list.f90 lib/jt9_decode.f90 lib/options.f90 @@ -279,8 +290,11 @@ set (wsjt_FSRCS lib/77bit/packjt77_grammar.f90 lib/77bit/packjt77.f90 lib/qra/q65/q65_workspace.f90 + lib/q65_codec.f90 + lib/qra/q65/q65_callers.F90 lib/qra/q65/q65.f90 lib/q65_decode.f90 + lib/q65_host_support.f90 lib/readwav.f90 lib/timer_C_wrapper.f90 lib/timer_impl.f90 @@ -306,6 +320,7 @@ set (wsjt_FSRCS lib/jtty/jtty_fec_mod.f90 lib/jtty/jttycom.f90 lib/jtty/jtty_mdecode.f90 + lib/jtty/jtty_receive_context.f90 # remaining non-module sources lib/addit.f90 @@ -348,6 +363,10 @@ set (wsjt_FSRCS lib/decode_echo.f90 lib/ft8/decode174_91.f90 lib/decoder_callbacks.f90 + lib/decoder_engine_types.f90 + lib/77bit/decoder_codec_context.f90 + lib/ft8_engine_kernel.f90 + lib/decoder_engine.f90 lib/decoder.f90 lib/env_module.f90 lib/deep4.f90 @@ -762,7 +781,6 @@ set (qcp_CXXSRCS set (all_CXXSRCS ${wsjt_CXXSRCS} - ${fort_qt_CXXSRCS} ${wsjt_qt_CXXSRCS} ${wsjt_qtmm_CXXSRCS} ${wsjtx_CXXSRCS} diff --git a/CMake/Utils.cmake b/CMake/Utils.cmake index 7b3b0fa8..4a0a5b28 100644 --- a/CMake/Utils.cmake +++ b/CMake/Utils.cmake @@ -7,13 +7,13 @@ # top-level file. # -# The Linux live-audio smoke tests synthesize their fixture at test time. Keep -# this one generator in the build graph even in lean CI configurations where -# the rest of the simulator utilities are disabled. +# The JTTY live-audio smoke test synthesizes its fixture at test time. Keep +# its generator available when simulator utilities are disabled. set (wsjt_jtty_live_audio_tests FALSE) if (WSJT_ENABLE_TESTS AND WSJT_BUILD_FORTRAN_OPENMP - AND CMAKE_SYSTEM_NAME STREQUAL "Linux" - AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64|AMD64)$") + AND ((CMAKE_SYSTEM_NAME STREQUAL "Linux" + AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|amd64|AMD64)$") + OR (WSJT_ENABLE_GUI_SMOKE_TESTS AND (APPLE OR WIN32)))) set (wsjt_jtty_live_audio_tests TRUE) endif () @@ -88,9 +88,6 @@ wsjt_link_common_fortran (q65_ftn_test) add_executable (jt49sim lib/jt49sim.f90) wsjt_link_common_fortran (jt49sim) -#add_executable (allsim lib/allsim.f90) -#target_link_libraries (allsim wsjt_fort wsjt_cxx) - add_executable (rtty_spec lib/rtty_spec.f90) wsjt_link_common_fortran (rtty_spec) diff --git a/CMake/generate_tags.cmake b/CMake/generate_tags.cmake new file mode 100644 index 00000000..3e6a7de4 --- /dev/null +++ b/CMake/generate_tags.cmake @@ -0,0 +1,50 @@ +cmake_minimum_required (VERSION 3.12) + +function (collect_tag_sources directory) + file (GLOB entries RELATIVE "${SOURCE_DIR}" "${directory}/*") + set (sources) + foreach (entry IN LISTS entries) + set (path "${SOURCE_DIR}/${entry}") + if (IS_SYMLINK "${path}") + continue () + endif () + if (IS_DIRECTORY "${path}") + if (entry MATCHES "(^|/)(\\.[^/]*|CMakeFiles)$" OR + path STREQUAL BINARY_DIR OR EXISTS "${path}/CMakeCache.txt") + continue () + endif () + collect_tag_sources ("${path}") + list (APPEND sources ${tag_sources}) + else () + string (TOLOWER "${entry}" source_name) + if (source_name MATCHES "\\.(c|cc|cpp|cxx|h|hh|hpp|hxx|f|for|f90|f95|f03|f08|inc)$") + list (APPEND sources "${entry}") + endif () + endif () + endforeach () + set (tag_sources "${sources}" PARENT_SCOPE) +endfunction () + +collect_tag_sources ("${SOURCE_DIR}") +string (REPLACE ";" "\n" tag_sources "${tag_sources}") +set (source_list "${BINARY_DIR}/CMakeFiles/${TAG_FILE}-sources.txt") +file (WRITE "${source_list}" "${tag_sources}\n") + +if (TAG_TOOL_KIND STREQUAL "emacs") + set (options -) +else () + set (options -L -) + if (TAG_FILE STREQUAL "TAGS") + set (options -e ${options}) + endif () +endif () +# A file list on stdin avoids command-line length limits on Windows. +execute_process ( + COMMAND "${TAG_TOOL}" -f "${TAG_FILE}" ${options} + INPUT_FILE "${source_list}" + WORKING_DIRECTORY "${SOURCE_DIR}" + RESULT_VARIABLE result + ) +if (NOT result STREQUAL "0") + message (FATAL_ERROR "Failed to generate ${TAG_FILE}: ${result}") +endif () diff --git a/CMake/prerelease_expiry.cmake b/CMake/prerelease_expiry.cmake new file mode 100644 index 00000000..16e86938 --- /dev/null +++ b/CMake/prerelease_expiry.cmake @@ -0,0 +1,16 @@ +if (NOT CHANNEL MATCHES "^(DEVEL|BETA|RC|GA)$" OR NOT SOURCE_DIR OR NOT OUTPUT_DIR + OR NOT CONFIGURE_EPOCH MATCHES "^[0-9]+$") + message (FATAL_ERROR "CHANNEL (DEVEL, BETA, RC or GA), SOURCE_DIR, OUTPUT_DIR and CONFIGURE_EPOCH are required; got CHANNEL \"${CHANNEL}\"") +endif () +include ("${CMAKE_CURRENT_LIST_DIR}/Modules/set_build_type.cmake") +wsjt_prerelease_expiry ("${CHANNEL}" "${SOURCE_DIR}" expiry "${CONFIGURE_EPOCH}") +message (STATUS "Prerelease expiry: ${expiry}") +set (header "${OUTPUT_DIR}/prerelease_expiry.h") +file (WRITE "${header}.txt" "#define WSJT_PRERELEASE_EXPIRY ${expiry}\n") +# An unchanged header keeps main.cpp from recompiling. +execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different "${header}.txt" "${header}" + RESULT_VARIABLE copy_result) +file (REMOVE "${header}.txt") +if (NOT copy_result EQUAL 0) + message (FATAL_ERROR "Could not update ${header}") +endif () diff --git a/CMake/release-tarballs.txt b/CMake/release-tarballs.txt new file mode 100644 index 00000000..9ca3aaca --- /dev/null +++ b/CMake/release-tarballs.txt @@ -0,0 +1,5 @@ +# <tarball> <program>...: the command-line programs each release tarball carries +jt9 jt9 +jt9stream jt9stream +wsprd wsprd +utilities wsprcode encode77 ft4sim jt4sim jt65sim cwsim sfoxsim |
