From 677a3172741d468c2c94923c35adbfb8131fbf3c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 23 May 2016 15:47:07 -0700 Subject: [PATCH] Strip ffmpeg in zip file --- script/create-dist.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/script/create-dist.py b/script/create-dist.py index 4601f6df564d..6602cbf2c143 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -124,13 +124,17 @@ def copy_license(): def strip_binaries(): - if get_target_arch() == 'arm': - strip = 'arm-linux-gnueabihf-strip' - else: - strip = 'strip' for binary in TARGET_BINARIES[PLATFORM]: if binary.endswith('.so') or '.' not in binary: - execute([strip, os.path.join(DIST_DIR, binary)]) + strip_binary(os.path.join(DIST_DIR, binary)) + + +def strip_binary(binary_path): + if get_target_arch() == 'arm': + strip = 'arm-linux-gnueabihf-strip' + else: + strip = 'strip' + execute([strip, binary_path]) def create_version(): @@ -191,6 +195,10 @@ def create_ffmpeg_zip(): shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'ffmpeg', ffmpeg_name), DIST_DIR) + + if PLATFORM == 'linux': + strip_binary(os.path.join(DIST_DIR, ffmpeg_name)) + with scoped_cwd(DIST_DIR): make_zip(zip_file, [ffmpeg_name, 'LICENSE', 'LICENSES.chromium.html'], [])