Add build details to the version field

This commit is contained in:
woblight
2024-08-12 15:43:00 +02:00
parent 310f842365
commit 168a5bc87a
3 changed files with 27 additions and 4 deletions
+12 -1
View File
@@ -71,7 +71,18 @@ int main(int argc, char *argv[])
} else {
Control::instance()->init();
qmlRegisterUncreatableType<Addon>("GitAddonsManager.engine",1,0,"Addon","");
engine.rootContext()->setContextProperty("gitVersion", GIT_DESCRIBE);
engine.rootContext()->setContextProperty("gitVersion", QString("%1 (%2 %3)").arg(GIT_DESCRIBE)
#ifdef GAM_BUILD_NAME
.arg(GAM_BUILD_NAME)
#else
.arg(QSysInfo::productType())
#endif
#ifdef GAM_BANCH_NAME
.arg(GAM_BANCH_NAME)
#else
.arg(QSysInfo::buildCpuArchitecture())
#endif
);
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
}
if (engine.rootObjects().isEmpty())