desktop-base-openmamba/bootrecover/bootrecover.kmdr

1241 lines
77 KiB
Plaintext
Raw Normal View History

2011-04-26 13:25:32 +02:00
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>bootrecover</class>
<author>Silvan Calarco</author>
<license>GPL</license>
<version>0.5</version>
<widget class="QWizard">
<property name="name">
<cstring>bootrecover</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>593</width>
<height>514</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="caption">
<string>openmamba boot loader recovery wizard</string>
</property>
<property name="icon">
<pixmap>image0</pixmap>
</property>
<widget class="QWidget">
<property name="name">
<cstring>introduction</cstring>
</property>
<attribute name="title">
<string>Welcome!</string>
</attribute>
<widget class="CheckBox">
<property name="name">
<cstring>BackBox</cstring>
</property>
<property name="geometry">
<rect>
<x>180</x>
<y>50</y>
<width>20</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string></string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
<string></string>
<string></string>
</stringlist>
</property>
</widget>
<widget class="CheckBox">
<property name="name">
<cstring>NextBox</cstring>
</property>
<property name="geometry">
<rect>
<x>130</x>
<y>50</y>
<width>20</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string></string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="GroupBox">
<property name="name">
<cstring>GroupBox2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>560</width>
<height>160</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="paletteBackgroundColor">
<color>
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</property>
<property name="title">
<string></string>
</property>
<widget class="ScriptObject">
<property name="name">
<cstring>AcceptScript</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true)
</string>
</stringlist>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label21</cstring>
</property>
<property name="geometry">
<rect>
<x>410</x>
<y>390</y>
<width>130</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Version 0.4</string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label29</cstring>
</property>
<property name="geometry">
<rect>
<x>420</x>
<y>130</y>
<width>130</width>
<height>16</height>
</rect>
</property>
<property name="paletteForegroundColor">
<color>
<red>40</red>
<green>96</green>
<blue>6</blue>
</color>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>www.openmamba.org</string>
</property>
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>wizardScript</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@dcop(@dcopid, KommanderIf, setEnabled(QString,bool), next, @NextBox.checked)
@dcop(@dcopid, KommanderIf, setEnabled(QString,bool), back, @BackBox.checked)
@dcop(@dcopid, KommanderIf, setEnabled(QString,bool), finish, true)
@dcop(@dcopid, KommanderIf, setVisible(QString,bool), help, false)
</string>
</stringlist>
</property>
</widget>
<widget class="PixmapLabel">
<property name="name">
<cstring>PixmapLabel2</cstring>
</property>
<property name="geometry">
<rect>
<x>80</x>
<y>40</y>
<width>400</width>
<height>74</height>
</rect>
</property>
<property name="pixmap">
<pixmap>image1</pixmap>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label1_2</cstring>
</property>
<property name="geometry">
<rect>
<x>280</x>
<y>100</y>
<width>230</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<italic>1</italic>
</font>
</property>
<property name="text">
<string>GNU/Linux distribution</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label1</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>540</width>
<height>34</height>
</rect>
</property>
<property name="paletteForegroundColor">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>Boot loader recovery tool for</string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label18_2_2_2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<width>400</width>
<height>29</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
<italic>1</italic>
</font>
</property>
<property name="text">
<string>Copyright (c) 2007-2010 by Silvan Calarco
Released under the terms of the GNU GPL v3 license</string>
</property>
<property name="textFormat">
<enum>AutoText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label30</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>190</y>
<width>560</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<bold>1</bold>
</font>
</property>
<property name="text">
<string>This program will recover the openmamba boot loader.</string>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label18_2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>220</y>
<width>560</width>
<height>200</height>
</rect>
</property>
<property name="text">
<string>This operation is normally needed after the very first sector of the disk (Master Boot Record) has been rewritten by the installation of another operating system.
Usually you will need to use this program only after the installation of a release of Microsoft Windows to restore the openmamba boot menu.
This tool is also useful before the installation of a third party boot manager in the Master Boot Record, by moving the openmamba boot loader installation from the MBR to its own partition.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>disk_choice</cstring>
</property>
<attribute name="title">
<string>System partition choice</string>
</attribute>
<widget class="CheckBox">
<property name="name">
<cstring>removablebox</cstring>
</property>
<property name="geometry">
<rect>
<x>420</x>
<y>240</y>
<width>150</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>removab&amp;le devices</string>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>driverlabel</cstring>
</property>
<property name="geometry">
<rect>
<x>404</x>
<y>155</y>
<width>121</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label21_2</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>540</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>Choose openmamba system partition</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="GroupBox">
<property name="name">
<cstring>PartitionBox</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>560</width>
<height>370</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Where do you want to install the boot loader from?</string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
<widget class="Label">
<property name="name">
<cstring>Label24</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>540</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>Please, select the openmamba system partition where you want the boot loader to be installed from.</string>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label3</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>340</y>
<width>180</width>
<height>20</height>
</rect>
</property>
<property name="font">
<font>
<bold>1</bold>
</font>
</property>
<property name="text">
<string>Install bootloader from:</string>
</property>
<property name="alignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
<widget class="ListBox">
<property name="name">
<cstring>devicesbox</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>540</width>
<height>230</height>
</rect>
</property>
<property name="populationText">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>showdevice</cstring>
</property>
<property name="geometry">
<rect>
<x>180</x>
<y>340</y>
<width>350</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>scanDevices</cstring>
</property>
<property name="geometry">
<rect>
<x>540</x>
<y>0</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@devicesbox.clear
@BackBox.setChecked(false)
@NextBox.setChecked(false)
@execBegin
function get_udisks_key() {
LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|"
}
devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r`
partlabel=
for device in $devices; do
native_path=`get_udisks_key $device native-path`
[ -e $native_path/partition ] || continue
is_system_internal=`get_udisks_key $device "system internal"`
volsize=`get_udisks_key $device size`
volsize=`expr $volsize / 1024 / 1024`
volname=`get_udisks_key $device label`
[ "$volname" ] || volname="unnamed"
parttype=`get_udisks_key $device usage`
[ "$parttype" ] || parttype="unknown"
partscheme=`get_udisks_key $device scheme`
[ "$partscheme" ] || partscheme="unknown"
fstype=`get_udisks_key $device type`
[ "$fstype" ] || fstype="unformatted"
add_info=""
is_mounted=`get_udisks_key $device "is mounted"`
[ "$is_mounted" = "1" ] || {
mkdir /mnt/${device:5:5} &amp;&amp; mount $device /mnt/${device:5:5}
}
mount_point=`get_udisks_key $device "mount paths"`
add_info=""
[ "$is_system_internal" == "1" ] || {
add_info=",removable"
[ @removablebox.checked == 1 ] || continue
}
if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then
partlabel="$partlabel&lt;br&gt;${device:5:5} $fstype $volname $volsize MB"
case "$fstype" in
ext2|ext3|ext4|reiserfs|reiser4)
[ "$mount_point" -a -e $mount_point/etc/openmamba-release ] &amp;&amp; {
release=`cat $mount_point/etc/openmamba-release`
dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox "${device:5:5} $mount_point ($fstype,$volname,$volsize MB${add_info})" 0
}
;;
*) ;;
esac
elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then
case "$fstype" in
swap|iso9660) ;;
ext2|ext3|ext4|reiserfs|reiser4)
[ "$mount_point" -a -e $mount_point/etc/openmamba-release ] &amp;&amp; {
release=`cat $mount_point/etc/openmamba-release`
dcop @dcopid KommanderIf "addListItem(QString,QString,int)" devicesbox "${device:5:5} $mount_point $volsize MB ($release)" 0
}
;;
*) ;;
esac
fi
done
@execEnd
</string>
</stringlist>
</property>
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>setlabel</cstring>
</property>
<property name="geometry">
<rect>
<x>540</x>
<y>40</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="populationText">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@execBegin
function get_udisks_key() {
LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|"
}
@if (@devicesbox.currentItem &gt;= 0)
currdev=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
@showdevice.setText(@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0))
@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), next, true)
@BackBox.setChecked(true)
#
# set MBR combo box
#
dcop @dcopid KommanderIf "clear(QString)" mbrbox
devices=`udisks --enumerate-device-files | grep -v /dev/disk`
dcop @dcopid KommanderIf "addListItem(QString,QString,int)" mbrbox "$currdev (@i18n("System partition"))" 0
for device in $devices; do
native_path=`get_udisks_key $d native-path`
[ ! -e $native_path/partition ] || continue
is_system_internal=`get_udisks_key $d "system internal"`
partscheme=`get_udisks_key $d scheme`
if [ "$is_system_internal" == "1" -o @removablebox.checked == 1 ]; then if [ "$partscheme" == "mbr" ]; then
dcop @dcopid KommanderIf "addListItem(QString,QString,int)" mbrbox "${device:5:5} (master boot record)" 0
fi
done
dcop @dcopid KommanderIf "setCurrentItem(int)" 0
@endif
@execEnd
@setBootableCheckbox.execute()
</string>
</stringlist>
</property>
2011-04-26 13:25:32 +02:00
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>bootloader</cstring>
</property>
<attribute name="title">
<string>Computer startup configuration</string>
</attribute>
<widget class="Label">
<property name="name">
<cstring>Label21_2_2</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>540</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>Configure the boot manager</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="ButtonGroup">
<property name="name">
<cstring>BootloaderBox</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>560</width>
<height>370</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Bootloader configuration</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>Layout5_2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>330</y>
<width>530</width>
<height>26</height>
</rect>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="Label">
<property name="name">
<cstring>Label3_2_3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Install bootloader on:</string>
</property>
</widget>
<widget class="ComboBox">
<property name="name">
<cstring>mbrbox</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
<widget class="CheckBox">
<property name="name">
<cstring>bootableBox</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>set &amp;bootable</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
<string></string>
<string></string>
</stringlist>
</property>
</widget>
</hbox>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label3_2_2_2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>290</width>
<height>24</height>
</rect>
</property>
<property name="text">
<string>Please select the boot menu options:</string>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label28</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>540</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>Below is a list of other operating systems found on this computer, you may configure them to appear as a choice when the computer starts.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
<widget class="ListBox">
<property name="name">
<cstring>chainloadbox</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>100</y>
<width>540</width>
<height>170</height>
</rect>
</property>
<property name="selectionMode">
<enum>Multi</enum>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>Label29_2</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>531</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>Please select where you want to install the boot manager.</string>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>setBootableCheckbox</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>520</x>
<y>70</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@execBegin
mbrdevice=@String.section(@mbrbox.item(@mbrbox.currentItem)," ",0)
mbrpart=${mbrdevice:3:2}
if [ "$mbrpart" ]; then
if [ $mbrpart -le 4 ]; then
dcop @dcopid KommanderIf setEnabled bootableBox true
else
dcop @dcopid KommanderIf setEnabled bootableBox false
dcop @dcopid KommanderIf setChecked bootableBox false
fi
else
dcop @dcopid KommanderIf setEnabled bootableBox false
fi
@execEnd
</string>
</stringlist>
</property>
</widget>
2011-04-26 13:25:32 +02:00
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>scanbootloader</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@BackBox.setChecked(true)
@NextBox.setChecked(true)
@chainloadbox.clear
@setBootableCheckbox.execute()
@execBegin
function get_udisks_key() {
LANG=C udisks --show-info $1 | grep " $2:" | head -n1 | sed "s|[[:space:]]*$2:[[:space:]]*\(.*\)|\1|"
}
2011-04-26 13:25:32 +02:00
installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
devices=`udisks --enumerate-device-files | grep -v /dev/disk | sort -n -r`
2011-04-26 13:25:32 +02:00
partlabel=
for device in $devices; do
native_path=`get_udisks_key $device native-path`
[ -e $native_path/partition ] || continue
is_system_internal=`get_udisks_key $device "system internal"`
volsize=`get_udisks_key $device size`
volsize=`expr $volsize / 1024 / 1024`
2011-04-26 13:25:32 +02:00
[ $volsize = 0 ] &amp;&amp; continue
volname=`get_udisks_key $device label`
2011-04-26 13:25:32 +02:00
[ "$volname" ] || volname="unnamed"
parttype=`get_udisks_key $device usage`
2011-04-26 13:25:32 +02:00
[ "$parttype" ] || parttype="unknown"
partscheme=`get_udisks_key $device scheme`
2011-04-26 13:25:32 +02:00
[ "$partscheme" ] || partscheme="unknown"
fstype=`get_udisks_key $device type`
2011-04-26 13:25:32 +02:00
[ "$fstype" ] || fstype="unformatted"
add_info=""
[ "$is_system_internal" = "1" ] || {
2011-04-26 13:25:32 +02:00
add_info=",removable"
[ @removablebox.checked == 1 ] || continue
}
2011-04-26 13:25:32 +02:00
if [ "$partscheme" == "mbr" -o "$partscheme" == "embr" ]; then
partlabel="$partlabel&lt;br&gt;${device:5:5} $fstype $volname $volsize MB"
case "$fstype" in
swap|iso9660|unformatted) ;;
ext2|ext3|ext4|reiserfs|reiser4|unformatted) ;;
2011-04-26 13:25:32 +02:00
*) dcop @dcopid KommanderIf "addListItem(QString,QString,int)" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})" 0
dcop @dcopid KommanderIf "setSelection" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})"
;;
esac
elif [ "$partscheme" == "gpt" -o "$partscheme" == "unknown" -a $volsize -gt 0 ]; then
case "$fstype" in
swap|iso9660|unformatted) ;;
ext2|ext3|ext4|reiserfs|reiser4) ;;
2011-04-26 13:25:32 +02:00
*) dcop @dcopid KommanderIf "addListItem(QString,QString,int)" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})" 0
dcop @dcopid KommanderIf "setSelection" chainloadbox "${device:5:5} ($fstype,$volname,$volsize MB${add_info})"
;;
esac
fi
done
@execEnd</string>
</stringlist>
</property>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>endinstall</cstring>
</property>
<attribute name="title">
<string>End of installation</string>
</attribute>
<widget class="CheckBox">
<property name="name">
<cstring>confirmBox</cstring>
</property>
<property name="geometry">
<rect>
<x>104</x>
<y>135</y>
<width>20</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="Label">
<property name="name">
<cstring>finallabel</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>0</y>
<width>540</width>
<height>50</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>18</pointsize>
</font>
</property>
<property name="text">
<string>Installation completed.</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="TextEdit">
<property name="name">
<cstring>installlog</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>540</width>
<height>360</height>
</rect>
</property>
<property name="hScrollBarMode">
<enum>AlwaysOn</enum>
</property>
<property name="textFormat">
<enum>LogText</enum>
</property>
<property name="populationText">
<string></string>
</property>
<property name="associations" stdset="0">
<stringlist>
<string></string>
</stringlist>
</property>
</widget>
2011-04-26 13:25:32 +02:00
<widget class="ScriptObject">
<property name="name">
<cstring>launchinstall</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>@NextBox.setChecked(false)
@execBegin
conffile=~/.bootrecover.conf
cat &gt; $conffile &lt;&lt; _EOF
#
# openmamba installation file
#
# created by openmamba bootrecover wizard
#
_EOF
@dcop(@dcopid, KommanderIf, enableWidget(QString,bool), back,false)
installdevice=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",0)
mountpoint=@String.section(@devicesbox.item(@devicesbox.currentItem)," ",1)
mbrdevice=@String.section(@mbrbox.item(@mbrbox.currentItem)," ",0)
IFS=$'\n'
CHAINLOAD_SELECTED=(`dcop @dcopid KommanderIf selection chainloadbox`)
for i in ${CHAINLOAD_SELECTED[*]}; do
chainloaddevices="/dev/${i:0:4} $chainloaddevices"
done
IFS=$' \t\n'
cat &gt;&gt;$conffile &lt;&lt; _EOF
INSTALL_DEVICE='/dev/$installdevice'
INSTALL_MOUNTPOINT='$mountpoint'
INSTALL_BOOTLOADER_DEVICE='/dev/$mbrdevice'
INSTALL_BOOTLOADER_DEVICE_SETBOOTABLE=@bootableBox.checked
INSTALL_BOOTLOADER_CHAINLOAD=($chainloaddevices)
_EOF
@execEnd
@if (@Message.question(@i18n("Boot loader from") @String.section(@devicesbox.item(@devicesbox.currentItem)," ",0) @i18n("will installed to ") @mbrbox.item(@mbrbox.currentItem).
@i18n("OK to continue?"), @i18n("Warning"), @i18n("OK"), @i18n("Abort")) == 1)
@confirmBox.setChecked(true)
@endif
@if (@confirmBox.checked); then
@dcop(@dcopid, KommanderIf, setEnabled(QString,bool), back, false)
@exec("/usr/share/openmamba/bootrecover/bootrecover.sh -y @dcopid &amp;&gt; ~/.bootrecover.log")
@execBegin
dcop @dcopid KommanderIf setText installlog "`cat ~/.bootrecover.log`"
@execEnd
@endif
@if (!@confirmBox.checked); then
@Message.info(@i18n("Installation aborted."))
@dcop(@dcopid, MainApplication-Interface, quit())
@endif
@BackBox.setChecked(false)
</string>
</stringlist>
</property>
</widget>
<widget class="ScriptObject">
<property name="name">
<cstring>ScriptObject7</cstring>
</property>
<property name="geometry">
<rect>
<x>540</x>
<y>20</y>
<width>32</width>
<height>32</height>
</rect>
</property>
<property name="associations" stdset="0">
<stringlist>
<string>dcop @dcopid KommanderIf setText installlog "`cat ~/.bootrecover.log`"
</string>
</stringlist>
</property>
</widget>
</widget>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="25999">789cc59c57afdd46d6a6effb5718cdbbc680df662631988b9373ce6730171599c913f68983f9ef53bbde5525d9966459ddc067360c3d665ab5f22a6ef57ffdebb7dbd3a3dffef55fff785eb2652b7e130d7bfaed5ff2651c3ffef7fff95ffff71fffccd3dfccffa24595fe16fff37ffce39f67cbdfc46fc7f3a4561006068285fd67c5f2d672e4f9ce72b248893f2c679e99e56aa116d18a27dccfdd799d1267747d4c5c804565594505ee979f2b8e165106eeecf551b22871fd545a4eddfdf360992d24389c2d737307de175996b15ed8c5eb35cbdac88bf30fc41a1cd8ebe3242279e7de72e69eaff62de7510c6eb9651e45f4fe5362ba5eec581669b1482ddbfb9328d6919567b2eb4f5444ef9fdf579ca65145f29d58ce627a7e6be54ff388d3f3b7c155b6c856fc202d174623b85e582e13ba5fae5bae2a89eb8dafac58c624afbcb7ac58b6282c872bce162c5ee4f67d7b96a35247b0d71a98315cdf9e807989ebd9367105960bcb312fe8fc16b13b6ffd314b780cf9c416319d178167fbbed9ea374b23b2678be7e731d967b2fe9b15b1207f6cc1ee7e7d64b9e47cc1ecf3772d33777eb2f6c8b8d37ffd06e66c5159ffb4face24570b69cf6bcb9a0b3c2fb0facda394e4a995e5d8bd8f6d121b0fb4fe65e5c9d394e2474d60f33c6edf67f59d673c22f91f88c542d8e7597de439cfa13ffd482c219fee2c17ee7dad8d97bc1411ec391d5aae128ab7f9ccb28829ded425d8ddcf62b0301ebbe2e6deb3cd2fc2ea2f976ebdcd022c4c84d9f36fc46964e5532f9695f14ffbfce9c0b28e499e07464cfedf419fdaf89ff58f6e5c71b170fecc2e2c4729d9af3925a6f3cd1a586491d5676dd75ba46281f8acadfc4526e2c8c66f238849fedae68b224f28dfb0c47221ca18febd6199890afae86c7e2b8cff4489b5c7b1652118ce4f3796654cfe3ce7e0c4f9b3cdbf8572fed1623daad2c82fccfa6fb9e009b8b1f158462efe3b1bbf659c507ed3579613a37fbb7e6efdb94c53d2af5c828d3eacbcb3b56f59262e3f6d800b1dc3ff71be4a5cfedb040b9340ec796bff92bbf353615938fd35365e4a99e4e46faf9695d117ec61e3b9d4ce9eaa01e7a49f6e1d5ca50b2b2fb7fe5d2da459b1d5cfb3e528a7f7b5c76019c5d67fb9e33829ad3cb83ec95dbd7b071709fc415e818dfeecf5b38dafaa48285ef83a3873f588832b7a7e5d834509fb3fd8fc5695eefef91cecf2477307965962e35ddb78ad98895ff8a3adbf154fe9fed6c64b2513ca7f8d04cb38b6f1d8597fab7429501f671b8f6c9150fd089fc139c59fbe060b1edbebd93a5856b41e2b2ff3fad4365fb0d85daf7bb0396fdf1fda7cc5929cfc899f8025c3fa1e6cbcb1d4f94bfb0976f6e7d69f5896d1fd0dce67d218d8fa87d507cb4541f9e58e98c536dff107b0e429fcdbc60f2b9dffb33db08863bb3e61e38f55ee7e0d792b93d0acbc13f4c7128a5fa5c099abbf365e192f28fe266b6f2672773e0117e606cbd09f34f5d2e6ffc9f60f4c25d42fd431b870f6b6f1c774eae26704f38cf2a3ad4f7c5146888f76021b7fb2eb11365e789491be6b5bbf79ecfc5727c4140fb3d5074fdcf9f0065cd07a440a36f910ebb5fec3bdfd1e3831dddfd97e8e6729f99fb6f6e47946eb91787e5e4511f46df3232f5c7c88126c146ed73b597fe3a57bfeb800e7f47cf90c568b0cf16bfb035eb9ebc506581689d5d783ed873873f9b77924a6f810908f65649fd1da977377fd9c5916a9b3bfe31cfd6e734cecea6f414cfedded12937f69c8239cffcf23b18bdf065cd0f583cd575c3aff981be212fed03c1093ffab3db07bfe007b2827cf5c79b6f1dd06c4eefd4b7049f619705ebbe7cfafc412fed9d8fe472cfcf99258523d9b895d7d5c1093be259d77fa6fad7f0a5fef03092e487eb5045726e1dbeb6d7e10b17bded4818dbfdb7c3587e09ce6a3701d5cba7eed9098ecdb8057e5163c1193ffcf36be8c3b64e8dfe43131bdbfb3f951642ebe9a9198de273ec1a641b0f5a3b9052b53712cdb78123e7ee688b8a07ef7006c2c867ac7c1c6dfd14fd0f5aaccecf5bdcd3f263d51be995e8915fa3581f717a5cb470f605622ff37361e4599917f771131a3fa734aac50ef05f45daa2ab7fed1c31f2a9fef3b6237efbc13733c6fba07e7b4fe50834b773fec57a904f97fb0fda76019f95f7d43ece68b337011235ec6736237cfe279ccd443cc27b00fcfa8fe0ea7c4e48f3de437ed3afaf5f9823842feafe1cfbc74f148e74d3f8678b1f94a0873bfcd1ff31d718e7e7cda23ae70fd60eb9590cebf66f8a374f52780bcb270f3ee15d8f803fa0b3b8f09e5faadf69698e63985f8d2aebf1a8e89c95ffb3d629a0794cd6726f85d7e0c88297e8633629a9fa72362d2e774052ee2c8d647c1c04a64b0afad3f3272f69ff78805f5fb1f60c913ab2f89e7c739d973704cfeda34c482ec85e79bf108f9a3bb059712f5a9b6fe207d7fd33e1293bf0fafc48aea730f36fe857c60ed63d235d9bf2fc00543ff192cc025e517b10676fea707b01918d0ffa6c432c7fc67fb6d9915344ff61531cdfb21de97556efec5f3f29ce2613a26a6fd95e913eceaff70481c53fece8829ff349ab85a60fe498915f245afc025cd279aeeaf5cbdb7fd845c851fecbb465ca2df0b5b70e5e6333aaf74867c69fb6f597a79b68839cdd3b057e9f43b2c8973f433fa146cfa69abcfba212e13c49b8d6f5915246fbf4eecfa8b8998fc7f1a88c95f07c8cfdcf93e2676f3db823887fef93db1cbcf6b9eadfdfbc433f2e906b1a079fe9cd8d59f6d7049fdd480f571275f774d4cf1c1d788291ff7079eadfd46c4
</image>
<image name="image1">
<data format="XPM.GZ" length="63226">789ced5d5b53db4c93be7f7f45ea9dbbafb6e6b32c5987dada8b70720c04128209646b2f66743027070810025bfbdfb7d52dc933a3912c270136fba93a60da927a5aa3e7e99e9326fffcc79be30fefdffce39f7fddde89bbb3f84d7c2abebdf947723f9f3ffee77ffdc77ffff5b73718bc09bc374377f066f8f7bffdf5379fbd89dfb0c160e00c06a85f14fa9074b18fba37080678be9ca03e1a84030f8f9fa11e0ca2c1087507f5702007019e4ff6c5201e84a80bd453282ec6f333d433c719a4a89fe4bae338ae83e5b331eaaee339583edb43dd73468e8bfe5ea23e727c07fd911275df091df4879fa21e3a9183fe081f75e1c44e84fa77d463277124eaef514f870327c1eb37727d38183a4e86f6dfa1ee0cdd21d5cf08f5e1d01b3ae8df17d45dd0a97eef51f786a321f9fb80fa68180cc9df5bd4fd6138447f19d6371c0d873edaff887a349443ac3fb6857a3c4c86e42fd94f86e910eb53929e0eb321fa2f19ea99eb0ca97e835c771dd775a97e87a80f4127fff1fe41f35cf45f84a87baeefa2ff6c8abaef062efa2b63d4033772c9dfafa847ae70c9df0fa80b57ba58df92a31ebb898bfe4bbc1fd03217fd6758bf6eea0d5cf45f60fd7b03cf71b1fec526ea8e37f4c8ffcfa87b9eefa17f721bf591177884cf0875df0b3daadf75d4434f7884871475e1498ff08078f5622ff5d03fbe837a22a381c0e3f35c1f0d46430ffde158dec891b183f527cf511f8ebc11d5e72eeaa35130427ff815eafe281c51fddda11e8ca211d61f3b465d8ce211fac327a44b49f8e7583f2309e5a13d36403d1ea523f2f710f544a60ed6bfb8413df50723c233f993c9cca1fb417ef8037f38a2fb413cfa8eeffa58bf12f909dac8273ce0fdf99eeffb58df02cb072df0a97ef1798116fa743f88773f8a87845786fcf3055417e2917f2a74b7c02f3e1f5fc61ee19753f9b19ff874bd8b7ae2673ee125223df609cf129f8f9f06039ff083f7130c032fc0e721309e80e607c447d247714078e4885f381a06743f21e9709ce21fc68b2008a200ef8f23fee16c11209ed80fd2e3c8a5fbc3fa82b36540cf03eb03b424c0fa67882fd0b280e221f225c84227c0ebd93de9b1f4287e227ec241380c880fc8c7d089b311ddcf37d487a117e2fdf203d2e3c4a3e78d780ddd7014129e12d4fd300ce97e112f6114a7845786f80b452843c2e37bd2a13c8af78fa427c311dd2fc65f383b09e9fe46a42703c2b7407c8671e28c887f18bfe1ec2ca4fbbf463d8b9c10ed49accfc889dc88e22de225729321e1935d17bae7137ff17e222ff223aa0fbc9f68140511c55bcc57a04511f983f107341951bc42fc80964474bf53d29380f022111f511ca511c5df5dd213bfc027c66bb83a8bf07e38d94f92a8c0d31aeaa91844884ff6447a22084f0ce3b518886144f11a9fb770842b08df783d6823417cf450f7e07ac23be61f381a088a7feba427055e052f7449f86118ff842f4241cf53909ec421b507480f4424c83f7c7e70b6108477ac6f382a05d5df11ea42c402eb8f61bc062d1514eff17e45223241fc0d484f52c297bc263d1d44143fa9fc540e04dd1fe241644956e00be39774a42b880f184fa52b4792ea07f39bf4c01eb51ff0f9c3d14012bee9fc51ead2f364d87e91be0c253dafefa4a70ee147c485eed1f365d85e016b4252fd209e6524a5a4fac0fa062d91e8af443cca58a692e20db6676402e553bc3b2a749fea5b627b4c66b123090f3ba4c3717a3ee85fecc4aea4f88df7130f632fa6fa43be80e6c714af9f4887eb897f6ea18792f885f12286781853befa487a1ad0f39518df631f1e27d947ffe0ec2826fc30d2d3909e3fc7e70947654cf541f6451cc7840fac4fd0d298ea639374a81e8a5788f73881f2e879be2df4b8a83fd2d33491943f100f71963831c58f31e9608f9e37e693c449dc84e207e67bd04609c543ac9fc44b53ba7f89cf138e06095dff9674288fda57a59ec5c42fcccf899f8409e107e32d6822a1e789f13289e072ca07f8fc414b12c233c697046e30a1fba3f3e30c223c1ec7f80e74c962e21f1d4fa0b947f783f13749d34142f1e596f4cc4b28ffe1f5e9201d2684177c5ee930f552ca1758df2934c712e223e62b38eaa714ff12d2a13c7afe5ea17be4bf24fb809794f82249cf46c5fd20dfc15a9852fb1cf906674729e553e42b1c1529e113f10547654af585ed23381aa784af7dd2b3c23f86f916ce4e53c2cf67d2c13f2a1ff36b1a6741513ee6a7142a28a5f8b4497ae653fdf11f855ef8c7301ea7693648e9f871a117fe726c2fa459e6a4c457cc9fd9201ba654df985f32277333e2ef49a187644f20ffe1e828233c627ccebc2cc8a8fe4b3d2cca5b2f7451d8c7f658e6676146fcfd5ce849610ff90ed6a28cea1bdb6370b6c8c81eb6a7e0a8ccb0be393e5f381a6754df183fe1689261fd72cc37705492fd8f187f32a8802c26bd975e7a69929e23bdf4d22e3d477a790de18c0b2e795c93e4b53dab4bcf915e5e5a78ca333e6b90d3d7f6ae2e3d477a7959e167fc1cb87061959e23bdf49273e41233869d253d477af9171760c8bc911f7d1ee9a597bb228f3471a4cf23bdfccb0b30e48c7fedf3482fbdb409b4b6aefa3cd24b2f4d8299e48c5ff31bfe0de4b6cf23bdf46293822967fccec823f7afed595d7a8ef4f27a021cf96ee49187d7f6a92e3d477a793da971a4cf23bdf4a2c9ffcf3cc27ff047fec4dfc2cf1a5f7f6def7bf9b3c5c2918dd7f6a92edd38c2d7f926dfe263fe8e4ff836fc4cf80e7c6ef35dfe9eeff1fdd7be0b8bc71ff847f0f8807fe287e8e921fc75c0a7fca8bbb7fc333fe6278dc74e
</image>
</images>
<connections>
<connection>
<sender>mbrbox</sender>
<signal>textChanged(const QString&amp;)</signal>
<receiver>setBootableCheckbox</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>bootrecover</sender>
<signal>selected(const QString&amp;)</signal>
<receiver>wizardScript</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>installlog</sender>
<signal>widgetOpened()</signal>
<receiver>ScriptObject7</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>mbrbox</sender>
<signal>widgetTextChanged(const QString&amp;)</signal>
<receiver>setBootableCheckbox</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>bootableBox</sender>
<signal>widgetOpened()</signal>
<receiver>scanbootloader</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>NextBox</sender>
<signal>widgetOpened()</signal>
<receiver>wizardScript</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>devicesbox</sender>
<signal>widgetOpened()</signal>
<receiver>scanDevices</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>devicesbox</sender>
<signal>selectionChanged()</signal>
<receiver>setlabel</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>NextBox</sender>
<signal>stateChanged(int)</signal>
<receiver>wizardScript</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>mbrbox</sender>
<signal>widgetOpened()</signal>
<receiver>setBootableCheckbox</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>installlog</sender>
<signal>widgetOpened()</signal>
<receiver>launchinstall</receiver>
<slot>execute()</slot>
</connection>
<connection>
<sender>installlog</sender>
<signal>widgetOpened()</signal>
<receiver>launchinstall</receiver>
<slot>adjustSize()</slot>
</connection>
</connections>
<tabstops>
<tabstop>devicesbox</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>