remove Imagewizard
authoracid-burn <acidburn@opendreambox.org>
Fri, 13 Feb 2009 07:03:12 +0000 (08:03 +0100)
committeracid-burn <acidburn@opendreambox.org>
Fri, 13 Feb 2009 07:03:12 +0000 (08:03 +0100)
data/imagewizard.xml [deleted file]
data/skin_default.xml
lib/python/Screens/ImageWizard.py [deleted file]
lib/python/Screens/Makefile.am

diff --git a/data/imagewizard.xml b/data/imagewizard.xml
deleted file mode 100644 (file)
index 8c40e3f..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<wizard>
-               <step id="restorequestion">
-                       <condition>
-from Screens.ImageWizard import checkConfigBackup
-self.backuppath = checkConfigBackup()
-self.condition = (self.backuppath is not None)
-                       </condition>
-                       <text value="Do you want to restore your settings?" />
-                       <list>
-                               <listentry caption="Yes, restore the settings now" step="restore" />
-                               <listentry caption="No, just start my dreambox" step="end" />
-                       </list>
-               </step>
-
-               <step id="welcome">
-                       <text value="Welcome to the Image upgrade wizard. The wizard will assist you in upgrading the firmware of your Dreambox by providing a backup facility for your current settings and a short explanation of how to upgrade your firmware." />
-                       <list>
-                               <listentry caption="OK, guide me through the upgrade process" step="backupquestion" />
-                               <listentry caption="Exit the wizard" step="end" />
-                       </list>
-               </step>
-
-               <step id="backupquestion">
-                       <text value="The wizard can backup your current settings. Do you want to do a backup now?" />
-                       <list>
-                               <listentry caption="Yes, backup my settings!" step="backupwhere" />
-                               <listentry caption="No backup needed" step="upgrade" />
-                       </list>
-               </step>
-
-               <step id="backupwhere">
-                       <text value="Where do you want to backup your settings?" />
-                       <list>
-                               <listentry caption="Harddisk" step="hdd" />
-                               <listentry caption="Compact flash card" step="cf" />
-                               <listentry caption="USB" step="usb" />
-                               <listentry caption="Somewhere else" step="file" />
-                       </list>
-               </step>
-
-               <step id="hdd" nextstep="backup">
-                       <condition>
-from Components.Harddisk import harddiskmanager
-self.condition = harddiskmanager.HDDCount() > 0
-                       </condition>
-                       <text value="You have chosen to backup to your harddisk. Please press OK to start the backup now." />
-                       <code pos="after">
-self.backuppath = '/media/hdd/'
-                       </code>
-               </step>
-
-               <step id="hddfailed" nextstep="backupwhere">
-                       <condition>
-from Components.Harddisk import harddiskmanager
-self.condition = harddiskmanager.HDDCount() == 0
-                       </condition>
-                       <text value="You do not seem to have a harddisk in your Dreambox. So backing up to a harddisk is not an option for you." />
-               </step>
-               
-               <step id="cf" nextstep="backup">
-                       <text value="You have chosen to backup to a compact flash card. The card must be in the slot. We do not verify if it is really used at the moment. So better backup to the harddisk!\nPlease press OK to start the backup now." />
-                       <code pos="after">
-self.backuppath = '/media/cf/'
-                       </code>
-               </step>
-
-               <step id="usb" nextstep="backup">
-                       <text value="You have chosen to backup to an usb drive. Better backup to the harddisk!\nPlease press OK to start the backup now." />
-                       <code pos="after">
-self.backuppath = '/media/usb/'
-                       </code>
-               </step>
-
-               <step id="file" nextstep="backupwhere">
-                       <text value="This is unsupported at the moment." />
-               </step>
-
-               <step id="backup" nextstep="backupresult">
-                       <code>
-from Screens.ImageWizard import doBackup
-doBackup(self.backuppath)
-                       </code>
-                       <text value="Backup is done. Please press OK to see the result." />
-               </step>
-               
-               <step id="backupresult" nextstep="upgrade">
-                       <condition>
-from Screens.ImageWizard import checkConfigBackup
-self.backuppath = checkConfigBackup()
-self.condition = (self.backuppath is not None)
-                       </condition>
-                       <text value="Your backup succeeded. We will now continue to explain the further upgrade process." />
-               </step>
-
-               <step id="backupresultfailed" nextstep="backupwhere">
-                       <condition>
-from Screens.ImageWizard import checkConfigBackup
-self.backuppath = checkConfigBackup()
-self.condition = (self.backuppath is None)
-                       </condition>
-                       <text value="The backup failed. Please choose a different backup location." />
-               </step>
-               
-               <step id="restore" nextstep="activate">
-                       <code>
-from Screens.ImageWizard import doRestore
-doRestore(self.backuppath)
-                       </code>
-                       <text value="Restoring the settings is done. Please press OK to activate the restored settings now." />
-               </step>
-               
-               <step id="activate" nextstep="activate">
-                       <code>
-import os
-from Screens.ImageWizard import backupfile
-print 'mv ' + self.backuppath + backupfile + ' ' + self.backuppath + backupfile + '.old'
-os.system('mv ' + self.backuppath + backupfile + ' ' + self.backuppath + backupfile + '.old')
-os.system('killall -9 enigma2') # ugly... no better solution atm
-                       </code>
-               </step>
-               
-               <step id="upgrade">
-                       <text value="You need a PC connected to your dreambox. If you need further instructions, please visit the website http://www.dm7025.de.\nYour dreambox will now be halted. After you have performed the update instructions from the website, your new firmware will ask you to restore your settings." />
-                       <list>
-                               <listentry caption="Yes, perform a shutdown now." step="shutdown" />
-                               <listentry caption="No, do nothing." step="end" />
-                       </list>
-               </step>
-
-               <step id="shutdown" nextstep="shutdown">
-                       <code>
-from enigma import quitMainloop
-quitMainloop(1)
-                       </code>
-                       <text value="Your dreambox is shutting down. Please stand by..." />
-               </step>
-               
-               <step id="end">
-                       <text value="The wizard is finished now." />
-               </step>
-</wizard>
index d60933eb369723767d4a9608b54063bc00da61d5..f99e1a76caecc3ccdaf06a8cfa436aecfe0d5053 100755 (executable)
@@ -368,12 +368,6 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count &gt; 7 and 2 or 3)
                <widget name="arrowup2" pixmap="skin_default/arrowup.png" position="-100,-100" zPosition="11" size="37,70" alphatest="on" />
                <widget name="long_key" position="320,520" size="350,50" font="Regular;25" halign="right" foregroundColor="yellow" />
        </screen>
-       <!-- Image Wizard -->
-       <screen name="ImageWizard" position="0,0" size="720,576" title="Welcome..." flags="wfNoBorder">
-               <widget name="text" position="50,100" size="440,250" font="Regular;22" />
-               <widget name="list" position="50,350" zPosition="1" size="440,200" />
-               <widget name="config" position="50,350" zPosition="1" size="440,200" transparent="1" scrollbarMode="showOnDemand" />
-       </screen>
        <!-- Inputbox -->
        <screen name="InputBox" position="80,250" size="550,90" title="Input">
                <widget name="text" position="10,20" size="550,25" font="Regular;23" />
diff --git a/lib/python/Screens/ImageWizard.py b/lib/python/Screens/ImageWizard.py
deleted file mode 100644 (file)
index faf6120..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-from Wizard import Wizard, wizardManager
-
-from Tools.Directories import fileExists
-
-import os
-
-backupfile = "backupenigma2settings.tar"
-
-def checkConfigBackup():
-       paths = ['/media/hdd/', '/media/cf/']
-       for x in paths:
-               if fileExists(x + backupfile):
-                       return x
-       return None
-
-if checkConfigBackup() is None:
-       backupAvailable = 0
-else:
-       backupAvailable = 1
-
-class ImageWizard(Wizard):
-       def __init__(self, session):
-               self.xmlfile = "imagewizard.xml"
-               Wizard.__init__(self, session, showSteps=False, showStepSlider=False, showList=True, showConfig=True)
-
-       def markDone(self):
-               pass
-
-wizardManager.registerWizard(ImageWizard, backupAvailable, priority = 10)
-
-def doBackup(path):
-       os.system('tar cvpf ' + path + backupfile + ' /etc/enigma2')
-
-def doRestore(path):
-       os.system('cd / && /bin/tar xvpf ' + path + backupfile)
-       
-
-               
\ No newline at end of file
index cde2d6c3e14c34a27e3e9c1d4b0e99f269d0b925..00204a94e26cc69f16727c0634c5843fd6f9667b 100755 (executable)
@@ -9,7 +9,7 @@ install_PYTHON = \
        InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \
        Dish.py LanguageSelection.py StartWizard.py PiPSetup.py Subtitles.py \
        TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \
-       Console.py InputBox.py ChoiceBox.py SimpleSummary.py ImageWizard.py \
+       Console.py InputBox.py ChoiceBox.py SimpleSummary.py \
        TimerSelection.py PictureInPicture.py TimeDateInput.py \
        SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \
        SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \