[FWN] Embed web UI into binary

This commit is contained in:
Nathan Hourt 2015-08-14 15:26:46 -04:00
parent f3a044d963
commit 4f19667fe3
25 changed files with 201 additions and 2 deletions

View file

@ -12,9 +12,11 @@ find_package(Qt5Quick)
find_package(Qt5WebEngine)
file(GLOB QML qml/*)
file(GLOB WEB web/*)
qt5_add_resources(QML_QRC qml/qml.qrc)
qt5_add_resources(WEB_QRC web/web.qrc)
add_executable(full_web_node BlockChain.cpp main.cpp ${QML_QRC} ${QML})
add_executable(full_web_node BlockChain.cpp main.cpp ${QML_QRC} ${WEB_QRC} ${QML})
target_link_libraries(full_web_node PRIVATE Qt5::Core Qt5::Quick Qt5::WebEngine
graphene_chain graphene_egenesis_full graphene_utilities fc graphene_account_history graphene_market_history graphene_app )

View file

@ -26,7 +26,7 @@ int main(int argc, char *argv[])
serverThread.async([&webGuiServer] {
webGuiServer.listen(fc::ip::endpoint::from_string("127.0.0.1:8080"));
webGuiServer.on_request([](const fc::http::request& request, const fc::http::server::response& response) {
QString path = QStringLiteral("/Users/nathan/graphene-ui/web/dist") + QString::fromStdString(request.path);
QString path = QStringLiteral(":") + QString::fromStdString(request.path);
if (path.endsWith('/'))
path.append(QStringLiteral("index.html"));
QFile file(path);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

View file

@ -0,0 +1 @@
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\"/>"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\"/>"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\"/>"

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\"/>"

View file

@ -0,0 +1,19 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width"/>
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>-->
<title>Graphene UI</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
body {background-color: #2a2a2a}
</style>
<link rel="stylesheet" href="app.css">
</head>
<body>
<main id="content"></main>
<script src="vendors.js" charset="utf-8"></script>
<script src="app.js" charset="utf-8"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,27 @@
<RCC>
<qresource prefix="/">
<file>1.app.js</file>
<file>app.css</file>
<file>app.js</file>
<file>favicon.ico</file>
<file>fonts</file>
<file>fonts/Roboto-Bold.eot</file>
<file>fonts/Roboto-Bold.svg</file>
<file>fonts/Roboto-Bold.ttf</file>
<file>fonts/Roboto-Bold.woff</file>
<file>fonts/Roboto-Light.eot</file>
<file>fonts/Roboto-Light.svg</file>
<file>fonts/Roboto-Light.ttf</file>
<file>fonts/Roboto-Light.woff</file>
<file>fonts/Roboto-Regular.eot</file>
<file>fonts/Roboto-Regular.svg</file>
<file>fonts/Roboto-Regular.ttf</file>
<file>fonts/Roboto-Regular.woff</file>
<file>fonts/RobotoCondensed-Regular.eot</file>
<file>fonts/RobotoCondensed-Regular.svg</file>
<file>fonts/RobotoCondensed-Regular.ttf</file>
<file>fonts/RobotoCondensed-Regular.woff</file>
<file>index.html</file>
<file>vendors.js</file>
</qresource>
</RCC>