diff --git a/tools/automate/automate-git.py b/tools/automate/automate-git.py index 58a8ee31c..772512db1 100644 --- a/tools/automate/automate-git.py +++ b/tools/automate/automate-git.py @@ -893,7 +893,7 @@ if not branch_is_master: # Verify the minimum supported branch number. if int(cef_branch) < 5060: print('The requested branch (%s) is too old to build using this tool. ' + - 'The minimum supported branch is 3071.' % cef_branch) + 'The minimum supported branch is 5060.' % cef_branch) sys.exit(1) # True if the requested branch is 7151 or older. @@ -911,13 +911,20 @@ if platform == 'mac' and not (options.x64build or options.arm64build): 'Add --x64-build or --arm64-build flag to generate a 64-bit build.') sys.exit(1) -# Platforms that build a cef_sandbox library. +# Platforms that build a cef_sandbox library in a separate output directory. sandbox_lib_platforms = ['mac'] -if branch_is_7151_or_older: - sandbox_lib_platforms.append('win') -if not platform in sandbox_lib_platforms and (options.sandboxdistrib or - options.sandboxdistribonly): +# Platforms that build a bootstrap executable in the same output directory. +bootstrap_exe_platforms = [] + +if branch_is_7151_or_older: + sandbox_lib_platforms.append('windows') +else: + bootstrap_exe_platforms.append('windows') + +if not platform in sandbox_lib_platforms and \ + not platform in bootstrap_exe_platforms and \ + (options.sandboxdistrib or options.sandboxdistribonly): print('The sandbox distribution is not supported on this platform.') sys.exit(1) @@ -1342,7 +1349,7 @@ if not options.nobuild and (chromium_checkout_changed or \ target += ' ' + options.testtarget if platform == 'linux': target += ' chrome_sandbox' - if platform == 'windows' and not branch_is_7151_or_older: + if platform in bootstrap_exe_platforms: target += ' bootstrap bootstrapc' # Make a CEF Debug build. diff --git a/tools/distrib/win/README.sandbox.txt b/tools/distrib/win/README.sandbox.txt index 09ee83264..59242634a 100644 --- a/tools/distrib/win/README.sandbox.txt +++ b/tools/distrib/win/README.sandbox.txt @@ -1,9 +1,9 @@ CONTENTS -------- -Debug Contains the Debug build of cef_sandbox.lib. +Debug Contains the Debug build of bootstrap.exe and bootstrapc.exe. -Release Contains the Release build of cef_sandbox.lib. +Release Contains the Release build of bootstrap.exe and bootstrapc.exe. USAGE @@ -11,4 +11,4 @@ USAGE Please visit the CEF Website for usage information. -https://bitbucket.org/chromiumembedded/cef/ +https://bitbucket.org/chromiumembedded/cef/wiki/SandboxSetup.md diff --git a/tools/make_distrib.py b/tools/make_distrib.py index fdffeb2f5..a74ea06cd 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -743,7 +743,7 @@ parser.add_option( action='store_true', dest='sandbox', default=False, - help='include only the cef_sandbox static library (macOS only)') + help='include only the cef_sandbox static library (macOS) or bootstrap executables (Windows)') parser.add_option( '--tools', action='store_true', @@ -791,8 +791,8 @@ if options.armbuild and platform != 'linux': print_error('--arm-build is only supported on Linux.') sys.exit() -if options.sandbox and platform != 'mac': - print_error('--sandbox is only supported on macOS.') +if options.sandbox and not platform in ('mac', 'windows'): + print_error('--sandbox is only supported on macOS and Windows.') sys.exit() if not options.ninjabuild: @@ -1127,8 +1127,6 @@ elif platform == 'windows': {'path': 'vulkan-1.dll'}, ] pdb_files = [ - {'path': 'bootstrap.exe.pdb'}, - {'path': 'bootstrapc.exe.pdb'}, {'path': 'chrome_elf.dll.pdb'}, {'path': 'dxcompiler.dll.pdb', 'conditional': True}, {'path': '%s.pdb' % libcef_dll}, @@ -1144,14 +1142,25 @@ elif platform == 'windows': 'path': 'cefsimple.exe' if platform_arch == 'arm64' else 'cefclient.exe' }) else: + if mode == 'sandbox': + # Only include the sandbox binaries. + binaries = [] + pdb_files = [] + # yapf: disable binaries.extend([ {'path': 'bootstrap.exe'}, {'path': 'bootstrapc.exe'}, - {'path': '%s.lib' % libcef_dll, 'out_path': 'libcef.lib'}, + ]) + pdb_files.extend([ + {'path': 'bootstrap.exe.pdb'}, + {'path': 'bootstrapc.exe.pdb'}, ]) # yapf: enable + if mode != 'sandbox': + binaries.append({'path': '%s.lib' % libcef_dll, 'out_path': 'libcef.lib'}) + # yapf: disable resources = [ {'path': 'chrome_100_percent.pak'}, @@ -1164,7 +1173,7 @@ elif platform == 'windows': valid_build_dir = None - if mode == 'standard': + if mode == 'standard' or mode == 'sandbox': # transfer Debug files build_dir = build_dir_debug if not options.allowpartial or path_exists( @@ -1199,7 +1208,7 @@ elif platform == 'windows': else: sys.stdout.write("No Release build files.\n") - if not valid_build_dir is None: + if mode != 'sandbox' and not valid_build_dir is None: # transfer resource files build_dir = valid_build_dir if mode == 'client':