Collect version info macros in one header file

master
Jeremy Hu 2018-04-11 16:34:51 +08:00
parent 86afcd0e7e
commit 2d9f64ebc2
4 changed files with 15 additions and 8 deletions

View File

@ -11,11 +11,11 @@ QMAKE_TARGET_PRODUCT = Dust3D
QMAKE_TARGET_DESCRIPTION = "Aim to be a quick modeling tool for game development"
QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2018 Dust3D Project. All Rights Reserved."
DEFINES += "APP_NAME=\"\\\"$$QMAKE_TARGET_PRODUCT\\\"\""
DEFINES += "APP_VER=\"\\\"$$VERSION\\\"\""
DEFINES += "APP_HUMAN_VER=\"\\\"$$HUMAN_VERSION\\\"\""
DEFINES += "APP_REPOSITORY_URL=\"\\\"$$REPOSITORY_URL\\\"\""
DEFINES += "APP_ISSUES_URL=\"\\\"$$ISSUES_URL\\\"\""
DEFINES += "PROJECT_DEFINED_APP_NAME=\"\\\"$$QMAKE_TARGET_PRODUCT\\\"\""
DEFINES += "PROJECT_DEFINED_APP_VER=\"\\\"$$VERSION\\\"\""
DEFINES += "PROJECT_DEFINED_APP_HUMAN_VER=\"\\\"$$HUMAN_VERSION\\\"\""
DEFINES += "PROJECT_DEFINED_APP_REPOSITORY_URL=\"\\\"$$REPOSITORY_URL\\\"\""
DEFINES += "PROJECT_DEFINED_APP_ISSUES_URL=\"\\\"$$ISSUES_URL\\\"\""
include(thirdparty/QtAwesome/QtAwesome/QtAwesome.pri)
@ -83,6 +83,8 @@ HEADERS += src/logbrowserdialog.h
SOURCES += src/main.cpp
HEADERS += src/version.h
INCLUDEPATH += ../meshlite/include
LIBS += -L../meshlite/target/debug -lmeshlite
@ -98,4 +100,4 @@ INCLUDEPATH += /usr/local/opt/cgal/include
LIBS += -L/usr/local/opt/cgal/lib -lCGAL
target.path = ./
INSTALLS += target
INSTALLS += target

View File

@ -1,6 +1,7 @@
#include <QTextEdit>
#include <QVBoxLayout>
#include "aboutwidget.h"
#include "version.h"
AboutWidget::AboutWidget()
{

View File

@ -119,8 +119,11 @@ void MeshGenerator::resolveBoundingBox(QRectF *mainProfile, QRectF *sideProfile)
zRightFirstTime = false;
}
}
*mainProfile = QRectF(left, top, right - left, bottom - top);
*sideProfile = QRectF(zLeft, top, zRight - zLeft, bottom - top);
*mainProfile = QRectF(QPointF(left, top), QPointF(right, bottom));
*sideProfile = QRectF(QPointF(zLeft, top), QPointF(zRight, bottom));
qDebug() << "resolveBoundingBox left:" << left << "top:" << top << "right:" << right << "bottom:" << bottom << " zLeft:" << zLeft << "zRight:" << zRight;
qDebug() << "mainHeight:" << mainProfile->height() << "mainWidth:" << mainProfile->width();
qDebug() << "sideHeight:" << sideProfile->height() << "sideWidth:" << sideProfile->width();
}
void MeshGenerator::process()

View File

@ -24,6 +24,7 @@
#include "logbrowser.h"
#include "util.h"
#include "aboutwidget.h"
#include "version.h"
QPointer<LogBrowser> g_logBrowser;
std::set<SkeletonDocumentWindow *> g_documentWindows;