diff options
43 files changed, 2210 insertions, 195 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..cc6090ef --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + labels: + - dependencies + - github-actions + commit-message: + prefix: "ci" + include: scope diff --git a/.github/scripts/publish-ctest-summary.py b/.github/scripts/publish-ctest-summary.py new file mode 100644 index 00000000..26afe98a --- /dev/null +++ b/.github/scripts/publish-ctest-summary.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +"""Render ctest-results.xml (JUnit) as a GitHub Actions step summary. + +Usage: publish-ctest-summary.py <label> [path-to-xml] + +Output goes to stdout; callers redirect into $GITHUB_STEP_SUMMARY. +Missing or malformed XML produces a legible notice rather than a hard fail +so the summary step stays non-blocking (the ctest step is the fail gate). +""" +import sys +import xml.etree.ElementTree as ET +from pathlib import Path + + +def main() -> int: + label = sys.argv[1] if len(sys.argv) > 1 else "" + xml_path = Path(sys.argv[2]) if len(sys.argv) > 2 else Path("ctest-results.xml") + + if not xml_path.exists(): + print(f"## Test Results — {label}") + print() + print(f"No `{xml_path.name}` produced (ctest step did not run or was skipped).") + return 0 + + try: + root = ET.parse(xml_path).getroot() + except ET.ParseError as exc: + print(f"## Test Results — {label}") + print() + print(f"Malformed `{xml_path.name}`: {exc}") + return 0 + + suite = root if root.tag == "testsuite" else root.find("testsuite") + if suite is None: + print(f"## Test Results — {label}") + print() + print("Malformed ctest-results.xml (no `testsuite` element).") + return 0 + + total = int(suite.get("tests", "0")) + failures = int(suite.get("failures", "0")) + errors = int(suite.get("errors", "0")) + skipped = int(suite.get("skipped", "0")) + passed = max(0, total - failures - errors - skipped) + verdict = "PASS" if failures == 0 and errors == 0 else "FAIL" + + print(f"## Test Results — {label} — {verdict}") + print() + print(f"**{passed}/{total} passed** ({failures} failed, {errors} errors, {skipped} skipped)") + print() + print("| Result | Test | Time (s) |") + print("|--------|------|----------|") + for case in suite.findall("testcase"): + name = case.get("name", "?") + raw_time = case.get("time", "") + try: + display_time = f"{float(raw_time):.2f}" + except ValueError: + display_time = raw_time + if case.find("failure") is not None: + result = "FAIL" + elif case.find("error") is not None: + result = "ERROR" + elif case.find("skipped") is not None: + result = "SKIP" + else: + result = "PASS" + print(f"| {result} | `{name}` | {display_time} |") + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml new file mode 100644 index 00000000..38b55845 --- /dev/null +++ b/.github/workflows/build-linux.yml @@ -0,0 +1,297 @@ +name: Build Linux + +on: + workflow_call: + inputs: + version: + description: "WSJT-X version string" + required: true + type: string + hamlib_branch: + description: "Hamlib branch to build" + required: false + type: string + default: "4.7.0" + arch: + description: "Linux target architecture: x86_64 or aarch64" + required: false + type: string + default: "x86_64" + +jobs: + build: + runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v6 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential cmake gfortran \ + libfftw3-dev libboost-all-dev \ + qtbase5-dev qttools5-dev qtmultimedia5-dev libqt5serialport5-dev \ + libqt5sql5-sqlite libqt5websockets5-dev \ + libqt5multimedia5-plugins \ + libusb-1.0-0-dev libudev-dev libreadline-dev \ + autoconf automake libtool pkg-config \ + texinfo \ + dpkg-dev fakeroot \ + asciidoctor \ + rpm + + - name: Cache pFUnit + id: pfunit-cache + uses: actions/cache@v5 + with: + path: pfunit-prefix + key: pfunit-linux-${{ inputs.arch }}-v4.9.0-${{ hashFiles('.github/workflows/build-linux.yml') }} + + - name: Build pFUnit + if: steps.pfunit-cache.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch v4.9.0 --recursive \ + https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git pfunit-src + cmake -S pfunit-src -B pfunit-build \ + -DSKIP_MPI=YES \ + -DSKIP_OPENMP=YES \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/pfunit-prefix" + cmake --build pfunit-build -j$(nproc) + cmake --install pfunit-build + + - name: Locate pFUnit config + id: pfunit + run: | + CONFIG=$(find "${GITHUB_WORKSPACE}/pfunit-prefix" -name PFUNITConfig.cmake | head -1) + if [ -z "$CONFIG" ]; then + echo "ERROR: PFUNITConfig.cmake not found under pfunit-prefix" + find "${GITHUB_WORKSPACE}/pfunit-prefix" -maxdepth 3 -type d + exit 1 + fi + PFUNIT_DIR="$(dirname "$CONFIG")" + echo "Found PFUNITConfig.cmake at: $CONFIG" + echo "dir=${PFUNIT_DIR}" >> "$GITHUB_OUTPUT" + + - name: Cache Hamlib + id: hamlib-cache + uses: actions/cache@v5 + with: + path: hamlib-prefix + key: hamlib-linux-${{ inputs.arch }}-${{ inputs.hamlib_branch }}-${{ hashFiles('.github/workflows/build-linux.yml') }} + + - name: Build Hamlib + if: steps.hamlib-cache.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch "${{ inputs.hamlib_branch }}" \ + https://github.com/Hamlib/Hamlib.git hamlib-src + cd hamlib-src + ./bootstrap + ./configure \ + --prefix="${GITHUB_WORKSPACE}/hamlib-prefix" \ + --disable-shared --enable-static \ + --without-cxx-binding \ + CFLAGS="-g -O2 -fPIC -fdata-sections -ffunction-sections" \ + LDFLAGS="-Wl,--gc-sections" + make -j$(nproc) + make install + + - name: Configure + run: | + cmake -S . -B wsjtx-build \ + -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/hamlib-prefix;${GITHUB_WORKSPACE}/pfunit-prefix" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DWSJT_SKIP_MANPAGES=ON \ + -DWSJT_BUILD_TESTS=ON \ + -DPFUNIT_DIR="${{ steps.pfunit.outputs.dir }}" \ + -Wno-dev + + - name: Build + run: cmake --build wsjtx-build -j$(nproc) + + - name: Run tests + id: ctest + run: ctest --output-on-failure --output-junit ctest-results.xml + working-directory: wsjtx-build + env: + QT_QPA_PLATFORM: offscreen + + - name: Publish test summary + if: always() && steps.ctest.conclusion != 'skipped' + working-directory: wsjtx-build + run: python3 ../.github/scripts/publish-ctest-summary.py "Linux ${{ inputs.arch }}" >> "$GITHUB_STEP_SUMMARY" + + - name: Upload test results + if: always() && steps.ctest.conclusion != 'skipped' + uses: actions/upload-artifact@v7 + with: + name: ctest-results-linux-${{ inputs.arch }} + path: wsjtx-build/ctest-results.xml + if-no-files-found: ignore + + - name: Verify binary + run: | + file wsjtx-build/jt9 + file wsjtx-build/jt9 | grep -q "ELF 64-bit" + + # CMakeLists.txt:1989-2012 enables CPack's DEB generator when + # dpkg-buildpackage is on the path (provided by dpkg-dev, installed + # above). The DEB generator ignores CPACK_PACKAGE_FILE_NAME and + # uses its own CPACK_DEBIAN_FILE_NAME (default <pkg>_<ver>_<arch>.deb + # → wsjtx_3.0.1_amd64.deb regardless). Override that variable to + # align the filename with the AppImage/installer naming used by + # the rest of the pipeline. + - name: Package .deb + env: + VERSION: ${{ inputs.version }} + ARCH: ${{ inputs.arch }} + run: | + cd wsjtx-build + cpack -G DEB \ + -D "CPACK_DEBIAN_FILE_NAME=wsjtx-${VERSION}-linux-${ARCH}.deb" + DEB="wsjtx-${VERSION}-linux-${ARCH}.deb" + if [ ! -f "$DEB" ]; then + echo "::error::cpack -G DEB produced no .deb at expected path: $DEB" + ls -la *.deb 2>/dev/null || true + exit 1 + fi + ls -lh "$DEB" + file "$DEB" + dpkg-deb --info "$DEB" | head -20 + + - name: Upload .deb + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-deb + path: wsjtx-build/wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}.deb + if-no-files-found: error + + # RPM builds via the same CPack scaffolding the .deb step above + # uses. CMakeLists.txt:2014-2026 already auto-detects rpmbuild and + # sets the Fedora-style dependency list (qt5-qtbase >= 5.9, fftw- + # libs-single, boost-log, etc.); only the workflow side was + # missing. `-G RPM` is explicit so this step doesn't accidentally + # rebuild the .deb already produced above. + - name: Package RPM + working-directory: wsjtx-build + run: | + cpack -G RPM + ls -lh *.rpm + + - name: Smoke-test RPM + working-directory: wsjtx-build + run: | + RPM=$(ls *.rpm | head -1) + echo "Querying $RPM" + rpm -qpi "$RPM" + rpm -qpR "$RPM" + rpm -qpl "$RPM" | head -40 + # Confirm the core binaries are in the package. + rpm -qpl "$RPM" | grep -qE '/bin/wsjtx$' + rpm -qpl "$RPM" | grep -qE '/bin/jt9$' + + - name: Upload RPM + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-rpm + path: wsjtx-build/*.rpm + if-no-files-found: error + + - name: Install to AppDir + run: | + cmake --install wsjtx-build --prefix "${GITHUB_WORKSPACE}/AppDir/usr" + # linuxdeploy's desktop/icon integration needs these exact paths. + test -x AppDir/usr/bin/wsjtx + test -x AppDir/usr/bin/jt9 + test -x AppDir/usr/bin/ft8code + test -f AppDir/usr/share/applications/wsjtx.desktop + test -f AppDir/usr/share/pixmaps/wsjtx_icon.png + + - name: Package AppImage + env: + VERSION: ${{ inputs.version }} + ARCH: ${{ inputs.arch }} + # Core linuxdeploy is pinned to a dated release + SHA256 verify + # so an undetected upstream change fails the build instead of + # shipping. The Qt5 plugin stays on the rolling "continuous" + # channel because upstream has not cut a dated release since + # 1-alpha-20250213-1, which carries a filesystem_error bug on + # ubuntu-24.04 / Qt5.15 (missing qt5/plugins/mediaservice dir). + # When upstream publishes a newer dated plugin release, pin + + # verify it here too. + LINUXDEPLOY_TAG: "1-alpha-20251107-1" + run: | + case "$ARCH" in + x86_64) LINUXDEPLOY_SHA256="c20cd71e3a4e3b80c3483cef793cda3f4e990aca14014d23c544ca3ce1270b4d" ;; + aarch64) LINUXDEPLOY_SHA256="620095110d693282b8ebeb244a95b5e911cf8f65f76c88b4b47d16ae6346fcff" ;; + *) echo "::error::Unknown linuxdeploy arch: $ARCH"; exit 1 ;; + esac + curl -fsSL -o linuxdeploy.AppImage \ + "https://github.com/linuxdeploy/linuxdeploy/releases/download/${LINUXDEPLOY_TAG}/linuxdeploy-${ARCH}.AppImage" + curl -fsSL -o linuxdeploy-plugin-qt.AppImage \ + "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${ARCH}.AppImage" + echo "${LINUXDEPLOY_SHA256} linuxdeploy.AppImage" | sha256sum -c - + chmod +x linuxdeploy.AppImage linuxdeploy-plugin-qt.AppImage + + # --appimage-extract-and-run avoids FUSE on the hosted runner. + export OUTPUT="wsjtx-${VERSION}-linux-${ARCH}.AppImage" + ./linuxdeploy.AppImage --appimage-extract-and-run \ + --appdir AppDir \ + --plugin qt \ + --output appimage \ + --desktop-file AppDir/usr/share/applications/wsjtx.desktop \ + --icon-file AppDir/usr/share/pixmaps/wsjtx_icon.png + + ls -lh "$OUTPUT" + file "$OUTPUT" + + - name: Smoke-test AppImage payload + env: + VERSION: ${{ inputs.version }} + ARCH: ${{ inputs.arch }} + run: | + APPIMAGE="wsjtx-${VERSION}-linux-${ARCH}.AppImage" + ./"$APPIMAGE" --appimage-extract >/dev/null + test -x squashfs-root/usr/bin/wsjtx + test -x squashfs-root/usr/bin/jt9 + test -x squashfs-root/usr/bin/ft8code + test -x squashfs-root/usr/bin/wsprd + file squashfs-root/usr/bin/wsjtx | grep -q "ELF 64-bit" + # Qt5 libs should have been bundled by linuxdeploy-plugin-qt. + ls squashfs-root/usr/lib/ | grep -q "^libQt5Core\.so" + ls squashfs-root/usr/lib/ | grep -q "^libQt5Widgets\.so" + ls squashfs-root/usr/lib/ | grep -q "^libQt5Multimedia\.so" + # Verify Qt audio backend plugins were bundled. Without them, + # QAudioDeviceInfo::availableDevices() returns empty at runtime + # and the user sees "no audio devices" — observed in v3.0.1 on + # Linux Lite. linuxdeploy-plugin-qt only WARNS when these are + # absent on the build host, it doesn't fail. + # Linux shared objects are conventionally `lib*.so` so the + # bundled plugins are libqtaudio_alsa.so and libqtmedia_pulse.so. + audio_plugins=$(find squashfs-root -path '*/plugins/audio/*.so' 2>/dev/null) + if [ -z "$audio_plugins" ]; then + echo "::error::No Qt audio backend plugins (qtaudio_alsa/qtaudio_pulse) bundled in AppImage." + echo "::error::Install libqt5multimedia5-plugins on the build host so linuxdeploy-plugin-qt can find them." + echo "AppImage plugin tree:" + find squashfs-root -path '*/plugins/*' -name '*.so' 2>/dev/null | head -20 + exit 1 + fi + echo "Qt audio plugins bundled:" + echo "$audio_plugins" + rm -rf squashfs-root + + - name: Upload AppImage + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}-AppImage + path: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }}.AppImage + if-no-files-found: error + + - name: Upload build artifacts + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-linux-${{ inputs.arch }} + path: | + wsjtx-build/jt9 + wsjtx-build/wsprd + wsjtx-build/wsjtx diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml new file mode 100644 index 00000000..657af14e --- /dev/null +++ b/.github/workflows/build-macos.yml @@ -0,0 +1,579 @@ +name: Build macOS + +on: + workflow_call: + inputs: + version: + description: "WSJT-X version string" + required: true + type: string + hamlib_branch: + description: "Hamlib branch to build" + required: false + type: string + default: "4.7.0" + arch: + description: "Target architecture (arm64 or x86_64)" + required: true + type: string + runner: + description: "GitHub Actions runner label" + required: true + type: string + deployment_target: + description: "macOS deployment target version" + required: true + type: string + +jobs: + build: + runs-on: ${{ inputs.runner }} + steps: + - uses: actions/checkout@v6 + + - name: Check signing secrets + id: check_secrets + env: + APP_P12: ${{ secrets.DEVELOPER_ID_CERTIFICATE_P12 }} + run: | + if [ -n "$APP_P12" ]; then + echo "signing_enabled=true" >> "$GITHUB_OUTPUT" + else + echo "signing_enabled=false" >> "$GITHUB_OUTPUT" + echo "::notice::macOS signing skipped — secrets unavailable (Dependabot or fork PR context). Compile + tests + dylib bundling still validated." + fi + + - name: Set Homebrew prefix + run: echo "HOMEBREW_PREFIX=$(brew --prefix)" >> "$GITHUB_ENV" + + - name: Install dependencies + run: brew install cmake gcc fftw boost qt@5 libusb dylibbundler autoconf automake libtool asciidoctor + + - name: Locate gfortran + id: fc + run: | + FC="$(brew --prefix gcc)/bin/gfortran" + [ -f "$FC" ] || FC="$(ls $HOMEBREW_PREFIX/bin/gfortran-* 2>/dev/null | sort -V | tail -1)" + echo "Found gfortran: $FC" + echo "path=$FC" >> "$GITHUB_OUTPUT" + + - name: Fix Qt5 keg-only paths + run: | + QT5_PREFIX="$(brew --prefix qt@5)" + [ -e $HOMEBREW_PREFIX/mkspecs ] || sudo ln -s "${QT5_PREFIX}/mkspecs" $HOMEBREW_PREFIX/mkspecs + [ -e $HOMEBREW_PREFIX/plugins ] || sudo ln -s "${QT5_PREFIX}/plugins" $HOMEBREW_PREFIX/plugins + + - name: Cache pFUnit + id: pfunit-cache + uses: actions/cache@v5 + with: + path: pfunit-prefix + key: pfunit-macos-${{ inputs.arch }}-v4.9.0-${{ hashFiles('.github/workflows/build-macos.yml') }} + + - name: Build pFUnit + if: steps.pfunit-cache.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch v4.9.0 --recursive \ + https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git pfunit-src + cmake -S pfunit-src -B pfunit-build \ + -DSKIP_MPI=YES \ + -DSKIP_OPENMP=YES \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_Fortran_COMPILER="${{ steps.fc.outputs.path }}" \ + -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/pfunit-prefix" + cmake --build pfunit-build -j$(sysctl -n hw.ncpu) + cmake --install pfunit-build + + - name: Locate pFUnit config + id: pfunit + run: | + CONFIG=$(find "${GITHUB_WORKSPACE}/pfunit-prefix" -name PFUNITConfig.cmake | head -1) + if [ -z "$CONFIG" ]; then + echo "ERROR: PFUNITConfig.cmake not found under pfunit-prefix" + find "${GITHUB_WORKSPACE}/pfunit-prefix" -maxdepth 3 -type d + exit 1 + fi + PFUNIT_DIR="$(dirname "$CONFIG")" + echo "Found PFUNITConfig.cmake at: $CONFIG" + echo "dir=${PFUNIT_DIR}" >> "$GITHUB_OUTPUT" + + - name: Cache Hamlib + id: hamlib-cache + uses: actions/cache@v5 + with: + path: hamlib-prefix + key: hamlib-macos-${{ inputs.arch }}-${{ inputs.hamlib_branch }}-${{ hashFiles('.github/workflows/build-macos.yml') }} + + - name: Build Hamlib + if: steps.hamlib-cache.outputs.cache-hit != 'true' + run: | + git clone --depth 1 --branch "${{ inputs.hamlib_branch }}" \ + https://github.com/Hamlib/Hamlib.git hamlib-src + cd hamlib-src + ./bootstrap + ./configure \ + --prefix="${GITHUB_WORKSPACE}/hamlib-prefix" \ + --disable-shared --enable-static \ + --without-cxx-binding + make -j$(sysctl -n hw.ncpu) + make install + + - name: Configure + run: | + cmake -S . -B wsjtx-build \ + -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/hamlib-prefix;${GITHUB_WORKSPACE}/pfunit-prefix;$(brew --prefix qt@5);$(brew --prefix libusb);$(brew --prefix fftw);$(brew --prefix boost)" \ + -DCMAKE_Fortran_COMPILER="${{ steps.fc.outputs.path }}" \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ inputs.deployment_target }} \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DWSJT_SKIP_MANPAGES=ON \ + -DWSJT_BUILD_TESTS=ON \ + -DPFUNIT_DIR="${{ steps.pfunit.outputs.dir }}" \ + -Wno-dev + + - name: Build + run: cmake --build wsjtx-build -j$(sysctl -n hw.ncpu) + + - name: Run tests + id: ctest + run: ctest --output-on-failure --output-junit ctest-results.xml + working-directory: wsjtx-build + + - name: Publish test summary + if: always() && steps.ctest.conclusion != 'skipped' + working-directory: wsjtx-build + run: python3 ../.github/scripts/publish-ctest-summary.py "macOS ${{ inputs.arch }}" >> "$GITHUB_STEP_SUMMARY" + + - name: Upload test results + if: always() && steps.ctest.conclusion != 'skipped' + uses: actions/upload-artifact@v7 + with: + name: ctest-results-macos-${{ inputs.arch }} + path: wsjtx-build/ctest-results.xml + if-no-files-found: ignore + + - name: Verify architecture + run: | + file wsjtx-build/jt9 + lipo -archs wsjtx-build/jt9 | grep -q ${{ inputs.arch }} + + - name: Collect binaries + id: collect + run: | + BUILD=wsjtx-build + STAGE=stage/wsjtx-${{ inputs.version }}-${{ inputs.arch }} + ASSETS=assets + + mkdir -p "${STAGE}" "${ASSETS}" + + cp -R "${BUILD}/wsjtx.app" "${STAGE}/" + + for bin in jt9 wsprd; do + [ -f "${BUILD}/${bin}" ] && cp "${BUILD}/${bin}" "${STAGE}/wsjtx.app/Contents/MacOS/" + done + + for bin in jt9 wsprd wsprcode jt65code jt4code ft8code q65code encode77 fcal hash22calc; do + [ -f "${BUILD}/${bin}" ] && cp "${BUILD}/${bin}" "${STAGE}/" && cp "${BUILD}/${bin}" "${ASSETS}/" + done + + for bin in ft4sim jt4sim jt65sim cwsim sfoxsim echosim EchoCallSim; do + [ -f "${BUILD}/${bin}" ] && cp "${BUILD}/${bin}" "${STAGE}/" && cp "${BUILD}/${bin}" "${ASSETS}/" + done + + echo "stage_dir=${STAGE}" >> "$GITHUB_OUTPUT" + echo "assets_dir=${ASSETS}" >> "$GITHUB_OUTPUT" + + - name: Bundle dylibs into app + run: | + STAGE="${{ steps.collect.outputs.stage_dir }}" + APP="${STAGE}/wsjtx.app" + FRAMEWORKS="${APP}/Contents/Frameworks" + GCC_LIB="$(brew --prefix gcc)/lib/gcc/current" + mkdir -p "${FRAMEWORKS}" + + "$(brew --prefix qt@5)/bin/macdeployqt" "${APP}" -verbose=1 + + resolve_lib() { + local lib="$1" + if [[ "$lib" == $HOMEBREW_PREFIX/* ]]; then + echo "$lib" + elif [[ "$lib" == @rpath/* ]]; then + local name="${lib#@rpath/}" + for dir in "$GCC_LIB" "$HOMEBREW_PREFIX/lib"; do + [ -f "$dir/$name" ] && echo "$dir/$name" && return + done + fi + } + + bundle_dylib() { + local binary="$1" + for lib in $(otool -L "$binary" | awk '{print $1}' | grep -E "($HOMEBREW_PREFIX|@rpath)" | grep -v Qt); do + local resolved + resolved=$(resolve_lib "$lib") + [ -z "$resolved" ] && continue + local libname=$(basename "$resolved") + if [ ! -f "${FRAMEWORKS}/${libname}" ]; then + echo " Bundling: $resolved -> ${FRAMEWORKS}/${libname}" + cp "$resolved" "${FRAMEWORKS}/${libname}" + chmod 644 "${FRAMEWORKS}/${libname}" + install_name_tool -id "@executable_path/../Frameworks/${libname}" "${FRAMEWORKS}/${libname}" + bundle_dylib "${FRAMEWORKS}/${libname}" + fi + install_name_tool -change "$lib" "@executable_path/../Frameworks/${libname}" "$binary" 2>/dev/null || true + done + } + + for exe in "${APP}/Contents/MacOS/"*; do + [ -f "$exe" ] && [ -x "$exe" ] && { + bundle_dylib "$exe" + for fw in $(otool -L "$exe" | awk '{print $1}' | grep '\.framework/'); do + fwname=$(basename "$fw") + bundled=$(find "${FRAMEWORKS}" -name "${fwname}" -path "*.framework/*" 2>/dev/null | head -1) + if [ -n "$bundled" ]; then + fwrel="${bundled#${APP}/Contents/}" + install_name_tool -change "$fw" "@executable_path/../${fwrel}" "$exe" 2>/dev/null || true + fi + done + } + done + + for fw in "${FRAMEWORKS}"/*.dylib; do + [ -f "$fw" ] && bundle_dylib "$fw" + done + + echo "Checking for remaining external references..." + REMAINING=$(find "${APP}/Contents/MacOS" -type f -perm +111 -exec otool -L {} \; 2>/dev/null | grep "$HOMEBREW_PREFIX" || true) + if [ -n "$REMAINING" ]; then + echo "WARNING: External paths still present:" + echo "$REMAINING" + else + echo "All dylibs bundled successfully" + fi + + - name: Bundle dylibs into CLI tools + run: | + ASSETS="${{ steps.collect.outputs.assets_dir }}" + STAGE="${{ steps.collect.outputs.stage_dir }}" + LIBDIR="${ASSETS}/lib" + mkdir -p "${LIBDIR}" + + BUNDLE_ARGS="" + for bin in "${ASSETS}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] && [ "$(basename "$bin")" != "lib" ] && { + BUNDLE_ARGS="$BUNDLE_ARGS -x $bin" + } + done + dylibbundler -od -b $BUNDLE_ARGS -d "${LIBDIR}/" -p @loader_path/lib/ + + QT5="$(brew --prefix qt@5)/lib" + for bin in "${ASSETS}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] && [ "$(basename "$bin")" != "lib" ] || continue + for fw in $(otool -L "$bin" | awk '{print $1}' | grep '\.framework/'); do + fwname=$(basename "$fw") + if [ ! -f "${LIBDIR}/${fwname}" ]; then + echo " Bundling framework: ${fwname}" + cp "$fw" "${LIBDIR}/${fwname}" + chmod 644 "${LIBDIR}/${fwname}" + install_name_tool -id "@loader_path/lib/${fwname}" "${LIBDIR}/${fwname}" + dylibbundler -b -x "${LIBDIR}/${fwname}" -d "${LIBDIR}/" -p @loader_path/ 2>/dev/null || true + fi + install_name_tool -change "$fw" "@loader_path/lib/${fwname}" "$bin" + codesign --force --sign - "$bin" + done + done + + for lib in "${LIBDIR}"/*; do + [ -f "$lib" ] || continue + for dep in $(otool -L "$lib" | awk '{print $1}' | grep '@loader_path/lib/'); do + depname=$(basename "$dep") + install_name_tool -change "$dep" "@loader_path/${depname}" "$lib" 2>/dev/null || true + done + RPATHS=$(otool -l "$lib" | grep -A2 LC_RPATH | grep "path " | awk '{print $2}' | sort | uniq -d) + for rp in $RPATHS; do + install_name_tool -delete_rpath "$rp" "$lib" 2>/dev/null || true + install_name_tool -add_rpath "$rp" "$lib" 2>/dev/null || true + done + codesign --force --sign - "$lib" + done + + echo "Verifying CLI tools..." + for bin in "${ASSETS}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] && [ "$(basename "$bin")" != "lib" ] && { + BAD=$(otool -L "$bin" | grep "$HOMEBREW_PREFIX" || true) + if [ -n "$BAD" ]; then + echo "ERROR: $(basename "$bin") still has Homebrew refs:" + echo "$BAD" + exit 1 + fi + } + done + echo "All CLI tools are self-contained" + + cp -R "${LIBDIR}" "${STAGE}/lib" + for bin in "${ASSETS}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] && [ "$(basename "$bin")" != "lib" ] && { + cp "$bin" "${STAGE}/$(basename "$bin")" + } + done + + - name: Import signing certificates + if: steps.check_secrets.outputs.signing_enabled == 'true' + env: + APP_P12: ${{ secrets.DEVELOPER_ID_CERTIFICATE_P12 }} + APP_P12_PW: ${{ secrets.DEVELOPER_ID_CERTIFICATE_PASSWORD }} + INST_P12: ${{ secrets.DEVELOPER_ID_INSTALLER_P12 }} + INST_P12_PW: ${{ secrets.DEVELOPER_ID_INSTALLER_PASSWORD }} + run: | + KEYCHAIN_PATH="$RUNNER_TEMP/signing.keychain-db" + KEYCHAIN_PASSWORD="$(openssl rand -hex 16)" + + security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" + security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + + echo "$APP_P12" | base64 --decode > "$RUNNER_TEMP/app.p12" + security import "$RUNNER_TEMP/app.p12" -P "$APP_P12_PW" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" + + echo "$INST_P12" | base64 --decode > "$RUNNER_TEMP/installer.p12" + security import "$RUNNER_TEMP/installer.p12" -P "$INST_P12_PW" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" + + security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" + security list-keychains -d user -s "$KEYCHAIN_PATH" login.keychain-db + + APP_IDENTITY=$(security find-identity -v -p codesigning "$KEYCHAIN_PATH" | grep "Developer ID Application" | head -1 | awk -F'"' '{print $2}') + INST_IDENTITY=$(security find-identity -v "$KEYCHAIN_PATH" | grep "Developer ID Installer" | head -1 | awk -F'"' '{print $2}') + echo "App identity: $APP_IDENTITY" + echo "Installer identity: $INST_IDENTITY" + echo "identity=$APP_IDENTITY" >> "$GITHUB_OUTPUT" + echo "installer_identity=$INST_IDENTITY" >> "$GITHUB_OUTPUT" + id: keychain + + # ALWAYS runs. Real Developer ID when secrets are present, ad-hoc + # signing (-) otherwise. Mirrors the Windows self-signed-sandbox + # pattern in build-windows.yml: prove the signing step is wired, + # rely on a real cert in production. Ad-hoc signing produces a + # structurally-valid signature with no Apple trust chain — pkg + # will not pass Gatekeeper without right-click→Open, but is + # well-formed and the all-platforms-ready gate in release.yml + # finds the artifact at the expected path. + - name: Code sign binaries + run: | + STAGE="${{ steps.collect.outputs.stage_dir }}" + ASSETS="${{ steps.collect.outputs.assets_dir }}" + APP="${STAGE}/wsjtx.app" + ENTITLEMENTS="${GITHUB_WORKSPACE}/entitlements.plist" + + if [ "${{ steps.check_secrets.outputs.signing_enabled }}" = "true" ]; then + IDENTITY="${{ steps.keychain.outputs.identity }}" + TS="--timestamp" + echo "Code signing mode: Developer ID (real)" + else + IDENTITY="-" + TS="" + echo "Code signing mode: ad-hoc (no Apple trust chain; pkg will be unsigned)" + fi + + # entitlements.plist declares com.apple.security.cs.disable- + # library-validation, which is required for any app bundling + # its own non-system frameworks (Qt, etc.) under hardened + # runtime — otherwise dyld refuses to load them. Applied on + # both signing paths: the real-cert path needs it for + # notarization-friendly distribution; the ad-hoc path needs + # it because each ad-hoc signature has its own pseudo-Team-ID + # so the main binary and bundled frameworks never match. + # (The plist is non-empty, so macos-15-intel's codesign now + # parses it cleanly — no need for the conditional that PR #23 + # introduced as a workaround for the empty-plist parser bug.) + find "${APP}/Contents/Frameworks" -type f \( -name "*.dylib" -o -perm +111 \) \ + -exec codesign --force --options runtime $TS --sign "$IDENTITY" {} \; + find "${APP}/Contents/Frameworks" -name "*.framework" -type d | while read fw; do + codesign --force --options runtime $TS --sign "$IDENTITY" "$fw" + done + find "${APP}/Contents/PlugIns" -type f -name "*.dylib" \ + -exec codesign --force --options runtime $TS --sign "$IDENTITY" {} \; 2>/dev/null || true + + find "${APP}/Contents/MacOS" -type f -perm +111 \ + -exec codesign --force --options runtime --entitlements "$ENTITLEMENTS" $TS --sign "$IDENTITY" {} \; + # Bundle-level codesign re-signs the main executable. --force + # without --entitlements would WIPE the entitlements applied + # in the previous step (PR #27 missed this — rc1 shipped with + # an unentitled wsjtx binary, so disable-library-validation + # never took effect and the dyld load of QtSerialPort still + # failed with mismatched Team IDs). + codesign --force --options runtime --entitlements "$ENTITLEMENTS" $TS --sign "$IDENTITY" "${APP}" + codesign --verify --deep --strict --verbose=2 "${APP}" + + # Defensive: confirm the entitlement actually made it onto + # the main binary. `codesign --verify` doesn't check + # entitlement presence — it only validates the signature + # itself — so a re-sign that wipes entitlements would still + # pass verify (that's how rc1 shipped broken). + MAIN_BIN="${APP}/Contents/MacOS/wsjtx" + if ! codesign -d --entitlements - "$MAIN_BIN" 2>/dev/null | grep -q "disable-library-validation"; then + echo "::error::wsjtx binary is missing com.apple.security.cs.disable-library-validation entitlement." + echo "::error::Bundled Qt frameworks will fail to load under hardened runtime." + codesign -d --entitlements - "$MAIN_BIN" || true + exit 1 + fi + echo "Confirmed disable-library-validation entitlement on $MAIN_BIN" + + for dir in "${STAGE}" "${ASSETS}"; do + find "${dir}" -maxdepth 1 -type f -perm +111 \ + -exec codesign --force --options runtime --entitlements "$ENTITLEMENTS" $TS --sign "$IDENTITY" {} \; + done + + for dir in "${STAGE}/lib" "${ASSETS}/lib"; do + [ -d "$dir" ] && find "$dir" -type f \ + -exec codesign --force --options runtime $TS --sign "$IDENTITY" {} \; + done + + # ALWAYS runs. productbuild signs with the Developer ID Installer + # cert when secrets are present; produces an unsigned .pkg + # otherwise. Either way the artifact is named identically and + # satisfies the all-platforms-ready gate in release.yml. + - name: Build installer pkg + run: | + STAGE="${{ steps.collect.outputs.stage_dir }}" + PKG_ID="org.k1jt.wsjtx.${{ inputs.arch }}" + PKG_VERSION="${{ inputs.version }}" + + PAYLOAD="$RUNNER_TEMP/pkg-payload" + SCRIPTS="$RUNNER_TEMP/pkg-scripts" + mkdir -p "${PAYLOAD}/Applications" "${PAYLOAD}/Library/LaunchDaemons" "${SCRIPTS}" + + cp -R "${STAGE}/wsjtx.app" "${PAYLOAD}/Applications/" + + mkdir -p "${PAYLOAD}/usr/local/wsjtx/lib" + for bin in "${STAGE}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] && cp "$bin" "${PAYLOAD}/usr/local/wsjtx/" + done + [ -d "${STAGE}/lib" ] && cp -R "${STAGE}/lib/"* "${PAYLOAD}/usr/local/wsjtx/lib/" + + cp "Darwin/com.wsjtx.sysctl.plist" "${PAYLOAD}/Library/LaunchDaemons/" + + cat > "${SCRIPTS}/postinstall" << 'SCRIPT' + #!/bin/bash + /bin/launchctl load /Library/LaunchDaemons/com.wsjtx.sysctl.plist 2>/dev/null || true + /usr/sbin/sysctl kern.sysv.shmmax=52428800 kern.sysv.shmall=25600 2>/dev/null || true + mkdir -p /usr/local/bin + for bin in /usr/local/wsjtx/*; do + [ -f "$bin" ] && [ -x "$bin" ] && ln -sf "$bin" "/usr/local/bin/$(basename "$bin")" + done + SCRIPT + chmod +x "${SCRIPTS}/postinstall" + + pkgbuild --analyze --root "${PAYLOAD}" "$RUNNER_TEMP/components.plist" + /usr/libexec/PlistBuddy -c "Set :0:BundleIsRelocatable false" "$RUNNER_TEMP/components.plist" 2>/dev/null || true + + pkgbuild \ + --root "${PAYLOAD}" \ + --scripts "${SCRIPTS}" \ + --component-plist "$RUNNER_TEMP/components.plist" \ + --identifier "${PKG_ID}" \ + --version "${PKG_VERSION}" \ + --install-location / \ + "$RUNNER_TEMP/wsjtx-component.pkg" + + PKG_OUT="wsjtx-${{ inputs.version }}-${{ inputs.arch }}-macOS.pkg" + if [ "${{ steps.check_secrets.outputs.signing_enabled }}" = "true" ]; then + INST_IDENTITY="${{ steps.keychain.outputs.installer_identity }}" + productbuild \ + --package "$RUNNER_TEMP/wsjtx-component.pkg" \ + --sign "$INST_IDENTITY" \ + "$PKG_OUT" + else + productbuild \ + --package "$RUNNER_TEMP/wsjtx-component.pkg" \ + "$PKG_OUT" + fi + + - name: Notarize pkg + if: steps.check_secrets.outputs.signing_enabled == 'true' + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_ID_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + run: | + notarize_and_staple() { + local file="$1" + echo "Notarizing: $file" + xcrun notarytool submit "$file" \ + --apple-id "$APPLE_ID" \ + --password "$APPLE_ID_PASSWORD" \ + --team-id "$APPLE_TEAM_ID" \ + --wait 2>&1 | tee notarize.log + + if grep -q "status: Invalid" notarize.log; then + SUBMISSION_ID=$(grep "id:" notarize.log | head -1 | awk '{print $2}') + xcrun notarytool log "$SUBMISSION_ID" \ + --apple-id "$APPLE_ID" \ + --password "$APPLE_ID_PASSWORD" \ + --team-id "$APPLE_TEAM_ID" || true + exit 1 + fi + + xcrun stapler staple "$file" + } + + notarize_and_staple "wsjtx-${{ inputs.version }}-${{ inputs.arch }}-macOS.pkg" + + - name: Notarize CLI tools + if: steps.check_secrets.outputs.signing_enabled == 'true' + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_ID_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + run: | + ASSETS="${{ steps.collect.outputs.assets_dir }}" + zip -r cli-tools.zip "${ASSETS}"/ + xcrun notarytool submit cli-tools.zip \ + --apple-id "$APPLE_ID" \ + --password "$APPLE_ID_PASSWORD" \ + --team-id "$APPLE_TEAM_ID" \ + --wait 2>&1 | tee notarize-cli.log + + if grep -q "status: Invalid" notarize-cli.log; then + SUBMISSION_ID=$(grep "id:" notarize-cli.log | head -1 | awk '{print $2}') + xcrun notarytool log "$SUBMISSION_ID" \ + --apple-id "$APPLE_ID" \ + --password "$APPLE_ID_PASSWORD" \ + --team-id "$APPLE_TEAM_ID" || true + exit 1 + fi + rm cli-tools.zip + + - name: Clean up keychain + if: always() && steps.check_secrets.outputs.signing_enabled == 'true' + run: security delete-keychain "$RUNNER_TEMP/signing.keychain-db" 2>/dev/null || true + + - name: Upload pkg + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-${{ inputs.arch }}-macOS.pkg + path: wsjtx-${{ inputs.version }}-${{ inputs.arch }}-macOS.pkg + + - name: Package individual binaries + run: | + # Tarball and inner-dir names include the arch suffix so arm64 + # and x86_64 per-binary artifacts can coexist in a single + # GitHub Release without ReleaseAsset.name collisions (#24). + ASSETS="${{ steps.collect.outputs.assets_dir }}" + ARCH="${{ inputs.arch }}" + PKGS=packages + mkdir -p "${PKGS}" + for bin in "${ASSETS}"/*; do + [ -f "$bin" ] && [ -x "$bin" ] || continue + name=$(basename "$bin") + arch_name="${name}-${ARCH}" + dir="${PKGS}/${arch_name}" + mkdir -p "${dir}" + cp "$bin" "${dir}/" + [ -d "${ASSETS}/lib" ] && cp -R "${ASSETS}/lib" "${dir}/lib" + tar -czf "${PKGS}/${arch_name}.tar.gz" -C "${PKGS}" "${arch_name}" + rm -rf "${dir}" + done + + - name: Upload individual binaries + uses: actions/upload-artifact@v7 + with: + name: individual-binaries-macos-${{ inputs.arch }} + path: packages/*.tar.gz diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 00000000..fd0f14a5 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,272 @@ +name: Build Windows x86_64 + +on: + workflow_call: + inputs: + version: + description: "WSJT-X version string" + required: true + type: string + hamlib_branch: + description: "Hamlib branch to build" + required: false + type: string + default: "4.7.0" + +jobs: + build: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + # windows-latest's git defaults to core.autocrlf=true, which converts + # text-file line endings during checkout. The converted working tree + # then differs from the index, so cmake/getsvn.cmake's git_local_changes + # reports DIRTY and the resulting binary's About tab shows + # "wsjtx-<ver>-<sha>-dirty". Disable autocrlf before checkout so the + # working tree matches the index exactly. (No-op on macOS/Linux runners, + # which already default to autocrlf=false; this fix is Windows-only.) + - name: Disable core.autocrlf before checkout + shell: pwsh + run: git config --global core.autocrlf false + + - uses: actions/checkout@v6 + + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + cache: true + install: >- + git make tar + mingw-w64-x86_64-gcc + mingw-w64-x86_64-gcc-fortran + mingw-w64-x86_64-cmake + mingw-w64-x86_64-qt5-base + mingw-w64-x86_64-qt5-multimedia + mingw-w64-x86_64-qt5-serialport + mingw-w64-x86_64-qt5-svg + mingw-w64-x86_64-qt5-tools + mingw-w64-x86_64-qt5-websockets + mingw-w64-x86_64-qt5-activeqt + mingw-w64-x86_64-fftw + mingw-w64-x86_64-boost + mingw-w64-x86_64-libusb + mingw-w64-x86_64-portaudio + mingw-w64-x86_64-pkg-config + mingw-w64-x86_64-nsis + mingw-w64-x86_64-osslsigncode + mingw-w64-x86_64-ruby + autoconf automake libtool + + # asciidoctor is a Ruby gem (no native MSYS2 package) — needed by + # doc/CMakeLists.txt to build the WSJT-X user guide HTML referenced + # by Help → Local User Guide. + - name: Install asciidoctor (Ruby gem) + run: gem install asciidoctor --no-document + + - name: Cache pFUnit + id: pfunit-cache + uses: actions/cache@v5 + with: + path: pfunit-prefix + key: pfunit-windows-v4.9.0-${{ hashFiles('.github/workflows/build-windows.yml') }} + + - name: Build pFUnit + if: steps.pfunit-cache.outputs.cache-hit != 'true' + run: | + WORKSPACE=$(cygpath "${GITHUB_WORKSPACE}") + git config --global core.longpaths true + git clone --depth 1 --branch v4.9.0 --recursive \ + https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git pfunit-src + cmake -S pfunit-src -B pfunit-build -G "MSYS Makefiles" \ + -DSKIP_MPI=YES \ + -DSKIP_OPENMP=YES \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_INSTALL_PREFIX="${WORKSPACE}/pfunit-prefix" + cmake --build pfunit-build -j$(nproc) + cmake --install pfunit-build + + - name: Locate pFUnit config + id: pfunit + run: | + WORKSPACE=$(cygpath "${GITHUB_WORKSPACE}") + # Locate each sub-package's config directly — MSYS2 pkg-config + # interacts badly with multi-entry CMAKE_PREFIX_PATH, so we pass + # explicit <pkg>_DIR hints instead. + for pkg in PFUNIT GFTL GFTL_SHARED FARGPARSE; do + CONFIG=$(find "${WORKSPACE}/pfunit-prefix" -name ${pkg}Config.cmake | head -1) + if [ -z "$CONFIG" ]; then + echo "ERROR: ${pkg}Config.cmake not found under pfunit-prefix" + find "${WORKSPACE}/pfunit-prefix" -maxdepth 3 -type d + exit 1 + fi + DIR="$(dirname "$CONFIG")" + echo "Found ${pkg}Config.cmake at: $CONFIG" + echo "$(echo $pkg | tr '[:upper:]' '[:lower:]')_dir=${DIR}" >> "$GITHUB_OUTPUT" + done + + - name: Cache Hamlib + id: hamlib-cache + uses: actions/cache@v5 + with: + path: hamlib-prefix + key: hamlib-windows-${{ inputs.hamlib_branch }}-${{ hashFiles('.github/workflows/build-windows.yml') }} + + - name: Build Hamlib + if: steps.hamlib-cache.outputs.cache-hit != 'true' + env: + MSYS2_PATH_TYPE: inherit + run: | + WORKSPACE=$(cygpath "${GITHUB_WORKSPACE}") + git clone --depth 1 --branch "${{ inputs.hamlib_branch }}" \ + https://github.com/Hamlib/Hamlib.git hamlib-src + cd hamlib-src + ./bootstrap + ./configure \ + --prefix="${WORKSPACE}/hamlib-prefix" \ + --enable-shared --disable-static \ + --without-cxx-binding \ + --without-readline \ + CFLAGS="-DNDEBUG -g -O2 -fdata-sections -ffunction-sections" \ + LDFLAGS="-Wl,--gc-sections" + make -j$(nproc) + make install-strip + + - name: Install OmniRig + shell: pwsh + run: | + # Download OmniRig (provides type library embedded in OmniRig.exe for dumpcpp) + Invoke-WebRequest -Uri "https://www.dxatlas.com/OmniRig/Files/OmniRig.zip" -OutFile OmniRig.zip + Expand-Archive -Path OmniRig.zip -DestinationPath omnirig-extract + # Run the installer silently (InnoSetup) + $setup = Get-ChildItem -Path omnirig-extract -Filter "*.exe" -Recurse | Select-Object -First 1 + if (-not $setup) { throw "No installer found in OmniRig.zip" } + Start-Process -FilePath $setup.FullName -ArgumentList '/VERYSILENT','/NORESTART' -Wait + # Locate the installed OmniRig.exe (embeds the COM type library) + $omnirig = Get-ChildItem -Path "C:\Program Files*\Afreet\OmniRig" -Filter "OmniRig.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 + if (-not $omnirig) { throw "OmniRig install failed — OmniRig.exe not found" } + echo "OMNIRIG_PATH=$($omnirig.FullName)" >> $env:GITHUB_ENV + + - name: Fix dumpcpp name (MSYS2 ships dumpcpp-qt5, CMake expects dumpcpp) + run: | + ln -sf /mingw64/bin/dumpcpp-qt5.exe /mingw64/bin/dumpcpp.exe + + - name: Configure + run: | + WORKSPACE=$(cygpath "${GITHUB_WORKSPACE}") + OMNIRIG=$(cygpath "${OMNIRIG_PATH}") + cmake -G "MSYS Makefiles" -S . -B wsjtx-build \ + -DCMAKE_PREFIX_PATH="${WORKSPACE}/hamlib-prefix" \ + -DOMNIRIG_TYPE_LIB="${OMNIRIG}" \ + -DWSJT_SKIP_MAP65=ON \ + -DCMAKE_Fortran_FLAGS="-fallow-argument-mismatch -std=legacy" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DWSJT_SKIP_MANPAGES=ON \ + -DWSJT_BUILD_TESTS=ON \ + -DPFUNIT_DIR="${{ steps.pfunit.outputs.pfunit_dir }}" \ + -DGFTL_DIR="${{ steps.pfunit.outputs.gftl_dir }}" \ + -DGFTL_SHARED_DIR="${{ steps.pfunit.outputs.gftl_shared_dir }}" \ + -DFARGPARSE_DIR="${{ steps.pfunit.outputs.fargparse_dir }}" \ + -Wno-dev + + - name: Build + run: cmake --build wsjtx-build -j$(nproc) + + - name: Run tests + id: ctest + run: ctest --output-on-failure --output-junit ctest-results.xml + working-directory: wsjtx-build + + - name: Publish test summary + if: always() && steps.ctest.conclusion != 'skipped' + working-directory: wsjtx-build + run: python3 ../.github/scripts/publish-ctest-summary.py "Windows x86_64" >> "$GITHUB_STEP_SUMMARY" + + - name: Upload test results + if: always() && steps.ctest.conclusion != 'skipped' + uses: actions/upload-artifact@v7 + with: + name: ctest-results-windows + path: wsjtx-build/ctest-results.xml + if-no-files-found: ignore + + - name: Verify binary + run: | + file wsjtx-build/jt9.exe + + # Emit an NSIS installer containing the full CLI tool set + # (wsjtx.exe, jt9, wsprd, fmtave, fcal, fmeasure + WSJT_BUILD_UTILS + # ft8code/jt65code/... + rigctl wrappers + Qt runtime via bundle_fixup). + # CMakeLists.txt:1989-1990 sets CPACK_GENERATOR=NSIS on WIN32 and + # CPACK_MONOLITHIC_INSTALL=1 packages every install() target. + - name: Package NSIS installer + run: | + cd wsjtx-build + # Override CPACK_PACKAGE_VERSION and + # CPACK_PACKAGE_FILE_NAME so the NSIS installer filename + # matches the tag-derived version exactly, including any + # pre-release suffix (-rc1, -beta1, etc.). CMakeLists.txt + # VERSION is numeric-only (CMake won't accept suffixes), so + # without this override cpack produces wsjtx-<numeric>-win64.exe + # while the sign step and upload-artifact paths below expect + # wsjtx-<inputs.version>-win64.exe. release.yml's prepare job + # enforces numeric-base parity; this override covers the + # suffix gap. + cpack -G NSIS -V \ + -D CPACK_PACKAGE_VERSION="${{ inputs.version }}" \ + -D CPACK_PACKAGE_FILE_NAME="wsjtx-${{ inputs.version }}-win64" + ls -la *.exe + + # Self-signed ephemeral signing — the signing step is wired into the + # pipeline, but the signature does NOT chain to a trusted root. This + # is intentional: Authenticode certification is a separate decision + # (CI/CD adoption decision #5). Generates an ephemeral cert per-run. + - name: Sign installer with self-signed ephemeral cert + run: | + cd wsjtx-build + INSTALLER=$(ls wsjtx-${{ inputs.version }}-*.exe | head -1) + if [ -z "$INSTALLER" ]; then + echo "ERROR: no NSIS installer produced by cpack" + ls -la + exit 1 + fi + echo "Unsigned installer: $INSTALLER" + # MSYS2 auto-converts arguments starting with '/' into Windows paths + # (e.g., '/CN=...' becomes 'D:/a/_temp/msys64/CN=...'). + # MSYS2_ARG_CONV_EXCL="*" disables that conversion for this command. + MSYS2_ARG_CONV_EXCL="*" openssl req -x509 -newkey rsa:2048 \ + -keyout ephemeral-key.pem -out ephemeral-cert.pem \ + -days 365 -nodes \ + -subj "/CN=WSJT-X Ephemeral Dev Signing/O=WSJTX/C=US" + SIGNED="${INSTALLER%.exe}-signed.exe" + osslsigncode sign \ + -certs ephemeral-cert.pem -key ephemeral-key.pem \ + -n "WSJT-X Installer" \ + -i "https://github.com/WSJTX/wsjtx-internal" \ + -h sha256 \ + -in "$INSTALLER" -out "$SIGNED" + mv "$SIGNED" "$INSTALLER" + rm -f ephemeral-key.pem ephemeral-cert.pem + echo "Signed installer: $INSTALLER" + osslsigncode verify "$INSTALLER" || true + # Exit 0: osslsigncode verify returns non-zero on CA-untrust even + # when the signature itself is structurally valid. The ephemeral + # cert is self-signed by design; the "|| true" keeps CI green. + # Structural presence is proven by the sign step succeeding above. + + - name: Upload installer artifact + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-windows-x86_64-installer + path: wsjtx-build/wsjtx-${{ inputs.version }}-*.exe + + - name: Upload build artifacts + uses: actions/upload-artifact@v7 + with: + name: wsjtx-${{ inputs.version }}-windows-x86_64 + path: | + wsjtx-build/jt9.exe + wsjtx-build/wsprd.exe + wsjtx-build/wsjtx.exe diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..52592fb4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,77 @@ +name: CI + +on: + push: + branches: [develop] + pull_request: + branches: [develop] + workflow_dispatch: + +jobs: + # Single source of truth for the project version string: read it from + # CMakeLists.txt so CI and release.yml cannot disagree. Strip the + # optional fourth tweak segment (3.0.0.0 → 3.0.0) to match the 3-part + # shape release.yml derives from build/v<X.Y.Z> tags. + prepare: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.v.outputs.version }} + steps: + - uses: actions/checkout@v6 + - id: v + run: | + VERSION=$(grep -E '^\s*VERSION\s+[0-9]' CMakeLists.txt | head -1 | awk '{print $2}' | cut -d. -f1-3) + if [ -z "$VERSION" ]; then + echo "::error::Could not derive VERSION from CMakeLists.txt" + exit 1 + fi + echo "Derived version from CMakeLists.txt: $VERSION" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + macos: + needs: prepare + uses: ./.github/workflows/build-macos.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "arm64" + runner: "macos-15" + deployment_target: "11.0" + secrets: inherit + + macos-intel: + needs: prepare + uses: ./.github/workflows/build-macos.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "x86_64" + runner: "macos-15-intel" + deployment_target: "10.13" + secrets: inherit + + linux: + needs: prepare + uses: ./.github/workflows/build-linux.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "x86_64" + secrets: inherit + + linux-arm: + needs: prepare + uses: ./.github/workflows/build-linux.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "aarch64" + secrets: inherit + + windows: + needs: prepare + uses: ./.github/workflows/build-windows.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + secrets: inherit diff --git a/.github/workflows/hamlib-upstream-check.yml b/.github/workflows/hamlib-upstream-check.yml new file mode 100644 index 00000000..01add999 --- /dev/null +++ b/.github/workflows/hamlib-upstream-check.yml @@ -0,0 +1,107 @@ +name: Hamlib Upstream Check + +on: + schedule: + # Weekly, Monday 12:00 UTC. Courtesy check for new Hamlib 4.x releases. + - cron: '0 12 * * MON' + workflow_dispatch: + +permissions: + contents: read + issues: write + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + + - name: Check for newer upstream release + env: + GH_TOKEN: ${{ github.token }} + # Extension hook: to add Qt, Boost, fftw, or any other upstream, + # duplicate this workflow with different COMPONENT / REPO / MAJOR + # values, or convert this job into a matrix over those keys. + # The step logic below only reads these three env vars plus the + # hamlib_branch line in ci.yml, so swapping is mechanical. + COMPONENT: Hamlib + REPO: Hamlib/Hamlib + MAJOR: "4" + run: | + set -euo pipefail + + # Single source of truth for the pinned version lives in ci.yml. + # ci.yml and release.yml must agree on hamlib_branch; CI failure + # is the signal if they drift, so this step reads ci.yml only. + PINNED=$(grep -m1 'hamlib_branch:' .github/workflows/ci.yml \ + | sed -E 's/.*"([^"]+)".*/\1/') + if [[ -z "$PINNED" ]]; then + echo "::error::Could not read pinned ${COMPONENT} version from ci.yml" + exit 1 + fi + echo "Pinned: ${PINNED}" + + # Highest tag in the MAJOR.x series. Strict three-component filter + # skips partial tags like "4.6" and anything non-semver. sort -V + # handles numeric ordering correctly for dotted versions. + LATEST=$(gh api "/repos/${REPO}/tags" --paginate -q '.[].name' \ + | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' \ + | awk -F. -v m="${MAJOR}" '$1 == m' \ + | sort -V \ + | tail -n1) + if [[ -z "${LATEST}" ]]; then + echo "::error::No ${COMPONENT} ${MAJOR}.x tags found upstream" + exit 1 + fi + echo "Upstream: ${LATEST}" + + if [[ "${LATEST}" == "${PINNED}" ]]; then + echo "Pinned version is current. Nothing to do." + exit 0 + fi + + HIGHEST=$(printf '%s\n%s\n' "${PINNED}" "${LATEST}" | sort -V | tail -n1) + if [[ "${HIGHEST}" != "${LATEST}" ]]; then + echo "Pinned (${PINNED}) is ahead of upstream (${LATEST}); no action." + exit 0 + fi + + # Avoid filing a duplicate if last week's tracking issue is still + # open. "in:title" + the specific version number is tight enough + # to never collide with an unrelated issue. + if gh issue list --state open \ + --search "${COMPONENT} ${LATEST} in:title" \ + --json number -q '.[].number' | grep -q .; then + echo "Tracking issue already open for ${COMPONENT} ${LATEST}. Nothing to do." + exit 0 + fi + + TITLE="Upstream: ${COMPONENT} ${LATEST} available (pinned at ${PINNED})" + BODY=$(cat <<EOF + Automated upstream version check. + + - **Component:** ${COMPONENT} + - **Pinned:** \`${PINNED}\` + - **Latest upstream ${MAJOR}.x tag:** \`${LATEST}\` + + ## To bump + + Update \`hamlib_branch\` in: + + - \`.github/workflows/ci.yml\` (five jobs) + - \`.github/workflows/release.yml\` (five jobs) + + Open a PR against \`develop\`, let CI run on all five platforms, then merge. + + ## Notes + + - This check only tracks the ${MAJOR}.x series. A future ${COMPONENT} ${MAJOR}+1 major release would require design review and is intentionally ignored here. + - Close this issue once the bump PR is merged. The next weekly run will re-file if another ${MAJOR}.x release appears. + + _Filed by \`.github/workflows/hamlib-upstream-check.yml\`._ + EOF + ) + + gh issue create --title "${TITLE}" --body "${BODY}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..be547624 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,313 @@ +name: Release + +on: + push: + tags: ["build/v*"] + +jobs: + # ── Derive the version string once from the pushed tag ──────────── + # Strips the "build/v" prefix so artifacts are named "wsjtx-3.0.1-rc1-*" + # rather than "wsjtx-build/v3.0.1-rc1-*". RC/beta suffixes (e.g. + # build/v3.0.1-rc1 → 3.0.1-rc1) are preserved so pre-release artifacts + # are distinguishable from GA. All downstream jobs consume this + # single output so the five platform artifacts cannot disagree. + prepare: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.v.outputs.version }} + steps: + - uses: actions/checkout@v6 + - id: v + run: echo "version=${GITHUB_REF_NAME#build/v}" >> "$GITHUB_OUTPUT" + + # Enforce that the pushed tag's numeric version base + # matches CMakeLists.txt:55 VERSION (first 3 components). CMake's + # VERSION field is numeric-only and cannot carry pre-release + # suffixes like -rc1 or -beta1, so this check compares the tag + # version stripped of any `-<suffix>` against the first three + # dotted components of CMakeLists.txt VERSION. Mismatch means the + # release commit forgot to bump CMakeLists.txt in lockstep with + # the tag; fail fast here before five platform builds burn ~30 + # minutes of CI. + - name: Verify tag ↔ CMakeLists.txt version parity + run: | + TAG_VERSION="${GITHUB_REF_NAME#build/v}" + TAG_NUMERIC="${TAG_VERSION%%-*}" + CMAKE_VERSION=$(sed -nE 's/^[[:space:]]*VERSION[[:space:]]+([0-9][0-9.]*).*/\1/p' CMakeLists.txt | head -1) + CMAKE_NUMERIC=$(echo "$CMAKE_VERSION" | awk -F. '{printf "%s.%s.%s", $1, $2, $3}') + echo "Tag version: $TAG_VERSION (numeric base: $TAG_NUMERIC)" + echo "CMakeLists.txt VER: $CMAKE_VERSION (first 3 components: $CMAKE_NUMERIC)" + if [ "$TAG_NUMERIC" != "$CMAKE_NUMERIC" ]; then + echo "::error::Tag numeric base ($TAG_NUMERIC) != CMakeLists.txt VERSION first 3 components ($CMAKE_NUMERIC)." + echo "::error::Bump CMakeLists.txt:55 VERSION in the same commit that gets tagged, then retry." + exit 1 + fi + echo "Parity check PASSED." + + # ── Build all five platforms ─────────────────────────────────────── + macos: + needs: prepare + uses: ./.github/workflows/build-macos.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "arm64" + runner: "macos-15" + deployment_target: "11.0" + secrets: inherit + + macos-intel: + needs: prepare + uses: ./.github/workflows/build-macos.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "x86_64" + runner: "macos-15-intel" + deployment_target: "10.13" + secrets: inherit + + linux: + needs: prepare + uses: ./.github/workflows/build-linux.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "x86_64" + secrets: inherit + + linux-arm: + needs: prepare + uses: ./.github/workflows/build-linux.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + arch: "aarch64" + secrets: inherit + + windows: + needs: prepare + uses: ./.github/workflows/build-windows.yml + with: + version: ${{ needs.prepare.outputs.version }} + hamlib_branch: "4.7.1" + secrets: inherit + + # ── Publish release + sync to public repo ────────────────────────── + release: + needs: [prepare, macos, macos-intel, linux, linux-arm, windows] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Download all artifacts + uses: actions/download-artifact@v8 + with: + path: artifacts + + # Source tarball is published on GA releases only, not on RC (-rc*, + # -beta*, etc.) pre-releases. Rationale: RCs may carry code for features + # that are not yet intended for open source distribution (limited-access + # field testing). GA releases always include a source tarball per the + # CI/CD adoption decision on platform-matrix assets. + - name: Build source tarball (GA only) + if: ${{ !contains(github.ref_name, '-') }} + env: + VERSION: ${{ needs.prepare.outputs.version }} + run: | + # This repo has no git submodules, so git archive's default + # single-tree output captures the full source. If submodules + # are ever added, this step must be revisited — git archive + # does not recurse into submodules on its own. + git archive \ + --format=tar.gz \ + --prefix="wsjtx-${VERSION}/" \ + -o "artifacts/wsjtx-${VERSION}-src.tar.gz" \ + "${GITHUB_REF_NAME}" + ls -lh "artifacts/wsjtx-${VERSION}-src.tar.gz" + + - name: List artifacts + run: find artifacts -type f | sort + + # ── All-platforms-ready gate ─────────────────────────────────────── + # Refuse to publish unless every platform produced an installer-grade + # artifact. The release job's `needs:` already enforces structural + # success (all 5 builds ran and exited 0), but a build can exit 0 + # without actually packaging — e.g. a packaging step behind an `if:` + # that evaluated false, or an upload-artifact step that silently + # matched zero files. This gate fails the release job BEFORE any + # asset upload so partial releases never reach GitHub Releases or + # the public mirror. + # + # Expected artifact layout (one installer per platform, per the + # five build-*.yml upload-artifact steps): + # artifacts/wsjtx-<ver>-arm64-macOS.pkg/*.pkg + # artifacts/wsjtx-<ver>-x86_64-macOS.pkg/*.pkg + # artifacts/wsjtx-<ver>-linux-x86_64-AppImage/*.AppImage + # artifacts/wsjtx-<ver>-linux-aarch64-AppImage/*.AppImage + # artifacts/wsjtx-<ver>-windows-x86_64-installer/*.exe + # + # Policy: publish only when all five platforms have produced an + # installer-grade artifact. Adjust or remove this step if the + # policy evolves (e.g. to publish any-platform-ready). + - name: Verify installer-grade artifacts (all-platforms-ready gate) + env: + VERSION: ${{ needs.prepare.outputs.version }} + run: | + shopt -s nullglob + labels=( + "macOS arm64 .pkg" + "macOS x86_64 .pkg" + "Linux x86_64 .AppImage" + "Linux aarch64 .AppImage" + "Windows x86_64 .exe" + ) + patterns=( + "artifacts/wsjtx-${VERSION}-arm64-macOS.pkg/*.pkg" + "artifacts/wsjtx-${VERSION}-x86_64-macOS.pkg/*.pkg" + "artifacts/wsjtx-${VERSION}-linux-x86_64-AppImage/*.AppImage" + "artifacts/wsjtx-${VERSION}-linux-aarch64-AppImage/*.AppImage" + "artifacts/wsjtx-${VERSION}-windows-x86_64-installer/*.exe" + ) + missing=0 + echo "Installer-grade artifact gate — checking 5 platforms…" + for i in "${!labels[@]}"; do + # shellcheck disable=SC2206 # word-split is intentional; nullglob makes it safe. + matches=( ${patterns[$i]} ) + if [ ${#matches[@]} -eq 0 ]; then + echo "::error::MISSING ${labels[$i]} — no match for ${patterns[$i]}" + missing=$((missing + 1)) + else + size=$(stat --printf '%s' "${matches[0]}") + printf ' ok %-22s %s (%s bytes)\n' "${labels[$i]}" "${matches[0]}" "$size" + fi + done + if [ "$missing" -gt 0 ]; then + echo "::error::All-platforms-ready gate FAILED — $missing of 5 platform(s) missing installer-grade artifact." + echo "::error::Refusing to publish a partial release. Fix the failing build job(s) and retry the tag." + exit 1 + fi + echo "All-platforms-ready gate PASSED — all 5 installer-grade artifacts present. Proceeding to publish." + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ github.token }} + run: | + TAG="${GITHUB_REF_NAME}" + # Filter to user-facing release assets. `find artifacts -type f` + # without filtering pulls in 5× ctest-results.xml (one per + # platform) and per-binary tarballs from individual-binaries-* + # that collide on basename across architectures — `gh release + # create` uses basenames as asset names and duplicates cause + # upload failures. + FILES=$(find artifacts -maxdepth 2 -type f \ + \( -name "*.pkg" -o -name "*.AppImage" -o -name "*.deb" \ + -o -name "*.exe" -o -name "*.tar.gz" -o -name "*.rpm" \)) + # SemVer pre-release tags contain a hyphen after the version + # (e.g., v3.0.1-rc1, v3.0.1-rc2, v3.0.1-beta1). Flag those as + # GitHub pre-releases so they don't appear as the latest stable. + PRERELEASE_FLAG="" + if [[ "$TAG" == *-* ]]; then + PRERELEASE_FLAG="--prerelease" + fi + gh release create "$TAG" \ + --title "WSJT-X ${{ needs.prepare.outputs.version }}" \ + --generate-notes \ + $PRERELEASE_FLAG \ + $FILES + + # ── Public mirror: GA only ───────────────────────────────────────── + # RC/beta tags (any tag carrying a '-' in the version, e.g. + # build/v3.0.1-rc1) stay internal — the public WSJTX/wsjtx repo is + # for stable releases only. The Build source tarball step above + # uses the same predicate; mirror logic must too. + + # Defense-in-depth: the workflow trigger already constrains + # github.ref_name to tags matching build/v*, but if this job + # ever runs outside that trigger (workflow_dispatch, manual + # re-run with a fork ref, misconfiguration) the force-push + # below would overwrite WSJTX/wsjtx:master with arbitrary content. + # Abort here if the ref doesn't match the expected release-tag + # shape. + - name: Verify release tag format (GA only) + if: ${{ !contains(github.ref_name, '-') }} + run: | + if [[ "$GITHUB_REF_TYPE" != "tag" || "$GITHUB_REF_NAME" != build/v* ]]; then + echo "::error::Refusing to sync — expected tag build/v*, got $GITHUB_REF_TYPE:$GITHUB_REF_NAME" + exit 1 + fi + + - name: Push to public repo (GA only) + if: ${{ !contains(github.ref_name, '-') }} + env: + TOKEN: ${{ secrets.CROSS_REPO_TOKEN }} + run: | + # A "successful" release that silently skips the mirror sync is + # the worst failure mode — it looks green in Actions but leaves + # users unable to download. Fail loud instead. + if [ -z "$TOKEN" ]; then + echo "::error::CROSS_REPO_TOKEN not set — refusing to publish without public-mirror sync" + exit 1 + fi + # Use CROSS_REPO_TOKEN (PAT with Contents:write on WSJTX/wsjtx) + # over HTTPS. Idempotent: on job re-run the remote already exists, + # so skip add. + if ! git remote get-url public >/dev/null 2>&1; then + git remote add public "https://x-access-token:${TOKEN}@github.com/WSJTX/wsjtx.git" + fi + + # Strip "build/" prefix per public release convention. Public + # users search for "v3.0.1", not "build/v3.0.1". Internal tag + # stays as-is for the wsjtx-internal release. + PUBLIC_TAG="${GITHUB_REF_NAME#build/}" + + # Derive the bare-prefix tag locally so the workflow doesn't + # depend on the team having pushed both tag forms. -f overwrites + # any pre-existing local tag at a stale SHA. + git tag -f "$PUBLIC_TAG" "$GITHUB_REF_NAME" + + # Human-auditable record of what the force-push is overwriting. + # If public master doesn't exist yet, ls-remote returns empty — + # still safe, just logs "no prior SHA". + PRIOR_SHA=$(git ls-remote public master | awk '{print $1}') + LOCAL_SHA=$(git rev-parse HEAD) + echo "Public mirror force-push audit:" + echo " internal tag: $GITHUB_REF_NAME" + echo " public tag: $PUBLIC_TAG" + echo " prior SHA: ${PRIOR_SHA:-<none>}" + echo " new SHA: $LOCAL_SHA" + + # --force retained per CI/CD adoption decision #3 (option a): + # automate the existing sync pattern. The v3.0.0 tag SHAs already + # match on both repos, so the force-push aligns history rather + # than rewrites it in the normal release case. + git push public HEAD:master --force + git push public "refs/tags/${PUBLIC_TAG}:refs/tags/${PUBLIC_TAG}" + + # Create the public-side GitHub Release with installer assets + # attached. Without this step, public-side Releases page is empty + # after a mirror push (source + tag, no downloadables) and end users + # can't find the artifacts. + - name: Create public GitHub Release (GA only) + if: ${{ !contains(github.ref_name, '-') }} + env: + GH_TOKEN: ${{ secrets.CROSS_REPO_TOKEN }} + VERSION: ${{ needs.prepare.outputs.version }} + run: | + PUBLIC_TAG="${GITHUB_REF_NAME#build/}" + # Same asset filter as the internal release. Re-find rather than + # carrying a list — keeps the all-platforms-ready gate, internal + # release, and public release mechanically aligned on one filter. + FILES=$(find artifacts -maxdepth 2 -type f \ + \( -name "*.pkg" -o -name "*.AppImage" -o -name "*.deb" \ + -o -name "*.exe" -o -name "*.tar.gz" -o -name "*.rpm" \)) + gh release create "$PUBLIC_TAG" \ + -R WSJTX/wsjtx \ + --title "WSJT-X ${VERSION}" \ + --generate-notes \ + $FILES diff --git a/CMake/Modules/FindFFTW3.cmake b/CMake/Modules/FindFFTW3.cmake index 999c2ffe..7264f582 100644 --- a/CMake/Modules/FindFFTW3.cmake +++ b/CMake/Modules/FindFFTW3.cmake @@ -64,14 +64,36 @@ foreach (_comp ${_components}) endif (_comp STREQUAL "single") endforeach (_comp ${_components}) -# If using threads, we need to link against threaded libraries as well - except on Windows. -if (NOT WIN32 AND _use_threads) +# If using threads, link against threaded libraries when they exist as +# separate files. Linux/macOS always ship threads separately. On Windows +# this depends on the toolchain: MSYS2 (used by CI) ships fftw3f_threads +# as a separate import library, but the official fftw.org prebuilt DLLs +# bundle threads into the main library — there is no separate file. Probe +# for the separate library and only add it to the link list if found, so +# both Windows toolchains link correctly without an environment-aware +# switch. +if (_use_threads) set (_thread_libs) - foreach (_lib ${_libraries}) - list (APPEND _thread_libs ${_lib}_threads) - endforeach (_lib ${_libraries}) - set (_libraries ${_thread_libs} ${_libraries}) -endif (NOT WIN32 AND _use_threads) + if (WIN32) + foreach (_lib ${_libraries}) + find_library (_${_lib}_threads_path + NAMES ${_lib}_threads ${_lib}_threads-3 + HINTS ${FFTW3_ROOT_DIR} + PATH_SUFFIXES lib) + if (_${_lib}_threads_path) + list (APPEND _thread_libs ${_lib}_threads) + endif () + mark_as_advanced (_${_lib}_threads_path) + endforeach (_lib ${_libraries}) + else (WIN32) + foreach (_lib ${_libraries}) + list (APPEND _thread_libs ${_lib}_threads) + endforeach (_lib ${_libraries}) + endif (WIN32) + if (_thread_libs) + set (_libraries ${_thread_libs} ${_libraries}) + endif () +endif (_use_threads) # Keep a list of variable names that we need to pass on to # find_package_handle_standard_args(). diff --git a/CMake/Modules/wsjtx-manifest.rc.in b/CMake/Modules/wsjtx-manifest.rc.in new file mode 100644 index 00000000..8a366085 --- /dev/null +++ b/CMake/Modules/wsjtx-manifest.rc.in @@ -0,0 +1,5 @@ +// Resource script that embeds wsjtx.exe.manifest into the executable +// as resource ID 1, type RT_MANIFEST (24). Configured at CMake time +// so the path to the manifest is absolute regardless of the windres +// working directory. +1 24 "@WSJTX_MANIFEST_PATH@" diff --git a/CMakeLists.txt b/CMakeLists.txt index cb951fd7..087b2a49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ if (POLICY CMP0075) endif () project (wsjtx - VERSION 3.0.0.0 + VERSION 3.0.1.0 LANGUAGES C CXX Fortran ) set (PROJECT_DESCRIPTION "WSJT-X: Digital Modes for Weak Signal Communications in Amateur Radio") @@ -152,6 +152,7 @@ option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.") option (WSJT_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.") option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON) option (WSJT_FOX_OTP "Enable Fox OTP Verification Messages." ON) +option (WSJT_SKIP_MAP65 "Skip building MAP65 EME decoder (legacy Fortran; fails on GCC 15)." OFF) CMAKE_DEPENDENT_OPTION (WSJT_QDEBUG_IN_RELEASE "Leave Qt debugging statements in Release configuration." OFF "NOT is_debug_build" OFF) CMAKE_DEPENDENT_OPTION (WSJT_ENABLE_EXPERIMENTAL_FEATURES "Enable features not fully ready for public releases." ON @@ -932,21 +933,30 @@ set_property (SOURCE ${all_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE if (WIN32) # generate the OmniRig COM interface source - find_program (DUMPCPP dumpcpp) - if (DUMPCPP-NOTFOUND) - message (FATAL_ERROR "dumpcpp tool not found") - endif (DUMPCPP-NOTFOUND) - execute_process ( - COMMAND ${DUMPCPP} -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270} - OUTPUT_VARIABLE AXSERVER - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string (STRIP "${AXSERVER}" AXSERVER) - if (NOT AXSERVER) - message (FATAL_ERROR "You need to install OmniRig on this computer") - endif (NOT AXSERVER) - string (REPLACE "\"" "" AXSERVER ${AXSERVER}) - file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS) + if (OMNIRIG_TYPE_LIB) + # CI / headless build: type library path provided directly. Bypasses + # COM registration which is not available in CI. Pass via + # -DOMNIRIG_TYPE_LIB=<path-to-OmniRig.tlb>. + file (TO_CMAKE_PATH "${OMNIRIG_TYPE_LIB}" AXSERVERSRCS) + message (STATUS "Using OmniRig type library: ${AXSERVERSRCS}") + else () + # Normal local build: query the COM registry for the type library. + find_program (DUMPCPP dumpcpp) + if (DUMPCPP-NOTFOUND) + message (FATAL_ERROR "dumpcpp tool not found") + endif (DUMPCPP-NOTFOUND) + execute_process ( + COMMAND ${DUMPCPP} -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270} + OUTPUT_VARIABLE AXSERVER + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string (STRIP "${AXSERVER}" AXSERVER) + if (NOT AXSERVER) + message (FATAL_ERROR "You need to install OmniRig on this computer, or pass -DOMNIRIG_TYPE_LIB=<path>") + endif (NOT AXSERVER) + string (REPLACE "\"" "" AXSERVER ${AXSERVER}) + file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS) + endif () endif () @@ -1074,6 +1084,17 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti") +# MinGW gcc 16.x (MSYS2 rolled forward 2026-05) raises false-positive +# -Wmaybe-uninitialized on the placement-new'd HRDMessage flexible-array +# struct in Transceiver/HRDTransceiver.cpp. Demote to a warning on Windows +# + gcc 16+ until upstream gcc tightens the analysis or HRDMessage is +# refactored. Scoped narrowly so other platforms keep -Werror discipline. +if (WIN32 + AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=maybe-uninitialized") +endif () + if (NOT APPLE) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas") if (${OPENMP_FOUND}) @@ -1613,7 +1634,9 @@ endif (${OPENMP_FOUND} OR APPLE) if (WIN32) find_package (Portaudio REQUIRED) - add_subdirectory (map65) + if (NOT WSJT_SKIP_MAP65) + add_subdirectory (map65) + endif () endif () add_subdirectory (qmap) @@ -1624,12 +1647,30 @@ generate_version_info (wsjtx_VERSION_RESOURCES ICON ${WSJTX_ICON_FILE} ) +# Embed a Windows application manifest declaring per-monitor V2 DPI +# awareness. Without it, Windows treats wsjtx.exe as DPI-unaware and +# applies legacy bitmap-stretching scaling on high-DPI displays — +# fonts/widgets appear larger than locally-built (MSVC) executables +# which auto-embed a manifest. Resource ID 1, type RT_MANIFEST (24). +set (wsjtx_PLATFORM_RESOURCES) +if (WIN32) + set (WSJTX_MANIFEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/wsjtx.exe.manifest") + configure_file ( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/wsjtx-manifest.rc.in" + "${CMAKE_CURRENT_BINARY_DIR}/wsjtx-manifest.rc" + @ONLY + ) + list (APPEND wsjtx_PLATFORM_RESOURCES + "${CMAKE_CURRENT_BINARY_DIR}/wsjtx-manifest.rc") +endif (WIN32) + add_executable (wsjtx MACOSX_BUNDLE ${wsjtx_CXXSRCS} ${wsjtx_GENUISRCS} ${WSJTX_ICON_FILE} ${wsjtx_RESOURCES_RCC} ${wsjtx_VERSION_RESOURCES} + ${wsjtx_PLATFORM_RESOURCES} ) if (WSJT_CREATE_WINMAIN) @@ -1779,6 +1820,11 @@ install (TARGETS jt9 wsprd fmtave fcal fmeasure BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) +install (TARGETS qmap + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime + 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..67874f07 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,143 @@ +# Contributing to WSJT-X
+
+## Overview
+
+**WSJT-X** and its sister programs **MAP65** and **QMAP** are open-source applications designed to facilitate weak-signsl ham radio communication. The project was started in 2001 and became an open-source effort in 2005. Our core development team has grown slowly over time, and in May 2026 consists of seven members.
+
+We welcome contributions to these programs from outside the core development team. This document provides a brief summary of how the WSJT-X GitHub repositories are organized, how the development team operates, and how outside contributions can be made.
+
+## Repository Structure
+
+We use two GitHub repositories. Public site https://github.com/WSJTX/wsjtx receives updated code whenever a general availability (GA) program version is released. Anyone can submit [Issues](https://github.com/WSJTX/wsjtx/issues) to be raised and discussed, as well as Bug Reports and [Pull Requests](https://github.com/WSJTX/wsjtx/pulls). External contributors should fork the public repo and submit pull requests based on that code.
+
+Development work by team members, including acceptance testing of outside pull requests, takes place in a private repository. At any particular time team members may be developing or experimenting with program features that are not yet ready for distribution or general use.
+
+## Building from Source
+Source code for WSJT-X, MAP65, and QMAP together amounts to more than 130,000 lines of C++, 75,000 lines of Fortran, and 18,000 lines of C. User interfaces use the Qt framework and are mostly written in C++, while signal processing and message encoding/decoding are done in Fortran. Required external libraries include FFTW3, Boost, libUSB, and Hamlib. The applications and related utility programs are multi-platform and can be built and used on the Windows, macOS, and Linux. We use CMake and Qt5, and we build Hamlib locally before building WSJT-X.
+
+### Prerequisites
+
+**All platforms:**
+- CMake 3.16+
+- Qt 5.12+ (Core, Widgets, Multimedia, SerialPort, Network, Sql, LinguistTools)
+- FFTW 3 (single precision — `libfftw3f`)
+- Boost C++ libraries
+- Compilers for C++ and FORTRAN, typically gcc and gfortran
+- Git
+
+**Linux (Debian/Ubuntu):**
+```
+sudo apt install build-essential cmake gfortran \
+ qtbase5-dev qttools5-dev qtmultimedia5-dev libqt5serialport5-dev \
+ libfftw3-dev libboost-all-dev libusb-1.0-0-dev libudev-dev \
+ autoconf automake libtool pkg-config texinfo
+```
+
+**macOS:**
+```
+brew install cmake gcc qt@5 fftw boost libusb autoconf automake libtool pkg-config texinfo
+```
+Xcode command-line tools are also required (`xcode-select --install`).
+
+**Windows:**
+Windows builds use the [Hamlib SDK](https://sourceforge.net/projects/hamlib-sdk/), which provides all prerequisite libraries and MinGW tooling. See the INSTALL file for detailed Windows instructions.
+
+### First Step: Build Hamlib
+
+WSJT-X requires a specific Hamlib version. Check `ci.yml` in `.github/workflows/` for the current `hamlib_branch` value — this is what CI builds against and what your local build should match.
+
+```bash
+# Replace HAMLIB_BRANCH with the current value from ci.yml (e.g., "4.7.1"):
+HAMLIB_BRANCH="4.7.1"
+
+mkdir -p ~/hamlib-prefix/build
+cd ~/hamlib-prefix
+git clone https://github.com/Hamlib/Hamlib src
+cd src
+git checkout $HAMLIB_BRANCH
+./bootstrap
+mkdir ../build && cd ../build
+../src/configure --prefix=$HOME/hamlib-prefix \
+ --disable-shared --enable-static \
+ --without-cxx-binding --disable-winradio \
+ CFLAGS="-g -O2 -fdata-sections -ffunction-sections" \
+ LDFLAGS="-Wl,--gc-sections"
+make
+make install-strip
+```
+
+### Building WSJT-X
+
+Fork the public repo:
+```bash
+git clone https://github.com/YOUR_USERNAME/wsjtx.git ~/wsjtx-prefix/src
+cd ~/wsjtx-prefix/src
+git remote add upstream https://github.com/WSJTX/wsjtx.git
+```
+
+Then build:
+```bash
+mkdir -p ~/wsjtx-prefix/build && cd ~/wsjtx-prefix/build
+cmake -DCMAKE_PREFIX_PATH="$HOME/hamlib-prefix" ../src
+cmake --build .
+```
+
+On macOS, add Qt5 and other Homebrew paths to `CMAKE_PREFIX_PATH`:
+```bash
+cmake -DCMAKE_PREFIX_PATH="$HOME/hamlib-prefix;$(brew --prefix qt@5);$(brew --prefix fftw);$(brew --prefix boost)" \
+ -DCMAKE_Fortran_COMPILER=$(brew --prefix gcc)/bin/gfortran ../src
+```
+
+### Updating and Rebuilding
+
+```bash
+# Update Hamlib
+cd ~/hamlib-prefix/src && git pull
+cd ~/hamlib-prefix/build && make && make install-strip
+
+# Update WSJT-X
+cd ~/wsjtx-prefix/src && git pull
+cd ~/wsjtx-prefix/build && cmake --build .
+```
+## Bug Reports
+
+Users and external contributors should file bug reports as Issues on the [public repo](https://github.com/WSJTX/wsjtx/issues). A team member will forward the Issue to `wsjtx-internal` if triage reveals development work to be done.
+
+When filing an Issue, please include:
+
+- WSJT-X version and operating system
+- Steps to reproduce
+- Expected vs. actual behavior
+- Relevant log output or screenshots
+
+## Pull Requests
+
+### Basic steps for external contributors
+
+1. Fork `WSJTX/wsjtx` on GitHub.
+
+2. Create a branch, make your changes, push to your fork.
+
+3. Open a PR from your fork to `WSJTX/wsjtx` targeting `master`.
+
+4. A team member reviews the PR. If accepted, they port the change to wsjtx-internal where it enters the normal development flow and CI validation.
+
+5. The change reaches the public repo at the next tagged release.
+
+This indirection exists because the public repo only receives code at release time. Merging directly to `master` would put it out of sync with internal development.
+
+### General guidelines
+
+- **One PR per logical change.** Don't bundle unrelated fixes.
+- **Test your changes.** Build on your platform and verify the application runs. If your change affects decoding, test with known `.wav` files.
+- **Include in the PR description:** what the change does, why, which platforms you tested on, and related issue numbers.
+- **Be patient.** The core developers are volunteers with other commitments. PRs may take days or weeks to review.
+
+### Coding Conventions
+
+- **C++:** Qt-style naming. Classes use `PascalCase`, methods use `camelCase`. Header guards use `FILENAME_HPP_` format.
+- **Fortran:** Traditional Fortran style. Signal processing and codec code lives in `lib/`.
+- **Indentation:** 2 spaces in C++, standard Fortran indentation in `.f90` files.
+- **Comments:** Descriptive block comments above classes and functions. Inline comments where logic is non-obvious.
+- **License:** All source files are GPL-3.0. New files should include the appropriate license header.
+
diff --git a/Configuration.cpp b/Configuration.cpp index f56139c5..185b3e4b 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1771,7 +1771,7 @@ Configuration::impl::impl (Configuration * self, QNetworkAccessManager * network , temp_dir_ {temp_directory} , writeable_data_dir_ {QStandardPaths::writableLocation (QStandardPaths::DataLocation)} , lotw_users_ {network_manager_} - , cloudlog_ {self, network_manager_} + , cloudlog_ {self} , restart_sound_input_device_ {false} , restart_sound_output_device_ {false} , restart_tci_device_ {false} diff --git a/Darwin/Info.plist.in b/Darwin/Info.plist.in index d2e943fe..0a1345b0 100644 --- a/Darwin/Info.plist.in +++ b/Darwin/Info.plist.in @@ -40,5 +40,7 @@ <true/> <key>NSMicrophoneUsageDescription</key> <string>This app requires microphone access to receive signals.</string> + <key>UIDesignRequiresCompatibility</key> + <true/> </dict> </plist> diff --git a/Network/Cloudlog.cpp b/Network/Cloudlog.cpp index 531f171f..ea9ac395 100644 --- a/Network/Cloudlog.cpp +++ b/Network/Cloudlog.cpp @@ -39,10 +39,10 @@ class Cloudlog::impl final Q_OBJECT public: - impl (Cloudlog * self, Configuration const * config, QNetworkAccessManager * network_manager) + impl (Cloudlog * self, Configuration const * config) : self_ {self} , config_ {config} - , network_manager_ {network_manager} + , network_manager_ {new QNetworkAccessManager(this)} { } @@ -70,7 +70,7 @@ public: void testApi (QString const& url, QString const& apiKey) { - QString apiUrl = url; + QString apiUrl = url.trimmed(); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) if (QNetworkAccessManager::Accessible != network_manager_->networkAccessible ()) { @@ -81,11 +81,11 @@ public: // Remove trailing slash if given if (apiUrl.endsWith('/')) { - apiUrl.remove(-1, 1); + apiUrl.chop(1); } // Remove full path to API if given if (apiUrl.endsWith("/index.php/api/qso")) { - apiUrl.remove(-18, 18); + apiUrl.chop(QStringLiteral("/index.php/api/qso").size()); } QNetworkRequest request {apiUrl+"/index.php/api/auth/"+apiKey}; @@ -153,9 +153,10 @@ public: #include "Cloudlog.moc" -Cloudlog::Cloudlog (Configuration const * config, QNetworkAccessManager * network_manager, QObject * parent) +Cloudlog::Cloudlog (Configuration const * config, + QObject * parent) : QObject {parent} - , m_ {this, config, network_manager} + , m_ {this, config} { } diff --git a/Network/Cloudlog.hpp b/Network/Cloudlog.hpp index 750bb0aa..61bb7a0e 100644 --- a/Network/Cloudlog.hpp +++ b/Network/Cloudlog.hpp @@ -18,7 +18,7 @@ class Cloudlog final Q_OBJECT public: - explicit Cloudlog (Configuration const *, QNetworkAccessManager *, QObject * parent = 0); + explicit Cloudlog (Configuration const * config, QObject * parent = nullptr); ~Cloudlog (); void logQso(QByteArray ADIF); diff --git a/Network/eqsl.cpp b/Network/eqsl.cpp index 91bac2d4..0f8b15df 100644 --- a/Network/eqsl.cpp +++ b/Network/eqsl.cpp @@ -19,9 +19,9 @@ namespace // char const * const wsprNetUrl = "http://127.0.0.1/post?"; }; -EQSL::EQSL(QNetworkAccessManager * manager, QObject *parent) +EQSL::EQSL(QObject *parent) : QObject{parent} - , networkManager {manager} + , networkManager {new QNetworkAccessManager(this)} , uploadTimer {new QTimer {this}} , m_in_progress {false} { diff --git a/Network/eqsl.h b/Network/eqsl.h index 00eb51d8..47bcf5f0 100644 --- a/Network/eqsl.h +++ b/Network/eqsl.h @@ -18,7 +18,7 @@ class EQSL : public QObject Q_OBJECT; public: - explicit EQSL(QNetworkAccessManager *, QObject *parent = nullptr); + explicit EQSL(QObject *parent = nullptr); void upload(QString const& eqsl_username, QString const& eqsl_passwd, QString const& eqsl_nickname , QString const& call, QString const& mode , QDateTime const& QSO_date_on diff --git a/Network/wsprnet.cpp b/Network/wsprnet.cpp index 903c8236..14dce13d 100644 --- a/Network/wsprnet.cpp +++ b/Network/wsprnet.cpp @@ -61,12 +61,11 @@ with app.test_request_context (): QRegularExpression wspr_re(R"(^(\d+)\s+(\d+)\s+(\d+)\s+([+-]?\d+)\s+([+-]?\d+\.\d+)\s+(\d+\.\d+)\s+([^ ].*[^ ])\s+([+-]?\d+)\s+([+-]?\d+)\s+([+-]?\d+))"); }; -WSPRNet::WSPRNet (QNetworkAccessManager * manager, QObject *parent) +WSPRNet::WSPRNet(QObject *parent) : QObject {parent} - , network_manager_ {manager} + , network_manager_ {new QNetworkAccessManager(this)} , spots_to_send_ {0} { - connect (network_manager_, &QNetworkAccessManager::finished, this, &WSPRNet::networkReply); connect (&upload_timer_, &QTimer::timeout, this, &WSPRNet::work); } @@ -326,7 +325,9 @@ void WSPRNet::work() QNetworkRequest request (QUrl {wsprNetUrl}); request.setHeader (QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); auto const& spot = spot_queue_.dequeue (); - m_outstandingRequests << network_manager_->post (request, spot.query (QUrl::FullyEncoded).toUtf8 ()); + QNetworkReply *reply = network_manager_->post (request, spot.query(QUrl::FullyEncoded).toUtf8()); + connect (reply, &QNetworkReply::finished, this, [this, reply]() { networkReply(reply); }); + m_outstandingRequests << reply; Q_EMIT uploadStatus(QString {"Uploading Spot %1/%2"}.arg (spots_to_send_ - spot_queue_.size()).arg (spots_to_send_)); } else diff --git a/Network/wsprnet.h b/Network/wsprnet.h index a450d582..345f43fd 100644 --- a/Network/wsprnet.h +++ b/Network/wsprnet.h @@ -18,7 +18,7 @@ class WSPRNet : public QObject using SpotQueue = QQueue<QUrlQuery>; public: - explicit WSPRNet (QNetworkAccessManager *, QObject *parent = nullptr); + explicit WSPRNet (QObject *parent = nullptr); void upload (QString const& call, QString const& grid, QString const& rfreq, QString const& tfreq, QString const& mode, float TR_peirod, QString const& tpct, QString const& dbm, QString const& version, QString const& fileName); diff --git a/README.md b/README.md new file mode 100644 index 00000000..5fe1f554 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Weak Signal Communication Software + +## Programs +*WSJT-X*, *MAP65*, and *QMAP* are open-source, multi-platform programs designed for weak-signal digital communication by amateur radio. *WSJT-X* works with a standard SSB transceiver, while *MAP65* and *QMAP* use wideband SDR-style hardware. The programs are open source, free of charge, and licensed under the GNU General Public License. + +*WSJT-X* implements communication protocols or "modes" called **FST4**, **FST4W**, **FT4**, **FT8**, **JT4**, **JT9**, **JT65**, **MSK144**, **Q65**, **WSPR**, and **Echo**. The first nine modes were designed for making reliable, confirmed QSOs in a wide variety of weak-signal propagation circumstances. These modes use timed Transmit/Receive sequences of specific lengths, synchronized with UTC. **WSPR** mode is for probing potential propagation paths with low-power transmissions, and **Echo** mode is for detecting and measuring reflections of your own signals from the Moon. + +*MAP65* implements a wideband receiver for **JT65** and **Q65** signals, optimized for EME on the VHF/UHF bands. It can be used together with *Linrad* (by SM5BSZ) or with direct input from a soundcard, FUNcube Dongle, or similar hardware. The program decodes all **JT65** or **Q65** signals in a passband up to 90 kHz wide, producing a sorted band map of decoded callsigns. In a dual-polarization system, *MAP65* optimally matches the linear polarization angle of each signal, thereby eliminating problems with Faraday rotation and spatial polarization offsets. *MAP65* also handles T/R switching and generates suitable messages and audio waveforms for the selected mode. + +*QMAP* is similar to *MAP65* in providing wideband reception of signals over a full EME sub-band. It works cooperatively with *WSJT-X*, supporting the **Q65** mode in both 30-second and 60-second submodes. The *QMAP* + *WSJT-X* combination provides full rig control and Doppler compensation for the EME (Earth-Moon-Earth) path. + + +## Mode Details +**JT4**, **JT9**, and **JT65** use nearly identical message structure, efficient compression of messages for minimal QSOs, and 60-second T/R sequences. **JT4** and **JT65** were designed for EME on the VHF, UHF, and microwave bands, while **JT9** is optimized for the MF and HF bands. **JT9** is about 2 dB more sensitive than **JT65** while using less than 10% of the bandwidth. + +**FT4** and **FT8** use T/R cycles of only 7.5 and 15 s, respectively. They have become extremely popular for world-wide DXing on the HF bands. **MSK144** is designed for Meteor Scatter on the VHF bands. **Q65** offers submodes with T/R sequence lengths from 15 seconds to 5 minutes, and a wide range of tone spacings. Particular Q65 submodes are highly recommended for EME, ionospheric scatter, and other weak signal work on VHF, UHF, and microwave bands. These modes include message formats explicitly supporting nonstandard callsigns and some popular radio contests. + +**FST4** and **FST4W** are designed particularly for the LF and MF bands. On these bands their fundamental sensitivities are better than other *WSJT-X* modes with the same sequence lengths, approaching the theoretical limits for their rates of information throughput. **FST4** is optimized for two-way QSOs, while **FST4W** is for quasi-beacon transmissions of **WSPR**-style messages. **FST4** and **FST4W** do not require the strict, independent time synchronization and phase locking of modes like EbNaut.
\ No newline at end of file diff --git a/Release_Notes.txt b/Release_Notes.txt index f5dc1cee..dadfae3e 100644 --- a/Release_Notes.txt +++ b/Release_Notes.txt @@ -11,7 +11,36 @@ Copyright 2001 - 2026 by Joe Taylor, K1JT, and the WSJT Development Team - Release: WSJT-X 3.0.0 + Release: WSJT-X 3.0.1 + May 4, 2026 + ------------------------- + +WSJT-X 3.0.1 is a bug-fix release; installation packages include QMAP +but not MAP65. Code has the following changes since release 3.0.0: + + - In posts sent to PSKReporter, version 3.0.0 incorrectly identified + itself as "WSJT-X v3.0.0 i+". Corrected. + + - Uploads to CloudLog are re-enabled. + + - UI Compatibility mode is enabled for better display on macOS Tahoe. + + - A bug sometimes affecting CW transmissions in Echo mode has been + fixed. + + - A bug preventing callsign highlighting in some circumstances has + been fixed. + + - Corrected band limits for the 2.5 mm and 2 mm bands. + + - Correct faulty repositioning of SWR label in status bar, after a + mode switch. + + - Fix stale Band Activity decodes after enabling SuperFox while in + Hound mode (reported by AF8C). + + + Release: WSJT-X 3.0.0 April 8, 2026 ------------------------- diff --git a/doc/common/links.adoc b/doc/common/links.adoc index d1a1b00f..6fa989c0 100644 --- a/doc/common/links.adoc +++ b/doc/common/links.adoc @@ -58,7 +58,7 @@ d). Edit lines as needed. Keeping them in alphabetic order help see dupes. :devsvn: https://sourceforge.net/p/wsjt/wsjt/HEAD/tree/[Devel-SVN] :devrepo: https://sourceforge.net/p/wsjt/wsjtx/ci/master/tree/[SourceForge] :dimension4: http://www.thinkman.com/dimension4/[Thinking Man Software] -:download: https://sourceforge.net/projects/wsjt/files/wsjtx-{VERSION}/wsjtx.html[Download Page] +:downloads: https://wsjtx.github.io/wsjtx/downloads.html[WSJT Downloads Page] :dxatlas: http://www.dxatlas.com/[Afreet Software, Inc.] :dxlcommander: https://www.dxlabsuite.com/commander/[Commander] :dxlsuite: https://www.dxlabsuite.com/[DX Lab Suite] @@ -73,7 +73,7 @@ d). Edit lines as needed. Keeping them in alphabetic order help see dupes. :ft8_tips: https://www.g4ifb.com/FT8_Hinson_tips_for_HF_DXers.pdf[FT8 Operating Guide] :ft8_DXped: https://wsjt.sourceforge.io/FT8_DXpedition_Mode.pdf[FT8 DXpedition Mode] :gnu_gpl: https://www.gnu.org/licenses/gpl-3.0.txt[GNU General Public License] -:homepage: https://wsjt.sourceforge.io/index.html[WSJT Home Page] +:homepage: https://wsjtx.github.io/wsjtx/index.html[WSJT Home Page] :hrd: http://www.hrdsoftwarellc.com/[Ham Radio Deluxe] :jt4eme: https://sourceforge.net/projects/wsjt/files/wsjtx-{VERSION}/WSJT-X_1.6.0_for_JT4_v7.pdf[Using WSJT-X for JT4 EME Operation] :jt65protocol: https://sourceforge.net/projects/wsjt/files/wsjtx-{VERSION}/JT65.pdf[QEX] diff --git a/doc/user_guide/en/acknowledgements.adoc b/doc/user_guide/en/acknowledgements.adoc index 6dd81e8b..5986a42d 100644 --- a/doc/user_guide/en/acknowledgements.adoc +++ b/doc/user_guide/en/acknowledgements.adoc @@ -3,11 +3,11 @@ The _WSJT_ project was started by *K1JT* in 2001. Starting in 2005 it has been an Open Source project, and it has included the programs _WSJT_, _MAP65_, _WSPR_, _WSJT-X_, and _QMAP_. *G4WJS* (since 2013), -*K9AN* (2015), *IV3NWV* (2016), *DG2YCB* (2021), *N9ADG* (2022), -*G4KLA* (2024), *DL3WDG* (2024), and *W3SZ* (2025) have made major -contributions to _WSJT-X_. Together with K1JT they now form the core -development team. *G4WJS* and *W9MDB* also made major contributions -to the _Hamlib_ library, on which _WSJT-X_ depends for rig control. +*K9AN* (2015), *IV3NWV* (2016), *DG2YCB* (2021-2026), *N9ADG* (2022), +*G4KLA* (2024), *DL3WDG* (2024), *W3SZ* (2025), and *KJ5HST* (2026) +have made major contributions to _WSJT-X_. *G4WJS* and *W9MDB* also +made major contributions to the _Hamlib_ library, on which _WSJT-X_ +depends for rig control. All code in the _WSJT_ project is licensed under the GNU Public License (GPL). Many users of these programs, too numerous to mention diff --git a/doc/user_guide/en/install-linux.adoc b/doc/user_guide/en/install-linux.adoc index 59d5c94d..05a015d6 100644 --- a/doc/user_guide/en/install-linux.adoc +++ b/doc/user_guide/en/install-linux.adoc @@ -1,34 +1,21 @@ -// Status=edited - -Debian, Ubuntu, and other Debian-based systems including Raspberry Pi OS: - -NOTE: Our binary installer packages are targeted for -one contemporary version of a Linux distribution. Although these may -work on newer Linux versions or even different distributions, it is -unlikely that they work on older versions. Check the notes provided -with the release for details of the targeted Linux distributions and -versions. If the binary package is not compatible with your Linux -distribution or version, you must build the application from sources. - -* 64-bit Intel/AMD: {debian64} -- To install: -+ -[example] -sudo dpkg -i wsjtx_{VERSION}_amd64.deb - -* 32-bit ARM hardware FP: {raspbian} -- To install: +You can use _WSJT-X_ on any 64-bit Linux system by downloading and +executing the appropriate "AppImage" file from the {downloads}. These +packages contain all required dependencies for use of _WSJT-X_, but +they do not provide access to _MAP65_, _QMAP_, or any of the related +utility programs. + +Complete installation packages are provided on the {downloads} for +64-bit Debian-based and RedHat-based Linux systems. Be sure to fetch +the package built for your machine's architecture: it will have +`x86_64` in the file name for Intel/AMD machines, `aarch64` for ARM. + +* To install on Debian-based Linux, for example Ubuntu 22.x or later, +execute the following command in a terminal: + [example] -sudo dpkg -i wsjtx_{VERSION}_armhf.deb +sudo dpkg -i <package-name> -* 64-bit ARM: {raspbian64} -- To install: -+ -[example] -sudo dpkg -i wsjtx_{VERSION}_arm64.deb - -* Uninstall for any of the above platforms: +* To uninstall: + [example] sudo dpkg -P wsjtx @@ -42,15 +29,12 @@ sudo apt install libgfortran5 libqt5widgets5 libqt5network5 \ libusb-1.0-0 libportaudio2 .... -Fedora, CentOS, Red Hat, and other rpm-based systems: - -* 64-bit: {fedora64} -- To install: +* To install on Fedora, CentOS, Red Hat, and other rpm-based systems: + [example] -sudo rpm -i wsjtx-{VERSION}-x86_64.rpm +sudo rpm -i <package-name> -* Uninstall: +* To uninstall: + [example] sudo rpm -e wsjtx diff --git a/doc/user_guide/en/install-mac.adoc b/doc/user_guide/en/install-mac.adoc index 6232e439..f661276c 100644 --- a/doc/user_guide/en/install-mac.adoc +++ b/doc/user_guide/en/install-mac.adoc @@ -1,10 +1,13 @@ -For *macOS 10.15* and later download support is provided for ARM64-bit Apple Silicon platforms as well as 64-bit Intel systems. - -For ARM64 download {osxarm} while for Intel platforms download {osx}. The dmg file should be downloaded to your Desktop. Double-click and consult the ReadMe file for important installation notes. +For *macOS 10.15* and later installers are provided for x86_64 (Intel) +systems and for ARM64 (Apple silicon) systems. Download the correct +package for your system from the {downloads}, double-click on the file +name, and follow the on-screen prompts in the Installer +app. Double-click and consult the `ReadMe` file for important +installation notes. If you have already installed a previous version, you can retain it by changing its name in the *Applications* folder (such as from _WSJT-X_ to -_WSJT-X_3.0_). You can then proceed to the installation phase. +_WSJT-X_2.7.0_). You can then proceed to the installation phase. Take note also of the following: diff --git a/doc/user_guide/en/install-windows.adoc b/doc/user_guide/en/install-windows.adoc index 7bb66f84..81e40642 100644 --- a/doc/user_guide/en/install-windows.adoc +++ b/doc/user_guide/en/install-windows.adoc @@ -1,18 +1,12 @@ // Status=edited -Download and execute the package file {win32} (Windows 7 or later, -32-bit) or {win64} (Windows 7 or later, 64-bit) following these -instructions: - -* Install _WSJT-X_ into its own directory, for example `C:\WSJTX` or `C:\WSJT\WSJTX`, rather than the conventional location `C:\Program - Files ...\WSJTX`. - -* All program files relating to _WSJT-X_ are stored in the chosen - installation directory and its subdirectories. - -* Logs and other writeable files are normally found in the - directory + - +For 64-bit Windows 10 and later: Download and execute the package file +{win64}. Install _WSJT-X_ into its own directory, for example +`C:\WSJTX` or `C:\WSJT\WSJTX`, rather than the conventional location + +`C:\Program Files ...\WSJTX`. All program files relating to _WSJT-X_ +will be stored in the chosen installation directory and its +subdirectories. Logs and other writeable files are normally found in +the directory + `C:\Users\<username>\AppData\Local\WSJT-X`. TIP: Your computer may be configured so that this directory is @@ -20,8 +14,8 @@ TIP: Your computer may be configured so that this directory is alternative (shortcut) directory name is `"%LocalAppData%\WSJT-X\"`. -* The built-in Windows facility for time synchronization is usually - not adequate. We recommend the program _Meinberg NTP Client_: see +* The built-in Windows facility for time synchronization may + not be adequate. We recommend the program _Meinberg NTP Client_: see {ntpsetup} for downloading and installation instructions. Recent versions of Windows are now shipped with a more capable Internet time synchronization service that is suitable if configured diff --git a/doc/user_guide/en/introduction.adoc b/doc/user_guide/en/introduction.adoc index 5be46bb3..4bad7e74 100644 --- a/doc/user_guide/en/introduction.adoc +++ b/doc/user_guide/en/introduction.adoc @@ -10,9 +10,10 @@ Somerville, G4WJS, Steve Franke, K9AN, and Nico Palermo, IV3NWV, have been major contributors to development of _WSJT-X_ since 2013, 2015, and 2016, respectively. Bill Somerville died unexpectedly in December 2021; Uwe Risse, DG2YCB, joined the core development team soon -afterward, followed by Brian Moran, N9ADG in 2022, John Nelson, G4KLA -and Charlie Suckling, DL3WDG in 2024, and Roger Rehr, W3SZ, in -2025. Over the years many other hams have contributed to _WSJT-X_ +afterward and worked with us until February 2026. Brian Moran, N9ADG, +joined the team in 2022; John Nelson, G4KLA and Charlie Suckling, +DL3WDG in 2024; Roger Rehr, W3SZ, in 2025; and Terrell Deppe, KJ5HST, +in 2026. Over the years many other hams have contributed to _WSJT-X_ development in more limited ways. We are extremely grateful for all of these contributions. diff --git a/doc/user_guide/en/wsjtx-main.adoc b/doc/user_guide/en/wsjtx-main.adoc index 6963fb00..062d3c93 100644 --- a/doc/user_guide/en/wsjtx-main.adoc +++ b/doc/user_guide/en/wsjtx-main.adoc @@ -46,10 +46,8 @@ include::system-requirements.adoc[] [[INSTALL]] == Installation -Installation packages for released versions on Windows, Linux, and OS -X are found on the {homepage}. Click on the _WSJT-X_ link at the -left margin and select the appropriate package for your operating -system. +Installation packages for Windows, Linux, and macOS are found on the +{downloads}. [[INSTALL_WIN]] === Windows diff --git a/entitlements.plist b/entitlements.plist new file mode 100644 index 00000000..2449f8c0 --- /dev/null +++ b/entitlements.plist @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <!-- + Hardened-runtime exception required by an app that bundles its own + Qt frameworks (and other third-party dylibs). Without this, dyld + refuses to load any framework whose code-signing Team ID does not + match the main executable's. That blocks every Qt framework load + when the app is ad-hoc signed (each ad-hoc signature has its own + pseudo-Team-ID derived from the CDHash, so no two ad-hoc binaries + ever match) and would also block bundled Qt loads under a real + Developer ID signature unless the same Team ID had signed Qt + upstream — which it didn't. + + This is the standard entitlement set for any macOS app that ships + bundled non-system frameworks; notarization accepts it. + --> + <key>com.apple.security.cs.disable-library-validation</key> + <true/> + + <!-- + Microphone access. Required so jt9 receives audio from the input + device once hardened runtime is enabled. NSMicrophoneUsageDescription + in Info.plist makes macOS prompt the user; without this entitlement, + hardened runtime overrides the user's grant at the syscall level and + reads return silence (audio level reads 0 dB; jt9 then crashes + processing the all-zero buffer at end of receive cycle). + --> + <key>com.apple.security.device.audio-input</key> + <true/> + + <!-- + GCC nested-function trampoline support, required by jt9. gfortran + compiles Fortran internal procedures (and procedure pointers to + them) using GCC's nested-function extension; libgcc's + __gcc_nested_func_ptr_created allocates a small heap page and + calls mprotect(PROT_READ|PROT_EXEC) so the trampoline can + dispatch to the inner procedure with the right static-link frame. + Under hardened runtime on macOS, that mprotect is denied without + this entitlement, libgcc has no fallback, and jt9 calls abort() + the first time multimode_decoder_ exercises a procedure pointer + through a trampoline (i.e. on the first decode cycle, in every + jt9-decoded mode). + + Only jt9 in this bundle uses gfortran nested-fn pointers + (verified via `nm`); wsjtx and wsprd do not. Granting the + capability bundle-wide is harmless for binaries that do not + exercise it. Notarization accepts this entitlement; unlike + com.apple.security.cs.disable-executable-page-protection it + stays targeted to runtime-generated code. + --> + <key>com.apple.security.cs.allow-unsigned-executable-memory</key> + <true/> +</dict> +</plist> diff --git a/lib/gen_cw_wave.f90 b/lib/gen_cw_wave.f90 index 24ed0d3e..cf6d6d98 100644 --- a/lib/gen_cw_wave.f90 +++ b/lib/gen_cw_wave.f90 @@ -4,7 +4,7 @@ subroutine gen_cw_wave(message,ifreq,wave) parameter (NMAX=98304) !2.048*48000 character*(*) message - integer icw(200) !Encoded CW message bits + integer icw(250) !Encoded CW message bits real*4 z(NMAX) real*8 dt,twopi,phi,dphi,fsample,tdit,t real*4 wave(NMAX) !Generated waveform diff --git a/lib/jplsubs.f b/lib/jplsubs.f index 6dcd1c9b..f1438d93 100644 --- a/lib/jplsubs.f +++ b/lib/jplsubs.f @@ -533,7 +533,7 @@ C C+++++++++++++++++++++++++ C - SUBROUTINE SPLIT(TT,FR) + SUBROUTINE SPLIT_DP(TT,FR) C C+++++++++++++++++++++++++ C @@ -754,11 +754,11 @@ C ********** MAIN ENTRY POINT ********** IF(ET2(1) .EQ. 0.D0) RETURN S=ET2(1)-.5D0 - CALL SPLIT(S,PJD(1)) - CALL SPLIT(ET2(2),PJD(3)) + CALL SPLIT_DP(S,PJD(1)) + CALL SPLIT_DP(ET2(2),PJD(3)) PJD(1)=PJD(1)+PJD(3)+.5D0 PJD(2)=PJD(2)+PJD(4) - CALL SPLIT(PJD(2),PJD(3)) + CALL SPLIT_DP(PJD(2),PJD(3)) PJD(1)=PJD(1)+PJD(3) C ERROR RETURN FOR EPOCH OUT OF RANGE diff --git a/lib/q65_decode.f90 b/lib/q65_decode.f90 index 64ae6ff5..5c9b0237 100644 --- a/lib/q65_decode.f90 +++ b/lib/q65_decode.f90 @@ -254,8 +254,7 @@ contains endif enddo ! ipass - !if(iand(ndepth,16).eq.0 .or. navg(iseq).lt.2) go to 100 - if(navg(iseq).lt.2) go to 100 + if(iand(ndepth,16).eq.0 .or. navg(iseq).lt.2) go to 100 ! There was no single-transmission decode. Try for an average 'q3n' decode. 50 iavg=1 diff --git a/lib/qra/q65/q65.f90 b/lib/qra/q65/q65.f90 index ee5db714..d73ded61 100644 --- a/lib/qra/q65/q65.f90 +++ b/lib/qra/q65/q65.f90 @@ -144,22 +144,6 @@ subroutine q65_dec0(iavg,iwave,ntrperiod,nfqso,ntol,lclearave, & endif i0=nint(nfqso/df) !Target QSO frequency -! add AGC to restore average decodes -ii1 = max(1, i0-64) -ii2 = i0-65+LL - -call pctile(s1(ii1:ii2,1:jz), ii2-ii1+1*jz, 45, base) -s1 = s1 / base - -! Apply fast AGC to the symbol spectra - s1max=20.0 - do j=1,jz - smax = maxval(s1(ii1:ii2,j)) - if (smax.gt.s1max) s1(ii1:ii2,j) = s1(ii1:ii2,j) * s1max/smax -enddo - -! end add AGC to restore average decodes - dat4=0 if(ncw.gt.0 .and. iavg.le.1) then ! Try list decoding via "Deep Likelihood". diff --git a/models/Bands.cpp b/models/Bands.cpp index f6d79f2e..7cf4d3cb 100644 --- a/models/Bands.cpp +++ b/models/Bands.cpp @@ -44,8 +44,8 @@ namespace {"1.25cm",24000000000u, 24250000000u}, {"6mm", 47000000000u, 47200000000u}, {"4mm", 75500000000u, 81000000000u}, - {"2.5mm", 119980000000u,120020000000u}, - {"2mm", 142000000000u,149000000000u}, + {"2.5mm", 119980000000u,125020000000u}, + {"2mm", 133000000000u,149000000000u}, {"1mm", 241000000000u,250000000000u}, }; diff --git a/qmap/CMakeLists.txt b/qmap/CMakeLists.txt index d633245e..bd943589 100644 --- a/qmap/CMakeLists.txt +++ b/qmap/CMakeLists.txt @@ -56,10 +56,4 @@ if (WIN32) endif () file (WRITE \"\${_path}\" \".\${_separator}\\n\")" ) - - install ( - TARGETS qmap - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime - BUNDLE DESTINATION . COMPONENT runtime - ) endif () diff --git a/widgets/SplashScreen.cpp b/widgets/SplashScreen.cpp index 561733cc..827153dc 100644 --- a/widgets/SplashScreen.cpp +++ b/widgets/SplashScreen.cpp @@ -31,8 +31,6 @@ SplashScreen::SplashScreen () showMessage ("<h2>" + QString {"WSJT-X v" + QCoreApplication::applicationVersion() + " " + revision ()}.simplified () + "</h2>" - "V2.0 has many new features.<br /><br />" - "The release notes have more details.<br /><br />" "Send issue reports to https://wsjtx.groups.io, and be sure to save .wav<br />" "files where appropriate.<br /><br />" "<b>Open the Help menu and select Release Notes for more details.</b><br />" diff --git a/widgets/about.cpp b/widgets/about.cpp index e9b9edce..59400929 100644 --- a/widgets/about.cpp +++ b/widgets/about.cpp @@ -22,8 +22,8 @@ CAboutDlg::CAboutDlg(QWidget *parent) : "© 2001-2026 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />" "Steve Franke, K9AN, Nico Palermo, IV3NWV, <br />" "Uwe Risse, DG2YCB, Brian Moran, N9ADG, <br />" - "Roger Rehr, W3SZ, John Nelson, G4KLA, and <br />" - "Charlie Suckling, DL3WDG.<br /><br />" + "Roger Rehr, W3SZ, John Nelson, G4KLA, <br />" + "Charlie Suckling, DL3WDG, and Terrell Deppe, KJ5HST <br /><br />" "We gratefully acknowledge contributions from AC6SL, AE4JY,<br />" "DF2ET, DJ0OT, DL3WDG, EA4AC, G4KLA, IW3RAB, JA7UDE,<br />" "K3WYC, KA1GT, KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KG4IYS, KI7MT,<br />" diff --git a/widgets/about_wsjtx.cpp b/widgets/about_wsjtx.cpp deleted file mode 100644 index 17abd51d..00000000 --- a/widgets/about_wsjtx.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "about.h" - -#include <QCoreApplication> -#include <QString> - -#include "revision_utils.hpp" - -#include "ui_about.h" - -CAboutDlg::CAboutDlg(QWidget *parent) : - QDialog(parent), - ui(new Ui::CAboutDlg) -{ - ui->setupUi(this); - - ui->labelTxt->setText ("<h2>" + QString {"WSJT-X v" - + QCoreApplication::applicationVersion () - + " " + revision ()}.simplified () + "</h2>" - - "WSJT-X implements a number of digital modes designed for <br />" - "weak-signal Amateur Radio communication. <br /><br />" - "© 2001-2025 by Joe Taylor, K1JT, Bill Somerville, G4WJS, <br />" - "Steve Franke, K9AN, Nico Palermo, IV3NWV, <br />" - "Uwe Risse, DG2YCB, Brian Moran, N9ADG, <br />" - "and Roger Rehr, W3SZ.<br /><br />" - "We gratefully acknowledge contributions from AC6SL, AE4JY,<br />" - "DF2ET, DJ0OT, DL3WDG, EA4AC, G4KLA, IW3RAB, JA7UDE,<br />" - "K3WYC, KA1GT, KA6MAL, KA9Q, KB1ZMX, KD6EKQ, KG4IYS, KI7MT,<br />" - "KK1D, ND0B, PY1ZRJ, PY2SDR, VE1SKY, VK3ACF, VK4BDJ,<br />" - "VK7MO, VR2UPU, W3DJS, W4TI, W4TV, and W9MDB.<br /><br />" - "WSJT-X is licensed under the terms of Version 3 <br />" - "of the GNU General Public License (GPL) <br /><br />" - "<a href=" TO_STRING__ (PROJECT_HOMEPAGE) ">" - "<img src=\":/icon_128x128.png\" /></a>" - "<a href=\"https://www.gnu.org/licenses/gpl-3.0.txt\">" - "<img src=\":/gpl-v3-logo.svg\" height=\"80\" /><br />" - "https://www.gnu.org/licenses/gpl-3.0.txt</a>"); -} - -CAboutDlg::~CAboutDlg() -{ -} diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 1e2f6423..2494928a 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -823,7 +823,6 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_period_only) { auto regexp = callsign; - last_period_only = true; // highlight last period only because it is faster and more robust if (!callsign.size () || callsign == "" || callsign == " " || callsign == "0") { return; diff --git a/widgets/logqso.ui b/widgets/logqso.ui index 90fb0889..aed6929a 100644 --- a/widgets/logqso.ui +++ b/widgets/logqso.ui @@ -629,6 +629,22 @@ <tabstop>rcvd</tabstop> <tabstop>grid</tabstop> <tabstop>name</tabstop> + <tabstop>txPower</tabstop> + <tabstop>cbTxPower</tabstop> + <tabstop>comments</tabstop> + <tabstop>addButton</tabstop> + <tabstop>cbComments</tabstop> + <tabstop>loggedOperator</tabstop> + <tabstop>exchSent</tabstop> + <tabstop>exchRcvd</tabstop> + <tabstop>comboBoxPropMode</tabstop> + <tabstop>cbPropMode</tabstop> + <tabstop>comboBoxSatellite</tabstop> + <tabstop>cbSatellite</tabstop> + <tabstop>comboBoxSatMode</tabstop> + <tabstop>cbSatMode</tabstop> + <tabstop>freqRx</tabstop> + <tabstop>cbFreqRx</tabstop> </tabstops> <resources/> <connections> diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b2c399ed..d58a98be 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -466,8 +466,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_onAirFreq0 {0.0}, m_first_error {true}, tx_status_label {tr ("Receiving")}, - wsprNet {new WSPRNet {&m_network_manager, this}}, - Eqsl {new EQSL {&m_network_manager, this}}, + wsprNet {new WSPRNet {this}}, + Eqsl {new EQSL {this}}, m_baseCall {Radio::base_callsign (m_config.my_callsign ())}, m_appDir {QApplication::applicationDirPath ()}, m_cqStr {""}, @@ -551,7 +551,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_config.udp_server_name (), m_config.udp_server_port (), m_config.udp_interface_names (), m_config.udp_TTL (), this}}, - m_psk_Reporter {&m_config, QString {"WSJT-X v" + version () + " i+"}.simplified ()}, // UR + m_psk_Reporter {&m_config, QString {"WSJT-X v" + version()}.simplified()}, m_manual {&m_network_manager}, m_block_udp_status_updates {false}, m_useDarkStyle {false} @@ -4425,7 +4425,7 @@ void MainWindow::setup_status_bar (bool vhf) band_hopping_label.setMinimumSize (QSize {80, 18}); } } else { - if (band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label); + if (!m_config.PWR_and_SWR () && band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label); } } @@ -4688,8 +4688,8 @@ void MainWindow::on_actionCopyright_Notice_triggered() "K1JT; Bill Somerville, G4WJS; Steven Franke, K9AN; Nico Palermo, " "IV3NWV; Greg Beam, KI7MT; Michael Black, W9MDB; Edson Pereira, PY2SDR; " "Philip Karn, KA9Q; Uwe Risse, DG2YCB; Brian Moran, N9ADG; Roger Rehr, " - "W3SZ; John Nelson, G4KLA; Charlie Suckling, DL3WDG; and other members " - "of the WSJT Development Group.\""); + "W3SZ; John Nelson, G4KLA; Charlie Suckling, DL3WDG; Terrell Deppe, " + "KJ5HST; and other members of the WSJT Development Group.\""); MessageBox::warning_message(this, message); } @@ -10940,7 +10940,16 @@ void MainWindow::on_actionFT8_triggered() QTimer::singleShot (50, [=] { if(m_specOp!=SpecOp::FOX) ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq_old",1500).toInt()); if(m_specOp==SpecOp::FOX && !m_config.superFox()) ui->TxFreqSpinBox->setValue(m_TxFreqFox); - if(SpecOp::HOUND == m_specOp && m_config.superFox()) clearDX(); + if(SpecOp::HOUND == m_specOp && m_config.superFox()) { + clearDX(); + // Stale F/H decodes left in the Band Activity / Rx Frequency windows + // can be double-clicked to re-prime Tx against a callsign that is no + // longer valid in SuperFox/Hound (where the target comes from the + // Active Stations widget via the $VERIFY$ flow). Erase them so the + // user-trap surface is gone. Reported by AF8C, 2026-05-03. + ui->decodedTextBrowser->erase (); + ui->decodedTextBrowser2->erase (); + } on_sbSubmode_valueChanged(ui->sbSubmode->value()); ui->cbHoldTxFreq->setChecked (HoldTxFreqStatus); }); @@ -12419,7 +12428,7 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& // Display PWR and SWR if(m_config.PWR_and_SWR()) { if (!band_hopping_label.isVisible ()) { - statusBar ()->addWidget (&band_hopping_label); + statusBar ()->addPermanentWidget (&band_hopping_label); band_hopping_label.setMinimumSize (QSize {80, 18}); band_hopping_label.show(); } diff --git a/wsjtx.exe.manifest b/wsjtx.exe.manifest new file mode 100644 index 00000000..c8b15ad4 --- /dev/null +++ b/wsjtx.exe.manifest @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<!-- + Windows application manifest declaring per-monitor V2 DPI awareness. + + Without this manifest, Windows treats wsjtx.exe as DPI-unaware and + applies legacy bitmap-stretching scaling on high-DPI displays — fonts + and widgets appear larger than the same source built locally with a + toolchain that auto-embeds a manifest (e.g. MSVC + Visual Studio). + + Both <dpiAware> (Win 7+) and <dpiAwareness> (Win 10 1607+) are needed + so the OS picks the strongest mode it understands. perMonitorV2 lets + Qt receive native pixel coordinates and DPI-change notifications, + matching Qt::AA_EnableHighDpiScaling at the OS level. +--> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <application xmlns="urn:schemas-microsoft-com:asm.v3"> + <windowsSettings> + <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware> + <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness> + </windowsSettings> + </application> +</assembly> |
