OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This Source Code Form is subject to the terms of the Mozilla Public | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
4 # License, v. 2.0. If a copy of the MPL was not distributed with this | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
6 | 6 |
7 import os | 7 import os |
8 import re | 8 import re |
9 import json | 9 import json |
10 import ConfigParser | 10 import ConfigParser |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 if metadata.has_section('import_locales'): | 241 if metadata.has_section('import_locales'): |
242 importGeckoLocales(params, files) | 242 importGeckoLocales(params, files) |
243 | 243 |
244 files['lib/info.js'] = createInfoModule(params) | 244 files['lib/info.js'] = createInfoModule(params) |
245 files['background.html'] = createBackgroundPage(params) | 245 files['background.html'] = createBackgroundPage(params) |
246 files['Info.plist'] = createManifest(params, files) | 246 files['Info.plist'] = createManifest(params, files) |
247 | 247 |
248 fixAbsoluteUrls(files) | 248 fixAbsoluteUrls(files) |
249 | 249 |
250 if not devenv: | 250 dirname = metadata.get('general', 'basename') + '.safariextension' |
251 dirname = metadata.get('general', 'basename') + '.safariextension' | 251 for filename in files.keys(): |
252 for filename in files.keys(): | 252 files[os.path.join(dirname, filename)] = files.pop(filename) |
253 files[os.path.join(dirname, filename)] = files.pop(filename) | |
254 | 253 |
255 if keyFile: | 254 if not devenv and keyFile: |
256 createSignedXarArchive(outFile, files, keyFile) | 255 createSignedXarArchive(outFile, files, keyFile) |
257 return | 256 else: |
258 | 257 files.zip(outFile) |
259 files.zip(outFile) | |
OLD | NEW |