diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfaa023 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/CubicSDR-a7e4d91.tar.gz diff --git a/0001-Revert-wxWidgets-3.1-usage.patch b/0001-Revert-wxWidgets-3.1-usage.patch new file mode 100644 index 0000000..9b94a02 --- /dev/null +++ b/0001-Revert-wxWidgets-3.1-usage.patch @@ -0,0 +1,598 @@ +From 8f6572a00bb6460ea1b0a18d163efe43344a6a4a Mon Sep 17 00:00:00 2001 +From: Matt Domsch +Date: Wed, 8 Aug 2018 11:18:13 -0500 +Subject: [PATCH] Revert wxWidgets 3.1 usage + +This reverst the wxWidgets changes from +e46d7f9735579d651664b6a1243d4b63a39bf109 +so that it can build on Fedora 28 with wxWidget 3.0. +--- + src/AppFrame.cpp | 8 ++++---- + src/CubicSDR.cpp | 15 +-------------- + src/CubicSDR.h | 3 --- + src/ui/UITestCanvas.cpp | 4 ++-- + src/ui/UITestCanvas.h | 2 +- + src/ui/UITestContext.cpp | 4 ++-- + src/ui/UITestContext.h | 2 +- + src/util/GLExt.cpp | 3 +-- + src/visual/GainCanvas.cpp | 4 ++-- + src/visual/GainCanvas.h | 2 +- + src/visual/InteractiveCanvas.cpp | 6 +++--- + src/visual/InteractiveCanvas.h | 2 +- + src/visual/MeterCanvas.cpp | 4 ++-- + src/visual/MeterCanvas.h | 2 +- + src/visual/MeterContext.cpp | 4 ++-- + src/visual/MeterContext.h | 2 +- + src/visual/ModeSelectorCanvas.cpp | 4 ++-- + src/visual/ModeSelectorCanvas.h | 2 +- + src/visual/ModeSelectorContext.cpp | 4 ++-- + src/visual/ModeSelectorContext.h | 2 +- + src/visual/PrimaryGLContext.cpp | 7 ++----- + src/visual/PrimaryGLContext.h | 2 +- + src/visual/ScopeCanvas.cpp | 4 ++-- + src/visual/ScopeCanvas.h | 2 +- + src/visual/ScopeContext.cpp | 4 ++-- + src/visual/ScopeContext.h | 2 +- + src/visual/SpectrumCanvas.cpp | 4 ++-- + src/visual/SpectrumCanvas.h | 2 +- + src/visual/TuningCanvas.cpp | 5 +++-- + src/visual/TuningCanvas.h | 2 +- + src/visual/TuningContext.cpp | 4 ++-- + src/visual/TuningContext.h | 2 +- + src/visual/WaterfallCanvas.cpp | 5 +++-- + src/visual/WaterfallCanvas.h | 2 +- + 34 files changed, 54 insertions(+), 72 deletions(-) + +diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp +index 0248d64..006e869 100644 +--- a/src/AppFrame.cpp ++++ b/src/AppFrame.cpp +@@ -88,10 +88,10 @@ AppFrame::AppFrame() : + wxBoxSizer *demodScopeTray = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *demodTunerTray = new wxBoxSizer(wxHORIZONTAL); + +- // OpenGL settings: +- //deprecated format: std::vector attribList = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 }; +- wxGLAttributes attribList; +- attribList.PlatformDefaults().RGBA().MinRGBA(8, 8, 8, 8).DoubleBuffer().EndList(); ++ std::vector attribList = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 }; ++ //wxGLAttributes attribList; ++ //attribList.PlatformDefaults().RGBA().DoubleBuffer().EndList(); ++ //attribList.PlatformDefaults().MinRGBA(8, 8, 8, 8).DoubleBuffer().Depth(16).EndList(); + + mainSplitter = new wxSplitterWindow( this, wxID_MAIN_SPLITTER, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH | wxSP_LIVE_UPDATE ); + mainSplitter->SetSashGravity(10.0f / 37.0f); +diff --git a/src/CubicSDR.cpp b/src/CubicSDR.cpp +index 1ec8034..659b155 100644 +--- a/src/CubicSDR.cpp ++++ b/src/CubicSDR.cpp +@@ -206,14 +206,6 @@ CubicSDR::CubicSDR() : frequency(0), offset(0), ppm(0), snap(1), sampleRate(DEFA + shuttingDown.store(false); + fdlgTarget = FrequencyDialog::FDIALOG_TARGET_DEFAULT; + stoppedDev = nullptr; +- +- //set OpenGL configuration: +- m_glContextAttributes = new wxGLContextAttrs(); +- +- wxGLContextAttrs glSettings; +- glSettings.PlatformDefaults().EndList(); +- +- *m_glContextAttributes = glSettings; + } + + bool CubicSDR::OnInit() { +@@ -503,18 +495,13 @@ int CubicSDR::OnExit() { + PrimaryGLContext& CubicSDR::GetContext(wxGLCanvas *canvas) { + PrimaryGLContext *glContext; + if (!m_glContext) { +- m_glContext = new PrimaryGLContext(canvas, NULL, GetContextAttributes()); ++ m_glContext = new PrimaryGLContext(canvas, NULL); + } + glContext = m_glContext; + + return *glContext; + } + +-wxGLContextAttrs* CubicSDR::GetContextAttributes() { +- +- return m_glContextAttributes; +-} +- + void CubicSDR::OnInitCmdLine(wxCmdLineParser& parser) { + parser.SetDesc (commandLineInfo); + parser.SetSwitchChars (wxT("-")); +diff --git a/src/CubicSDR.h b/src/CubicSDR.h +index 405d474..0897aa8 100644 +--- a/src/CubicSDR.h ++++ b/src/CubicSDR.h +@@ -71,7 +71,6 @@ public: + CubicSDR(); + + PrimaryGLContext &GetContext(wxGLCanvas *canvas); +- wxGLContextAttrs* GetContextAttributes(); + + virtual bool OnInit(); + virtual int OnExit(); +@@ -188,8 +187,6 @@ private: + AppFrame *appframe = nullptr; + AppConfig config; + PrimaryGLContext *m_glContext = nullptr; +- wxGLContextAttrs *m_glContextAttributes = nullptr; +- + std::vector *devs = nullptr; + + DemodulatorMgr demodMgr; +diff --git a/src/ui/UITestCanvas.cpp b/src/ui/UITestCanvas.cpp +index bce7471..9abe7df 100644 +--- a/src/ui/UITestCanvas.cpp ++++ b/src/ui/UITestCanvas.cpp +@@ -27,10 +27,10 @@ EVT_LEAVE_WINDOW(UITestCanvas::OnMouseLeftWindow) + EVT_ENTER_WINDOW(UITestCanvas::OnMouseEnterWindow) + wxEND_EVENT_TABLE() + +-UITestCanvas::UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++UITestCanvas::UITestCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs) { + +- glContext = new UITestContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new UITestContext(this, &wxGetApp().GetContext(this)); + } + + UITestCanvas::~UITestCanvas() { +diff --git a/src/ui/UITestCanvas.h b/src/ui/UITestCanvas.h +index 27c341e..631366a 100644 +--- a/src/ui/UITestCanvas.h ++++ b/src/ui/UITestCanvas.h +@@ -17,7 +17,7 @@ + + class UITestCanvas: public InteractiveCanvas { + public: +- UITestCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ UITestCanvas(wxWindow *parent, std::vector dispAttrs); + ~UITestCanvas(); + + private: +diff --git a/src/ui/UITestContext.cpp b/src/ui/UITestContext.cpp +index ac91d0e..e8cdd17 100644 +--- a/src/ui/UITestContext.cpp ++++ b/src/ui/UITestContext.cpp +@@ -5,8 +5,8 @@ + #include "UITestCanvas.h" + #include "ColorTheme.h" + +-UITestContext::UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) : +-PrimaryGLContext(canvas, sharedContext, ctxAttrs), testMeter("TEST",0,100,50) { ++UITestContext::UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext) : ++PrimaryGLContext(canvas, sharedContext), testMeter("TEST",0,100,50) { + + testPanel.setPosition(0.0, 0.0); + testPanel.setSize(1.0, 1.0); +diff --git a/src/ui/UITestContext.h b/src/ui/UITestContext.h +index e44b550..62ce4fa 100644 +--- a/src/ui/UITestContext.h ++++ b/src/ui/UITestContext.h +@@ -11,7 +11,7 @@ class UITestCanvas; + + class UITestContext: public PrimaryGLContext { + public: +- UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs); ++ UITestContext(UITestCanvas *canvas, wxGLContext *sharedContext); + + void DrawBegin(); + void Draw(); +diff --git a/src/util/GLExt.cpp b/src/util/GLExt.cpp +index 6349121..191fbdb 100644 +--- a/src/util/GLExt.cpp ++++ b/src/util/GLExt.cpp +@@ -46,8 +46,7 @@ void initGLExtensions() { + + #ifdef _WIN32 + if (GLExtSupported("WGL_EXT_swap_control")) { +- std::cout << "Initializing WGL swap control extensions.." << std::endl << std::flush; +- ++ std::cout << "Initializing WGL swap control extensions.." << std::endl; + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) wglGetProcAddress("wglSwapIntervalEXT"); + wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC) wglGetProcAddress("wglGetSwapIntervalEXT"); + +diff --git a/src/visual/GainCanvas.cpp b/src/visual/GainCanvas.cpp +index 8bebc74..70010cf 100644 +--- a/src/visual/GainCanvas.cpp ++++ b/src/visual/GainCanvas.cpp +@@ -29,10 +29,10 @@ EVT_ENTER_WINDOW(GainCanvas::OnMouseEnterWindow) + EVT_MOUSEWHEEL(GainCanvas::OnMouseWheelMoved) + wxEND_EVENT_TABLE() + +-GainCanvas::GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++GainCanvas::GainCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs) { + +- glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); + bgPanel.setCoordinateSystem(GLPanel::GLPANEL_Y_UP); + bgPanel.setFill(GLPanel::GLPANEL_FILL_GRAD_X); + +diff --git a/src/visual/GainCanvas.h b/src/visual/GainCanvas.h +index 251c8a2..323724b 100644 +--- a/src/visual/GainCanvas.h ++++ b/src/visual/GainCanvas.h +@@ -21,7 +21,7 @@ + + class GainCanvas: public InteractiveCanvas { + public: +- GainCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ GainCanvas(wxWindow *parent, std::vector dispAttrs); + ~GainCanvas(); + + void setHelpTip(std::string tip); +diff --git a/src/visual/InteractiveCanvas.cpp b/src/visual/InteractiveCanvas.cpp +index b33ea18..cfb9e85 100644 +--- a/src/visual/InteractiveCanvas.cpp ++++ b/src/visual/InteractiveCanvas.cpp +@@ -20,9 +20,9 @@ + + #include + +-InteractiveCanvas::InteractiveCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : +- wxGLCanvas(parent, dispAttrs, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE), +- parent(parent), shiftDown(false), altDown(false), ctrlDown(false), centerFreq(0), bandwidth(0), lastBandwidth(0), isView( ++InteractiveCanvas::InteractiveCanvas(wxWindow *parent, std::vector dispAttrs) : ++ wxGLCanvas(parent, wxID_ANY, dispAttrs.data(), wxDefaultPosition, wxDefaultSize, ++ wxFULL_REPAINT_ON_RESIZE), parent(parent), shiftDown(false), altDown(false), ctrlDown(false), centerFreq(0), bandwidth(0), lastBandwidth(0), isView( + false) { + mouseTracker.setTarget(this); + } +diff --git a/src/visual/InteractiveCanvas.h b/src/visual/InteractiveCanvas.h +index 14bd1e7..091a9f6 100644 +--- a/src/visual/InteractiveCanvas.h ++++ b/src/visual/InteractiveCanvas.h +@@ -12,7 +12,7 @@ + + class InteractiveCanvas: public wxGLCanvas { + public: +- InteractiveCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ InteractiveCanvas(wxWindow *parent, std::vector dispAttrs); + virtual ~InteractiveCanvas(); + + long long getFrequencyAt(float x); +diff --git a/src/visual/MeterCanvas.cpp b/src/visual/MeterCanvas.cpp +index d18dd78..d80b432 100644 +--- a/src/visual/MeterCanvas.cpp ++++ b/src/visual/MeterCanvas.cpp +@@ -30,10 +30,10 @@ EVT_LEAVE_WINDOW(MeterCanvas::OnMouseLeftWindow) + EVT_ENTER_WINDOW(MeterCanvas::OnMouseEnterWindow) + wxEND_EVENT_TABLE() + +-MeterCanvas::MeterCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++MeterCanvas::MeterCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs), level(0), level_min(0), level_max(1), inputValue(0), userInputValue(0), showUserInput(true) { + +- glContext = new MeterContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new MeterContext(this, &wxGetApp().GetContext(this)); + } + + MeterCanvas::~MeterCanvas() { +diff --git a/src/visual/MeterCanvas.h b/src/visual/MeterCanvas.h +index 1246d7d..9134d6e 100644 +--- a/src/visual/MeterCanvas.h ++++ b/src/visual/MeterCanvas.h +@@ -17,7 +17,7 @@ + + class MeterCanvas: public InteractiveCanvas { + public: +- MeterCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ MeterCanvas(wxWindow *parent, std::vector dispAttrs); + ~MeterCanvas(); + + void setLevel(float level_in); +diff --git a/src/visual/MeterContext.cpp b/src/visual/MeterContext.cpp +index 7e86ce7..4c33332 100644 +--- a/src/visual/MeterContext.cpp ++++ b/src/visual/MeterContext.cpp +@@ -5,8 +5,8 @@ + #include "MeterCanvas.h" + #include "ColorTheme.h" + +-MeterContext::MeterContext(MeterCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) : +- PrimaryGLContext(canvas, sharedContext, ctxAttrs) { ++MeterContext::MeterContext(MeterCanvas *canvas, wxGLContext *sharedContext) : ++ PrimaryGLContext(canvas, sharedContext) { + } + + void MeterContext::DrawBegin() { +diff --git a/src/visual/MeterContext.h b/src/visual/MeterContext.h +index e154135..789ebcd 100644 +--- a/src/visual/MeterContext.h ++++ b/src/visual/MeterContext.h +@@ -12,7 +12,7 @@ class MeterCanvas; + + class MeterContext: public PrimaryGLContext { + public: +- MeterContext(MeterCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs); ++ MeterContext(MeterCanvas *canvas, wxGLContext *sharedContext); + + void DrawBegin(); + void Draw(float r, float g, float b, float a, float level); +diff --git a/src/visual/ModeSelectorCanvas.cpp b/src/visual/ModeSelectorCanvas.cpp +index 56bafae..31c53ed 100644 +--- a/src/visual/ModeSelectorCanvas.cpp ++++ b/src/visual/ModeSelectorCanvas.cpp +@@ -27,10 +27,10 @@ EVT_LEAVE_WINDOW(ModeSelectorCanvas::OnMouseLeftWindow) + EVT_ENTER_WINDOW(ModeSelectorCanvas::OnMouseEnterWindow) + wxEND_EVENT_TABLE() + +-ModeSelectorCanvas::ModeSelectorCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++ModeSelectorCanvas::ModeSelectorCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs), numChoices(0), currentSelection(-1), toggleMode(false), inputChanged(false), padX(4.0), padY(4.0), highlightOverride(false) { + +- glContext = new ModeSelectorContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new ModeSelectorContext(this, &wxGetApp().GetContext(this)); + + highlightColor = RGBA4f(1.0,1.0,1.0,1.0); + } +diff --git a/src/visual/ModeSelectorCanvas.h b/src/visual/ModeSelectorCanvas.h +index 4fa0abd..3a0d588 100644 +--- a/src/visual/ModeSelectorCanvas.h ++++ b/src/visual/ModeSelectorCanvas.h +@@ -27,7 +27,7 @@ public: + + class ModeSelectorCanvas: public InteractiveCanvas { + public: +- ModeSelectorCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ ModeSelectorCanvas(wxWindow *parent, std::vector dispAttrs); + ~ModeSelectorCanvas(); + + int getHoveredSelection(); +diff --git a/src/visual/ModeSelectorContext.cpp b/src/visual/ModeSelectorContext.cpp +index 8eb0005..5ce3b08 100644 +--- a/src/visual/ModeSelectorContext.cpp ++++ b/src/visual/ModeSelectorContext.cpp +@@ -6,8 +6,8 @@ + #include "ColorTheme.h" + + +-ModeSelectorContext::ModeSelectorContext(ModeSelectorCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) : +- PrimaryGLContext(canvas, sharedContext, ctxAttrs) { ++ModeSelectorContext::ModeSelectorContext(ModeSelectorCanvas *canvas, wxGLContext *sharedContext) : ++ PrimaryGLContext(canvas, sharedContext) { + glDisable(GL_CULL_FACE); + glDisable(GL_DEPTH_TEST); + +diff --git a/src/visual/ModeSelectorContext.h b/src/visual/ModeSelectorContext.h +index 7576853..8daecc0 100644 +--- a/src/visual/ModeSelectorContext.h ++++ b/src/visual/ModeSelectorContext.h +@@ -12,7 +12,7 @@ class ModeSelectorCanvas; + + class ModeSelectorContext: public PrimaryGLContext { + public: +- ModeSelectorContext(ModeSelectorCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs); ++ ModeSelectorContext(ModeSelectorCanvas *canvas, wxGLContext *sharedContext); + + void DrawBegin(); + void DrawSelector(std::string label, int c, int cMax, bool on, float r, float g, float b, float a, float padx, float pady); +diff --git a/src/visual/PrimaryGLContext.cpp b/src/visual/PrimaryGLContext.cpp +index 6ff20c0..cd56408 100644 +--- a/src/visual/PrimaryGLContext.cpp ++++ b/src/visual/PrimaryGLContext.cpp +@@ -50,11 +50,8 @@ void PrimaryGLContext::CheckGLError() { + } + } + +-PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs* ctxAttrs) : +- wxGLContext(canvas, sharedContext, (const wxGLContextAttrs*) ctxAttrs), hoverAlpha(1.0) { +- +- +- ++PrimaryGLContext::PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext) : ++ wxGLContext(canvas, sharedContext), hoverAlpha(1.0) { + //#ifndef __linux__ + // SetCurrent(*canvas); + // // Pre-load fonts +diff --git a/src/visual/PrimaryGLContext.h b/src/visual/PrimaryGLContext.h +index fe3ae13..a799e75 100644 +--- a/src/visual/PrimaryGLContext.h ++++ b/src/visual/PrimaryGLContext.h +@@ -16,7 +16,7 @@ + + class PrimaryGLContext: public wxGLContext { + public: +- PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs* ctxAttrs); ++ PrimaryGLContext(wxGLCanvas *canvas, wxGLContext *sharedContext); + + static wxString glGetwxString(GLenum name); + static void CheckGLError(); +diff --git a/src/visual/ScopeCanvas.cpp b/src/visual/ScopeCanvas.cpp +index c751814..1f8fc80 100644 +--- a/src/visual/ScopeCanvas.cpp ++++ b/src/visual/ScopeCanvas.cpp +@@ -31,9 +31,9 @@ EVT_LEAVE_WINDOW(ScopeCanvas::OnMouseLeftWindow) + EVT_ENTER_WINDOW(ScopeCanvas::OnMouseEnterWindow) + wxEND_EVENT_TABLE() + +-ScopeCanvas::ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { ++ScopeCanvas::ScopeCanvas(wxWindow *parent, std::vector dispAttrs) : InteractiveCanvas(parent, dispAttrs), ppmMode(false), ctr(0), ctrTarget(0), dragAccel(0), helpTip("") { + +- glContext = new ScopeContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new ScopeContext(this, &wxGetApp().GetContext(this)); + inputData->set_max_num_items(2); + bgPanel.setFill(GLPanel::GLPANEL_FILL_GRAD_Y); + bgPanel.setSize(1.0, 0.5f); +diff --git a/src/visual/ScopeCanvas.h b/src/visual/ScopeCanvas.h +index 395f808..bf16eb9 100644 +--- a/src/visual/ScopeCanvas.h ++++ b/src/visual/ScopeCanvas.h +@@ -18,7 +18,7 @@ + + class ScopeCanvas: public InteractiveCanvas { + public: +- ScopeCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ ScopeCanvas(wxWindow *parent, std::vector dispAttrs); + ~ScopeCanvas(); + + //This is public because it is indeed forwarded from +diff --git a/src/visual/ScopeContext.cpp b/src/visual/ScopeContext.cpp +index 309fa48..f0b0a76 100644 +--- a/src/visual/ScopeContext.cpp ++++ b/src/visual/ScopeContext.cpp +@@ -6,8 +6,8 @@ + #include "ScopeCanvas.h" + #include "ColorTheme.h" + +-ScopeContext::ScopeContext(ScopeCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) : +- PrimaryGLContext(canvas, sharedContext, ctxAttrs) { ++ScopeContext::ScopeContext(ScopeCanvas *canvas, wxGLContext *sharedContext) : ++ PrimaryGLContext(canvas, sharedContext) { + glDisable (GL_CULL_FACE); + glDisable (GL_DEPTH_TEST); + +diff --git a/src/visual/ScopeContext.h b/src/visual/ScopeContext.h +index 1b0030c..b4860d9 100644 +--- a/src/visual/ScopeContext.h ++++ b/src/visual/ScopeContext.h +@@ -12,7 +12,7 @@ class ScopeCanvas; + + class ScopeContext: public PrimaryGLContext { + public: +- ScopeContext(ScopeCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs); ++ ScopeContext(ScopeCanvas *canvas, wxGLContext *sharedContext); + + void DrawBegin(bool clear=true); + void DrawTunerTitles(bool ppmMode=false); +diff --git a/src/visual/SpectrumCanvas.cpp b/src/visual/SpectrumCanvas.cpp +index 9fb7e23..78b0a1f 100644 +--- a/src/visual/SpectrumCanvas.cpp ++++ b/src/visual/SpectrumCanvas.cpp +@@ -32,10 +32,10 @@ EVT_RIGHT_DOWN(SpectrumCanvas::OnMouseRightDown) + EVT_RIGHT_UP(SpectrumCanvas::OnMouseRightReleased) + wxEND_EVENT_TABLE() + +-SpectrumCanvas::SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++SpectrumCanvas::SpectrumCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs), waterfallCanvas(NULL) { + +- glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); + + visualDataQueue->set_max_num_items(1); + +diff --git a/src/visual/SpectrumCanvas.h b/src/visual/SpectrumCanvas.h +index 2d63591..c88d66c 100644 +--- a/src/visual/SpectrumCanvas.h ++++ b/src/visual/SpectrumCanvas.h +@@ -17,7 +17,7 @@ class WaterfallCanvas; + + class SpectrumCanvas: public InteractiveCanvas { + public: +- SpectrumCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ SpectrumCanvas(wxWindow *parent, std::vector dispAttrs); + ~SpectrumCanvas(); + + //This is public because it is indeed forwarded from +diff --git a/src/visual/TuningCanvas.cpp b/src/visual/TuningCanvas.cpp +index b250238..66ebabe 100644 +--- a/src/visual/TuningCanvas.cpp ++++ b/src/visual/TuningCanvas.cpp +@@ -33,10 +33,10 @@ EVT_MOUSEWHEEL(TuningCanvas::OnMouseWheelMoved) + //EVT_KEY_UP(TuningCanvas::OnKeyUp) + wxEND_EVENT_TABLE() + +-TuningCanvas::TuningCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++TuningCanvas::TuningCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs), dragAccum(0), uxDown(0), top(false), bottom(false), freq(-1), bw(-1), center(-1), halfBand(false) { + +- glContext = new TuningContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new TuningContext(this, &wxGetApp().GetContext(this)); + + hoverIndex = 0; + downIndex = 0; +@@ -272,6 +272,7 @@ void TuningCanvas::OnIdle(wxIdleEvent &event) { + if (mouseTracker.mouseInView() || changed()) { + Refresh(); + } ++ event.RequestMore(); + } + + void TuningCanvas::OnMouseMoved(wxMouseEvent& event) { +diff --git a/src/visual/TuningCanvas.h b/src/visual/TuningCanvas.h +index 5a947be..708ddcf 100644 +--- a/src/visual/TuningCanvas.h ++++ b/src/visual/TuningCanvas.h +@@ -20,7 +20,7 @@ public: + enum ActiveState { + TUNING_HOVER_NONE, TUNING_HOVER_FREQ, TUNING_HOVER_BW, TUNING_HOVER_PPM, TUNING_HOVER_CENTER + }; +- TuningCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ TuningCanvas(wxWindow *parent, std::vector dispAttrs); + ~TuningCanvas(); + + void setHelpTip(std::string tip); +diff --git a/src/visual/TuningContext.cpp b/src/visual/TuningContext.cpp +index 5575c4e..3c06161 100644 +--- a/src/visual/TuningContext.cpp ++++ b/src/visual/TuningContext.cpp +@@ -18,8 +18,8 @@ protected: + } + }; + +-TuningContext::TuningContext(TuningCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs) : +- PrimaryGLContext(canvas, sharedContext, ctxAttrs) { ++TuningContext::TuningContext(TuningCanvas *canvas, wxGLContext *sharedContext) : ++ PrimaryGLContext(canvas, sharedContext) { + glDisable(GL_CULL_FACE); + glDisable(GL_DEPTH_TEST); + +diff --git a/src/visual/TuningContext.h b/src/visual/TuningContext.h +index 13b8eef..5f37e50 100644 +--- a/src/visual/TuningContext.h ++++ b/src/visual/TuningContext.h +@@ -12,7 +12,7 @@ class TuningCanvas; + + class TuningContext: public PrimaryGLContext { + public: +- TuningContext(TuningCanvas *canvas, wxGLContext *sharedContext, wxGLContextAttrs *ctxAttrs); ++ TuningContext(TuningCanvas *canvas, wxGLContext *sharedContext); + + void DrawBegin(); + void Draw(float r, float g, float b, float a, float p1, float p2); +diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp +index 515d3cf..8108a13 100644 +--- a/src/visual/WaterfallCanvas.cpp ++++ b/src/visual/WaterfallCanvas.cpp +@@ -39,11 +39,11 @@ EVT_ENTER_WINDOW(WaterfallCanvas::OnMouseEnterWindow) + EVT_MOUSEWHEEL(WaterfallCanvas::OnMouseWheelMoved) + wxEND_EVENT_TABLE() + +-WaterfallCanvas::WaterfallCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs) : ++WaterfallCanvas::WaterfallCanvas(wxWindow *parent, std::vector dispAttrs) : + InteractiveCanvas(parent, dispAttrs), dragState(WF_DRAG_NONE), nextDragState(WF_DRAG_NONE), fft_size(0), new_fft_size(0), waterfall_lines(0), + dragOfs(0), mouseZoom(1), zoom(1), freqMoving(false), freqMove(0.0), hoverAlpha(1.0) { + +- glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this), wxGetApp().GetContextAttributes()); ++ glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this)); + linesPerSecond = DEFAULT_WATERFALL_LPS; + lpsIndex = 0; + preBuf = false; +@@ -486,6 +486,7 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) { + void WaterfallCanvas::OnIdle(wxIdleEvent &event) { + processInputQueue(); + Refresh(); ++ event.RequestMore(); + } + + void WaterfallCanvas::updateHoverState() { +diff --git a/src/visual/WaterfallCanvas.h b/src/visual/WaterfallCanvas.h +index d7ba9de..21dea27 100644 +--- a/src/visual/WaterfallCanvas.h ++++ b/src/visual/WaterfallCanvas.h +@@ -21,7 +21,7 @@ public: + WF_DRAG_NONE, WF_DRAG_BANDWIDTH_LEFT, WF_DRAG_BANDWIDTH_RIGHT, WF_DRAG_FREQUENCY, WF_DRAG_RANGE + }; + +- WaterfallCanvas(wxWindow *parent, const wxGLAttributes& dispAttrs); ++ WaterfallCanvas(wxWindow *parent, std::vector dispAttrs); + void setup(unsigned int fft_size_in, int waterfall_lines_in); + void setFFTSize(unsigned int fft_size_in); + ~WaterfallCanvas(); +-- +2.17.0 + diff --git a/CubicSDR b/CubicSDR new file mode 100644 index 0000000..d0f6095 --- /dev/null +++ b/CubicSDR @@ -0,0 +1,2 @@ +#!/bin/sh +GDK_BACKEND=x11 /usr/bin/CubicSDR.bin diff --git a/CubicSDR.spec b/CubicSDR.spec new file mode 100644 index 0000000..2deb0ae --- /dev/null +++ b/CubicSDR.spec @@ -0,0 +1,68 @@ +%global commit a7e4d911e92a7063888528afe0efe321c02b9a7b +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global snapshotdate 20180806 +Name: CubicSDR +Version: 0.2.4 +Release: 4.%{snapshotdate}git%{shortcommit}%{?dist} +Summary: Cross-Platform Software-Defined Radio Panadapter + +# The primary license of CubicSDR is GPLv2+. +# There are multiple third party libraries bundled in the source of CubicSDR. +# external/loadpng/ and external/tinyxml/ use the zlib/libpng license +# external/rs232/, external/liquid-dsp/, src/util/DataTree* use the MIT/X11 (BSD like) license +# Note: external/hamlib/ and external/rtaudio/ are provided by the source, but at +# build and run time we use system-provided copies of these libraries +License: GPLv2+ and MIT and zlib +URL: https://cubicsdr.com +Source0: https://github.com/cjcliffe/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +Source1: CubicSDR +# Revert changes that require wxWidgets 3.1, as that's a prerelease +# version that is not in Fedora or EPEL. +Patch0: 0001-Revert-wxWidgets-3.1-usage.patch +# Upstream includes local copies of librs232 and tinyxml unfortunately. +# https://github.com/cjcliffe/CubicSDR/issues/670 +Provides: bundled(librs232) = 0.21 +Provides: bundled(tinyxml) = 2.6.2 +# Upstream includes local copy of lodepng not present in Fedora already +Provides: bundled(lodepng) = 20180809 +BuildRequires: cmake gcc-c++ SoapySDR-devel liquid-dsp-devel wxGTK3-devel hamlib-devel fftw-devel rtaudio-devel +BuildRequires: desktop-file-utils + +%description +Cross-Platform Software-Defined Radio Panadapter + +%prep +%autosetup -n %{name}-%{commit} -p1 + +%build +%cmake -Wno-dev -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=$(which wx-config) -DUSE_HAMLIB=1 -DUSE_SYSTEM_RTAUDIO=1 . +%make_build + + +%install +%make_install +desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop +mv %{buildroot}/%{_bindir}/CubicSDR %{buildroot}/%{_bindir}/CubicSDR.bin +install -m 0755 %{SOURCE1} %{buildroot}/%{_bindir}/CubicSDR + +%files +%license LICENSE +%{_bindir}/* +# Upstream includes local copies of Bitstream Vera fonts +# https://github.com/cjcliffe/CubicSDR/issues/669 +%dir %{_datadir}/cubicsdr +%{_datadir}/cubicsdr/* +%{_datadir}/applications/%{name}.desktop + +%changelog +* Tue Jan 28 2020 Fedora Release Engineering - 0.2.4-4.20180806gita7e4d91 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 0.2.4-3.20180806gita7e4d91 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 0.2.4-2.20180806gita7e4d91 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Aug 7 2018 Matt Domsch 0.2.4-1.20180806gita7e4d91 +- Initial Fedora packaging diff --git a/README.md b/README.md new file mode 100644 index 0000000..6764e4e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# CubicSDR + +The CubicSDR package \ No newline at end of file diff --git a/dead.package b/dead.package deleted file mode 100644 index fa06b8d..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -CubicSDR requires wxGTK 3.1 which is not available in Fedora nor will it be any time soon. The package may be reintroduced at a later date. diff --git a/sources b/sources new file mode 100644 index 0000000..e76a5e8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (CubicSDR-a7e4d91.tar.gz) = b2af88e13718ca8e7424983060283baf2eb8d9c999623a97f03737ea21109469f8c61f5e9285b26a46b68cb3d65fb1e2efdc6866be841c921a4858f4acd00b83