Index: packagerChrome.py |
=================================================================== |
--- a/packagerChrome.py |
+++ b/packagerChrome.py |
@@ -34,7 +34,7 @@ |
return result |
def getPackageFiles(params): |
- result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui',)) |
+ result = set(('_locales', 'icons', 'jquery-ui', 'lib', 'skin', 'ui', 'ext')) |
if params['devenv']: |
result.add('qunit') |
@@ -279,10 +279,14 @@ |
files[operaFile] = files[chromeFile] |
del files[chromeFile] |
- # Hack: Replace "Chrome" by "Opera" in the locales |
+ if params['type'] in ('opera', 'safari'): |
+ # Hack: Replace "Chrome" by "Opera" or "Safari" in the locales |
for path, data in files.iteritems(): |
if path.startswith("_locales/") and path.endswith("/messages.json"): |
- files[path] = re.sub(r"\bChrome\b", "Opera", data) |
+ # Hack: There is exactly one text (in the first run page) that contains |
+ # "Google Chrome" and means Google Chrome, even though it is only shown |
+ # on Safari. |
+ files[path] = re.sub(r"\b(?<!Google )Chrome\b", params['type'].capitalize(), data) |
def signBinary(zipdata, keyFile): |
import M2Crypto |
@@ -335,6 +339,16 @@ |
if metadata.has_section('convert_js'): |
convertJS(params, files) |
+ if metadata.has_section('convert_img'): |
+ from imageConversion import convertImages |
+ convertImages(params, files) |
+ |
+ if metadata.has_section('preprocess'): |
+ files.preprocess( |
+ [f for f, _ in metadata.items('preprocess')], |
+ {'needsExt': True} |
+ ) |
+ |
if metadata.has_section('import_locales'): |
importGeckoLocales(params, files) |