diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-19 22:25:36 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-19 22:25:36 (GMT) |
commit | b9204bad8cc2957bc0ae6201640d2972e9d4c239 (patch) | |
tree | 6c7668606fb9b7016a01ce93993a654e95a63ef2 | |
parent | 8b9ae4ba7aa509f467b97ae298642fbe1710ea36 (diff) | |
download | uscxml-b9204bad8cc2957bc0ae6201640d2972e9d4c239.zip uscxml-b9204bad8cc2957bc0ae6201640d2972e9d4c239.tar.gz uscxml-b9204bad8cc2957bc0ae6201640d2972e9d4c239.tar.bz2 |
Find JavaScriptCoreGTK3 as well
-rw-r--r-- | CMakeLists.txt | 31 | ||||
-rw-r--r-- | contrib/cmake/FindJSC.cmake | 2 | ||||
-rw-r--r-- | embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java | 22 | ||||
-rw-r--r-- | src/uscxml/Interpreter.h | 6 | ||||
-rw-r--r-- | src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp | 7 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 1 |
6 files changed, 45 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7df3af..11fc485 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -665,7 +665,6 @@ if (BUILD_MINIMAL) SET(DISABLE_ALL ON) endif() - if (APPLE OR IOS) OPTION(DISABLE_AUDIOTOOLBOX "Ignore AudioToolbox" OFF) if (NOT DISABLE_AUDIOTOOLBOX AND NOT DISABLE_ALL) @@ -687,21 +686,6 @@ if (APPLE OR IOS) endif() -OPTION(DISABLE_SPIDERMONKEY "Ignore SpiderMonkey" ON) -if (NOT DISABLE_SPIDERMONKEY AND NOT DISABLE_ALL AND NOT ECMA_FOUND) - find_package(SpiderMonkey) - if (SPIDERMONKEY_FOUND) - set(ECMA_FOUND ON) - include_directories(${SPIDERMONKEY_INCLUDE_DIR}) - if (UNIX) - add_definitions(-DXP_UNIX) - endif() - list (APPEND USCXML_OPT_LIBS ${SPIDERMONKEY_LIBRARY}) - endif() -else() - set(SPIDERMONKEY_FOUND OFF) -endif() - OPTION(DISABLE_JSC "Ignore JavaScriptCore" OFF) if (NOT DISABLE_JSC AND NOT DISABLE_ALL AND NOT ECMA_FOUND) find_package(JSC) @@ -728,6 +712,21 @@ else() set(V8_FOUND OFF) endif() +OPTION(DISABLE_SPIDERMONKEY "Ignore SpiderMonkey" ON) +if (NOT DISABLE_SPIDERMONKEY AND NOT DISABLE_ALL AND NOT ECMA_FOUND) + find_package(SpiderMonkey) + if (SPIDERMONKEY_FOUND) + set(ECMA_FOUND ON) + include_directories(${SPIDERMONKEY_INCLUDE_DIR}) + if (UNIX) + add_definitions(-DXP_UNIX) + endif() + list (APPEND USCXML_OPT_LIBS ${SPIDERMONKEY_LIBRARY}) + endif() +else() + set(SPIDERMONKEY_FOUND OFF) +endif() + OPTION(DISABLE_LUA "Ignore Lua" OFF) if (NOT DISABLE_LUA AND NOT DISABLE_ALL) diff --git a/contrib/cmake/FindJSC.cmake b/contrib/cmake/FindJSC.cmake index 54c5df4..2040ccf 100644 --- a/contrib/cmake/FindJSC.cmake +++ b/contrib/cmake/FindJSC.cmake @@ -1,6 +1,6 @@ if (NOT APPLE) FIND_PATH(JSC_INCLUDE_DIR JavaScriptCore/JavaScriptCore.h - PATH_SUFFIXES webkitgtk-1.0 + PATH_SUFFIXES webkitgtk-1.0 webkitgtk-3.0 PATHS /usr/local /usr diff --git a/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java b/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java new file mode 100644 index 0000000..4d14602 --- /dev/null +++ b/embedding/java/src/org/uscxml/tests/invoker/factory/vxml/TestVoiceXMLInvoker.java @@ -0,0 +1,22 @@ +package org.uscxml.tests.invoker.factory.vxml; + +import java.io.IOException; +import java.net.URL; + +import org.uscxml.HTTPServer; +import org.uscxml.Interpreter; +import org.uscxml.InterpreterException; + +public class TestVoiceXMLInvoker { + + public static void main(String[] args) throws IOException, InterpreterException { + System.load("/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava64.jnilib"); + + HTTPServer http = HTTPServer.getInstance(5080, 5081); + + URL jVoiceXMLDoc = new URL(new URL("file:"), "../../test/uscxml/test-jvoicexml.scxml"); + Interpreter interpreter = Interpreter.fromURI(jVoiceXMLDoc); + interpreter.interpret(); + } + +} diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index 66379f9..70fb888 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -114,9 +114,9 @@ public: withHTTPS(true), withWS(true), logLevel(0), - httpPort(0), - httpsPort(0), - wsPort(0) { + httpPort(5080), + httpsPort(5443), + wsPort(5081) { } bool withDebugger; diff --git a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp index ca50b75..dd3a0b4 100644 --- a/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp +++ b/src/uscxml/plugins/datamodel/lua/LuaDataModel.cpp @@ -49,6 +49,7 @@ static int luaInspect(lua_State * l) { } bool _luaHasXMLParser = false; + static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { luabridge::LuaRef luaData (_luaState); @@ -63,7 +64,7 @@ static luabridge::LuaRef getDataAsLua(lua_State* _luaState, const Data& data) { try { luaData = luaLomParse(luaXMLSS.str()); } catch (luabridge::LuaException e) { - LOG(ERROR) << e.what(); + ERROR_EXECUTION_THROW(e.what()); } return luaData; } @@ -152,7 +153,7 @@ boost::shared_ptr<DataModelImpl> LuaDataModel::create(InterpreterImpl* interpret luabridge::setGlobal(dm->_luaState, resultLxpLOM, "lxp.lom"); } } catch (luabridge::LuaException e) { - LOG(ERROR) << e.what(); + LOG(INFO) << e.what(); } luabridge::getGlobalNamespace(dm->_luaState).beginClass<InterpreterImpl>("Interpreter").endClass(); @@ -258,7 +259,7 @@ void LuaDataModel::setEvent(const Event& event) { try { luaEvent["data"] = luaLomParse(luaXMLSS.str()); } catch (luabridge::LuaException e) { - LOG(ERROR) << e.what(); + ERROR_EXECUTION_THROW(e.what()); } } else { ERROR_EXECUTION_THROW("No DOM support in Lua datamodel"); diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 48d2f96..1b92203 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -566,7 +566,6 @@ bool HTTPServer::registerServlet(const std::string& path, HTTPServlet* servlet) HTTPServer* INSTANCE = getInstance(); if (!INSTANCE->_httpHandle) { - LOG(ERROR) << "Registering a servlet at '" << path << "' with no HTTPServer running, did you forget to specify a port?"; return true; // this is the culprit! } |