2018-09-28 14:10:42 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2018-09-27 05:38:06 +00:00
|
|
|
import glob
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from lib.config import PLATFORM, get_target_arch
|
|
|
|
from lib.util import scoped_cwd, get_electron_version, make_zip, \
|
2018-09-28 06:48:09 +00:00
|
|
|
get_electron_branding, get_out_dir
|
2018-09-27 05:38:06 +00:00
|
|
|
|
|
|
|
ELECTRON_VERSION = get_electron_version()
|
2018-09-28 06:48:09 +00:00
|
|
|
PROJECT_NAME = get_electron_branding()['project_name']
|
2018-09-27 05:38:06 +00:00
|
|
|
OUT_DIR = get_out_dir()
|
|
|
|
|
|
|
|
def main():
|
|
|
|
if get_target_arch() == 'mips64el':
|
|
|
|
return
|
|
|
|
|
|
|
|
dist_name = 'symbols.zip'
|
|
|
|
zip_file = os.path.join(OUT_DIR, dist_name)
|
|
|
|
licenses = ['LICENSE', 'LICENSES.chromium.html', 'version']
|
|
|
|
|
|
|
|
with scoped_cwd(OUT_DIR):
|
|
|
|
dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)]
|
|
|
|
make_zip(zip_file, licenses, dirs)
|
|
|
|
|
|
|
|
if PLATFORM == 'darwin':
|
|
|
|
dsym_name = 'dsym.zip'
|
|
|
|
with scoped_cwd(OUT_DIR):
|
|
|
|
dsyms = glob.glob('*.dSYM')
|
|
|
|
make_zip(os.path.join(OUT_DIR, dsym_name), licenses, dsyms)
|
|
|
|
elif PLATFORM == 'win32':
|
|
|
|
pdb_name = 'pdb.zip'
|
|
|
|
with scoped_cwd(OUT_DIR):
|
|
|
|
pdbs = glob.glob('*.pdb')
|
|
|
|
make_zip(os.path.join(OUT_DIR, pdb_name), pdbs + licenses, [])
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(main())
|