add Event
[enigma2.git] / data / imagewizard.xml
1 <wizard>
2                 <step id="restorequestion">
3                         <condition>
4 from Screens.ImageWizard import checkConfigBackup
5 self.backuppath = checkConfigBackup()
6 self.condition = (self.backuppath is not None)
7                         </condition>
8                         <text value="Do you want to restore your settings?" />
9                         <list>
10                                 <listentry caption="Yes, restore the settings now" step="restore" />
11                                 <listentry caption="No, just start my dreambox" step="end" />
12                         </list>
13                 </step>
14
15                 <step id="welcome">
16                         <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." />
17                         <list>
18                                 <listentry caption="OK, guide me through the upgrade process" step="backupquestion" />
19                                 <listentry caption="Exit the wizard" step="end" />
20                         </list>
21                 </step>
22
23                 <step id="backupquestion">
24                         <text value="The wizard can backup your current settings. Do you want to do a backup now?" />
25                         <list>
26                                 <listentry caption="Yes, backup my settings!" step="backupwhere" />
27                                 <listentry caption="No backup needed" step="upgrade" />
28                         </list>
29                 </step>
30
31                 <step id="backupwhere">
32                         <text value="Where do you want to backup your settings?" />
33                         <list>
34                                 <listentry caption="Harddisk" step="hdd" />
35                                 <listentry caption="Compact flash card" step="cf" />
36                                 <listentry caption="USB" step="usb" />
37                                 <listentry caption="Somewhere else" step="file" />
38                         </list>
39                 </step>
40
41                 <step id="hdd" nextstep="backup">
42                         <condition>
43 from Components.Harddisk import harddiskmanager
44 self.condition = harddiskmanager.HDDCount() > 0
45                         </condition>
46                         <text value="You have chosen to backup to your harddisk. Please press OK to start the backup now." />
47                         <code pos="after">
48 self.backuppath = '/media/hdd/'
49                         </code>
50                 </step>
51
52                 <step id="hddfailed" nextstep="backupwhere">
53                         <condition>
54 from Components.Harddisk import harddiskmanager
55 self.condition = harddiskmanager.HDDCount() == 0
56                         </condition>
57                         <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." />
58                 </step>
59                 
60                 <step id="cf" nextstep="backup">
61                         <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." />
62                         <code pos="after">
63 self.backuppath = '/media/cf/'
64                         </code>
65                 </step>
66
67                 <step id="usb" nextstep="backup">
68                         <text value="You have chosen to backup to an usb drive. Better backup to the harddisk!\nPlease press OK to start the backup now." />
69                         <code pos="after">
70 self.backuppath = '/media/usb/'
71                         </code>
72                 </step>
73
74                 <step id="file" nextstep="backupwhere">
75                         <text value="This is unsupported at the moment." />
76                 </step>
77
78                 <step id="backup" nextstep="backupresult">
79                         <code>
80 from Screens.ImageWizard import doBackup
81 doBackup(self.backuppath)
82                         </code>
83                         <text value="Backup is done. Please press OK to see the result." />
84                 </step>
85                 
86                 <step id="backupresult" nextstep="upgrade">
87                         <condition>
88 from Screens.ImageWizard import checkConfigBackup
89 self.backuppath = checkConfigBackup()
90 self.condition = (self.backuppath is not None)
91                         </condition>
92                         <text value="Your backup succeeded. We will now continue to explain the further upgrade process." />
93                 </step>
94
95                 <step id="backupresultfailed" nextstep="backupwhere">
96                         <condition>
97 from Screens.ImageWizard import checkConfigBackup
98 self.backuppath = checkConfigBackup()
99 self.condition = (self.backuppath is None)
100                         </condition>
101                         <text value="The backup failed. Please choose a different backup location." />
102                 </step>
103                 
104                 <step id="restore" nextstep="activate">
105                         <code>
106 from Screens.ImageWizard import doRestore
107 doRestore(self.backuppath)
108                         </code>
109                         <text value="Restoring the settings is done. Please press OK to activate the restored settings now." />
110                 </step>
111                 
112                 <step id="activate" nextstep="activate">
113                         <code>
114 import os
115 from Screens.ImageWizard import backupfile
116 print 'mv ' + self.backuppath + backupfile + ' ' + self.backuppath + backupfile + '.old'
117 os.system('mv ' + self.backuppath + backupfile + ' ' + self.backuppath + backupfile + '.old')
118 os.system('killall enigma2') # ugly... no better solution atm
119                         </code>
120                 </step>
121                 
122                 <step id="upgrade">
123                         <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." />
124                         <list>
125                                 <listentry caption="Yes, perform a shutdown now." step="shutdown" />
126                                 <listentry caption="No, do nothing." step="end" />
127                         </list>
128                 </step>
129
130                 <step id="shutdown" nextstep="shutdown">
131                         <code>
132 from enigma import quitMainloop
133 quitMainloop(1)
134                         </code>
135                         <text value="Your dreambox is shutting down. Please stand by..." />
136                 </step>
137                 
138                 <step id="end">
139                         <text value="The wizard is finished now." />
140                 </step>
141 </wizard>