Make build directory depending on profile 65/186065/1
authorSangYong Park <sy302.park@samsung.com>
Tue, 7 Aug 2018 04:30:40 +0000 (13:30 +0900)
committerSangYong Park <sy302.park@samsung.com>
Tue, 7 Aug 2018 04:30:40 +0000 (13:30 +0900)
. make build directory depending on profile
. change build dependency (dbus-glib-1 -> dbus-1)
. fix build warning

Change-Id: I829394b076f187b51b9246ad7b47a3f631febf54
Signed-off-by: SangYong Park <sy302.park@samsung.com>
packaging/electron-efl.spec
script/build.py
script/update.py
tizen/extensions/renderer/xwalk_module_system.cc
tizen/extensions/renderer/xwalk_v8tools_module.cc
tizen/script/build

index ea9690e..54ecad2 100755 (executable)
@@ -27,7 +27,7 @@ BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(capi-system-info)
 BuildRequires: pkgconfig(chromium-efl)
 BuildRequires: pkgconfig(cynara-client)
-BuildRequires: pkgconfig(dbus-glib-1)
+BuildRequires: pkgconfig(dbus-1)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(ecore-evas)
@@ -74,10 +74,17 @@ cp %{SOURCE1001} .
 %define _icondir %TZ_SYS_RO_APP/%{_pkgid}/shared/res
 %define _pkgid org.tizen.%{name}
 %define _xmldir %TZ_SYS_RO_PACKAGES
-%define _out out.tizen/out/D
 %define _resourcedir /opt/usr/home/owner/data/wrt
 %define extension_path %{_libdir}/tizen-extensions-crosswalk
 
+%define _build_config D
+%if "%{?outputdir}" != ""
+%define _out %outputdir/out/%_build_config
+export GYP_GENERATOR_OUTPUT=%outputdir
+%else
+%define _out out.tizen/out/%_build_config
+%endif
+
 DEFINE_ARGS="
     libchromiumcontent_component=1
     use_efl=1
index 80f266d..05dff2f 100755 (executable)
@@ -27,8 +27,8 @@ def main():
 
   args = parse_args()
   for config in args.configuration:
-    if PLATFORM == 'tizen':
-      build_path = os.path.join('out.tizen', 'out', config[0])
+    if PLATFORM == 'tizen' and os.environ.has_key('GYP_GENERATOR_OUTPUT'):
+      build_path = os.path.join(os.environ.get('GYP_GENERATOR_OUTPUT'), 'out', config[0])
     else:
       build_path = os.path.join('out', config[0])
     ret = subprocess.call([ninja, '-C', build_path, args.target])
index 08bdf58..a82822a 100755 (executable)
@@ -61,8 +61,6 @@ def run_gyp(target_arch, component):
     env['GYP_CROSSCOMPILE'] = '1'
   elif PLATFORM == 'win32':
     env['GYP_MSVS_VERSION'] = '2015'
-  elif PLATFORM == 'tizen':
-    env['GYP_GENERATOR_OUTPUT'] = os.path.join(SOURCE_ROOT, 'out.tizen')
   python = sys.executable
   if sys.platform == 'cygwin':
     # Force using win32 python on cygwin.
index 2218188..0cba12f 100644 (file)
@@ -517,7 +517,7 @@ void XWalkModuleSystem::EnsureExtensionNamespaceIsReadOnly(
   v8::Handle<v8::String> v8_extension_name(
       v8::String::NewFromUtf8(context->GetIsolate(), basename.c_str()));
   value.As<v8::Object>()->ForceSet(
-      v8_extension_name, value.As<v8::Object>()->Get(v8_extension_name),
+      context, v8_extension_name, value.As<v8::Object>()->Get(v8_extension_name),
       v8::ReadOnly);
 }
 
index 4fcad37..1d8ce93 100644 (file)
@@ -18,7 +18,10 @@ void ForceSetPropertyCallback(
   if (info.Length() != 3 || !info[0]->IsObject() || !info[1]->IsString()) {
     return;
   }
-  info[0].As<v8::Object>()->ForceSet(info[1], info[2]);
+  v8::Isolate* isolate = info.GetIsolate();
+  v8::HandleScope handle_scope(isolate);
+  v8::Local<v8::Context> context = isolate->GetCurrentContext();
+  info[0].As<v8::Object>()->ForceSet(context, info[1], info[2]);
 }
 
 // ================
index 22091bd..8ea059c 100755 (executable)
@@ -122,6 +122,7 @@ def build_gbs(profile, force_bootstrap, verbose):
   print 'Build : profile=' + profile + ' architecture=' + arch
   command = ['gbs', '--conf', os.path.join(SCRIPT_PATH, 'gbs.conf'), 'build',
              '-P', profile, '--include-all', '-A', arch, '--incremental']
+  command.extend(['--define=outputdir ' + get_output_dir(profile)])
   if not force_bootstrap and not need_bootstrap(profile):
     command.extend(['--define=skipbootstrap 1'])
   return True if subprocess.call(command) == 0 else False
@@ -131,15 +132,22 @@ def find_architecture(profile):
     return 'armv7l'
   values = profile.split('_')
   arch = values[-1] if values[-1] != 'mirror' else values[-2]
-  arch = arch if arch != 'ia32' else 'i586'
+  if arch == 'standard':
+    return 'armv7l'
+  elif arch == 'ia32':
+    return 'i586'
   return arch
 
+def get_output_dir(profile):
+  values = profile.split('_')
+  return 'out.' + '_'.join(values if values[-1] != 'mirror' else values[:-1])
+
 def need_bootstrap(profile):
   # TODO: condition improvement is necessary
   if profile == 'desktop':
     if os.path.isdir(os.path.join(ROOT_PATH, 'out')):
       return False
-  elif os.path.isdir(os.path.join(ROOT_PATH, 'out.tizen', 'out')):
+  elif os.path.isdir(os.path.join(ROOT_PATH, get_output_dir(profile), 'out')):
     return False
   return True