Create zip distribution for binaries on Windows.
This commit is contained in:
parent
24f510ca03
commit
beba27ed1e
2 changed files with 14 additions and 3 deletions
|
@ -129,13 +129,14 @@ def create_version():
|
||||||
|
|
||||||
|
|
||||||
def create_zip():
|
def create_zip():
|
||||||
print "Zipping distribution..."
|
|
||||||
zip_file = os.path.join(SOURCE_ROOT, 'dist', 'atom-shell.zip')
|
zip_file = os.path.join(SOURCE_ROOT, 'dist', 'atom-shell.zip')
|
||||||
safe_unlink(zip_file)
|
safe_unlink(zip_file)
|
||||||
|
|
||||||
with scoped_cwd(DIST_DIR):
|
with scoped_cwd(DIST_DIR):
|
||||||
files = ['Atom.app', 'LICENSE', 'version']
|
files = TARGET_BINARIES[TARGET_PLATFORM] + \
|
||||||
subprocess.check_call(['zip', '-r', '-y', zip_file] + files)
|
TARGET_DIRECTORIES[TARGET_PLATFORM] + \
|
||||||
|
['LICENSE', 'version']
|
||||||
|
make_zip(zip_file, files)
|
||||||
|
|
||||||
|
|
||||||
def create_header_tarball():
|
def create_header_tarball():
|
||||||
|
|
|
@ -64,6 +64,16 @@ def extract_zip(zip_path, destination):
|
||||||
with zipfile.ZipFile(zip_path) as z:
|
with zipfile.ZipFile(zip_path) as z:
|
||||||
z.extractall(destination)
|
z.extractall(destination)
|
||||||
|
|
||||||
|
def make_zip(zip_file_path, files):
|
||||||
|
safe_unlink(zip_file_path)
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
subprocess.check_call(['zip', '-r', '-y', zip_file_path] + files)
|
||||||
|
else:
|
||||||
|
zip_file = zipfile.ZipFile(zip_file_path, "w")
|
||||||
|
for filename in files:
|
||||||
|
zip_file.write(filename, filename)
|
||||||
|
zip_file.close()
|
||||||
|
|
||||||
|
|
||||||
def rm_rf(path):
|
def rm_rf(path):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue