tazlito annotate tazlitobox @ rev 75

Desktop file for tazlito manual
author Christophe Lincoln <pankso@slitaz.org>
date Tue Jun 10 01:22:59 2008 +0200 (2008-06-10)
parents
children 42a1f0b032ee
rev   line source
pankso@74 1 #! /bin/sh
pankso@74 2 #
pankso@74 3 # Gtkdialog box for Tazlito - SliTaz Live Tool.
pankso@74 4 #
pankso@74 5 VERSION=20080306
pankso@74 6
pankso@74 7 # Check if user is root.
pankso@74 8 check_root()
pankso@74 9 {
pankso@74 10 if test $(id -u) != 0 ; then
pankso@74 11 echo -e "
pankso@74 12 You must be root to run `basename $0`. Please type 'su' and
pankso@74 13 root password to become super-user.\n"
pankso@74 14 exit 0
pankso@74 15 fi
pankso@74 16 }
pankso@74 17
pankso@74 18 # By default we go in the flavors dir to download or gen flavors.
pankso@74 19 cd_flavors()
pankso@74 20 {
pankso@74 21 mkdir -p /home/slitaz/flavors
pankso@74 22 cd /home/slitaz/flavors
pankso@74 23 }
pankso@74 24
pankso@74 25 export HELP='
pankso@74 26 <window title="Tazlito Box - Help" icon-name="media-cdrom">
pankso@74 27 <vbox>
pankso@74 28 <text use-markup="true">
pankso@74 29 <label>"
pankso@74 30 <b>Tazlito Box - Help</b>"
pankso@74 31 </label>
pankso@74 32 </text>
pankso@74 33
pankso@74 34 <frame Overview>
pankso@74 35 <text wrap="true" width-chars="52" use-markup="true">
pankso@74 36 <label>
pankso@74 37 "
pankso@74 38 Tazlito Box is a tiny interface to SliTaz Live Tool aka Tazlito.
pankso@74 39 You can simply generate a LiveCD in a few minutes, using your
pankso@74 40 own flavor or one from the SliTaz community. Tazlito can also
pankso@74 41 generate a LiveCD flavor using all the current installed packages
pankso@74 42 selection. Tazlito commads are executed in a XTerm, you can
pankso@74 43 then press ENTER or the mouse to close the window.
pankso@74 44 "
pankso@74 45 </label>
pankso@74 46 </text>
pankso@74 47 </frame>
pankso@74 48
pankso@74 49 <frame Default paths>
pankso@74 50 <text wrap="true" width-chars="50" use-markup="true">
pankso@74 51 <label>
pankso@74 52 "
pankso@74 53 Distro : /home/slitaz/distro
pankso@74 54 Flavors : /home/slitaz/flavors
pankso@74 55 Packages : /home/slitaz/packages
pankso@74 56 "
pankso@74 57 </label>
pankso@74 58 </text>
pankso@74 59 </frame>
pankso@74 60
pankso@74 61 <hbox>
pankso@74 62 <button>
pankso@74 63 <input file icon="exit"></input>
pankso@74 64 <action type="closewindow">HELP</action>
pankso@74 65 </button>
pankso@74 66 </hbox>
pankso@74 67
pankso@74 68 </vbox>
pankso@74 69 </window>
pankso@74 70 '
pankso@74 71
pankso@74 72 # Execute tazlito commands in a XTerm.
pankso@74 73 #
pankso@74 74 export MAIN_DIALOG='
pankso@74 75 <window title="Tazlito Box" icon-name="media-cdrom">
pankso@74 76 <vbox>
pankso@74 77
pankso@74 78 <text use-markup="true">
pankso@74 79 <label>
pankso@74 80 "
pankso@74 81 <b>SliTaz Live Tool Box</b>"
pankso@74 82 </label>
pankso@74 83 </text>
pankso@74 84 <text wrap="true" width-chars="54" use-markup="true">
pankso@74 85 <label>
pankso@74 86 "
pankso@74 87 Generate a LiveCD flavor with Tazlito.
pankso@74 88 "
pankso@74 89 </label>
pankso@74 90 </text>
pankso@74 91
pankso@74 92 <notebook labels="System|Flavors|Configuration files">
pankso@74 93
pankso@74 94 <frame Current packages selection>
pankso@74 95
pankso@74 96 <text use-markup="true">
pankso@74 97 <label>
pankso@74 98 "
pankso@74 99 Gen distro will creat a LiveCD with all installed packages.
pankso@74 100 "
pankso@74 101 </label>
pankso@74 102 </text>
pankso@74 103
pankso@74 104 <hbox>
pankso@74 105 <button>
pankso@74 106 <label>Gen running distro</label>
pankso@74 107 <input file icon="forward"></input>
pankso@74 108 <action>cd /home/slitaz</action>
pankso@74 109 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-distro" -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 110 </button>
pankso@74 111 <button>
pankso@74 112 <label>Clean distro</label>
pankso@74 113 <input file icon="edit-clear"></input>
pankso@74 114 <action>cd /home/slitaz</action>
pankso@74 115 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
pankso@74 116 </button>
pankso@74 117 </hbox>
pankso@74 118
pankso@74 119 <hbox>
pankso@74 120 <text use-markup="true">
pankso@74 121 <label>"<b>New flavor :</b>"</label>
pankso@74 122 </text>
pankso@74 123 <entry>
pankso@74 124 <default>home-made</default>
pankso@74 125 <variable>GEN_FLAVOR_NAME</variable>
pankso@74 126 </entry>
pankso@74 127 </hbox>
pankso@74 128 <hbox>
pankso@74 129 <button>
pankso@74 130 <label>Gen flavor</label>
pankso@74 131 <input file icon="forward"></input>
pankso@74 132 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-flavor $GEN_FLAVOR_NAME" -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 133 </button>
pankso@74 134 </hbox>
pankso@74 135 </frame>
pankso@74 136
pankso@74 137 <frame Community and personnal flavors>
pankso@74 138 <text wrap="true" use-markup="true">
pankso@74 139 <label>
pankso@74 140 "
pankso@74 141 Flavors list can be recharged from SliTaz mirror.
pankso@74 142 "
pankso@74 143 </label>
pankso@74 144 </text>
pankso@74 145
pankso@74 146 <hbox>
pankso@74 147 <text use-markup="true">
pankso@74 148 <label>"<b>Flavor :</b>"</label>
pankso@74 149 </text>
pankso@74 150 <entry>
pankso@74 151 <default>core</default>
pankso@74 152 <variable>COMMUNITY_FLAVOR</variable>
pankso@74 153 </entry>
pankso@74 154 </hbox>
pankso@74 155
pankso@74 156 <hbox>
pankso@74 157 <button>
pankso@74 158 <label>List flavors</label>
pankso@74 159 <input file icon="media-cdrom"></input>
pankso@74 160 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "list-flavors" -e "tazlito list-flavors && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 161 </button>
pankso@74 162 <button>
pankso@74 163 <label>Recharge list</label>
pankso@74 164 <input file icon="reload"></input>
pankso@74 165 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "list-flavors --recharge" -e "tazlito list-flavors --recharge && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 166 </button>
pankso@74 167 </hbox>
pankso@74 168
pankso@74 169 <hbox>
pankso@74 170 <button>
pankso@74 171 <label>Get flavor</label>
pankso@74 172 <input file icon="forward"></input>
pankso@74 173 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "get-flavor $COMMUNITY_FLAVOR" -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 174 </button>
pankso@74 175 <button>
pankso@74 176 <label>Gen flavor distro</label>
pankso@74 177 <input file icon="forward"></input>
pankso@74 178 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "gen-distro" -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"</action>
pankso@74 179 </button>
pankso@74 180 <button>
pankso@74 181 <label>Clean distro</label>
pankso@74 182 <input file icon="edit-clear"></input>
pankso@74 183 <action>xterm -fa MiscFixed -fs 11 -bg gray93 -fg black -geometry 80x16 -title "clean-distro" -e "tazlito clean-distro && sleep 1"</action>
pankso@74 184 </button>
pankso@74 185 </hbox>
pankso@74 186 </frame>
pankso@74 187
pankso@74 188 <frame Flavor config and packages list>
pankso@74 189 <text wrap="true" use-markup="true">
pankso@74 190 <label>
pankso@74 191 "
pankso@74 192 Before editing files you must have a flavor description.
pankso@74 193 "
pankso@74 194 </label>
pankso@74 195 </text>
pankso@74 196
pankso@74 197 <hbox>
pankso@74 198 <text use-markup="true">
pankso@74 199 <label>"<b>Flavor config :</b>"</label>
pankso@74 200 </text>
pankso@74 201 <entry>
pankso@74 202 <default>/home/slitaz/flavors/tazlito.conf</default>
pankso@74 203 <variable>CONFIG_FILE</variable>
pankso@74 204 </entry>
pankso@74 205 <button>
pankso@74 206 <input file icon="accessories-text-editor"></input>
pankso@74 207 <action>leafpad $CONFIG_FILE</action>
pankso@74 208 </button>
pankso@74 209 </hbox>
pankso@74 210
pankso@74 211 <hbox>
pankso@74 212 <text use-markup="true">
pankso@74 213 <label>"<b>Packages list :</b>"</label>
pankso@74 214 </text>
pankso@74 215 <entry>
pankso@74 216 <default>/home/slitaz/flavors/distro-packages.list</default>
pankso@74 217 <variable>PKGS_LIST</variable>
pankso@74 218 </entry>
pankso@74 219 <button>
pankso@74 220 <input file icon="accessories-text-editor"></input>
pankso@74 221 <action>leafpad $PKGS_LIST</action>
pankso@74 222 </button>
pankso@74 223 </hbox>
pankso@74 224
pankso@74 225 </frame>
pankso@74 226
pankso@74 227 </notebook>
pankso@74 228
pankso@74 229 <hbox>
pankso@74 230 <button help>
pankso@74 231 <input file icon="help-browser"></input>
pankso@74 232 <action type="launch">HELP</action>
pankso@74 233 </button>
pankso@74 234 <button>
pankso@74 235 <input file icon="exit"></input>
pankso@74 236 <action type="exit">Exit</action>
pankso@74 237 </button>
pankso@74 238 </hbox>
pankso@74 239
pankso@74 240 </vbox>
pankso@74 241 </window>
pankso@74 242 '
pankso@74 243
pankso@74 244 # Tazlitobox action
pankso@74 245 check_root
pankso@74 246 cd_flavors
pankso@74 247 gtkdialog --center --program=MAIN_DIALOG
pankso@74 248
pankso@74 249 exit 0