Use WSJT-X revision utilities to label the MAP65 revision

MAP65 still has  a private version number as set  in map65/main.c, but
the SCS revision automatically tracks the git SHA.
This commit is contained in:
Bill Somerville 2021-04-30 22:51:09 +01:00
parent 42318c9021
commit 039513e2cf
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
8 changed files with 32 additions and 33 deletions

View File

@ -48,7 +48,8 @@ add_subdirectory (libm65)
qt5_wrap_ui (map65_GENUISRCS ${map65_UISRCS})
add_executable (map65 ${map65_CXXSRCS} ${map65_CSRCS} ${map65_GENUISRCS} map65.rc)
target_link_libraries (map65 m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Portaudio::Portaudio Usb::Usb)
target_include_directories (map65 PRIVATE ${CMAKE_SOURCE_DIR})
target_link_libraries (map65 wsjt_qt m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Portaudio::Portaudio Usb::Usb)
install (
CODE "file (TO_NATIVE_PATH \"/\" _separator)

View File

@ -1,20 +1,20 @@
#include "about.h"
#include "revision_utils.hpp"
#include "ui_about.h"
CAboutDlg::CAboutDlg(QWidget *parent, QString Revision) :
CAboutDlg::CAboutDlg(QWidget *parent) :
QDialog(parent),
m_Revision(Revision),
ui(new Ui::CAboutDlg)
{
ui->setupUi(this);
ui->labelTxt->clear();
m_Str = "<html><h4>" + m_Revision + "</h4>\n\n";
m_Str += "MAP65 implements a wideband polarization-matching receiver <br>";
m_Str += "for the JT65 protocol, with a matching transmitting facility. <br>";
m_Str += "It is primarily intended for amateur radio EME communication. <br><br>";
m_Str += "Copyright 2001-2021 by Joe Taylor, K1JT. Additional <br>";
m_Str += "acknowledgments are contained in the source code. <br>";
ui->labelTxt->setText(m_Str);
ui->labelTxt->setText("<html><h4>" + QString {"MAP65 v"
+ QCoreApplication::applicationVersion ()
+ " " + revision ()}.simplified () + "</h4><br />"
"MAP65 implements a wideband polarization-matching receiver <br />"
"for the JT65 protocol, with a matching transmitting facility. <br />"
"It is primarily intended for amateur radio EME communication. <br /><br />"
"Copyright 2001-2021 by Joe Taylor, K1JT. Additional <br />"
"acknowledgments are contained in the source code.");
}
CAboutDlg::~CAboutDlg()

View File

@ -12,11 +12,10 @@ class CAboutDlg : public QDialog
Q_OBJECT
public:
explicit CAboutDlg(QWidget *parent=0, QString Revision="");
~CAboutDlg();
explicit CAboutDlg(QWidget *parent = nullptr);
~CAboutDlg();
private:
QString m_Revision;
Ui::CAboutDlg *ui;
QString m_Str;
};

View File

@ -22,19 +22,15 @@
<property name="windowTitle">
<string>About MAP65</string>
</property>
<widget class="QLabel" name="labelTxt">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>331</width>
<height>131</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labelTxt">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>

View File

@ -1,6 +1,6 @@
#include "bandmap.h"
#include "ui_bandmap.h"
#include "../qt_helpers.hpp"
#include "qt_helpers.hpp"
#include <QDebug>
BandMap::BandMap(QWidget *parent) :

View File

@ -5,6 +5,7 @@
#endif
#include <QApplication>
#include "revision_utils.hpp"
#include "mainwindow.h"
static QtMessageHandler default_message_handler;
@ -22,6 +23,9 @@ int main(int argc, char *argv[])
default_message_handler = qInstallMessageHandler (my_message_handler);
QApplication a {argc, argv};
// Override programs executable basename as application name.
a.setApplicationName ("MAP65");
a.setApplicationVersion ("3.0.0-devel");
MainWindow w;
w.show ();
return a.exec ();

View File

@ -1,5 +1,6 @@
//------------------------------------------------------------------ MainWindow
#include "mainwindow.h"
#include "revision_utils.hpp"
#include "ui_mainwindow.h"
#include "devsetup.h"
#include "plotter.h"
@ -32,8 +33,6 @@ BandMap* g_pBandMap = NULL;
TxTune* g_pTxTune = NULL;
QSharedMemory mem_m65("mem_m65");
QString Program_Title_Version=" MAP65 3.0.0-devel by K1JT, G4WJS, K9AN, and IV3NWV";
extern const int RxDataFrequency = 96000;
extern const int TxDataFrequency = 11025;
@ -92,7 +91,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->decodedTextBrowser,SIGNAL(selectCallsign(bool)),this,
SLOT(selectCall2(bool)));
setWindowTitle(Program_Title_Version);
setWindowTitle (program_title ());
connect(&soundInThread, SIGNAL(readyForFFT(int)),
this, SLOT(dataSink(int)));
@ -782,7 +781,7 @@ void MainWindow::on_actionBlue_triggered()
void MainWindow::on_actionAbout_triggered() //Display "About"
{
CAboutDlg dlg(this,Program_Title_Version);
CAboutDlg dlg(this);
dlg.exec();
}

View File

@ -1,7 +1,7 @@
#include "messages.h"
#include "ui_messages.h"
#include "mainwindow.h"
#include "../qt_helpers.hpp"
#include "qt_helpers.hpp"
Messages::Messages(QWidget *parent) :
QDialog(parent),