eric6/Project/Project.py

changeset 7960
e8fc383322f7
parent 7959
44e15eda6506
child 7992
0d1e35a10a0b
equal deleted inserted replaced
7959:44e15eda6506 7960:e8fc383322f7
4223 self.tr('Create Package List'), 4223 self.tr('Create Package List'),
4224 UI.PixmapCache.getIcon("pluginArchiveList"), 4224 UI.PixmapCache.getIcon("pluginArchiveList"),
4225 self.tr('Create &Package List'), 0, 0, 4225 self.tr('Create &Package List'), 0, 0,
4226 self.pluginGrp, 'project_plugin_pkglist') 4226 self.pluginGrp, 'project_plugin_pkglist')
4227 self.pluginPkgListAct.setStatusTip( 4227 self.pluginPkgListAct.setStatusTip(
4228 self.tr('Create an initial PKGLIST file for an eric6 plugin.')) 4228 self.tr('Create an initial PKGLIST file for an eric plugin.'))
4229 self.pluginPkgListAct.setWhatsThis(self.tr( 4229 self.pluginPkgListAct.setWhatsThis(self.tr(
4230 """<b>Create Package List</b>""" 4230 """<b>Create Package List</b>"""
4231 """<p>This creates an initial list of files to include in an""" 4231 """<p>This creates an initial list of files to include in an"""
4232 """ eric6 plugin archive. The list is created from the project""" 4232 """ eric plugin archive. The list is created from the project"""
4233 """ file.</p>""" 4233 """ file.</p>"""
4234 )) 4234 ))
4235 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList) 4235 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList)
4236 self.actions.append(self.pluginPkgListAct) 4236 self.actions.append(self.pluginPkgListAct)
4237 4237
4239 self.tr('Create Plugin Archives'), 4239 self.tr('Create Plugin Archives'),
4240 UI.PixmapCache.getIcon("pluginArchive"), 4240 UI.PixmapCache.getIcon("pluginArchive"),
4241 self.tr('Create Plugin &Archives'), 0, 0, 4241 self.tr('Create Plugin &Archives'), 0, 0,
4242 self.pluginGrp, 'project_plugin_archive') 4242 self.pluginGrp, 'project_plugin_archive')
4243 self.pluginArchiveAct.setStatusTip( 4243 self.pluginArchiveAct.setStatusTip(
4244 self.tr('Create eric6 plugin archive files.')) 4244 self.tr('Create eric plugin archive files.'))
4245 self.pluginArchiveAct.setWhatsThis(self.tr( 4245 self.pluginArchiveAct.setWhatsThis(self.tr(
4246 """<b>Create Plugin Archives</b>""" 4246 """<b>Create Plugin Archives</b>"""
4247 """<p>This creates eric6 plugin archive files using the list""" 4247 """<p>This creates eric plugin archive files using the list"""
4248 """ of files given in a PKGLIST* file. The archive name is""" 4248 """ of files given in a PKGLIST* file. The archive name is"""
4249 """ built from the main script name if not designated in""" 4249 """ built from the main script name if not designated in"""
4250 """ the package list file.</p>""" 4250 """ the package list file.</p>"""
4251 )) 4251 ))
4252 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchives) 4252 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchives)
4256 self.tr('Create Plugin Archives (Snapshot)'), 4256 self.tr('Create Plugin Archives (Snapshot)'),
4257 UI.PixmapCache.getIcon("pluginArchiveSnapshot"), 4257 UI.PixmapCache.getIcon("pluginArchiveSnapshot"),
4258 self.tr('Create Plugin Archives (&Snapshot)'), 0, 0, 4258 self.tr('Create Plugin Archives (&Snapshot)'), 0, 0,
4259 self.pluginGrp, 'project_plugin_sarchive') 4259 self.pluginGrp, 'project_plugin_sarchive')
4260 self.pluginSArchiveAct.setStatusTip(self.tr( 4260 self.pluginSArchiveAct.setStatusTip(self.tr(
4261 'Create eric6 plugin archive files (snapshot releases).')) 4261 'Create eric plugin archive files (snapshot releases).'))
4262 self.pluginSArchiveAct.setWhatsThis(self.tr( 4262 self.pluginSArchiveAct.setWhatsThis(self.tr(
4263 """<b>Create Plugin Archives (Snapshot)</b>""" 4263 """<b>Create Plugin Archives (Snapshot)</b>"""
4264 """<p>This creates eric6 plugin archive files using the list""" 4264 """<p>This creates eric plugin archive files using the list"""
4265 """ of files given in the PKGLIST* file. The archive name is""" 4265 """ of files given in the PKGLIST* file. The archive name is"""
4266 """ built from the main script name if not designated in""" 4266 """ built from the main script name if not designated in"""
4267 """ the package list file. The version entry of the main script""" 4267 """ the package list file. The version entry of the main script"""
4268 """ is modified to reflect a snapshot release.</p>""" 4268 """ is modified to reflect a snapshot release.</p>"""
4269 )) 4269 ))
5312 self.appendFile("PKGLIST") 5312 self.appendFile("PKGLIST")
5313 5313
5314 @pyqtSlot() 5314 @pyqtSlot()
5315 def __pluginCreateArchives(self, snapshot=False): 5315 def __pluginCreateArchives(self, snapshot=False):
5316 """ 5316 """
5317 Private slot to create eric6 plugin archives. 5317 Private slot to create eric plugin archives.
5318 5318
5319 @param snapshot flag indicating snapshot archives (boolean) 5319 @param snapshot flag indicating snapshot archives (boolean)
5320 """ 5320 """
5321 if not self.pdata["MAINSCRIPT"]: 5321 if not self.pdata["MAINSCRIPT"]:
5322 E5MessageBox.critical( 5322 E5MessageBox.critical(
5425 except OSError as why: 5425 except OSError as why:
5426 E5MessageBox.critical( 5426 E5MessageBox.critical(
5427 self.ui, 5427 self.ui,
5428 self.tr("Create Plugin Archive"), 5428 self.tr("Create Plugin Archive"),
5429 self.tr( 5429 self.tr(
5430 """<p>The eric6 plugin archive file <b>{0}</b>""" 5430 """<p>The eric plugin archive file <b>{0}</b>"""
5431 """ could not be created.</p>""" 5431 """ could not be created.</p>"""
5432 """<p>Reason: {1}</p>""").format(archive, str(why))) 5432 """<p>Reason: {1}</p>""").format(archive, str(why)))
5433 errors += 1 5433 errors += 1
5434 count += 1 5434 count += 1
5435 continue 5435 continue
5479 5479
5480 if errors: 5480 if errors:
5481 self.ui.showNotification( 5481 self.ui.showNotification(
5482 UI.PixmapCache.getPixmap("pluginArchive48"), 5482 UI.PixmapCache.getPixmap("pluginArchive48"),
5483 self.tr("Create Plugin Archive"), 5483 self.tr("Create Plugin Archive"),
5484 self.tr("<p>The eric6 plugin archive files were " 5484 self.tr("<p>The eric plugin archive files were "
5485 "created with some errors.</p>"), 5485 "created with some errors.</p>"),
5486 kind=NotificationTypes.Critical, 5486 kind=NotificationTypes.Critical,
5487 timeout=0) 5487 timeout=0)
5488 else: 5488 else:
5489 self.ui.showNotification( 5489 self.ui.showNotification(
5490 UI.PixmapCache.getPixmap("pluginArchive48"), 5490 UI.PixmapCache.getPixmap("pluginArchive48"),
5491 self.tr("Create Plugin Archive"), 5491 self.tr("Create Plugin Archive"),
5492 self.tr("<p>The eric6 plugin archive files were " 5492 self.tr("<p>The eric plugin archive files were "
5493 "created successfully.</p>")) 5493 "created successfully.</p>"))
5494 5494
5495 def __pluginCreateSnapshotArchives(self): 5495 def __pluginCreateSnapshotArchives(self):
5496 """ 5496 """
5497 Private slot to create eric6 plugin archive snapshot releases. 5497 Private slot to create eric plugin archive snapshot releases.
5498 """ 5498 """
5499 self.__pluginCreateArchives(True) 5499 self.__pluginCreateArchives(True)
5500 5500
5501 def __createZipDirEntries(self, path, zipFile): 5501 def __createZipDirEntries(self, path, zipFile):
5502 """ 5502 """

eric ide

mercurial