Fix compiler errors when using wxWidgets 3.0. (#914)

* Fix compiler errors when using wxWidgets 3.0.

* Add GH action to make sure we can compile on Ubuntu 22.04.

* Fix package name.

* Add PR #914 to changelog.

* Ensure only one build per branch happens at a time.
pull/911/head^2
Mooneer Salem 2025-06-05 12:36:24 -07:00 committed by GitHub
parent 46fe2fba96
commit 5bd401b03a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 63 additions and 11 deletions

View File

@ -5,22 +5,28 @@ on:
branches-ignore:
- 'dr-render-manual'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install LLVM/Clang >=20.0 (Required for RTSan)
if: ${{ matrix.os == 'ubuntu-24.04' }}
uses: MorganCaron/latest-clang-action@master
- name: Install rtkit for RT threading
@ -32,12 +38,25 @@ jobs:
sudo sed -i 's/no/yes/g' /usr/share/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
sudo systemctl restart polkit
- name: Install packages
- name: Install common packages
shell: bash
run: |
sudo apt-get install codespell libpulse-dev libspeexdsp-dev libsamplerate0-dev sox git libwxgtk3.2-dev portaudio19-dev libhamlib-dev libasound2-dev libao-dev libgsm1-dev libsndfile-dev xvfb pipewire pulseaudio-utils pipewire-pulse wireplumber metacity at-spi2-core octave octave-signal
sudo apt-get install libpulse-dev libspeexdsp-dev libsamplerate0-dev sox git portaudio19-dev libhamlib-dev libasound2-dev libao-dev libgsm1-dev libsndfile-dev xvfb pipewire pulseaudio-utils pipewire-pulse wireplumber metacity at-spi2-core octave octave-signal
- name: Install version-specific packages
if: ${{ matrix.os == 'ubuntu-22.04' }}
shell: bash
run: |
sudo apt-get install libwxgtk3.0-gtk3-dev
- name: Install version-specific packages
if: ${{ matrix.os == 'ubuntu-24.04' }}
shell: bash
run: |
sudo apt-get install codespell libwxgtk3.2-dev
- name: Spellcheck codebase
if: ${{ matrix.os == 'ubuntu-24.04' }}
shell: bash
run: codespell --ignore-words-list=caf,radae,rade,inout,nin,ontop,parm,tthe,ue `find src -name '*.c*' -o -name '*.h' | grep -v 3rdparty`
@ -66,6 +85,7 @@ jobs:
- name: Execute unit tests
shell: bash
if: ${{ matrix.os == 'ubuntu-24.04' }}
working-directory: ${{github.workspace}}/build_linux
run: |
sudo systemctl enable rtkit-daemon
@ -88,6 +108,7 @@ jobs:
- name: Instrument AddressSanitizer
shell: bash
if: ${{ matrix.os == 'ubuntu-24.04' }}
working-directory: ${{github.workspace}}
run: |
. ./rade-venv/bin/activate
@ -95,6 +116,7 @@ jobs:
- name: Check for memory leaks
shell: bash
if: ${{ matrix.os == 'ubuntu-24.04' }}
working-directory: ${{github.workspace}}/build_linux
run: |
export DISPLAY=:99.0
@ -104,6 +126,7 @@ jobs:
- name: Instrument RealtimeSanitizer
shell: bash
if: ${{ matrix.os == 'ubuntu-24.04' }}
working-directory: ${{github.workspace}}
run: |
. ./rade-venv/bin/activate
@ -111,6 +134,7 @@ jobs:
- name: Check for RT-unsafe function calls
shell: bash
if: ${{ matrix.os == 'ubuntu-24.04' }}
working-directory: ${{github.workspace}}/build_linux
run: |
export DISPLAY=:99.0

View File

@ -5,6 +5,10 @@ on:
branches-ignore:
- 'dr-render-manual'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

View File

@ -5,6 +5,10 @@ on:
branches-ignore:
- 'dr-render-manual'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug

View File

@ -795,6 +795,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
1. Bugfixes:
* Reduce latency when going between TX->RX with Hamlib configured. (PR #893)
* Reduce usage of non-real time safe code. (PR #900)
* Fix compiler errors when using wxWidgets 3.0. (PR #914)
## V2.0.0 June 2025

View File

@ -1721,6 +1721,20 @@ wxDataViewItem FreeDVReporterDialog::FreeDVReporterDataModel::GetParent (const w
return wxDataViewItem(nullptr);
}
#if !wxCHECK_VERSION(3,2,0)
unsigned int FreeDVReporterDialog::FreeDVReporterDataModel::GetColumnCount () const
{
return RIGHTMOST_COL;
}
wxString FreeDVReporterDialog::FreeDVReporterDataModel::GetColumnType (unsigned int col) const
{
wxVariant tmp("");
return tmp.GetType();
}
#endif // !wxCHECK_VERSION(3,2,0)
void FreeDVReporterDialog::FreeDVReporterDataModel::GetValue (wxVariant &variant, const wxDataViewItem &item, unsigned int col) const
{
std::unique_lock<std::recursive_mutex> lk(const_cast<std::recursive_mutex&>(dataMtx_));
@ -2200,7 +2214,7 @@ void FreeDVReporterDialog::FreeDVReporterDataModel::onMessageUpdateFn_(std::stri
}
else
{
iter->second->userMessage = wxString::FromUTF8(message);
iter->second->userMessage = wxString::FromUTF8(message.c_str());
}
auto lastUpdateTime = makeValidTime_(lastUpdate, iter->second->lastUpdateDate);

View File

@ -212,6 +212,11 @@ class FreeDVReporterDialog : public wxFrame
virtual bool IsContainer (const wxDataViewItem &item) const override;
virtual bool SetValue (const wxVariant &variant, const wxDataViewItem &item, unsigned int col) override;
#if !wxCHECK_VERSION(3,2,0)
virtual unsigned int GetColumnCount () const override;
virtual wxString GetColumnType (unsigned int col) const override;
#endif // !wxCHECK_VERSION(3,2,0)
private:
struct ReporterData
{

View File

@ -221,7 +221,7 @@ void MainFrame::OnToolsOptions(wxCommandEvent& event)
// Update voice keyer file if different
wxFileName fullVKPath(wxGetApp().appConfiguration.voiceKeyerWaveFilePath, wxGetApp().appConfiguration.voiceKeyerWaveFile);
if (wxString::FromUTF8(vkFileName_) != fullVKPath.GetFullPath())
if (wxString::FromUTF8(vkFileName_.c_str()) != fullVKPath.GetFullPath())
{
// Clear filename to force reselection next time VK is triggered.
vkFileName_ = "";

View File

@ -218,7 +218,7 @@ int MainFrame::VoiceKeyerStartTx(void)
SNDFILE* tmpPlayFile = sf_open(vkFileName_.c_str(), SFM_READ, &sfInfo);
if(tmpPlayFile == NULL) {
wxString strErr = sf_strerror(NULL);
wxMessageBox(strErr, wxT("Couldn't open:") + wxString::FromUTF8(vkFileName_), wxOK);
wxMessageBox(strErr, wxT("Couldn't open:") + wxString::FromUTF8(vkFileName_.c_str()), wxOK);
next_state = VK_IDLE;
m_togBtnVoiceKeyer->SetBackgroundColour(wxNullColour);
m_togBtnVoiceKeyer->SetValue(false);
@ -237,7 +237,7 @@ int MainFrame::VoiceKeyerStartTx(void)
g_sfPlayFile = tmpPlayFile;
SetStatusText(wxT("Voice Keyer: Playing file ") + wxString::FromUTF8(vkFileName_) + wxT(" to mic input") , 0);
SetStatusText(wxT("Voice Keyer: Playing file ") + wxString::FromUTF8(vkFileName_.c_str()) + wxT(" to mic input") , 0);
g_loopPlayFileToMicIn = false;
g_playFileToMicIn = true;