From: SangYong Park Date: Tue, 7 Aug 2018 04:30:40 +0000 (+0900) Subject: Make build directory depending on profile X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F186065%2F1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Make build directory depending on profile . 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 --- diff --git a/packaging/electron-efl.spec b/packaging/electron-efl.spec index ea9690e..54ecad2 100755 --- a/packaging/electron-efl.spec +++ b/packaging/electron-efl.spec @@ -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 diff --git a/script/build.py b/script/build.py index 80f266d..05dff2f 100755 --- a/script/build.py +++ b/script/build.py @@ -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]) diff --git a/script/update.py b/script/update.py index 08bdf58..a82822a 100755 --- a/script/update.py +++ b/script/update.py @@ -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. diff --git a/tizen/extensions/renderer/xwalk_module_system.cc b/tizen/extensions/renderer/xwalk_module_system.cc index 2218188..0cba12f 100644 --- a/tizen/extensions/renderer/xwalk_module_system.cc +++ b/tizen/extensions/renderer/xwalk_module_system.cc @@ -517,7 +517,7 @@ void XWalkModuleSystem::EnsureExtensionNamespaceIsReadOnly( v8::Handle v8_extension_name( v8::String::NewFromUtf8(context->GetIsolate(), basename.c_str())); value.As()->ForceSet( - v8_extension_name, value.As()->Get(v8_extension_name), + context, v8_extension_name, value.As()->Get(v8_extension_name), v8::ReadOnly); } diff --git a/tizen/extensions/renderer/xwalk_v8tools_module.cc b/tizen/extensions/renderer/xwalk_v8tools_module.cc index 4fcad37..1d8ce93 100644 --- a/tizen/extensions/renderer/xwalk_v8tools_module.cc +++ b/tizen/extensions/renderer/xwalk_v8tools_module.cc @@ -18,7 +18,10 @@ void ForceSetPropertyCallback( if (info.Length() != 3 || !info[0]->IsObject() || !info[1]->IsString()) { return; } - info[0].As()->ForceSet(info[1], info[2]); + v8::Isolate* isolate = info.GetIsolate(); + v8::HandleScope handle_scope(isolate); + v8::Local context = isolate->GetCurrentContext(); + info[0].As()->ForceSet(context, info[1], info[2]); } // ================ diff --git a/tizen/script/build b/tizen/script/build index 22091bd..8ea059c 100755 --- a/tizen/script/build +++ b/tizen/script/build @@ -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