aboutsummaryrefslogtreecommitdiff
path: root/data/imagewizard.xml
blob: 8c40e3f98718ccfe88d1c0972ef665b38dba5886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<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>