From 2110162a4d6e0145c3edd554c5d83aae603a54f4 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 23 Jun 2015 14:54:23 +0200 Subject: [PATCH] standalone javascript console --- libjsconsole/JSLocalConsole.cpp | 1 - libjsconsole/JSLocalConsole.h | 2 -- libjsengine/JSResources.cmake | 3 ++- libjsengine/JSV8Engine.cpp | 2 ++ libjsengine/JSV8Engine.h | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libjsconsole/JSLocalConsole.cpp b/libjsconsole/JSLocalConsole.cpp index 0220e18fc..04c6104a6 100644 --- a/libjsconsole/JSLocalConsole.cpp +++ b/libjsconsole/JSLocalConsole.cpp @@ -21,7 +21,6 @@ */ #include -#include #include "JSLocalConsole.h" #include "JSV8Connector.h" diff --git a/libjsconsole/JSLocalConsole.h b/libjsconsole/JSLocalConsole.h index e7ad1a3c3..cb520fe36 100644 --- a/libjsconsole/JSLocalConsole.h +++ b/libjsconsole/JSLocalConsole.h @@ -34,8 +34,6 @@ namespace dev namespace eth { -class AccountHolder; - class JSLocalConsole: public JSConsole { public: diff --git a/libjsengine/JSResources.cmake b/libjsengine/JSResources.cmake index d4370a8da..15e788778 100644 --- a/libjsengine/JSResources.cmake +++ b/libjsengine/JSResources.cmake @@ -1,8 +1,9 @@ set(web3 "${CMAKE_CURRENT_LIST_DIR}/../libjsqrc/ethereumjs/dist/web3.js") +set(admin "${CMAKE_CURRENT_LIST_DIR}/../libjsqrc/admin.js") set(pretty_print "${CMAKE_CURRENT_LIST_DIR}/PrettyPrint.js") set(common "${CMAKE_CURRENT_LIST_DIR}/Common.js") set(ETH_RESOURCE_NAME "JSEngineResources") set(ETH_RESOURCE_LOCATION "${CMAKE_CURRENT_BINARY_DIR}") -set(ETH_RESOURCES "web3" "pretty_print" "common") +set(ETH_RESOURCES "web3" "pretty_print" "common" "admin") diff --git a/libjsengine/JSV8Engine.cpp b/libjsengine/JSV8Engine.cpp index 4e06f0f65..ebf0a0e72 100644 --- a/libjsengine/JSV8Engine.cpp +++ b/libjsengine/JSV8Engine.cpp @@ -143,9 +143,11 @@ JSV8Engine::JSV8Engine(): m_scope(new JSV8Scope()) JSEngineResources resources; string common = resources.loadResourceAsString("common"); string web3 = resources.loadResourceAsString("web3"); + string admin = resources.loadResourceAsString("admin"); eval(common.c_str()); eval(web3.c_str()); eval("web3 = require('web3');"); + eval(admin.c_str()); } JSV8Engine::~JSV8Engine() diff --git a/libjsengine/JSV8Engine.h b/libjsengine/JSV8Engine.h index 56459c5d0..563642d73 100644 --- a/libjsengine/JSV8Engine.h +++ b/libjsengine/JSV8Engine.h @@ -22,7 +22,10 @@ #pragma once +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-parameter" #include +#pragma clang diagnostic pop #include "JSEngine.h" namespace dev