Tweak versioning reporting

pull/11/head
Geoffrey Merck 4 years ago
parent f016fc5b3b
commit eec293e147

@ -26,6 +26,7 @@
#include "Utils.h"
#include "Defs.h"
#include "Log.h"
#include "Version.h"
// #define DUMP_TX
@ -44,7 +45,7 @@ m_reconnectTimer(1000U),
m_tries(0U),
m_APRSReadCallback(NULL),
m_filter(""),
m_clientName("DStarGateway")
m_clientName(FULL_PRODUCT_NAME)
{
assert(!callsign.empty());
assert(!password.empty());
@ -249,7 +250,7 @@ bool CAPRSWriterThread::connect()
std::stringstream connectString;
connectString << "User " << m_username << "-" << m_ssid
<< " pass " << m_password
<< " vers " << (m_clientName.length() ? m_clientName : "DStarGateway")
<< " vers " << (!m_clientName.empty() ? m_clientName : FULL_PRODUCT_NAME)
<< filter;
//CLog::logInfo("Connect String : ") + connectString);
ret = m_socket.writeLine(connectString.str());

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
}
if ('-' == argv[1][0]) {
printf("\nDStarGateway Version %s (GitID #%.7s) Copyright (C) %s\n", VERSION.c_str(), gitversion, VENDOR_NAME.c_str());
printf("\n%s Copyright (C) %s\n", FULL_PRODUCT_NAME.c_str(), VENDOR_NAME.c_str());
printf("DStarGateway comes with ABSOLUTELY NO WARRANTY; see the LICENSE for details.\n");
printf("This is free software, and you are welcome to distribute it\nunder certain conditions that are discussed in the LICENSE file.\n\n");
return 0;
@ -91,7 +91,7 @@ void CDStarGatewayApp::run()
bool CDStarGatewayApp::createThread()
{
printf("\nDStarGateway Version %s (GitID #%.7s) Copyright (C) %s\n", VERSION.c_str(), gitversion, VENDOR_NAME.c_str());
printf("\n%s Copyright (C) %s\n", FULL_PRODUCT_NAME.c_str(), VENDOR_NAME.c_str());
printf("DStarGateway comes with ABSOLUTELY NO WARRANTY; see the LICENSE for details.\n");
printf("This is free software, and you are welcome to distribute it\nunder certain conditions that are discussed in the LICENSE file.\n\n");

@ -48,9 +48,13 @@ dstargateway : GitVersion.h $(OBJS)
GitVersion.h : FORCE
ifneq ("$(wildcard .git/index)","")
@echo "#pragma once\nconst char *gitversion = \"$(shell git rev-parse HEAD)\";" > /tmp/$@
@echo "#pragma once" > /tmp/$@
@echo "#include <string>" >> /tmp/$@
@echo "const std::string gitversion(\"$(shell git rev-parse --short HEAD)\");" >> /tmp/$@
else
@echo "#pragma once\nconst char *gitversion = \"0000000000000000000000000000000000000000\";" > /tmp/$@
@echo "#pragma once" > /tmp/$@
@echo "#include <string>" >> /tmp/$@
@echo "const std::string gitversion(\"0000000\");" >> /tmp/$@
endif
@cmp -s /tmp/$@ $@; \
RETVAL=$$?; \

@ -22,5 +22,10 @@
#include <string>
const std::string VENDOR_NAME("Geoffrey Merck F4FXL / KC3FRA");
#include "GitVersion.h"
const std::string PRODUCT_NAME("DStarGateway");
const std::string VENDOR_NAME("Geoffrey Merck F4FXL / KC3FRA and Contributors");
const std::string VERSION("0.4");
const std::string FULL_PRODUCT_NAME = PRODUCT_NAME + " v" + VERSION + "-" + gitversion;
const std::string SHORT_PRODUCT_NAME = "DStarGW v" + VERSION + "-" + gitversion;

@ -45,13 +45,13 @@ m_out(0U)
m_data = new CAMBEData*[NUM_FRAMES];
char vstr[32];
snprintf(vstr, 32, "DStar GW - %s", VERSION.substr(0, 8).c_str());
auto vstr = SHORT_PRODUCT_NAME;
vstr.resize(NUM_FRAMES, ' ');
CLog::logInfo("Version text set to \"%s\"\n", vstr);
CSlowDataEncoder encoder;
encoder.setTextData(std::string(vstr));
encoder.setTextData(vstr);
// Seq No and end
for (unsigned int i = 0U; i < NUM_FRAMES; i++) {

Loading…
Cancel
Save

Powered by TurnKey Linux.