From 4005c6aad00c9dc1ae3ba982edadab642eb64683 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Wed, 11 Oct 2017 17:20:51 +0900 Subject: [PATCH] [Tizen] Add build configurations for Tizen target This enables tizen build. Change-Id: Ibba34f66bc1a0fae09d55e44c18e13e41e9c37c1 Signed-off-by: Youngsoo Choi --- common.gypi | 16 +++++ efl/build/common.sh | 43 +++++++++++++ efl/build/system.gyp | 30 ++++++---- efl/features.gypi | 3 + electron.gyp | 56 +++++++++++------ script/bootstrap.py | 5 +- script/build.py | 6 +- script/clean.py | 5 +- script/lib/config.py | 3 + script/update.py | 13 ++-- vendor/breakpad/breakpad.gyp | 3 + vendor/brightray/brightray.gyp | 70 ++++++++++++++++------ .../vendor/libchromiumcontent/script/download | 8 ++- .../tools/generate_filenames_gypi.py | 37 ++++++++---- 14 files changed, 227 insertions(+), 71 deletions(-) diff --git a/common.gypi b/common.gypi index ac3f21c..f56e491 100644 --- a/common.gypi +++ b/common.gypi @@ -24,6 +24,7 @@ 'openssl_no_asm': 1, 'use_efl%': 0, 'desktop_linux%': 0, + 'is_tizen%': 0, 'use_openssl_def': 0, 'OPENSSL_PRODUCT': 'libopenssl.a', 'node_release_urlbase': 'https://atom.io/download/atom-shell', @@ -139,6 +140,7 @@ }], ['_target_name=="node"', { 'include_dirs': [ + '/usr/include/v8', '<(libchromiumcontent_src_dir)', '<(libchromiumcontent_src_dir)/third_party/icu/source/common', '<(libchromiumcontent_src_dir)/third_party/icu/source/i18n', @@ -277,5 +279,19 @@ }, }, }], # OS=="mac" + ['is_tizen==1', { + 'target_defaults': { + 'defines': [ + 'OS_TIZEN', + ], + }, + }], # is_tizen==1 + ['use_efl==1', { + 'target_defaults': { + 'defines': [ + 'USE_EFL', + ], + }, + }], # is_tizen==1 ], } diff --git a/efl/build/common.sh b/efl/build/common.sh index cf60c90..8c8ad13 100644 --- a/efl/build/common.sh +++ b/efl/build/common.sh @@ -2,6 +2,7 @@ export SCRIPTDIR=$(readlink -e $(dirname $0)) export TOPDIR=$(readlink -f "${SCRIPTDIR}/../..") +export LATEST_TIZEN_VERSION=4.0 function error_report() { echo "Error: File:$1 Line:$2" @@ -36,3 +37,45 @@ function hostGypElectronEfl() { $@ fi } + +function setupAndExecuteTargetBuild() { + local platform="$1" + shift + + local PROFILE + local ARCHITECTURE + local CONF_FLAG + local -a ARGS + + local count=0 + local exclusive_options=0 + local RPMLINT=0 + local NOINIT=0 + local MIRROR=0 + + # "|| :" means "or always succeeding built-in command" + PROFILE=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :) + ARCHITECTURE=$(echo "$@" | grep -Po "(?<=\-A\s)[^\s]*" || :) + + while [[ $# > 0 ]]; do + count=$(( $count + 1 )) + case "$1" in + --standard*) + PROFILE=tz_v${LATEST_TIZEN_VERSION}_$(echo $1 | sed 's/--//g')_$(echo $ARCHITECTURE | grep "i586" -q && echo "ia32" || echo $ARCHITECTURE) + ;; + --emulator*) + PROFILE=tz_v${LATEST_TIZEN_VERSION}_$(echo $1 | sed 's/--//g')_$(echo $ARCHITECTURE | grep "i586" -q && echo "ia32" || echo $ARCHITECTURE) + ;; + *) + ARGS[$count]="$1" + ;; + esac + shift; + done + + if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then + CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf" + fi + + gbs $CONF_FLAG build -P $PROFILE --include-all -A $ARCHITECTURE "${ARGS[@]}" $BUILD_CONF_OPTS $EXTRA_PACK_OPTS --incremental +} diff --git a/efl/build/system.gyp b/efl/build/system.gyp index 542bf0b..2461986 100644 --- a/efl/build/system.gyp +++ b/efl/build/system.gyp @@ -10,19 +10,23 @@ { 'target_name': 'ecore-x', 'type': 'none', - 'direct_dependent_settings': { - 'cflags': [ - '