3125 Public method to get the path of the management directory. |
3125 Public method to get the path of the management directory. |
3126 |
3126 |
3127 @return path of the management directory (string) |
3127 @return path of the management directory (string) |
3128 """ |
3128 """ |
3129 if Utilities.isWindowsPlatform(): |
3129 if Utilities.isWindowsPlatform(): |
3130 return os.path.join(self.ppath, "_eric5project") |
3130 return os.path.join(self.ppath, "_eric6project") |
3131 else: |
3131 else: |
3132 return os.path.join(self.ppath, ".eric5project") |
3132 return os.path.join(self.ppath, ".eric6project") |
3133 |
3133 |
3134 def createProjectManagementDir(self): |
3134 def createProjectManagementDir(self): |
3135 """ |
3135 """ |
3136 Public method to create the project management directory. |
3136 Public method to create the project management directory. |
3137 |
3137 |
3704 self.tr('Create Package List'), |
3704 self.tr('Create Package List'), |
3705 UI.PixmapCache.getIcon("pluginArchiveList.png"), |
3705 UI.PixmapCache.getIcon("pluginArchiveList.png"), |
3706 self.tr('Create &Package List'), 0, 0, |
3706 self.tr('Create &Package List'), 0, 0, |
3707 self.pluginGrp, 'project_plugin_pkglist') |
3707 self.pluginGrp, 'project_plugin_pkglist') |
3708 self.pluginPkgListAct.setStatusTip( |
3708 self.pluginPkgListAct.setStatusTip( |
3709 self.tr('Create an initial PKGLIST file for an eric5 plugin.')) |
3709 self.tr('Create an initial PKGLIST file for an eric6 plugin.')) |
3710 self.pluginPkgListAct.setWhatsThis(self.tr( |
3710 self.pluginPkgListAct.setWhatsThis(self.tr( |
3711 """<b>Create Package List</b>""" |
3711 """<b>Create Package List</b>""" |
3712 """<p>This creates an initial list of files to include in an""" |
3712 """<p>This creates an initial list of files to include in an""" |
3713 """ eric5 plugin archive. The list is created from the project""" |
3713 """ eric6 plugin archive. The list is created from the project""" |
3714 """ file.</p>""" |
3714 """ file.</p>""" |
3715 )) |
3715 )) |
3716 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList) |
3716 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList) |
3717 self.actions.append(self.pluginPkgListAct) |
3717 self.actions.append(self.pluginPkgListAct) |
3718 |
3718 |
3720 self.tr('Create Plugin Archive'), |
3720 self.tr('Create Plugin Archive'), |
3721 UI.PixmapCache.getIcon("pluginArchive.png"), |
3721 UI.PixmapCache.getIcon("pluginArchive.png"), |
3722 self.tr('Create Plugin &Archive'), 0, 0, |
3722 self.tr('Create Plugin &Archive'), 0, 0, |
3723 self.pluginGrp, 'project_plugin_archive') |
3723 self.pluginGrp, 'project_plugin_archive') |
3724 self.pluginArchiveAct.setStatusTip( |
3724 self.pluginArchiveAct.setStatusTip( |
3725 self.tr('Create an eric5 plugin archive file.')) |
3725 self.tr('Create an eric6 plugin archive file.')) |
3726 self.pluginArchiveAct.setWhatsThis(self.tr( |
3726 self.pluginArchiveAct.setWhatsThis(self.tr( |
3727 """<b>Create Plugin Archive</b>""" |
3727 """<b>Create Plugin Archive</b>""" |
3728 """<p>This creates an eric5 plugin archive file using the list""" |
3728 """<p>This creates an eric6 plugin archive file using the list""" |
3729 """ of files given in the PKGLIST file. The archive name is""" |
3729 """ of files given in the PKGLIST file. The archive name is""" |
3730 """ built from the main script name.</p>""" |
3730 """ built from the main script name.</p>""" |
3731 )) |
3731 )) |
3732 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchive) |
3732 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchive) |
3733 self.actions.append(self.pluginArchiveAct) |
3733 self.actions.append(self.pluginArchiveAct) |
3736 self.tr('Create Plugin Archive (Snapshot)'), |
3736 self.tr('Create Plugin Archive (Snapshot)'), |
3737 UI.PixmapCache.getIcon("pluginArchiveSnapshot.png"), |
3737 UI.PixmapCache.getIcon("pluginArchiveSnapshot.png"), |
3738 self.tr('Create Plugin Archive (&Snapshot)'), 0, 0, |
3738 self.tr('Create Plugin Archive (&Snapshot)'), 0, 0, |
3739 self.pluginGrp, 'project_plugin_sarchive') |
3739 self.pluginGrp, 'project_plugin_sarchive') |
3740 self.pluginSArchiveAct.setStatusTip(self.tr( |
3740 self.pluginSArchiveAct.setStatusTip(self.tr( |
3741 'Create an eric5 plugin archive file (snapshot release).')) |
3741 'Create an eric6 plugin archive file (snapshot release).')) |
3742 self.pluginSArchiveAct.setWhatsThis(self.tr( |
3742 self.pluginSArchiveAct.setWhatsThis(self.tr( |
3743 """<b>Create Plugin Archive (Snapshot)</b>""" |
3743 """<b>Create Plugin Archive (Snapshot)</b>""" |
3744 """<p>This creates an eric5 plugin archive file using the list""" |
3744 """<p>This creates an eric6 plugin archive file using the list""" |
3745 """ of files given in the PKGLIST file. The archive name is""" |
3745 """ of files given in the PKGLIST file. The archive name is""" |
3746 """ built from the main script name. The version entry of the""" |
3746 """ built from the main script name. The version entry of the""" |
3747 """ main script is modified to reflect a snapshot release.</p>""" |
3747 """ main script is modified to reflect a snapshot release.</p>""" |
3748 )) |
3748 )) |
3749 self.pluginSArchiveAct.triggered.connect( |
3749 self.pluginSArchiveAct.triggered.connect( |
4632 self.appendFile("PKGLIST") |
4632 self.appendFile("PKGLIST") |
4633 |
4633 |
4634 @pyqtSlot() |
4634 @pyqtSlot() |
4635 def __pluginCreateArchive(self, snapshot=False): |
4635 def __pluginCreateArchive(self, snapshot=False): |
4636 """ |
4636 """ |
4637 Private slot to create an eric5 plugin archive. |
4637 Private slot to create an eric6 plugin archive. |
4638 |
4638 |
4639 @param snapshot flag indicating a snapshot archive (boolean) |
4639 @param snapshot flag indicating a snapshot archive (boolean) |
4640 """ |
4640 """ |
4641 pkglist = os.path.join(self.ppath, "PKGLIST") |
4641 pkglist = os.path.join(self.ppath, "PKGLIST") |
4642 if not os.path.exists(pkglist): |
4642 if not os.path.exists(pkglist): |
4678 except IOError as why: |
4678 except IOError as why: |
4679 E5MessageBox.critical( |
4679 E5MessageBox.critical( |
4680 self.ui, |
4680 self.ui, |
4681 self.tr("Create Plugin Archive"), |
4681 self.tr("Create Plugin Archive"), |
4682 self.tr( |
4682 self.tr( |
4683 """<p>The eric5 plugin archive file <b>{0}</b> could """ |
4683 """<p>The eric6 plugin archive file <b>{0}</b> could """ |
4684 """not be created.</p>""" |
4684 """not be created.</p>""" |
4685 """<p>Reason: {1}</p>""").format(archive, str(why))) |
4685 """<p>Reason: {1}</p>""").format(archive, str(why))) |
4686 return |
4686 return |
4687 |
4687 |
4688 for name in names: |
4688 for name in names: |
4719 if self.ui.notificationsEnabled(): |
4719 if self.ui.notificationsEnabled(): |
4720 self.ui.showNotification( |
4720 self.ui.showNotification( |
4721 UI.PixmapCache.getPixmap("pluginArchive48.png"), |
4721 UI.PixmapCache.getPixmap("pluginArchive48.png"), |
4722 self.tr("Create Plugin Archive"), |
4722 self.tr("Create Plugin Archive"), |
4723 self.tr( |
4723 self.tr( |
4724 """<p>The eric5 plugin archive file <b>{0}</b> was """ |
4724 """<p>The eric6 plugin archive file <b>{0}</b> was """ |
4725 """created successfully.</p>""") |
4725 """created successfully.</p>""") |
4726 .format(os.path.basename(archive))) |
4726 .format(os.path.basename(archive))) |
4727 else: |
4727 else: |
4728 E5MessageBox.information( |
4728 E5MessageBox.information( |
4729 self.ui, |
4729 self.ui, |
4730 self.tr("Create Plugin Archive"), |
4730 self.tr("Create Plugin Archive"), |
4731 self.tr( |
4731 self.tr( |
4732 """<p>The eric5 plugin archive file <b>{0}</b> was """ |
4732 """<p>The eric6 plugin archive file <b>{0}</b> was """ |
4733 """created successfully.</p>""").format(archive)) |
4733 """created successfully.</p>""").format(archive)) |
4734 |
4734 |
4735 def __pluginCreateSnapshotArchive(self): |
4735 def __pluginCreateSnapshotArchive(self): |
4736 """ |
4736 """ |
4737 Private slot to create an eric5 plugin archive snapshot release. |
4737 Private slot to create an eric6 plugin archive snapshot release. |
4738 """ |
4738 """ |
4739 self.__pluginCreateArchive(True) |
4739 self.__pluginCreateArchive(True) |
4740 |
4740 |
4741 def __createZipDirEntries(self, path, zipFile): |
4741 def __createZipDirEntries(self, path, zipFile): |
4742 """ |
4742 """ |