389 self.pfile = "" # name of the project file |
389 self.pfile = "" # name of the project file |
390 self.ppath = "" # name of the project directory |
390 self.ppath = "" # name of the project directory |
391 self.translationsRoot = "" # the translations prefix |
391 self.translationsRoot = "" # the translations prefix |
392 self.name = "" |
392 self.name = "" |
393 self.opened = False |
393 self.opened = False |
394 self.subdirs = [""] # record the project dir as a relative path |
394 self.subdirs = [""] |
395 # (i.e. empty path) |
395 # record the project dir as a relative path (i.e. empty path) |
396 self.otherssubdirs = [] |
396 self.otherssubdirs = [] |
397 self.vcs = None |
397 self.vcs = None |
398 self.vcsRequested = False |
398 self.vcsRequested = False |
399 self.dbgCmdline = '' |
399 self.dbgCmdline = '' |
400 self.dbgWd = '' |
400 self.dbgWd = '' |
1557 "<p>The file <b>{0}</b> already exists.</p>" |
1557 "<p>The file <b>{0}</b> already exists.</p>" |
1558 "<p>Overwrite it?</p>") |
1558 "<p>Overwrite it?</p>") |
1559 .format(targetfile), |
1559 .format(targetfile), |
1560 icon=E5MessageBox.Warning) |
1560 icon=E5MessageBox.Warning) |
1561 if not res: |
1561 if not res: |
1562 continue # don't overwrite, carry on |
1562 continue |
1563 # with next file |
1563 # don't overwrite, carry on with next file |
1564 |
1564 |
1565 shutil.copy(file, target) |
1565 shutil.copy(file, target) |
1566 except EnvironmentError: |
1566 except EnvironmentError: |
1567 continue |
1567 continue |
1568 self.appendFile(targetfile) |
1568 self.appendFile(targetfile) |
4611 self.tr( |
4611 self.tr( |
4612 """<p>The file <b>PKGLIST</b> could not be created.</p>""" |
4612 """<p>The file <b>PKGLIST</b> could not be created.</p>""" |
4613 """<p>Reason: {0}</p>""").format(str(why))) |
4613 """<p>Reason: {0}</p>""").format(str(why))) |
4614 return |
4614 return |
4615 |
4615 |
4616 if not "PKGLIST" in self.pdata["OTHERS"]: |
4616 if "PKGLIST" not in self.pdata["OTHERS"]: |
4617 self.appendFile("PKGLIST") |
4617 self.appendFile("PKGLIST") |
4618 |
4618 |
4619 @pyqtSlot() |
4619 @pyqtSlot() |
4620 def __pluginCreateArchive(self, snapshot=False): |
4620 def __pluginCreateArchive(self, snapshot=False): |
4621 """ |
4621 """ |
4696 """<p>Reason: {1}</p>""") |
4696 """<p>Reason: {1}</p>""") |
4697 .format(os.path.join(self.ppath, name), str(why))) |
4697 .format(os.path.join(self.ppath, name), str(why))) |
4698 archiveFile.writestr("VERSION", version.encode("utf-8")) |
4698 archiveFile.writestr("VERSION", version.encode("utf-8")) |
4699 archiveFile.close() |
4699 archiveFile.close() |
4700 |
4700 |
4701 if not archive in self.pdata["OTHERS"]: |
4701 if archive not in self.pdata["OTHERS"]: |
4702 self.appendFile(archive) |
4702 self.appendFile(archive) |
4703 |
4703 |
4704 if self.ui.notificationsEnabled(): |
4704 if self.ui.notificationsEnabled(): |
4705 self.ui.showNotification( |
4705 self.ui.showNotification( |
4706 UI.PixmapCache.getPixmap("pluginArchive48.png"), |
4706 UI.PixmapCache.getPixmap("pluginArchive48.png"), |
4734 return |
4734 return |
4735 |
4735 |
4736 if not path.endswith("/") and not path.endswith("\\"): |
4736 if not path.endswith("/") and not path.endswith("\\"): |
4737 path = "{0}/".format(path) |
4737 path = "{0}/".format(path) |
4738 |
4738 |
4739 if not path in zipFile.namelist(): |
4739 if path not in zipFile.namelist(): |
4740 self.__createZipDirEntries(os.path.split(path[:-1])[0], zipFile) |
4740 self.__createZipDirEntries(os.path.split(path[:-1])[0], zipFile) |
4741 zipFile.writestr(path, b"") |
4741 zipFile.writestr(path, b"") |
4742 |
4742 |
4743 def __createSnapshotSource(self, filename): |
4743 def __createSnapshotSource(self, filename): |
4744 """ |
4744 """ |