mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Linux: Add support for ozone builds (fixes issue #2296).
Ozone builds can run with different platform backends (Wayland, X11, etc). Usage of the Views framework is required, and the cefclient sample application is not supported. Example usage: $ export GN_DEFINES="use_ozone=true" $ cd /path/to/chromium/src/cef $ ./cef_create_projects.sh $ cd /path/to/chromium/src $ ninja -C out/Release_GN_x64 cefsimple $ ./out/Release_GN_x64/cefsimple --use-views --ozone-platform=wayland Binary distributions can be created by passing the `--ozone` flag to make_distrib.py.
This commit is contained in:
committed by
Marshall Greenblatt
parent
07863c0d46
commit
491253fa03
@ -496,6 +496,12 @@ parser.add_option(
|
||||
dest='sandbox',
|
||||
default=False,
|
||||
help='include only the cef_sandbox static library (macOS and Windows only)')
|
||||
parser.add_option(
|
||||
'--ozone',
|
||||
action='store_true',
|
||||
dest='ozone',
|
||||
default=False,
|
||||
help='include ozone build related files (Linux only)')
|
||||
parser.add_option(
|
||||
'-q',
|
||||
'--quiet',
|
||||
@ -541,6 +547,10 @@ if not options.ninjabuild:
|
||||
print 'Ninja build is required on all platforms'
|
||||
sys.exit()
|
||||
|
||||
if options.ozone and platform != 'linux':
|
||||
print '--ozone is only supported on Linux.'
|
||||
sys.exit()
|
||||
|
||||
# script directory
|
||||
script_dir = os.path.dirname(__file__)
|
||||
|
||||
@ -602,6 +612,9 @@ elif options.sandbox:
|
||||
else:
|
||||
mode = 'standard'
|
||||
|
||||
if options.ozone:
|
||||
output_dir_name = output_dir_name + '_ozone'
|
||||
|
||||
output_dir = create_output_dir(output_dir_name, options.outputdir)
|
||||
|
||||
# create the README.TXT file
|
||||
@ -711,9 +724,10 @@ if mode == 'standard':
|
||||
shared_dir = os.path.join(tests_dir, 'shared')
|
||||
make_dir(shared_dir, options.quiet)
|
||||
|
||||
# create the tests/cefclient directory
|
||||
cefclient_dir = os.path.join(tests_dir, 'cefclient')
|
||||
make_dir(cefclient_dir, options.quiet)
|
||||
if not options.ozone:
|
||||
# create the tests/cefclient directory
|
||||
cefclient_dir = os.path.join(tests_dir, 'cefclient')
|
||||
make_dir(cefclient_dir, options.quiet)
|
||||
|
||||
# create the tests/cefsimple directory
|
||||
cefsimple_dir = os.path.join(tests_dir, 'cefsimple')
|
||||
@ -733,17 +747,18 @@ if mode == 'standard':
|
||||
transfer_gypi_files(cef_dir, cef_paths2['shared_sources_resources'], \
|
||||
'tests/shared/', shared_dir, options.quiet)
|
||||
|
||||
# transfer common cefclient files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_browser'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_common'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_renderer'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_resources'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_resources_extensions_set_page_color'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
if not options.ozone:
|
||||
# transfer common cefclient files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_browser'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_common'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_renderer'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_resources'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_resources_extensions_set_page_color'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
|
||||
# transfer common cefsimple files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefsimple_sources_common'], \
|
||||
@ -757,9 +772,10 @@ if mode == 'standard':
|
||||
create_fuzed_gtest(tests_dir)
|
||||
|
||||
# process cmake templates
|
||||
process_cmake_template(os.path.join(cef_dir, 'tests', 'cefclient', 'CMakeLists.txt.in'), \
|
||||
os.path.join(cefclient_dir, 'CMakeLists.txt'), \
|
||||
variables, options.quiet)
|
||||
if not options.ozone:
|
||||
process_cmake_template(os.path.join(cef_dir, 'tests', 'cefclient', 'CMakeLists.txt.in'), \
|
||||
os.path.join(cefclient_dir, 'CMakeLists.txt'), \
|
||||
variables, options.quiet)
|
||||
process_cmake_template(os.path.join(cef_dir, 'tests', 'cefsimple', 'CMakeLists.txt.in'), \
|
||||
os.path.join(cefsimple_dir, 'CMakeLists.txt'), \
|
||||
variables, options.quiet)
|
||||
@ -1101,6 +1117,8 @@ elif platform == 'linux':
|
||||
{'path': 'swiftshader/libGLESv2.so'},
|
||||
]
|
||||
# yapf: enable
|
||||
if options.ozone:
|
||||
binaries.append({'path': 'libminigbm.so', 'conditional': True})
|
||||
|
||||
if mode == 'client':
|
||||
binaries.append({'path': 'cefsimple'})
|
||||
@ -1163,9 +1181,10 @@ elif platform == 'linux':
|
||||
transfer_gypi_files(cef_dir, cef_paths2['shared_sources_linux'], \
|
||||
'tests/shared/', shared_dir, options.quiet)
|
||||
|
||||
# transfer cefclient files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_linux'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
if not options.ozone:
|
||||
# transfer cefclient files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefclient_sources_linux'], \
|
||||
'tests/cefclient/', cefclient_dir, options.quiet)
|
||||
|
||||
# transfer cefsimple files
|
||||
transfer_gypi_files(cef_dir, cef_paths2['cefsimple_sources_linux'], \
|
||||
|
Reference in New Issue
Block a user