예제 #1
0
	def markDone(self):
		pass

	def listDevices(self):
		list = [ (r.description, r.mountpoint) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
		for x in list:
			result = access(x[1], W_OK) and access(x[1], R_OK)
			if result is False or x[1] == '/':
				list.remove(x)
		for x in list:
			if x[1].startswith('/autofs/'):
				list.remove(x)	
		return list

	def deviceSelectionMade(self, index):
		self.deviceSelect(index)
		
	def deviceSelectionMoved(self):
		self.deviceSelect(self.selection)
		
	def deviceSelect(self, device):
		self.selectedDevice = device
		config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
		config.plugins.configurationbackup.backuplocation.save()
		config.plugins.configurationbackup.save()

	
if config.misc.firstrun.value:
	wizardManager.registerWizard(ImageWizard, backupAvailable, priority = 10)

예제 #2
0
def filescan(**kwargs):
    from Components.Scanner import Scanner, ScanPath
    return \
     Scanner(mimetypes=["application/x-dream-package"],
      paths_to_scan=[
        ScanPath(path="dmpkg", with_subdirs=True),
        ScanPath(path="", with_subdirs=False),
       ],
      name="Dream-Package",
      description=_("Install settings, skins, software..."),
      openfnc=filescan_open, )


print("add dreampackage scanner plugin")
plugins.addPlugin(
    PluginDescriptor(name="Dream-Package",
                     where=PluginDescriptor.WHERE_FILESCAN,
                     fnc=filescan,
                     internal=True))
print("added")

wizardManager.registerWizard(DefaultWizard,
                             config.misc.defaultchosen.value,
                             priority=6)

if config.misc.defaultchosen.value:
    print("Installing image defaults")
    installer = ImageDefaultInstaller()
    print("installing done!")
예제 #3
0
	def markDone(self):
		pass

	def listDevices(self):
		list = [ (r.description, r.mountpoint) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
		for x in list:
			result = access(x[1], W_OK) and access(x[1], R_OK)
			if result is False or x[1] == '/':
				list.remove(x)
		for x in list:
			if x[1].startswith('/autofs/'):
				list.remove(x)
		return list

	def deviceSelectionMade(self, index):
		self.deviceSelect(index)

	def deviceSelectionMoved(self):
		self.deviceSelect(self.selection)

	def deviceSelect(self, device):
		self.selectedDevice = device
		config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
		config.plugins.configurationbackup.backuplocation.save()
		config.plugins.configurationbackup.save()


if config.misc.firstrun.value:
	wizardManager.registerWizard(ImageWizard, backupAvailable, priority = 10)

예제 #4
0
        else:
            self["button_green"].boolean = False
            self["button_green_text"].hide()

        if yellow:
            self["button_yellow"].boolean = True
            self["button_yellow_text"].show()
        else:
            self["button_yellow"].boolean = False
            self["button_yellow_text"].hide()

        if blue:
            self["button_blue"].boolean = True
            self["button_blue_text"].show()
        else:
            self["button_blue"].boolean = False
            self["button_blue_text"].hide()

    def showState(self, show=False):
        if show:
            self["state"].show()
            self["state_label"].show()
        else:
            self["state"].hide()
            self["state_label"].hide()


wizardManager.registerWizard(StartWizard,
                             config.misc.firstrun.value,
                             priority=20)
예제 #5
0
    def listDevices(self):
        list = [
            (r.description, r.mountpoint)
            for r in harddiskmanager.getMountedPartitions(onlyhotplug=False)
        ]
        for x in list:
            result = access(x[1], W_OK) and access(x[1], R_OK)
            if result is False or x[1] == '/':
                list.remove(x)
        for x in list:
            if x[1].startswith('/autofs/'):
                list.remove(x)
        return list

    def deviceSelectionMade(self, index):
        self.deviceSelect(index)

    def deviceSelectionMoved(self):
        self.deviceSelect(self.selection)

    def deviceSelect(self, device):
        self.selectedDevice = device
        config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
        config.plugins.configurationbackup.backuplocation.save()
        config.plugins.configurationbackup.save()


if config.misc.firstrun.value:
    wizardManager.registerWizard(RestoreWizard, backupAvailable, priority=0)
예제 #6
0
        #Screen.setTitle(self, _("Welcome..."))
        Screen.setTitle(self, _("StartWizard"))

    def markDone(self):
        # setup remote control, all stb have same settings except dm8000 which uses a different settings
        if getBoxType() == 'dm8000':
            config.misc.rcused.value = 0
        else:
            config.misc.rcused.value = 1
        config.misc.rcused.save()

        config.misc.firstrun.value = 0
        config.misc.firstrun.save()
        configfile.save()


# mytest.py#L528ff - RestoreSettings
wizardManager.registerWizard(VideoWizard,
                             config.misc.videowizardenabled.value,
                             priority=0)
wizardManager.registerWizard(LanguageWizard,
                             config.misc.languageselected.value,
                             priority=2)
# FrontprocessorUpgrade FPUpgrade priority = 8
# FrontprocessorUpgrade SystemMessage priority = 9
wizardManager.registerWizard(StartWizard,
                             config.misc.firstrun.value,
                             priority=20)
# StartWizard calls InstallWizard
# NetworkWizard priority = 25
예제 #7
0
    def listDevices(self):
        list = [
            (r.description, r.mountpoint)
            for r in harddiskmanager.getMountedPartitions(onlyhotplug=False)
        ]
        for x in list:
            result = access(x[1], W_OK) and access(x[1], R_OK)
            if result is False or x[1] == '/':
                list.remove(x)
        for x in list:
            if x[1].startswith('/autofs/'):
                list.remove(x)
        return list

    def deviceSelectionMade(self, index):
        self.deviceSelect(index)

    def deviceSelectionMoved(self):
        self.deviceSelect(self.selection)

    def deviceSelect(self, device):
        self.selectedDevice = device
        config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
        config.plugins.configurationbackup.backuplocation.save()
        config.plugins.configurationbackup.save()


wizardManager.registerWizard(ImageWizard,
                             config.misc.firstrun.value,
                             priority=10)
예제 #8
0
            self.container.appClosed.remove(self.appClosed)
            self.container.dataAvail.remove(self.dataAvail)
        self.container = None
        self.logfile.close()
        os.remove("/etc/.doAutoinstall")
        self.close(3)


if not os.path.isfile("/etc/installed"):
    from Components.Console import Console
    Console().ePopen(
        "opkg list_installed | cut -d ' ' -f 1 > /etc/installed;chmod 444 /etc/installed"
    )

wizardManager.registerWizard(AutoInstallWizard,
                             os.path.isfile("/etc/.doAutoinstall"),
                             priority=0)
wizardManager.registerWizard(AutoRestoreWizard,
                             config.misc.languageselected.value
                             and config.misc.firstrun.value
                             and checkForAvailableAutoBackup(),
                             priority=0)
wizardManager.registerWizard(LanguageWizard,
                             config.misc.languageselected.value,
                             priority=10)
if OverscanWizard:
    wizardManager.registerWizard(OverscanWizard,
                                 config.misc.do_overscanwizard.value,
                                 priority=30)
wizardManager.registerWizard(StartWizard,
                             config.misc.firstrun.value,
예제 #9
0
config.misc.firstrun = ConfigBoolean(default=True)
config.misc.languageselected = ConfigBoolean(default=True)
config.misc.videowizardenabled = ConfigBoolean(default=True)
config.misc.networkenabled = ConfigBoolean(default=False)


class StartWizard(WizardLanguage, Rc):
	def __init__(self, session, silent=True, showSteps=False, neededTag=None):
		self.xmlfile = ["startwizard.xml"]
		WizardLanguage.__init__(self, session, showSteps=False)
		Rc.__init__(self)
		self["wizard"] = Pixmap()

	def markDone(self):
		# setup remote control, all stb have same settings except dm8000 which uses a different settings
		if getBoxType() == 'dm8000':
			config.misc.rcused.value = 0
		else:
			config.misc.rcused.value = 1
		config.misc.rcused.save()

		config.misc.firstrun.value = 0
		config.misc.firstrun.save()
		configfile.save()


wizardManager.registerWizard(VideoWizard, config.misc.videowizardenabled.value, priority=5)
wizardManager.registerWizard(LanguageWizard, config.misc.languageselected.value, priority=10)
wizardManager.registerWizard(UserInterfacePositionerWizard, config.misc.firstrun.value, priority=15)
wizardManager.registerWizard(StartWizard, config.misc.firstrun.value, priority=20)
예제 #10
0
            (x.description, x.mountpoint)
            for x in harddiskmanager.getMountedPartitions(onlyhotplug=False)
            if x.mountpoint != "/"
        ]
        for partition in partitions:
            if not (access(partition[1], W_OK) and access(partition[1], R_OK)):
                partitions.remove(partition)
        for partition in partitions:
            if partition[1].startswith("/autofs/"):
                partitions.remove(partition)
        return partitions

    def deviceSelectionMade(self, index):
        self.deviceSelect(index)

    def deviceSelectionMoved(self):
        self.deviceSelect(self.selection)

    def deviceSelect(self, device):
        self.selectedDevice = device
        config.plugins.configurationbackup.backuplocation.setValue(
            self.selectedDevice)
        config.plugins.configurationbackup.backuplocation.save()
        config.plugins.configurationbackup.save()


if config.misc.firstrun.value:
    wizardManager.registerWizard(ImageWizard,
                                 0 if checkConfigBackup() is None else 1,
                                 priority=10)
예제 #11
0
파일: ImageWizard.py 프로젝트: popazerty/12
		self.selectedDevice = None
		
	def markDone(self):
		pass

	def listDevices(self):
		list = [ (r.description, r.mountpoint) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
		for x in list:
			result = access(x[1], W_OK) and access(x[1], R_OK)
			if result is False or x[1] == '/':
				list.remove(x)
		for x in list:
			if x[1].startswith('/autofs/'):
				list.remove(x)	
		return list

	def deviceSelectionMade(self, index):
		self.deviceSelect(index)
		
	def deviceSelectionMoved(self):
		self.deviceSelect(self.selection)
		
	def deviceSelect(self, device):
		self.selectedDevice = device
		config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
		config.plugins.configurationbackup.backuplocation.save()
		config.plugins.configurationbackup.save()

wizardManager.registerWizard(ImageWizard, config.misc.firstrun.value, priority = 10)

예제 #12
0
	def markDone(self):
		pass

	def listDevices(self):
		list = [ (r.description, r.mountpoint) for r in harddiskmanager.getMountedPartitions(onlyhotplug = False)]
		for x in list:
			result = access(x[1], W_OK) and access(x[1], R_OK)
			if result is False or x[1] == '/':
				list.remove(x)
		for x in list:
			if x[1].startswith('/autofs/'):
				list.remove(x)
		return list

	def deviceSelectionMade(self, index):
		self.deviceSelect(index)

	def deviceSelectionMoved(self):
		self.deviceSelect(self.selection)

	def deviceSelect(self, device):
		self.selectedDevice = device
		config.plugins.configurationbackup.backuplocation.value = self.selectedDevice
		config.plugins.configurationbackup.backuplocation.save()
		config.plugins.configurationbackup.save()


if config.misc.firstrun.value:
	wizardManager.registerWizard(RestoreWizard, backupAvailable, priority = 0)