Skip to content

Commit

Permalink
Add Version Information
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Reif committed Nov 11, 2017
1 parent 12f8ae7 commit 13c87ac
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(pfcrender)

# The project version number.
set(VERSION_MAJOR 0 CACHE STRING "Major version number.")
set(VERSION_MINOR 3 CACHE STRING "Minor version number.")
set(VERSION_MINOR 4 CACHE STRING "Minor version number.")
set(VERSION_PATCH 0 CACHE STRING "Patch version number.")
mark_as_advanced(VERSION_MAJOR VERSION_MINOR VERSION_PATCH)

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ set(INC

"QtGUI/PFCRender.h"

"projectinfo.h.in"
)

#TODO: Split SRC and INC by common and GUI
Expand Down
22 changes: 15 additions & 7 deletions src/PFCStart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "Model/LSYSModel.h"
#include "ViewModel/CustomGeometryModel.h"

#include "projectinfo.h"

int main(int argc, char** argv)
{
Plugins::Plugin_Registry* plugins = Plugins::Plugin_Registry::getInstance();
Expand All @@ -20,18 +22,24 @@ int main(int argc, char** argv)

//XXX: For now, let's not mess with CLI mode
#if 1
qmlRegisterType<ViewModel::CustomGeometryModel>("sci.pfcrender.customModel", 1, 0, "CustomGeometryModel");
QGuiApplication app(argc,argv);
#else
QCoreApplication app(argc,argv);
#endif
//Set Version Information
app.setApplicationVersion(VERSION_STRING);


QGuiApplication app(argc,argv);
QQmlApplicationEngine qeng(QUrl(QStringLiteral("qrc:///main.qml")));

//Register custom QML Types
qmlRegisterType<ViewModel::CustomGeometryModel>("sci.pfcrender.customModel", 1, 0, "CustomGeometryModel");


#if 1
QQmlApplicationEngine qeng(QUrl(QStringLiteral("qrc:///main.qml")));
QtGUI::PFCRender desktop_obj(&qeng);
#endif


return app.exec();
#else
QCoreApplication qapp(argc,argv);
return qapp.exec();
#endif
}

0 comments on commit 13c87ac

Please sign in to comment.