'tools/mac/generate_breakpad_symbols.py',
'--build-dir=<(PRODUCT_DIR)',
'--binary=<(PRODUCT_DIR)/<(product_name).app/Contents/MacOS/<(product_name)',
- '--symbols-dir=<(PRODUCT_DIR)/<(product_name).breakpad.syms',
+ '--symbols-dir=<(PRODUCT_DIR)/atom-shell.breakpad.syms',
'--clear',
'--jobs=16',
],
os.makedirs(DIST_DIR)
force_build()
+ create_symbols()
copy_binaries()
copy_headers()
copy_license()
create_version()
- create_zip()
+ create_dist_zip()
+ create_symbols_zip()
create_header_tarball()
version_file.write(ATOM_SHELL_VRESION)
-def create_zip():
+def create_symbols():
+ out_dir = os.path.join(SOURCE_ROOT, 'out', 'Release')
+
+ build = os.path.join(SOURCE_ROOT, 'script', 'build.py')
+ subprocess.check_output([sys.executable, build, '-c', 'Release',
+ '-t', 'atom_dump_symbols'])
+
+ directory = 'atom-shell.breakpad.syms'
+ shutil.copytree(os.path.join(out_dir, directory),
+ os.path.join(DIST_DIR, directory),
+ symlinks=True)
+
+
+def create_dist_zip():
dist_name = 'atom-shell-{0}-{1}.zip'.format(ATOM_SHELL_VRESION,
TARGET_PLATFORM)
zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
make_zip(zip_file, files, dirs)
+def create_symbols_zip():
+ dist_name = 'atom-shell-{0}-{1}-symbols.zip'.format(ATOM_SHELL_VRESION,
+ TARGET_PLATFORM)
+ zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name)
+
+ with scoped_cwd(DIST_DIR):
+ files = ['LICENSE', 'version']
+ dirs = ['atom-shell.breakpad.syms']
+ make_zip(zip_file, files, dirs)
+
+
def create_header_tarball():
with scoped_cwd(DIST_DIR):
tarball = tarfile.open(name=DIST_HEADERS_DIR + '.tar.gz', mode='w:gz')
def extract_zip(zip_path, destination):
if sys.platform == 'darwin':
# Use unzip command on Mac to keep symbol links in zip file work.
- subprocess.check_call(['unzip', zip_path, '-d', destination])
+ subprocess.check_output(['unzip', zip_path, '-d', destination])
else:
with zipfile.ZipFile(zip_path) as z:
z.extractall(destination)
safe_unlink(zip_file_path)
if sys.platform == 'darwin':
files += dirs
- subprocess.check_call(['zip', '-r', '-y', zip_file_path] + files)
+ subprocess.check_output(['zip', '-r', '-y', zip_file_path] + files)
else:
zip_file = zipfile.ZipFile(zip_file_path, "w", zipfile.ZIP_DEFLATED)
for filename in files: