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}) qt5_wrap_ui (map65_GENUISRCS ${map65_UISRCS})
add_executable (map65 ${map65_CXXSRCS} ${map65_CSRCS} ${map65_GENUISRCS} map65.rc) 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 ( install (
CODE "file (TO_NATIVE_PATH \"/\" _separator) CODE "file (TO_NATIVE_PATH \"/\" _separator)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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