Fill in software information and set version to 0.0 for now

This commit is contained in:
Adam Honse 2020-02-29 13:45:43 -06:00
parent e10881db3e
commit 85b2545409
2 changed files with 20 additions and 0 deletions

View file

@ -5,6 +5,20 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = OpenRGB
TEMPLATE = app
VERSION = 0.0
win32:BUILDDATE = $$system(date /t)
unix:BUILDDATE = $$system(date -R)
GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse HEAD)
GIT_COMMIT_DATE = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ show -s --format=%ci HEAD)
GIT_BRANCH = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse --abbrev-ref HEAD)
DEFINES += \
VERSION_STRING=\\"\"\"$$VERSION\\"\"\" \
BUILDDATE_STRING=\\"\"\"$$BUILDDATE\\"\"\" \
GIT_COMMIT_ID=\\"\"\"$$GIT_COMMIT_ID\\"\"\" \
GIT_COMMIT_DATE=\\"\"\"$$GIT_COMMIT_DATE\\"\"\" \
GIT_BRANCH=\\"\"\"$$GIT_BRANCH\\"\"\"
RC_ICONS = qt/OpenRGB.ico
INCLUDEPATH += \

View file

@ -7,6 +7,12 @@ OpenRGBSoftwareInfoPage::OpenRGBSoftwareInfoPage(QWidget *parent) :
ui(new Ui::OpenRGBSoftwareInfoPageUi)
{
ui->setupUi(this);
ui->VersionValue->setText(VERSION_STRING);
ui->BuildDateValue->setText(BUILDDATE_STRING);
ui->GitCommitIDValue->setText(GIT_COMMIT_ID);
ui->GitCommitDateValue->setText(GIT_COMMIT_DATE);
ui->GitBranchValue->setText(GIT_BRANCH);
}
OpenRGBSoftwareInfoPage::~OpenRGBSoftwareInfoPage()