Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: packagerEdge.py

Issue 29367145: Issue 4719 - Edge packager does not generate an info module (Closed)
Patch Set: Rebase and fix the style Created Dec. 13, 2016, 4:26 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import base64 5 import base64
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import mimetypes 8 import mimetypes
9 import os 9 import os
10 import zipfile 10 import zipfile
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 packagerChrome.convertJS(params, files) 164 packagerChrome.convertJS(params, files)
165 165
166 if metadata.has_section('preprocess'): 166 if metadata.has_section('preprocess'):
167 files.preprocess(metadata.options('preprocess'), {'needsExt': True}) 167 files.preprocess(metadata.options('preprocess'), {'needsExt': True})
168 168
169 if metadata.has_section('import_locales'): 169 if metadata.has_section('import_locales'):
170 packagerChrome.importGeckoLocales(params, files) 170 packagerChrome.importGeckoLocales(params, files)
171 171
172 files['manifest.json'] = packagerChrome.createManifest(params, files) 172 files['manifest.json'] = packagerChrome.createManifest(params, files)
173 173
174 if (metadata.has_option('general', 'backgroundScripts') and
175 'lib/info.js' in metadata.get('general', 'backgroundScripts').split()
kzar 2016/12/13 09:19:22 IMO this looks kind of ugly, I don't like how the
Vasily Kuznetsov 2016/12/13 18:49:58 I would have computed the background scripts list
Sebastian Noack 2016/12/15 13:58:06 I agree with Vasily here. Also, is it even necesse
Oleksandr 2016/12/22 02:53:24 I think touching packagerChrome.py would require a
176 and 'lib/info.js' not in files):
177 files['lib/info.js'] = packagerChrome.createInfoModule(params)
178
174 move_files_to_extension(files) 179 move_files_to_extension(files)
175 180
176 if metadata.has_section('appx_assets'): 181 if metadata.has_section('appx_assets'):
177 for name, path in metadata.items('appx_assets'): 182 for name, path in metadata.items('appx_assets'):
178 path = os.path.join(baseDir, path) 183 path = os.path.join(baseDir, path)
179 files.read(path, '{}/{}'.format(ASSETS_DIR, name)) 184 files.read(path, '{}/{}'.format(ASSETS_DIR, name))
180 185
181 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild) 186 files[MANIFEST] = create_appx_manifest(params, files, releaseBuild)
182 files[BLOCKMAP] = create_appx_blockmap(files) 187 files[BLOCKMAP] = create_appx_blockmap(files)
183 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP]) 188 files[CONTENT_TYPES] = create_content_types_map(files.keys() + [BLOCKMAP])
184 189
185 files.zip(outfile, compression=zipfile.ZIP_STORED) 190 files.zip(outfile, compression=zipfile.ZIP_STORED)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld