Esempio n. 1
0
	def getImageVersionString(self):
		try:
			file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
			lines = file.readlines()
			for x in lines:
				splitted = x.split('=')
				if splitted[0] == "version":
					#     YYYY MM DD hh mm
					#0120 2005 11 29 01 16
					#0123 4567 89 01 23 45
					vtiversion = getVTiVersionString()
					version = splitted[1]
					image_type = version[0] # 0 = release, 1 = experimental
					major = version[1]
					minor = version[2]
					revision = version[3]
					year = version[4:8]
					month = version[8:10]
					day = version[10:12]
					date = '-'.join((year, month, day))
					if image_type == '0':
						image_type = "Release"
						version = '.'.join((major, minor, revision))
						return ' '.join((image_type, vtiversion, version, date))
					else:
						image_type = "Release"
						return ' '.join((image_type, vtiversion, date))
			file.close()
		except IOError:
			pass

		return "unavailable"
def isVTI():
	try:
		from enigma import getVTiVersionString
		imageversion = getVTiVersionString()
		print("[SerienRecorder] VTI version: " + imageversion)
	except ImportError:
		isVTIImage = False
	else:
		isVTIImage = True
	return isVTIImage
Esempio n. 3
0
 def __init__(self,
              session,
              title='Restore/Backup VTimage',
              restorepath=None,
              backuppath=None,
              image_flash=False):
     Screen.__init__(self, session)
     self.restorepath = restorepath
     self.backuppath = backuppath
     self.image_flash = image_flash
     self.run = True
     self.error = False
     self.finished = False
     self.device = HardwareInfoVu().get_device_name()
     self.vtiversion = getVTiVersionString()
     if self.restorepath:
         skin = skin_2
     elif self.backuppath:
         skin = skin_1
         self['task_one'] = Label()
         self['task_two'] = Label()
         self['task_three'] = Label()
         self['task_four'] = Label()
         self['task_one_state'] = Label()
         self['task_two_state'] = Label()
         self['task_three_state'] = Label()
         self['task_four_state'] = Label()
         self['progress'] = ProgressBar()
     self.skin = skin
     self['actions'] = ActionMap(['OkCancelActions'], {
         'ok': self.keyOk,
         'cancel': self.keyCancel
     })
     self['description'] = Label()
     self.text_done = _('[ ok ]')
     self.logfile = '/tmp/vti-backup.log'
     self.text_logfile_hint = _(
         '\n\nPlease take a look at\n%s\nfor more details') % self.logfile
     self.mount = '/bin/mount'
     self.umount = '/bin/umount'
     self.rm = '/bin/rm'
     self.touch = '/bin/touch'
     self.mk_ubifs = '/usr/sbin/mkfs.ubifs'
     self.mk_jffs2 = '/usr/sbin/mkfs.jffs2'
     self.nanddump = '/usr/sbin/nanddump'
     self.ubinize = '/usr/sbin/ubinize'
     self.flash_erase = '/usr/sbin/flash_erase'
     self.nand_write = '/usr/sbin/nandwrite'
     self.ubi_image2nand = '/usr/sbin/ubi-image2nand'
     self.onLayoutFinish.append(self.layoutFinished)
Esempio n. 4
0
 def __init__(self, session, title = 'Restore/Backup VTimage', restorepath = None, backuppath = None, image_flash = False):
     Screen.__init__(self, session)
     self.restorepath = restorepath
     self.backuppath = backuppath
     self.image_flash = image_flash
     self.run = True
     self.error = False
     self.finished = False
     self.device = HardwareInfoVu().get_device_name()
     self.vtiversion = getVTiVersionString()
     if self.restorepath:
         skin = skin_2
     elif self.backuppath:
         skin = skin_1
         self['task_one'] = Label()
         self['task_two'] = Label()
         self['task_three'] = Label()
         self['task_four'] = Label()
         self['task_one_state'] = Label()
         self['task_two_state'] = Label()
         self['task_three_state'] = Label()
         self['task_four_state'] = Label()
         self['progress'] = ProgressBar()
     self.skin = skin
     self['actions'] = ActionMap(['OkCancelActions'], {'ok': self.keyOk,
      'cancel': self.keyCancel})
     self['description'] = Label()
     self.text_done = _('[ ok ]')
     self.logfile = '/tmp/vti-backup.log'
     self.text_logfile_hint = _('\n\nPlease take a look at\n%s\nfor more details') % self.logfile
     self.mount = '/bin/mount'
     self.umount = '/bin/umount'
     self.rm = '/bin/rm'
     self.touch = '/bin/touch'
     self.mk_ubifs = '/usr/sbin/mkfs.ubifs'
     self.mk_jffs2 = '/usr/sbin/mkfs.jffs2'
     self.nanddump = '/usr/sbin/nanddump'
     self.ubinize = '/usr/sbin/ubinize'
     self.flash_erase = '/usr/sbin/flash_erase'
     self.nand_write = '/usr/sbin/nandwrite'
     self.ubi_image2nand = '/usr/sbin/ubi-image2nand'
     self.onLayoutFinish.append(self.layoutFinished)
Esempio n. 5
0
def getHeader():
    imageversion = getVTiVersionString()
    ret = 'VTi ' + imageversion + ' (Vu+ '
    if vumodel == 'duo':
        ret += 'Duo)\n'
    elif vumodel == 'solo':
        ret += 'Solo)\n'
    elif vumodel == 'uno':
        ret += 'Uno)\n'
    elif vumodel == 'ultimo':
        ret += 'Ultimo)\n'
    elif vumodel == 'solo2':
        ret += 'Solo2)\n'
    elif vumodel == 'duo2':
        ret += 'Duo2)\n'
    elif vumodel == 'solose':
        ret += 'Solo SE)\n'
    elif vumodel == 'zero':
        ret += 'zero)\n'
    return ret
Esempio n. 6
0
def getHeader():
    imageversion = getVTiVersionString()
    ret = 'VTi ' + imageversion + ' (Vu+ '
    if vumodel == 'duo':
        ret += 'Duo)\n'
    elif vumodel == 'solo':
        ret += 'Solo)\n'
    elif vumodel == 'uno':
        ret += 'Uno)\n'
    elif vumodel == 'ultimo':
        ret += 'Ultimo)\n'
    elif vumodel == 'solo2':
        ret += 'Solo2)\n'
    elif vumodel == 'duo2':
        ret += 'Duo2)\n'
    elif vumodel == 'solose':
        ret += 'Solo SE)\n'
    elif vumodel == 'zero':
        ret += 'zero)\n'
    return ret
Esempio n. 7
0
	def getVTiVersionString(self):
		return getVTiVersionString()
Esempio n. 8
0
def getVTiVersion():
    from enigma import getVTiVersionString
    vtiversion = 'VTi ' + getVTiVersionString()
    return vtiversion
Esempio n. 9
0
 def VtiImageVersion(self):
     vtiversion = getVTiVersionString()
     return 'VTi-Team Image Release v. %s' % vtiversion