Merge pull request #5668 from electron/strip-ffmpeg
Strip ffmpeg in zip file
This commit is contained in:
commit
994cc62031
1 changed files with 13 additions and 5 deletions
|
@ -124,13 +124,17 @@ def copy_license():
|
||||||
|
|
||||||
|
|
||||||
def strip_binaries():
|
def strip_binaries():
|
||||||
|
for binary in TARGET_BINARIES[PLATFORM]:
|
||||||
|
if binary.endswith('.so') or '.' not in binary:
|
||||||
|
strip_binary(os.path.join(DIST_DIR, binary))
|
||||||
|
|
||||||
|
|
||||||
|
def strip_binary(binary_path):
|
||||||
if get_target_arch() == 'arm':
|
if get_target_arch() == 'arm':
|
||||||
strip = 'arm-linux-gnueabihf-strip'
|
strip = 'arm-linux-gnueabihf-strip'
|
||||||
else:
|
else:
|
||||||
strip = 'strip'
|
strip = 'strip'
|
||||||
for binary in TARGET_BINARIES[PLATFORM]:
|
execute([strip, binary_path])
|
||||||
if binary.endswith('.so') or '.' not in binary:
|
|
||||||
execute([strip, os.path.join(DIST_DIR, binary)])
|
|
||||||
|
|
||||||
|
|
||||||
def create_version():
|
def create_version():
|
||||||
|
@ -191,6 +195,10 @@ def create_ffmpeg_zip():
|
||||||
|
|
||||||
shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'ffmpeg', ffmpeg_name),
|
shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'ffmpeg', ffmpeg_name),
|
||||||
DIST_DIR)
|
DIST_DIR)
|
||||||
|
|
||||||
|
if PLATFORM == 'linux':
|
||||||
|
strip_binary(os.path.join(DIST_DIR, ffmpeg_name))
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
make_zip(zip_file, [ffmpeg_name, 'LICENSE', 'LICENSES.chromium.html'], [])
|
make_zip(zip_file, [ffmpeg_name, 'LICENSE', 'LICENSES.chromium.html'], [])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue