Changeset 506
- Timestamp:
- 2007-07-09 16:56:36 (2 years ago)
- Files:
-
- tools/make.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/make.py
r504 r506 35 35 release_id = '{DDC359D1-844A-42a7-9AA1-88A850A938A8}' 36 36 37 xpi_file = 'downthemall %s.xpi'37 xpi_file = 'downthemall.xpi' 38 38 39 39 class XPI: … … 71 71 self.jar() 72 72 yield "creating the xpi" 73 self.createXPI(xpi_file) 73 for x in self.createXPI(xpi_file): 74 yield x 74 75 yield "cleaning up" 75 76 self.cleanup() … … 235 236 if self.opts.revision: 236 237 additional += '-r%d' % self.getrevision() 237 xpi_file = ZipFile(xpi_file % additional, 'w', ZIP_DEFLATED) 238 output = xpi_file % additional 239 xpi_file = ZipFile(output, 'w', ZIP_DEFLATED) 238 240 for x in self.getfilelist(self.opts.exportTo): 239 241 xpi_file.write(x, x[len(self.opts.exportTo) + 1:].encode('cp437')) 240 242 xpi_file.close() 243 yield "written to: " + output 241 244 242 245 def cleanup(self): … … 245 248 246 249 def main(): 250 global xpi_file, svn_path 251 247 252 parser = OptionParser(usage="%prog [options] [branch]", version="$Id$") 248 253 parser.add_option( … … 303 308 default=False 304 309 ) 310 parser.add_option( 311 '--output', 312 dest='xpifile', 313 help='the resulting xpi file (might be changed by the modificators)', 314 type='string', 315 default=xpi_file 316 ) 305 317 opts, args = parser.parse_args() 306 318 if len(args) > 1: … … 311 323 opts.branch, = args 312 324 313 global xpi_file, svn_path325 xpi_file = "%s%%s%s" % path.splitext(opts.xpifile) 314 326 315 327 xpi = XPI(opts, svn_path)
