Separate Watch app implementation from TV build 13/185013/1
authorws29.jung <ws29.jung@samsung.com>
Wed, 25 Jul 2018 07:41:54 +0000 (16:41 +0900)
committerws29.jung <ws29.jung@samsung.com>
Wed, 25 Jul 2018 07:53:11 +0000 (16:53 +0900)
Tizen build has 2 type build: Standard, TV.

Wath App implementation files must include within only Standard build but
gyp and sources files were including watch app files on both Standard and TV.
In this patch, files relate to the Watch App are separated from TV build.

Change-Id: Id355deae9b6316e3a65d237d434cbaff1a620dfd
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
atom/app/runtime.cc
atom/browser/native_window_efl.cc
efl/build/system.gyp
packaging/electron-efl.spec
wrt.gyp

index c089436..6e27d1a 100644 (file)
@@ -16,7 +16,9 @@
 
 #include "atom/app/runtime.h"
 #include "atom/app/ui_runtime.h"
+#if !defined(OS_TIZEN_TV_PRODUCT)
 #include "atom/app/watch_runtime.h"
+#endif
 #include "atom/browser/atom_browser_main_parts.h"
 #include "atom/browser/native_window_efl.h"
 #include "base/logging.h"
@@ -43,9 +45,11 @@ std::unique_ptr<Runtime> Runtime::MakeRuntime(content::ContentMainParams *params
 #endif  // IME_FEATURE_SUPPORT */
   auto app_data = common::ApplicationDataManager::GetCurrentAppData();
   efl::WindowFactory::SetDelegate(&atom::NativeWindowEfl::GetHostWindowDelegate);
+#if !defined(OS_TIZEN_TV_PRODUCT)
   if (app_data->app_type() == common::ApplicationData::WATCH)
     return std::unique_ptr<Runtime>(new WatchRuntime(params));
   else
+#endif
     return std::unique_ptr<Runtime>(new UiRuntime(params));
 }
 
index d032579..1fac541 100644 (file)
@@ -6,7 +6,12 @@
 
 #include <Elementary.h>
 #include <map>
+#if defined(OS_TIZEN_TV_PRODUCT)
+#include <Ecore_Wayland.h>
+#include <cursor_module.h>
+#else
 #include <watch_app_efl.h>
+#endif
 
 #include "atom/common/options_switches.h"
 #include "base/command_line.h"
 #include "tizen/common/application_data.h"
 #endif
 
-#if defined(OS_TIZEN_TV_PRODUCT)
-#include <Ecore_Wayland.h>
-#include <cursor_module.h>
-#endif
-
 namespace atom {
 
 namespace {
@@ -73,6 +73,7 @@ Evas_Object* NativeWindowEfl::GetHostWindowDelegate(const content::WebContents*
 
   Evas_Object* win = NULL;
   auto app_data = common::ApplicationDataManager::GetCurrentAppData();
+#if !defined(OS_TIZEN_TV_PRODUCT)
   if (app_data->app_type() == common::ApplicationData::WATCH) {
     elm_config_accel_preference_set("opengl");
     watch_app_get_elm_win(&win);
@@ -80,9 +81,12 @@ Evas_Object* NativeWindowEfl::GetHostWindowDelegate(const content::WebContents*
     evas_object_render_op_set(win, EVAS_RENDER_COPY);
   }
   else {
+#endif
     win = elm_win_util_standard_add("", "");
     elm_win_autodel_set(win, EINA_TRUE);
+#if !defined(OS_TIZEN_TV_PRODUCT)
   }
+#endif
 
   window_map_[web_contents] = win;
   return win;
index ebbc965..4b56c0d 100644 (file)
       'target_name': 'capi-appfw-watch-application',
       'type': 'none',
       'conditions': [
-        ['is_tizen==1', {
+        ['tizen_product_tv==0', {
           'direct_dependent_settings': {
             'cflags': [
               '<!@(<(pkg-config) --cflags capi-appfw-watch-application)',
       'target_name': 'appcore-watch',
       'type': 'none',
       'conditions': [
-        ['is_tizen==1', {
+        ['tizen_product_tv==0', {
           'direct_dependent_settings': {
             'cflags': [
               '<!@(<(pkg-config) --cflags appcore-watch)',
index 3fd098d..3a9137f 100755 (executable)
@@ -17,14 +17,12 @@ BuildRequires: python-accel-armv7l-cross-arm
 %ifarch aarch64
 BuildRequires: python-accel-aarch64-cross-aarch64
 %endif
-BuildRequires: pkgconfig(appcore-watch)
 BuildRequires: pkgconfig(appsvc)
 BuildRequires: pkgconfig(aul)
 BuildRequires: pkgconfig(bundle)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-appfw-app-manager)
 BuildRequires: pkgconfig(capi-appfw-package-manager)
-BuildRequires: pkgconfig(capi-appfw-watch-application)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(capi-system-info)
 BuildRequires: pkgconfig(chromium-efl)
@@ -50,14 +48,16 @@ BuildRequires: pkgconfig(nss)
 BuildRequires: pkgconfig(pkgmgr-info)
 BuildRequires: pkgconfig(sqlite3)
 BuildRequires: pkgconfig(uuid)
-BuildRequires: pkgconfig(ttrace)
 BuildRequires: pkgconfig(tts)
+BuildRequires: pkgconfig(wgt-manifest-handlers)
+BuildRequires: pkgconfig(jsoncpp)
 %if "%{?TIZEN_PRODUCT_TV}" == "1"
 BuildRequires: pkgconfig(capi-media-player)
 BuildRequires: pkgconfig(vd-win-util)
+%else
+BuildRequires: pkgconfig(appcore-watch)
+BuildRequires: pkgconfig(capi-appfw-watch-application)
 %endif
-BuildRequires: pkgconfig(wgt-manifest-handlers)
-BuildRequires: pkgconfig(jsoncpp)
 
 Requires: /usr/bin/systemctl
 
diff --git a/wrt.gyp b/wrt.gyp
index 1e978f6..272eb50 100644 (file)
--- a/wrt.gyp
+++ b/wrt.gyp
           ],
         }],
         ['tizen_product_tv==1', {
+          'sources!': [
+            'atom/app/watch_runtime.cc',
+            'atom/app/watch_runtime.h',
+          ],
+          'dependencies!': [
+            '<(DEPTH)/efl/build/system.gyp:appcore-watch',
+            '<(DEPTH)/efl/build/system.gyp:capi-appfw-watch-application',
+          ],
           'dependencies': [
             # `media_player_efl.h` internally includes `player.h`.
             '<(DEPTH)/efl/build/system.gyp:capi-media-player',