def run(self): # Create config file createSyslinux(self.dst) for file in self.file_list: size = getFileSize(file) file_name = os.path.split(file)[1] self.message = self.tr("Copying %s (%0.2fMB)" % (file_name, size)) self.emit(QtCore.SIGNAL("updateLabel"), self.message) shutil.copyfile(file, "%s/%s" % (self.dst, file.split(self.src)[-1])) self.emit(QtCore.SIGNAL("incrementProgress()")) self.emit(QtCore.SIGNAL("closeProgressDialog()"))
def __createImage(self, src, dst): createUSBDirs(dst) self.utils.cprint(_("Creating boot manager..."), "yellow") if createSyslinux(dst): self.utils.cprint(_("Could not create boot manager."), "red") return False self.__copyImage(MOUNT_ISO, dst) self.utils.cprint(_("Unmounting image..."), "green") cmd = "fusermount -u %s" % MOUNT_ISO if runCommand(cmd): self.utils.cprint(_("Could not unmounted image."), "red") return False if dst == MOUNT_USB: self.utils.cprint(_("Unmounting USB disk..."), "green") cmd = "umount %s" % MOUNT_USB if runCommand(cmd): self.utils.cprint(_("Could not unmounted USB disk."), "red") return False self.utils.cprint(_("USB disk is ready. Now you can install or run Pardus from your USB disk."), "brightgreen") return True
def __createImage(self, src, dst): createUSBDirs(dst) self.utils.cprint(_("Creating boot manager..."), "yellow") if createSyslinux(dst): self.utils.cprint(_("Could not create boot manager."), "red") return False self.__copyImage(MOUNT_ISO, dst) self.utils.cprint(_("Unmounting image..."), "green") cmd = "fusermount -u %s" % MOUNT_ISO if runCommand(cmd): self.utils.cprint(_("Could not unmounted image."), "red") return False if dst == MOUNT_USB: self.utils.cprint(_("Unmounting USB disk..."), "green") cmd = "umount %s" % MOUNT_USB if runCommand(cmd): self.utils.cprint(_("Could not unmounted USB disk."), "red") return False self.utils.cprint( _("USB disk is ready. Now you can install or run Pardus from your USB disk." ), "brightgreen") return True
def __createImage(self, src, dst): createUSBDirs(dst) self.utils.cprint(_("Creating boot manager..."), "yellow") if createSyslinux(dst): self.utils.cprint(_("Could not create boot manager."), "red") return False self.__copyImage(self.iso_dir, dst) self.utils.cprint(_("Unmounting image and USB disk..."), "green") unmountDirs() self.utils.cprint(_("USB disk is ready. Now you can install or run Pardus from your USB disk."), "brightgreen") return True