Mac v2 signing - Bug 1059467 - Move precomplete file from the root of the Mac bundle to Contents/Resources. r=bbondy, r=nthomas

This commit is contained in:
Robert Strong
2014-09-29 11:51:55 -07:00
parent 0d82b5f691
commit e2938e9434
9 changed files with 44 additions and 80 deletions

View File

@@ -44,14 +44,17 @@ def generate_precomplete(root_path):
application update instructions. The given directory is used
for the location to enumerate and to create the precomplete file.
"""
rel_path_precomplete = "precomplete"
# If inside a Mac bundle use the root of the bundle for the path.
if os.path.basename(root_path) == "Resources":
root_path = os.path.abspath(os.path.join(root_path, '../../'))
rel_path_precomplete = "Contents/Resources/precomplete"
rel_file_path_list, rel_dir_path_list = get_build_entries(root_path)
precomplete_file_path = os.path.join(root_path,"precomplete")
# open in binary mode to prevent OS specific line endings.
precomplete_file_path = os.path.join(root_path,rel_path_precomplete)
# Open the file so it exists before building the list of files and open it
# in binary mode to prevent OS specific line endings.
precomplete_file = open(precomplete_file_path, "wb")
rel_file_path_list, rel_dir_path_list = get_build_entries(root_path)
for rel_file_path in rel_file_path_list:
precomplete_file.writelines("remove \""+rel_file_path+"\"\n")