Add new full_web_node target

This will eventually run a full node complete with bundled web GUI
This commit is contained in:
Nathan Hourt 2015-08-12 11:10:40 -04:00
parent 96fb8f60c2
commit 8fc1ac736b
5 changed files with 73 additions and 0 deletions

View file

@ -7,3 +7,7 @@ set(BUILD_QT_GUI FALSE CACHE BOOL "Build the Qt-based light client GUI")
if(BUILD_QT_GUI)
add_subdirectory(light_client)
endif()
set(BUILD_WEB_NODE FALSE CACHE BOOL "Build the Qt-based full node with web GUI")
if(BUILD_WEB_NODE)
add_subdirectory(full_web_node)
endif()

View file

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 2.8.11)
project(full_web_node)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
#set(CMAKE_AUTOMOC ON)
find_package(Qt5Core)
find_package(Qt5Quick)
find_package(Qt5WebEngine)
file(GLOB QML qml/*)
qt5_add_resources(QML_QRC qml/qml.qrc)
add_executable(full_web_node main.cpp ${QML_QRC} ${QML})
target_link_libraries(full_web_node PRIVATE Qt5::Core Qt5::Quick Qt5::WebEngine graphene_chain graphene_egenesis_brief graphene_utilities fc graphene_app )
install( TARGETS
full_web_node
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

View file

@ -0,0 +1,24 @@
#include <fc/thread/thread.hpp>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtWebEngine>
#include <QtQml>
int main(int argc, char *argv[])
{
fc::thread::current().set_name("main");
QGuiApplication app(argc, argv);
app.setApplicationName("Graphene Client");
app.setApplicationDisplayName(app.applicationName());
app.setOrganizationDomain("cryptonomex.org");
app.setOrganizationName("Cryptonomex, Inc.");
QtWebEngine::initialize();
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
#include "main.moc"

View file

@ -0,0 +1,13 @@
import QtQuick 2.5
import QtQuick.Window 2.2
import QtWebEngine 1.0
Window {
width: 800
height: 600
visible: true
WebEngineView {
anchors.fill: parent
}
}

View file

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>