Index: packagerChrome.py |
=================================================================== |
--- a/packagerChrome.py |
+++ b/packagerChrome.py |
@@ -134,17 +134,20 @@ def createManifest(params, files): |
if '_dummy' in data: |
del data['_dummy'] |
manifest = json.dumps(data, sort_keys=True, indent=2) |
return manifest.encode('utf-8') |
def createInfoModule(params): |
- template = getTemplate('chromeInfo.js.tmpl') |
+ if params['type'] == 'gecko-webext': |
+ template = getTemplate('geckoInfo.js.tmpl') |
+ else: |
+ template = getTemplate('chromeInfo.js.tmpl') |
return template.render(params).encode('utf-8') |
def convertJS(params, files): |
from jshydra.abp_rewrite import rewrite_js |
output_files = collections.OrderedDict() |
args = collections.defaultdict(list) |
@@ -330,17 +333,21 @@ def writePackage(outputFile, pubkey, sig |
file.write(zipdata) |
def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuild=False, keyFile=None, devenv=False): |
metadata = readMetadata(baseDir, type) |
version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) |
if outFile == None: |
- outFile = getDefaultFileName(metadata, version, 'crx' if keyFile else 'zip') |
+ if type == 'gecko-webext': |
+ file_extension = 'xpi' |
+ else: |
+ file_extension = 'crx' if keyFile else 'zip' |
+ outFile = getDefaultFileName(metadata, version, file_extension) |
params = { |
'type': type, |
'baseDir': baseDir, |
'releaseBuild': releaseBuild, |
'version': version, |
'devenv': devenv, |
'metadata': metadata, |