Skip to content

Commit

Permalink
Improve ability to build debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Kristoff committed Jul 12, 2017
1 parent c6da360 commit 997734c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
6 changes: 3 additions & 3 deletions digilent-agent.pro
Expand Up @@ -26,7 +26,8 @@ TEMPLATE = app
CONFIG += qt

CONFIG(debug, debug|release) {
#CONFIG+=console
DEFINES += AGENT_BUILD_NOTE=\\\"DEBUG\\\"
CONFIG+=console
}


Expand Down Expand Up @@ -78,8 +79,7 @@ DISTFILES += \
lib/digilent/qtSerial/LICENSE \
lib/digilent/qtSerial/README.md \
lib/digilent/pgm/.gitignore \
lib/digilent/pgm/LICENSE \
qt.conf
lib/digilent/pgm/LICENSE

OTHER_FILES +=

Expand Down
2 changes: 1 addition & 1 deletion installer/debug-build.txt
@@ -1 +1 @@
debug build 0.3.28
debug build 1.0.1
8 changes: 8 additions & 0 deletions src/core/agent.cpp
Expand Up @@ -20,6 +20,10 @@ Agent::Agent(QObject *parent) : QObject(parent)
this->minorVersion = 0;
this->patchVersion = 1;

#ifdef AGENT_BUILD_NOTE
this->buildNote = AGENT_BUILD_NOTE;
#endif

this->firmwareUploadStatus = "idle";

//Initialize devices array with null pointers
Expand Down Expand Up @@ -84,6 +88,10 @@ int Agent::getPatchVersion() {
return this->patchVersion;
}

QString Agent::getBuildNote() {
return this->buildNote;
}

bool Agent::launchWfl() {
//Todo - Launch Electron Version If It Exists

Expand Down
4 changes: 3 additions & 1 deletion src/core/agent.h
Expand Up @@ -30,6 +30,7 @@ class Agent : public QObject
int getMajorVersion();
int getMinorVersion();
int getPatchVersion();
QString getBuildNote();
QString getFirmwareUploadStatus();
int getFirmwareUploadProgress();
bool launchWfl();
Expand Down Expand Up @@ -59,7 +60,8 @@ public slots:
bool httpCapable;
int majorVersion;
int minorVersion;
int patchVersion;
int patchVersion;
QString buildNote;

QString firmwareUploadStatus;
DigilentPgm *pgm;
Expand Down
4 changes: 4 additions & 0 deletions src/mainWindow.cpp
Expand Up @@ -51,7 +51,11 @@ MainWindow::~MainWindow()

void MainWindow::createWindowActions()
{
#ifdef AGENT_BUILD_NOTE
versionAction = new QAction(QString("Agent Version: ") + QString(this->agent->getVersion()) + " - " + this->agent->getBuildNote(), this);
#else
versionAction = new QAction(QString("Agent Version: ") + QString(this->agent->getVersion()), this);
#endif
versionAction->setEnabled(false);

#ifdef _WIN32
Expand Down

0 comments on commit 997734c

Please sign in to comment.