This enables tizen build.
Change-Id: Ibba34f66bc1a0fae09d55e44c18e13e41e9c37c1
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
'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',
}],
['_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',
},
},
}], # OS=="mac"
+ ['is_tizen==1', {
+ 'target_defaults': {
+ 'defines': [
+ 'OS_TIZEN',
+ ],
+ },
+ }], # is_tizen==1
+ ['use_efl==1', {
+ 'target_defaults': {
+ 'defines': [
+ 'USE_EFL',
+ ],
+ },
+ }], # is_tizen==1
],
}
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"
$@
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
+}
{
'target_name': 'ecore-x',
'type': 'none',
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags ecore-x)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-x)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l ecore-x)',
- ],
- },
+ 'conditions': [
+ ['desktop_linux==1', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags ecore-x)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other ecore-x)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l ecore-x)',
+ ],
+ },
+ }],
+ ],
}, # ecore-x
{
'target_name': 'elocation',
],
}]
],
+ 'variables': {
+ 'clang' : 0,
+ },
},
}
'company_abbr%': 'github',
'version%': '1.6.7',
'js2c_input_dir': '<(SHARED_INTERMEDIATE_DIR)/js2c',
+ 'clang%': 0,
},
'includes': [
'filenames.gypi',
],
'include_dirs': [
'.',
+ '/usr/include/v8',
'<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
],
'conditions': [
],
},
'destination': '<(PRODUCT_DIR)',
- 'files': [
-# '<!(<(echo <(libchromiumcontent_shared_v8_libraries)))',
- '<@(copied_libraries)',
-# '<(libchromiumcontent_dir)/locales',
-# '<(libchromiumcontent_dir)/icudtl.dat',
-# '<(libchromiumcontent_dir)/blink_image_resources_200_percent.pak',
-# '<(libchromiumcontent_dir)/content_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/content_shell.pak',
-# '<(libchromiumcontent_dir)/ui_resources_200_percent.pak',
-# '<(libchromiumcontent_dir)/views_resources_200_percent.pak',
- '<(libchromiumcontent_dir)/natives_blob.bin',
- '<(libchromiumcontent_dir)/snapshot_blob.bin',
+ 'conditions': [
+ ['desktop_linux==0', {
+ 'files': [
+ '<@(copied_libraries)',
+ '<(libchromiumcontent_dir)/chromium-efl/content_shell.pak',
+ '<(libchromiumcontent_dir)/chromium-efl/natives_blob.bin',
+ '<(libchromiumcontent_dir)/chromium-efl/snapshot_blob.bin',
+ ],
+ }, {
+ 'files': [
+ '<@(copied_libraries)',
+ '<(libchromiumcontent_dir)/content_shell.pak',
+ '<(libchromiumcontent_dir)/natives_blob.bin',
+ '<(libchromiumcontent_dir)/snapshot_blob.bin',
+ ],
+ }],
],
},
],
],
}], # OS=="linux"
['use_efl==1', {
- 'dependencies': [
- '<(DEPTH)/efl/build/system.gyp:ecore-x',
- '<(DEPTH)/efl/build/system.gyp:elocation',
- '<(DEPTH)/efl/build/system.gyp:elementary',
- '<(DEPTH)/efl/build/system.gyp:evas',
- '<(DEPTH)/efl/build/system.gyp:icu',
- 'electron_shell_copy',
+ 'conditions': [
+ ['is_tizen==1', {
+ 'dependencies': [
+ '<(DEPTH)/efl/build/system.gyp:elocation',
+ '<(DEPTH)/efl/build/system.gyp:elementary',
+ '<(DEPTH)/efl/build/system.gyp:evas',
+ '<(DEPTH)/efl/build/system.gyp:icu',
+ 'electron_shell_copy',
+ ],
+ }, {
+ 'dependencies': [
+ '<(DEPTH)/efl/build/system.gyp:ecore-x',
+ '<(DEPTH)/efl/build/system.gyp:elocation',
+ '<(DEPTH)/efl/build/system.gyp:elementary',
+ '<(DEPTH)/efl/build/system.gyp:evas',
+ '<(DEPTH)/efl/build/system.gyp:icu',
+ 'electron_shell_copy',
+ ],
+ }],
],
'defines': [
'USE_SYSTEM_ICU',
libcc_shared_library_path = os.path.join(dist_dir, 'shared_library')
libcc_static_library_path = os.path.join(dist_dir, 'static_library')
- if PLATFORM != 'win32':
+ if PLATFORM != 'win32' and args.libcc_chromium_efl_path == None:
if not args.disable_clang and args.clang_dir == '':
# Download prebuilt clang binaries.
update_clang()
- setup_python_libs()
+ if os.path.isfile('/etc/tizen-release') != True:
+ setup_python_libs()
if args.libcc_chromium_efl_path == None:
update_node_modules('.')
bootstrap_brightray(args.dev, args.url, args.target_arch,
import_vs_env(get_target_arch())
ninja = os.path.join('vendor', 'depot_tools', 'ninja')
+ ninja = 'ninja'
if sys.platform == 'win32':
ninja += '.exe'
args = parse_args()
for config in args.configuration:
- build_path = os.path.join('out', config[0])
+ if os.path.isfile('/etc/tizen-release'):
+ build_path = os.path.join('out.tizen', 'out', config[0])
+ else:
+ build_path = os.path.join('out', config[0])
ret = subprocess.call([ninja, '-C', build_path, args.target])
if ret != 0:
sys.exit(ret)
args = parse_args()
remove_directory('dist')
- remove_directory('out')
+ if os.path.isfile('/etc/tizen-release'):
+ remove_directory('out.tizen')
+ else:
+ remove_directory('out')
if not args.build:
remove_directory('node_modules')
'win32': 'win32',
}[sys.platform]
+if os.path.isfile('/etc/tizen-release'):
+ PLATFORM = 'tizen'
+
verbose_mode = False
def main():
os.chdir(SOURCE_ROOT)
- if PLATFORM != 'win32' and platform.architecture()[0] != '64bit':
- print 'Electron is required to be built on a 64bit machine'
- return 1
+ if PLATFORM != 'tizen':
+ if PLATFORM != 'win32' and platform.architecture()[0] != '64bit':
+ print 'Electron is required to be built on a 64bit machine'
+ return 1
+
+ update_external_binaries()
- update_external_binaries()
return update_gyp()
def update_gyp():
+ print 'update gyp !!!'
# Since gyp doesn't support specify link_settings for each configuration,
# we are not able to link to different libraries in "Debug" and "Release"
# configurations.
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.
# found in the LICENSE file.
{
+ 'variables' : {
+ 'clang%': 0,
+ },
'includes': [
'breakpad_sender.gypi',
'breakpad_handler.gypi',
{
- 'variables': {
- # The libraries brightray will be compiled to.
- 'linux_system_libraries': 'dbus-1 evas x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss icu-i18n icu-uc'
- },
+ 'conditions': [
+ ['desktop_linux==0', {
+ 'variables': {
+ # The libraries brightray will be compiled to.
+ 'linux_system_libraries': 'chromium-efl dbus-1 evas gmodule-2.0 nss icu-i18n icu-uc'
+ }
+ }, {
+ 'variables': {
+ # The libraries brightray will be compiled to.
+ 'linux_system_libraries': 'dbus-1 evas x11 x11-xcb xcb xi xcursor xdamage xrandr xcomposite xext xfixes xrender xtst xscrnsaver gconf-2.0 gmodule-2.0 nss icu-i18n icu-uc'
+ }
+ }]
+ ],
'includes': [
'filenames.gypi',
],
'type': 'static_library',
'include_dirs': [
'.',
+ '/usr/include/v8',
'<(libchromiumcontent_src_dir)',
+ '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/skia/include/core',
+ '<(libchromiumcontent_src_dir)/third_party/skia/include/config',
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
'<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
+ '<(libchromiumcontent_src_dir)/gen',
'<(libchromiumcontent_dir)/gen',
],
'direct_dependent_settings': {
'include_dirs': [
'.',
'..',
+ '/usr/include/v8',
'<(libchromiumcontent_src_dir)',
+ '<(libchromiumcontent_src_dir)/tizen_src/chromium_impl',
'<(libchromiumcontent_src_dir)/gpu',
'<(libchromiumcontent_src_dir)/skia/config',
'<(libchromiumcontent_src_dir)/third_party/boringssl/src/include',
'<(libchromiumcontent_src_dir)/third_party/mojo/src',
'<(libchromiumcontent_src_dir)/third_party/khronos',
'<(libchromiumcontent_src_dir)/third_party/WebKit',
+ '<(libchromiumcontent_src_dir)/gen',
'<(libchromiumcontent_dir)/gen',
],
},
'ldflags': [
'-Wl,--whole-archive',
'<@(libchromiumcontent_libraries)',
- '<!(<(echo <@(libchromiumcontent_libraries)))',
+# '<!(<(echo <@(libchromiumcontent_libraries)))',
'-Wl,--no-whole-archive',
],
}
'link_settings': {
'libraries': [
'<@(libchromiumcontent_libraries)',
- '<!(<(echo <@(libchromiumcontent_libraries)))',
+# '<!(<(echo <@(libchromiumcontent_libraries)))',
]
},
}], # (Normal builds)
},
}, {
'link_settings': {
- 'libraries': [
- # Link with ffmpeg.
-# '<(libchromiumcontent_dir)/libffmpeg.so',
- # Following libraries are required by libchromiumcontent:
- '-lasound',
- '-lcap',
- '-lcups',
- '-lrt',
- '-ldl',
- '-lresolv',
- '-lfontconfig',
- '-lfreetype',
- '-lexpat',
+ 'conditions': [
+ ['is_tizen==1', {
+ 'libraries': [
+ # Following libraries are required by libchromiumcontent:
+ '-lasound',
+ '-lcap',
+ '-lrt',
+ '-ldl',
+ '-lresolv',
+ '-lfontconfig',
+ '-lfreetype',
+ '-lexpat',
+ ],
+ },{
+ 'libraries': [
+ # Link with ffmpeg.
+ # '<(libchromiumcontent_dir)/libffmpeg.so',
+ # Following libraries are required by libchromiumcontent:
+ '-lasound',
+ '-lcap',
+ '-lcups',
+ '-lrt',
+ '-ldl',
+ '-lresolv',
+ '-lfontconfig',
+ '-lfreetype',
+ '-lexpat',
+ ],
+ }],
],
},
}],
def main():
try:
args = parse_args()
- if args.libcc_chromium_efl_path != None:
+ if os.path.isfile('/etc/tizen-release'):
+ SRC_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../src')
+ generate_filenames_gypi(os.path.join(args.path, 'filenames.gypi'),
+ os.path.join(os.path.dirname(os.path.abspath(__file__)), '../src'),
+ args.libcc_chromium_efl_path,
+ args.libcc_chromium_efl_path)
+ elif args.libcc_chromium_efl_path != None:
generate_filenames_gypi(os.path.join(args.path, 'filenames.gypi'),
args.libcc_chromium_efl_path,
os.path.join(args.libcc_chromium_efl_path, 'out.x64'),
def main(target_file, code_dir, shared_dir, static_dir):
- print "YSYS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", shared_dir
+ print "+ share_dir : ", shared_dir
+ print "+ code_dir : ", code_dir
+ print '+ is_tizen : ', os.path.isfile('/etc/tizen-release')
(shared_libraries, shared_v8_libraries) = searh_files(
shared_dir, SHARED_LIBRARY_SUFFIX, EXCLUDE_SHARED_LIBRARIES)
(shared_root_libraries, shared_v8_libraries) = searh_files(
'../../../../../out/Dependencies/Root/lib64', SHARED_LIBRARY_SUFFIX, EXCLUDE_SHARED_LIBRARIES)
(static_libraries, static_v8_libraries) = searh_files(
static_dir, STATIC_LIBRARY_SUFFIX, EXCLUDE_STATIC_LIBRARIES)
- content = GYPI_TEMPLATE % {
- 'src': repr(os.path.abspath(code_dir)),
- 'shared_libraries_dir': repr(os.path.abspath(shared_dir)),
- 'static_libraries_dir': repr(os.path.abspath(static_dir)),
- 'shared_libraries': shared_libraries,
- 'shared_root_libraries': shared_root_libraries,
- 'shared_v8_libraries': shared_v8_libraries,
- 'static_libraries': static_libraries,
- 'static_v8_libraries': static_v8_libraries,
- }
+ if os.path.isfile('/etc/tizen-release'):
+ content = GYPI_TEMPLATE % {
+ 'src': repr(os.path.abspath(code_dir)),
+ 'shared_libraries_dir': repr(os.path.abspath(shared_dir)),
+ 'static_libraries_dir': repr(os.path.abspath(static_dir)),
+ 'shared_libraries': ['/usr/lib/libchromium-ewk.so'],
+ 'shared_root_libraries': shared_root_libraries,
+ 'shared_v8_libraries': shared_v8_libraries,
+ 'static_libraries': static_libraries,
+ 'static_v8_libraries': static_v8_libraries,
+ }
+ else:
+ content = GYPI_TEMPLATE % {
+ 'src': repr(os.path.abspath(code_dir)),
+ 'shared_libraries_dir': repr(os.path.abspath(shared_dir)),
+ 'static_libraries_dir': repr(os.path.abspath(static_dir)),
+ 'shared_libraries': shared_libraries,
+ 'shared_root_libraries': shared_root_libraries,
+ 'shared_v8_libraries': shared_v8_libraries,
+ 'static_libraries': static_libraries,
+ 'static_v8_libraries': static_v8_libraries,
+ }
+
with open(target_file, 'wb+') as f:
f.write(content)