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
parent
46fe2fba96
commit
5bd401b03a
|
@ -4,6 +4,10 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dr-render-manual'
|
- 'dr-render-manual'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
@ -11,16 +15,18 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# The CMake configure and build commands are platform agnostic and should work equally
|
strategy:
|
||||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
fail-fast: true
|
||||||
# cross-platform coverage.
|
matrix:
|
||||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
os: [ubuntu-24.04, ubuntu-22.04]
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install LLVM/Clang >=20.0 (Required for RTSan)
|
- name: Install LLVM/Clang >=20.0 (Required for RTSan)
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
uses: MorganCaron/latest-clang-action@master
|
uses: MorganCaron/latest-clang-action@master
|
||||||
|
|
||||||
- name: Install rtkit for RT threading
|
- 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 sed -i 's/no/yes/g' /usr/share/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
|
||||||
sudo systemctl restart polkit
|
sudo systemctl restart polkit
|
||||||
|
|
||||||
- name: Install packages
|
- name: Install common packages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
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
|
- name: Spellcheck codebase
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
shell: bash
|
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`
|
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
|
- name: Execute unit tests
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
working-directory: ${{github.workspace}}/build_linux
|
working-directory: ${{github.workspace}}/build_linux
|
||||||
run: |
|
run: |
|
||||||
sudo systemctl enable rtkit-daemon
|
sudo systemctl enable rtkit-daemon
|
||||||
|
@ -88,6 +108,7 @@ jobs:
|
||||||
|
|
||||||
- name: Instrument AddressSanitizer
|
- name: Instrument AddressSanitizer
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
run: |
|
run: |
|
||||||
. ./rade-venv/bin/activate
|
. ./rade-venv/bin/activate
|
||||||
|
@ -95,6 +116,7 @@ jobs:
|
||||||
|
|
||||||
- name: Check for memory leaks
|
- name: Check for memory leaks
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
working-directory: ${{github.workspace}}/build_linux
|
working-directory: ${{github.workspace}}/build_linux
|
||||||
run: |
|
run: |
|
||||||
export DISPLAY=:99.0
|
export DISPLAY=:99.0
|
||||||
|
@ -104,6 +126,7 @@ jobs:
|
||||||
|
|
||||||
- name: Instrument RealtimeSanitizer
|
- name: Instrument RealtimeSanitizer
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
working-directory: ${{github.workspace}}
|
working-directory: ${{github.workspace}}
|
||||||
run: |
|
run: |
|
||||||
. ./rade-venv/bin/activate
|
. ./rade-venv/bin/activate
|
||||||
|
@ -111,6 +134,7 @@ jobs:
|
||||||
|
|
||||||
- name: Check for RT-unsafe function calls
|
- name: Check for RT-unsafe function calls
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ matrix.os == 'ubuntu-24.04' }}
|
||||||
working-directory: ${{github.workspace}}/build_linux
|
working-directory: ${{github.workspace}}/build_linux
|
||||||
run: |
|
run: |
|
||||||
export DISPLAY=:99.0
|
export DISPLAY=:99.0
|
||||||
|
|
|
@ -4,6 +4,10 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dr-render-manual'
|
- 'dr-render-manual'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
|
|
@ -4,6 +4,10 @@ on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'dr-render-manual'
|
- 'dr-render-manual'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
|
|
@ -795,6 +795,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
|
||||||
1. Bugfixes:
|
1. Bugfixes:
|
||||||
* Reduce latency when going between TX->RX with Hamlib configured. (PR #893)
|
* Reduce latency when going between TX->RX with Hamlib configured. (PR #893)
|
||||||
* Reduce usage of non-real time safe code. (PR #900)
|
* 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
|
## V2.0.0 June 2025
|
||||||
|
|
||||||
|
|
|
@ -1721,6 +1721,20 @@ wxDataViewItem FreeDVReporterDialog::FreeDVReporterDataModel::GetParent (const w
|
||||||
return wxDataViewItem(nullptr);
|
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
|
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_));
|
std::unique_lock<std::recursive_mutex> lk(const_cast<std::recursive_mutex&>(dataMtx_));
|
||||||
|
@ -2200,7 +2214,7 @@ void FreeDVReporterDialog::FreeDVReporterDataModel::onMessageUpdateFn_(std::stri
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
iter->second->userMessage = wxString::FromUTF8(message);
|
iter->second->userMessage = wxString::FromUTF8(message.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto lastUpdateTime = makeValidTime_(lastUpdate, iter->second->lastUpdateDate);
|
auto lastUpdateTime = makeValidTime_(lastUpdate, iter->second->lastUpdateDate);
|
||||||
|
|
|
@ -212,6 +212,11 @@ class FreeDVReporterDialog : public wxFrame
|
||||||
virtual bool IsContainer (const wxDataViewItem &item) const override;
|
virtual bool IsContainer (const wxDataViewItem &item) const override;
|
||||||
virtual bool SetValue (const wxVariant &variant, const wxDataViewItem &item, unsigned int col) 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:
|
private:
|
||||||
struct ReporterData
|
struct ReporterData
|
||||||
{
|
{
|
||||||
|
|
|
@ -221,7 +221,7 @@ void MainFrame::OnToolsOptions(wxCommandEvent& event)
|
||||||
|
|
||||||
// Update voice keyer file if different
|
// Update voice keyer file if different
|
||||||
wxFileName fullVKPath(wxGetApp().appConfiguration.voiceKeyerWaveFilePath, wxGetApp().appConfiguration.voiceKeyerWaveFile);
|
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.
|
// Clear filename to force reselection next time VK is triggered.
|
||||||
vkFileName_ = "";
|
vkFileName_ = "";
|
||||||
|
|
|
@ -218,7 +218,7 @@ int MainFrame::VoiceKeyerStartTx(void)
|
||||||
SNDFILE* tmpPlayFile = sf_open(vkFileName_.c_str(), SFM_READ, &sfInfo);
|
SNDFILE* tmpPlayFile = sf_open(vkFileName_.c_str(), SFM_READ, &sfInfo);
|
||||||
if(tmpPlayFile == NULL) {
|
if(tmpPlayFile == NULL) {
|
||||||
wxString strErr = sf_strerror(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;
|
next_state = VK_IDLE;
|
||||||
m_togBtnVoiceKeyer->SetBackgroundColour(wxNullColour);
|
m_togBtnVoiceKeyer->SetBackgroundColour(wxNullColour);
|
||||||
m_togBtnVoiceKeyer->SetValue(false);
|
m_togBtnVoiceKeyer->SetValue(false);
|
||||||
|
@ -237,7 +237,7 @@ int MainFrame::VoiceKeyerStartTx(void)
|
||||||
|
|
||||||
g_sfPlayFile = tmpPlayFile;
|
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_loopPlayFileToMicIn = false;
|
||||||
g_playFileToMicIn = true;
|
g_playFileToMicIn = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue