Skip to content

Commit daffb48

Browse files
committed
Create and upload free version of ffmpeg
1 parent cd30308 commit daffb48

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

script/create-dist.py

+19
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def main():
9999
create_dist_zip()
100100
create_chrome_binary_zip('chromedriver', get_chromedriver_version())
101101
create_chrome_binary_zip('mksnapshot', ATOM_SHELL_VERSION)
102+
create_ffmpeg_zip()
102103
create_symbols_zip()
103104

104105

@@ -205,6 +206,24 @@ def create_chrome_binary_zip(binary, version):
205206
make_zip(zip_file, files, [])
206207

207208

209+
def create_ffmpeg_zip():
210+
dist_name = 'ffmpeg-{0}-{1}-{2}.zip'.format(
211+
ATOM_SHELL_VERSION, get_platform_key(), get_target_arch())
212+
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
213+
214+
if PLATFORM == 'darwin':
215+
ffmpeg_name = 'libffmpeg.dylib'
216+
elif PLATFORM == 'linux':
217+
ffmpeg_name = 'libffmpeg.so'
218+
elif PLATFORM == 'win32':
219+
ffmpeg_name = 'ffmpeg.dll'
220+
221+
shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'ffmpeg', ffmpeg_name),
222+
DIST_DIR)
223+
with scoped_cwd(DIST_DIR):
224+
make_zip(zip_file, [ffmpeg_name, 'LICENSE', 'LICENSES.chromium.html'], [])
225+
226+
208227
def create_symbols_zip():
209228
dist_name = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME,
210229
ATOM_SHELL_VERSION,

script/upload.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
ATOM_SHELL_VERSION,
3636
get_platform_key(),
3737
get_target_arch())
38-
MKSNAPSHOT_NAME = 'mksnapshot-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION,
39-
get_platform_key(),
40-
get_target_arch())
4138

4239

4340
def main():
@@ -89,12 +86,19 @@ def main():
8986
if PLATFORM == 'darwin':
9087
upload_atom_shell(github, release, os.path.join(DIST_DIR, DSYM_NAME))
9188

89+
# Upload free version of ffmpeg.
90+
ffmpeg = 'ffmpeg-{0}-{1}-{2}.zip'.format(
91+
ATOM_SHELL_VERSION, get_platform_key(), get_target_arch())
92+
upload_atom_shell(github, release, os.path.join(DIST_DIR, ffmpeg))
93+
9294
# Upload chromedriver and mksnapshot for minor version update.
9395
if parse_version(args.version)[2] == '0':
9496
chromedriver = 'chromedriver-{0}-{1}-{2}.zip'.format(
9597
get_chromedriver_version(), get_platform_key(), get_target_arch())
9698
upload_atom_shell(github, release, os.path.join(DIST_DIR, chromedriver))
97-
upload_atom_shell(github, release, os.path.join(DIST_DIR, MKSNAPSHOT_NAME))
99+
mksnapshot = 'mksnapshot-{0}-{1}-{2}.zip'.format(
100+
ATOM_SHELL_VERSION, get_platform_key(), get_target_arch())
101+
upload_atom_shell(github, release, os.path.join(DIST_DIR, mksnapshot))
98102

99103
if PLATFORM == 'win32' and not tag_exists:
100104
# Upload node headers.

0 commit comments

Comments
 (0)