From f330e1a47425dc3cee9297c45778b2af57637ef1 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Tue, 16 Jun 2015 10:37:42 +0900 Subject: [PATCH] Fix injected bundle path against aarch64 Change-Id: Ia8740c0916b8ad2461a2e88982bb5f266e5bdf12 --- CMakeLists.txt | 5 +++++ packaging/wrt.spec | 6 ++++-- src/runtime/web_application.cc | 8 +++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7347fdf..2f10e25 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,11 @@ IF(NOT EXTENSION_PATH) ENDIF(NOT EXTENSION_PATH) ADD_DEFINITIONS("-DEXTENSION_PATH=\"${EXTENSION_PATH}\"") +IF(NOT INJECTED_BUNDLE_PATH) + SET(INJECTED_BUNDLE_PATH ${LIB_INSTALL_DIR}/libwrt-injected-bundle.so) +ENDIF(NOT INJECTED_BUNDLE_PATH) +ADD_DEFINITIONS("-DINJECTED_BUNDLE_PATH=\"${INJECTED_BUNDLE_PATH}\"") + # Targets names SET(TARGET_RUNTIME "wrt") SET(TARGET_COMMON_STATIC "wrt-common-static") diff --git a/packaging/wrt.spec b/packaging/wrt.spec index ba2cefa..c5410cd 100755 --- a/packaging/wrt.spec +++ b/packaging/wrt.spec @@ -57,6 +57,7 @@ Runtime for Web Application %setup -q %define extension_path %{_libdir}/tizen-extensions-crosswalk +%define injected_bundle_path %{_libdir}/libwrt-injected-bundle.so %build @@ -82,7 +83,8 @@ cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \ -DX11_SUPPORT=%{enable_x11} \ -DWAYLAND_SUPPORT=%{enable_wayland} \ - -DEXTENSION_PATH=%{extension_path} + -DEXTENSION_PATH=%{extension_path} \ + -DINJECTED_BUNDLE_PATH=${injected_bundle_path} make %{?jobs:-j%jobs} @@ -101,6 +103,6 @@ rm -fr %{buildroot} %attr(755,root,root) %{_bindir}/wrt %attr(755,root,root) %{_bindir}/wrt-popup-test %attr(644,root,root) %{_datadir}/edje/wrt/wrt.edj -%attr(644,root,root) %{_libdir}/libwrt-injected-bundle.so +%attr(644,root,root) %{injected_bundle_path} %attr(644,root,root) %{extension_path}/libwidget-plugin.so %attr(755,root,root) %{_datadir}/locale/* diff --git a/src/runtime/web_application.cc b/src/runtime/web_application.cc index 36bccff..7eac773 100755 --- a/src/runtime/web_application.cc +++ b/src/runtime/web_application.cc @@ -42,6 +42,10 @@ #include "runtime/popup.h" #include "runtime/popup_string.h" +#ifndef INJECTED_BUNDLE_PATH + #error INJECTED_BUNDLE_PATH is not set. +#endif + namespace wrt { namespace { @@ -54,8 +58,6 @@ const char* kConsoleMessageLogTag = "ConsoleMessage"; const char* kDebugKey = "debug"; const char* kPortKey = "port"; -// TODO(wy80.choi): consider 64bits system. -const char* kInjectedBundlePath = "/usr/lib/libwrt-injected-bundle.so"; const char* kDBusIntrospectionXML = "" " " @@ -193,7 +195,7 @@ WebApplication::WebApplication( : launched_(false), debug_mode_(false), ewk_context_(ewk_context_new_with_injected_bundle_path( - kInjectedBundlePath)), + INJECTED_BUNDLE_PATH)), window_(window), appid_(app_data->app_id()), app_uuid_(utils::GenerateUUID()), -- 2.7.4