mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add an archive creation step to make_distrib.py.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@325 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -10,6 +10,21 @@ import os
|
|||||||
import re
|
import re
|
||||||
from svn_util import *
|
from svn_util import *
|
||||||
import sys
|
import sys
|
||||||
|
import zipfile
|
||||||
|
|
||||||
|
def create_archive(input_dir, zip_file):
|
||||||
|
""" Creates a zip archive of the specified input directory. """
|
||||||
|
zf = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED)
|
||||||
|
def addDir(dir):
|
||||||
|
for f in os.listdir(dir):
|
||||||
|
full_path = os.path.join(dir, f)
|
||||||
|
if os.path.isdir(full_path):
|
||||||
|
addDir(full_path)
|
||||||
|
else:
|
||||||
|
zf.write(full_path, os.path.relpath(full_path, \
|
||||||
|
os.path.join(input_dir, os.pardir)))
|
||||||
|
addDir(input_dir)
|
||||||
|
zf.close()
|
||||||
|
|
||||||
def create_readme(src, output_dir, cef_rev, chromium_rev, date):
|
def create_readme(src, output_dir, cef_rev, chromium_rev, date):
|
||||||
""" Creates the README.TXT file. """
|
""" Creates the README.TXT file. """
|
||||||
@ -310,3 +325,9 @@ elif platform == 'linux':
|
|||||||
# transfer additional files, if any
|
# transfer additional files, if any
|
||||||
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/linux/transfer.cfg'), \
|
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib/linux/transfer.cfg'), \
|
||||||
output_dir, options.quiet)
|
output_dir, options.quiet)
|
||||||
|
|
||||||
|
# Create an archive of the output directory
|
||||||
|
zip_file = os.path.split(output_dir)[1] + '.zip'
|
||||||
|
if not options.quiet:
|
||||||
|
sys.stdout.write('Creating '+zip_file+"...\n")
|
||||||
|
create_archive(output_dir, os.path.join(output_dir, os.pardir, zip_file))
|
||||||
|
Reference in New Issue
Block a user