tazlito annotate tazlitobox @ rev 217
Add extraction tools in loram builder for slitaz-installer : no extra package to install during install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 27 11:57:31 2011 +0200 (2011-04-27) |
parents | 55ec0ab30411 |
children |
rev | line source |
---|---|
pankso@140 | 1 #!/bin/sh |
pankso@74 | 2 # |
pankso@74 | 3 # Gtkdialog box for Tazlito - SliTaz Live Tool. |
paul@216 | 4 # Tabs are used for indent and all actions should go into functions to |
paul@216 | 5 # separate the GUI and commands. |
pankso@140 | 6 # |
pankso@214 | 7 # (C) GNU gpl v3 - SliTaz GNU/Linux 2011. |
pankso@74 | 8 # |
pankso@214 | 9 VERSION=4.0 |
pankso@133 | 10 |
pankso@188 | 11 # Include gettext helper script. |
pankso@188 | 12 . /usr/bin/gettext.sh |
pankso@188 | 13 |
pankso@188 | 14 # Export package name for gettext. |
pankso@188 | 15 TEXTDOMAIN='tazusbbox' |
pankso@188 | 16 export TEXTDOMAIN |
pankso@188 | 17 |
pankso@133 | 18 export BIN=$0 |
pankso@74 | 19 |
pankso@74 | 20 # Check if user is root. |
pankso@74 | 21 check_root() |
pankso@74 | 22 { |
pankso@74 | 23 if test $(id -u) != 0 ; then |
pankso@74 | 24 echo -e " |
pankso@74 | 25 You must be root to run `basename $0`. Please type 'su' and |
pankso@74 | 26 root password to become super-user.\n" |
pankso@74 | 27 exit 0 |
pankso@74 | 28 fi |
pankso@74 | 29 } |
pankso@74 | 30 |
pankso@133 | 31 # We need to parse flavors.list for GTK tree. |
pankso@133 | 32 list_flavors() |
pankso@133 | 33 { |
pankso@133 | 34 tazlito list-flavors | grep ^[a-z] | while read line |
pankso@133 | 35 do |
pankso@133 | 36 info=`echo -n $line | awk '{print $1 " " $2 " " $3}'` |
pankso@133 | 37 printinfo=`echo -n $line | awk '{print $1 "|" $2 "|" $3}'` |
pankso@133 | 38 echo "$printinfo|`echo $line | sed s/\"$info\"//`" |
pankso@133 | 39 done |
pankso@133 | 40 } |
pankso@133 | 41 |
pankso@133 | 42 recharge_list() |
pankso@133 | 43 { |
pankso@133 | 44 xterm -geometry 90x14 \ |
pankso@133 | 45 -title "list-flavors --recharge" \ |
pankso@133 | 46 -e "tazlito list-flavors --recharge | grep ^[a-z] && sleep 2" |
pankso@133 | 47 } |
pankso@133 | 48 |
paul@216 | 49 # When using gen-liveflavor, gen-flavor or gen-distro, a user can put some |
pankso@133 | 50 # addfiles copied into the rootfs. |
pankso@133 | 51 addfiles_action() |
pankso@133 | 52 { |
pankso@133 | 53 cd /home/slitaz |
pankso@136 | 54 mkdir -p distro/addfiles/rootfs/usr/share/images |
pankso@133 | 55 mkdir -p distro/addfiles/rootcd |
pankso@133 | 56 file-manager distro/addfiles & |
pankso@133 | 57 } |
pankso@133 | 58 |
pankso@136 | 59 writeiso_action() |
pankso@136 | 60 { |
pankso@136 | 61 xterm -geometry 80x16 \ |
pankso@136 | 62 -title "writeiso" \ |
pankso@136 | 63 -e "tazlito writeiso $COMPRESSION" |
pankso@136 | 64 } |
pankso@136 | 65 |
pankso@137 | 66 gen_liveflavor_action() |
pankso@137 | 67 { |
pankso@137 | 68 cd /home/slitaz |
pankso@137 | 69 sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" \ |
pankso@137 | 70 /etc/tazlito/tazlito.conf |
pankso@137 | 71 xterm -geometry 80x16 \ |
pankso@137 | 72 -title "gen-liveflavor" \ |
pankso@137 | 73 -e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" |
pankso@137 | 74 } |
pankso@137 | 75 |
pankso@137 | 76 clean_distro_action() |
pankso@137 | 77 { |
pankso@137 | 78 cd /home/slitaz |
pankso@137 | 79 xterm -geometry 80x16 \ |
pankso@137 | 80 -title "clean-distro" \ |
pankso@137 | 81 -e "tazlito clean-distro && sleep 1" |
pankso@137 | 82 } |
pankso@137 | 83 |
pascal@164 | 84 show_flavors() |
pascal@164 | 85 { |
pascal@164 | 86 tazlito list-flavors | \ |
pascal@164 | 87 awk '{if (show && $1 != "") print $1} /^==/ {show=1}' |
pascal@164 | 88 } |
pascal@164 | 89 |
pankso@139 | 90 get_flavor_action() |
pankso@139 | 91 { |
pankso@139 | 92 cd /home/slitaz |
pankso@139 | 93 xterm -geometry 80x16 \ |
pankso@139 | 94 -title "get-flavor $COMMUNITY_FLAVOR" \ |
pankso@139 | 95 -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close" |
pankso@139 | 96 } |
pankso@139 | 97 |
pankso@139 | 98 gen_distro_action() |
pankso@139 | 99 { |
pankso@139 | 100 cd /home/slitaz |
pankso@139 | 101 xterm -geometry 80x16 \ |
pankso@139 | 102 -title "gen-distro" \ |
pankso@139 | 103 -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close" |
pankso@139 | 104 } |
pankso@139 | 105 |
pankso@139 | 106 gen_flavor_action() |
pankso@139 | 107 { |
pankso@139 | 108 cd /home/slitaz |
pankso@139 | 109 xterm -geometry 80x16 \ |
pankso@139 | 110 -title "gen-flavor $GEN_FLAVOR_NAME" \ |
pankso@139 | 111 -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" |
pankso@139 | 112 } |
pankso@139 | 113 |
pankso@139 | 114 edit_distro_script() |
pankso@139 | 115 { |
pankso@139 | 116 [ ! -f $DISTRO_SCRIPT ] && echo "#!/bin/sh" > $DISTRO_SCRIPT |
pankso@139 | 117 chmod +x $DISTRO_SCRIPT |
pankso@139 | 118 editor $DISTRO_SCRIPT |
pankso@139 | 119 } |
pankso@139 | 120 |
pascal@170 | 121 loram_action() |
pascal@170 | 122 { |
pascal@198 | 123 case "$LORAM_RAM$LORAM_CDROM$LORAM_CDROM_SMALL" in |
pascal@198 | 124 falsefalsetrue) type=smallcdrom ;; |
pascal@198 | 125 falsetruefalse) type=cdrom ;; |
pascal@170 | 126 *) type=ram ;; |
pascal@170 | 127 esac |
pascal@170 | 128 xterm -geometry 80x16 \ |
pascal@170 | 129 -title "build loram iso image $LORAM_OUT" \ |
pascal@170 | 130 -e "tazlito build-loram $LORAM_IN $LORAM_OUT $type ; echo -e \"----\nENTER to continue...\" && read close" |
pascal@170 | 131 } |
pascal@170 | 132 |
pascal@164 | 133 merge_input() |
pascal@164 | 134 { |
pascal@164 | 135 set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) |
pascal@164 | 136 while [ -n "$2" ]; do |
pascal@164 | 137 echo "$2 | $1" |
pascal@164 | 138 shift 2 |
pascal@164 | 139 done |
pascal@164 | 140 } |
pascal@164 | 141 |
pascal@164 | 142 merge_add() |
pascal@164 | 143 { |
pascal@164 | 144 echo -n " $ISO_IN $ISO_RAM" >> /tmp/tazlito.mergelist |
pascal@164 | 145 } |
pascal@164 | 146 |
pascal@164 | 147 merge_del() |
pascal@164 | 148 { |
pascal@164 | 149 set -- $(cat /tmp/tazlito.mergelist) |
pascal@164 | 150 ARGS="" |
pascal@164 | 151 while [ -n "$2" ]; do |
pascal@164 | 152 case "$1" in |
pascal@164 | 153 $ISO_ITEM) ;; |
pascal@164 | 154 *) [ -n "$ARGS" ] && ARGS="$ARGS " |
pascal@164 | 155 ARGS="$ARGS$1 $2" ;; |
pascal@164 | 156 esac |
pascal@164 | 157 shift 2 |
pascal@164 | 158 done |
pascal@164 | 159 echo -n "$ARGS" > /tmp/tazlito.mergelist |
pascal@164 | 160 } |
pascal@164 | 161 |
pascal@164 | 162 merge_args() |
pascal@164 | 163 { |
pascal@164 | 164 first=true |
pascal@164 | 165 while [ -n "$2" ]; do |
pascal@164 | 166 echo "$(stat -c "%s" $1) $1 $2" |
pascal@164 | 167 shift 2 |
pascal@164 | 168 done | sort -nr | while read size file ram; do |
pascal@164 | 169 if $first; then |
pascal@164 | 170 cp $file $ISO_OUT |
pascal@164 | 171 echo -n "$ram $ISO_OUT " |
pascal@164 | 172 first=false |
pascal@164 | 173 continue |
pascal@164 | 174 fi |
pascal@164 | 175 dir=$tmp/$(basename $file) |
pascal@164 | 176 mkdir $dir |
pascal@164 | 177 mount -o loop,ro $file $dir |
pascal@164 | 178 echo -n "$ram $dir/boot/rootfs.gz " |
pascal@164 | 179 done |
pascal@164 | 180 } |
pascal@164 | 181 |
pascal@164 | 182 merge_action() |
pascal@164 | 183 { |
pascal@164 | 184 set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) |
pascal@164 | 185 rm -f /tmp/tazlito.mergelist |
pascal@164 | 186 tmp=/tmp/tazlitobox$$ |
pascal@164 | 187 mkdir $tmp |
pascal@164 | 188 [ -n "$4" ] || return |
pascal@164 | 189 xterm -geometry 80x16 -title "build meta iso image $ISO_OUT" \ |
pascal@164 | 190 -e "script -c 'tazlito merge $(merge_args $@)' && echo -e \"----\nENTER to continue...\" && read close" |
pascal@164 | 191 mv $ISO_OUT.merged $ISO_OUT |
pascal@164 | 192 for i in $tmp/*; do |
pascal@164 | 193 umount -d $i |
pascal@164 | 194 done |
pascal@164 | 195 rm -rf $tmp |
pascal@164 | 196 } |
pascal@164 | 197 |
pankso@139 | 198 # Boxes |
pankso@139 | 199 |
pankso@74 | 200 export HELP=' |
pankso@74 | 201 <window title="Tazlito Box - Help" icon-name="media-cdrom"> |
pankso@133 | 202 <vbox> |
pankso@133 | 203 <text use-markup="true"> |
pankso@133 | 204 <label>" |
pankso@74 | 205 <b>Tazlito Box - Help</b>" |
pankso@133 | 206 </label> |
pankso@133 | 207 </text> |
pankso@133 | 208 |
pankso@133 | 209 <frame Overview> |
pankso@133 | 210 <text wrap="true" width-chars="52" use-markup="true"> |
pankso@133 | 211 <label> |
pankso@74 | 212 " |
paul@90 | 213 Tazlito Box is a tiny interface to the SliTaz Live Tool aka Tazlito. |
pankso@74 | 214 You can simply generate a LiveCD in a few minutes, using your |
pankso@74 | 215 own flavor or one from the SliTaz community. Tazlito can also |
paul@90 | 216 generate a LiveCD flavor using all of the currently installed |
paul@90 | 217 packages. Tazlito commands are executed in a XTerm, you can |
paul@90 | 218 press ENTER or the mouse to close the window. |
pankso@74 | 219 " |
pankso@133 | 220 </label> |
pankso@133 | 221 </text> |
pankso@133 | 222 </frame> |
pankso@133 | 223 |
pankso@133 | 224 <frame Default paths> |
pankso@133 | 225 <text wrap="true" width-chars="50" use-markup="true"> |
pankso@133 | 226 <label> |
pankso@74 | 227 " |
pankso@74 | 228 Distro : /home/slitaz/distro |
pankso@74 | 229 Flavors : /home/slitaz/flavors |
pankso@74 | 230 Packages : /home/slitaz/packages |
pankso@74 | 231 " |
pankso@133 | 232 </label> |
pankso@133 | 233 </text> |
pankso@133 | 234 </frame> |
pankso@133 | 235 |
pankso@133 | 236 <hbox> |
pankso@133 | 237 <button> |
pankso@133 | 238 <input file icon="exit"></input> |
pankso@133 | 239 <action type="closewindow">HELP</action> |
pankso@133 | 240 </button> |
pankso@133 | 241 </hbox> |
pankso@133 | 242 |
pankso@133 | 243 </vbox> |
pankso@74 | 244 </window> |
pankso@74 | 245 ' |
pankso@74 | 246 |
pankso@133 | 247 # List all flavors on the mirror. |
pankso@133 | 248 export LIST_FLAVORS_BOX=' |
pankso@133 | 249 <window title="Community flavors list" icon-name="tazlito"> |
pankso@133 | 250 <vbox> |
pankso@133 | 251 <tree> |
pankso@133 | 252 <width>500</width><height>200</height> |
pankso@133 | 253 <variable>COMMUNITY_FLAVOR</variable> |
pankso@133 | 254 <label>Name|ISO|Rootfs|Description</label> |
pankso@133 | 255 <input exported_column="0">$BIN list_flavors</input> |
pankso@133 | 256 </tree> |
pankso@133 | 257 <hbox> |
pankso@133 | 258 <button> |
pankso@133 | 259 <label>Recharge list</label> |
pankso@133 | 260 <input file icon="reload"></input> |
pankso@133 | 261 <action>$BIN recharge_list</action> |
pankso@133 | 262 <action>refresh:COMMUNITY_FLAVOR</action> |
pankso@133 | 263 </button> |
pankso@133 | 264 <button> |
pankso@133 | 265 <label>Exit</label> |
pankso@133 | 266 <input file icon="exit"></input> |
pankso@133 | 267 <action type="closewindow">LIST_FLAVORS_BOX</action> |
pankso@133 | 268 </button> |
pankso@133 | 269 </hbox> |
pankso@133 | 270 </vbox> |
pankso@133 | 271 </window>' |
pankso@133 | 272 |
pankso@133 | 273 # Execute tazlito commands in a XTerm. Notebook: tab-pos="GTK_POS_LEFT" |
pankso@133 | 274 export TAZLITO_BOX=' |
pankso@74 | 275 <window title="Tazlito Box" icon-name="media-cdrom"> |
pankso@140 | 276 <vbox> |
pankso@132 | 277 |
pankso@140 | 278 <hbox> |
pankso@140 | 279 <text use-markup="true"> |
pankso@140 | 280 <label>"<b>SliTaz Live Tool</b>"</label> |
pankso@140 | 281 </text> |
pankso@140 | 282 <pixmap> |
pankso@140 | 283 <input file>/usr/share/pixmaps/tazlito.png</input> |
pankso@140 | 284 </pixmap> |
pankso@140 | 285 </hbox> |
pankso@132 | 286 |
pascal@170 | 287 <notebook labels="Writeiso|Live flavor|Flavors list|Gen flavor|Meta|Low RAM|Configuration"> |
pankso@140 | 288 |
pankso@140 | 289 <frame Filesystem to ISO> |
pankso@140 | 290 |
pankso@140 | 291 <text wrap="true" width-chars="60" use-markup="true"> |
pankso@140 | 292 <label> |
pankso@74 | 293 " |
pankso@132 | 294 Writeiso will generate an ISO image of the current filesystem as |
paul@134 | 295 is, including the /home directory. It is an easy way to remaster a |
pankso@132 | 296 SliTaz Live system, you just have to: boot, modify, writeiso. |
pankso@74 | 297 " |
pankso@140 | 298 </label> |
pankso@140 | 299 </text> |
pankso@132 | 300 |
pankso@140 | 301 <hbox> |
pankso@140 | 302 <text use-markup="true"> |
pascal@164 | 303 <label>"<b>Compression:</b>"</label> |
pankso@140 | 304 </text> |
pascal@164 | 305 <combobox> |
pankso@140 | 306 <variable>COMPRESSION</variable> |
pascal@164 | 307 <item>gzip</item> |
pascal@164 | 308 <item>lzma</item> |
pascal@164 | 309 <item>none</item> |
pascal@164 | 310 </combobox> |
pankso@140 | 311 <button> |
pankso@140 | 312 <label>Writeiso</label> |
pankso@140 | 313 <input file icon="forward"></input> |
pankso@140 | 314 <action>$BIN writeiso_action</action> |
pankso@140 | 315 </button> |
pankso@140 | 316 </hbox> |
pankso@140 | 317 |
pankso@140 | 318 </frame> |
pankso@140 | 319 |
pankso@140 | 320 <frame Current packages selection> |
pankso@140 | 321 |
pankso@140 | 322 <text wrap="true" width-chars="60" use-markup="true"> |
pankso@140 | 323 <label> |
pankso@132 | 324 " |
pankso@132 | 325 Gen Live flavor will create a LiveCD based on all the currently |
pankso@132 | 326 installed packages. To build the rootfs and ISO image it will use |
paul@184 | 327 original SliTaz packages. Any addfiles can be copied before |
paul@184 | 328 generating the distro. |
pankso@132 | 329 " |
pankso@140 | 330 </label> |
pankso@140 | 331 </text> |
pankso@140 | 332 |
pankso@140 | 333 <hbox> |
pankso@140 | 334 <text use-markup="true"> |
pankso@140 | 335 <label>"<b>Flavor name :</b>"</label> |
pankso@140 | 336 </text> |
pankso@140 | 337 <entry> |
pankso@140 | 338 <default>slitaz</default> |
pankso@140 | 339 <variable>GEN_LIVEFLAVOR_NAME</variable> |
pankso@140 | 340 </entry> |
pankso@140 | 341 </hbox> |
pankso@140 | 342 |
pankso@140 | 343 <hbox> |
pankso@140 | 344 <button> |
pankso@140 | 345 <label>Addfiles</label> |
pankso@140 | 346 <input file icon="gtk-open"></input> |
pankso@140 | 347 <action>$BIN addfiles_action</action> |
pankso@140 | 348 </button> |
pankso@140 | 349 <button> |
pankso@140 | 350 <label>Gen distro</label> |
pankso@140 | 351 <input file icon="forward"></input> |
pankso@140 | 352 <action>$BIN gen_liveflavor_action</action> |
pankso@140 | 353 </button> |
pankso@140 | 354 <button> |
pankso@140 | 355 <label>Clean distro</label> |
pankso@140 | 356 <input file icon="edit-clear"></input> |
pankso@140 | 357 <action>$BIN clean_distro_action</action> |
pankso@140 | 358 </button> |
pankso@140 | 359 </hbox> |
pankso@140 | 360 |
pankso@140 | 361 </frame> |
pankso@140 | 362 |
pankso@140 | 363 <frame Community and personal flavors> |
pankso@140 | 364 |
pankso@140 | 365 <text wrap="true" width-chars="60" use-markup="true"> |
pankso@140 | 366 <label> |
paul@90 | 367 " |
paul@184 | 368 Get and build preconfigured flavors from the community. The list of |
paul@184 | 369 flavors can be recharged from the SliTaz mirror. Some addfiles can |
paul@184 | 370 be copied before generating the distro. |
pankso@74 | 371 " |
pankso@140 | 372 </label> |
pankso@140 | 373 </text> |
pankso@140 | 374 |
pankso@140 | 375 <hbox> |
pankso@140 | 376 <text use-markup="true"> |
pankso@140 | 377 <label>"<b>Flavor :</b>"</label> |
pankso@140 | 378 </text> |
pankso@140 | 379 <entry> |
pankso@140 | 380 <default>core</default> |
pankso@140 | 381 <variable>COMMUNITY_FLAVOR</variable> |
pankso@140 | 382 </entry> |
pankso@140 | 383 <button> |
pankso@140 | 384 <label>List flavors</label> |
pankso@140 | 385 <input file icon="media-cdrom"></input> |
pankso@140 | 386 <action type="launch">LIST_FLAVORS_BOX</action> |
pankso@140 | 387 </button> |
pankso@140 | 388 </hbox> |
pankso@140 | 389 |
pankso@140 | 390 <hbox> |
pankso@140 | 391 <button> |
pankso@140 | 392 <label>Get flavor</label> |
pankso@140 | 393 <input file icon="forward"></input> |
pankso@140 | 394 <action>$BIN get_flavor_action</action> |
pankso@140 | 395 </button> |
pankso@140 | 396 <button> |
pankso@140 | 397 <label>Addfiles</label> |
pankso@140 | 398 <input file icon="gtk-open"></input> |
pankso@140 | 399 <action>$BIN addfiles_action</action> |
pankso@140 | 400 </button> |
pankso@140 | 401 <button> |
pankso@140 | 402 <label>Gen distro</label> |
pankso@140 | 403 <input file icon="forward"></input> |
pankso@140 | 404 <action>$BIN gen_distro_action</action> |
pankso@140 | 405 </button> |
pankso@140 | 406 <button> |
pankso@140 | 407 <label>Clean distro</label> |
pankso@140 | 408 <input file icon="edit-clear"></input> |
pankso@140 | 409 <action>$BIN clean_distro_action</action> |
pankso@140 | 410 </button> |
pankso@140 | 411 </hbox> |
pankso@140 | 412 |
pankso@140 | 413 </frame> |
pankso@140 | 414 <frame Generate a flavor> |
pankso@140 | 415 |
pankso@140 | 416 <text wrap="true" width-chars="60" use-markup="true"> |
pankso@140 | 417 <label> |
pankso@132 | 418 " |
paul@184 | 419 Gen Flavor will generate a new flavor file based on a rootfs in |
pankso@136 | 420 /home/slitaz/distro. All addfiles will be included in the flavor file. |
pankso@132 | 421 " |
pankso@140 | 422 </label> |
pankso@140 | 423 </text> |
pankso@132 | 424 |
pankso@140 | 425 <hbox> |
pankso@140 | 426 <text use-markup="true"> |
pankso@140 | 427 <label>"<b>New flavor :</b>"</label> |
pankso@140 | 428 </text> |
pankso@140 | 429 <entry> |
pankso@140 | 430 <default>slitaz</default> |
pankso@140 | 431 <variable>GEN_FLAVOR_NAME</variable> |
pankso@140 | 432 </entry> |
pankso@140 | 433 </hbox> |
pankso@140 | 434 |
pankso@140 | 435 <hbox> |
pankso@140 | 436 <button> |
pankso@140 | 437 <label>Addfiles</label> |
pankso@140 | 438 <input file icon="gtk-open"></input> |
pankso@140 | 439 <action>$BIN addfiles_action</action> |
pankso@140 | 440 </button> |
pankso@140 | 441 <button> |
pankso@140 | 442 <label>Gen new flavor</label> |
pankso@140 | 443 <input file icon="forward"></input> |
pankso@140 | 444 <action>$BIN gen_flavor_action</action> |
pankso@140 | 445 </button> |
pankso@140 | 446 </hbox> |
pankso@140 | 447 |
pankso@140 | 448 </frame> |
pankso@140 | 449 |
pascal@164 | 450 <frame Meta ISO image> |
pascal@164 | 451 |
pascal@164 | 452 <vbox> |
pascal@164 | 453 <hbox> |
pascal@166 | 454 <vbox> |
pascal@166 | 455 <text wrap="true" width-chars="33" use-markup="true"> |
pascal@166 | 456 <label> |
pascal@164 | 457 " |
pascal@164 | 458 Combines several ISO flavors like |
pascal@164 | 459 nested Russian dolls. The amount |
pascal@164 | 460 of RAM available at startup will be |
paul@183 | 461 used to select the utmost one. " |
pascal@166 | 462 </label> |
pascal@166 | 463 </text> |
pascal@166 | 464 <hbox> |
pascal@166 | 465 <text use-markup="true"> |
pascal@166 | 466 <label>"<b>ISO input: </b> "</label> |
pascal@166 | 467 </text> |
pascal@166 | 468 <entry accept="filename"> |
pascal@166 | 469 <variable>ISO_IN</variable> |
pascal@166 | 470 </entry> |
pascal@166 | 471 <button> |
pascal@166 | 472 <input file stock="gtk-open"></input> |
pascal@166 | 473 <action type="fileselect">ISO_IN</action> |
pascal@166 | 474 </button> |
pascal@166 | 475 </hbox> |
pascal@166 | 476 <hbox> |
pascal@166 | 477 <text use-markup="true"> |
paul@173 | 478 <label>"<b>RAM needed:</b> "</label> |
pascal@166 | 479 </text> |
pascal@166 | 480 <entry> |
pascal@166 | 481 <default>128M</default> |
pascal@166 | 482 <variable>ISO_RAM</variable> |
pascal@166 | 483 </entry> |
pascal@166 | 484 <button> |
pascal@166 | 485 <input file icon="add"></input> |
pascal@166 | 486 <action>$BIN merge_add</action> |
pascal@166 | 487 <action>refresh:ISO_ITEM</action> |
pascal@166 | 488 </button> |
pascal@166 | 489 </hbox> |
pascal@166 | 490 </vbox> |
pascal@166 | 491 <tree> |
pascal@166 | 492 <width>140</width><height>50</height> |
pascal@166 | 493 <label>RAM|ISO</label> |
pascal@166 | 494 <variable>ISO_ITEM</variable> |
pascal@166 | 495 <input>$BIN merge_input</input> |
pascal@166 | 496 <action>$BIN merge_del</action> |
pascal@164 | 497 <action>refresh:ISO_ITEM</action> |
pascal@166 | 498 </tree> |
pascal@164 | 499 </hbox> |
pascal@164 | 500 <hbox> |
pascal@164 | 501 <text use-markup="true"> |
pascal@164 | 502 <label>"<b>ISO output:</b>"</label> |
pascal@164 | 503 </text> |
pascal@164 | 504 <entry accept="filename"> |
pascal@164 | 505 <default>meta.iso</default> |
pascal@164 | 506 <variable>ISO_OUT</variable> |
pascal@164 | 507 </entry> |
pascal@164 | 508 <button> |
pascal@164 | 509 <input file icon="go-next"></input> |
pascal@164 | 510 <label>"Build ISO"</label> |
pascal@164 | 511 <action>$BIN merge_action</action> |
pascal@164 | 512 </button> |
pascal@164 | 513 </hbox> |
pascal@164 | 514 </vbox> |
pascal@164 | 515 |
pascal@164 | 516 </frame> |
pascal@164 | 517 |
pascal@170 | 518 <frame Low RAM ISO image> |
pascal@170 | 519 |
pascal@170 | 520 <vbox> |
pascal@170 | 521 <hbox> |
pascal@170 | 522 <text wrap="true" width-chars="25" use-markup="true"> |
pascal@170 | 523 <label> |
pascal@170 | 524 " |
paul@173 | 525 Build a Low RAM version |
pascal@170 | 526 of a SliTaz ISO image. |
pascal@170 | 527 The root filesystem is |
pascal@170 | 528 compressed and slower. |
pascal@170 | 529 " |
pascal@170 | 530 </label> |
pascal@170 | 531 </text> |
pascal@170 | 532 |
pascal@170 | 533 <vbox> |
pascal@170 | 534 <radiobutton> |
pascal@170 | 535 <label>The filesystem is always in RAM.</label> |
pascal@170 | 536 <variable>LORAM_RAM</variable> |
pascal@170 | 537 </radiobutton> |
pascal@170 | 538 <radiobutton> |
pascal@198 | 539 <label>The filesystem may be on a small CDROM.</label> |
pascal@198 | 540 <variable>LORAM_CDROM_SMALL</variable> |
pascal@198 | 541 </radiobutton> |
pascal@198 | 542 <radiobutton> |
pascal@198 | 543 <label>The filesystem may be on a large CDROM.</label> |
pascal@170 | 544 <variable>LORAM_CDROM</variable> |
pascal@170 | 545 </radiobutton> |
pascal@170 | 546 </vbox> |
pascal@170 | 547 </hbox> |
pascal@170 | 548 <hbox> |
pascal@170 | 549 <text use-markup="true"> |
pascal@170 | 550 <label>"<b>ISO input: </b>"</label> |
pascal@170 | 551 </text> |
pascal@170 | 552 <entry accept="filename"> |
pascal@170 | 553 <variable>LORAM_IN</variable> |
pascal@170 | 554 </entry> |
pascal@170 | 555 <button> |
pascal@170 | 556 <input file stock="gtk-open"></input> |
pascal@170 | 557 <action type="fileselect">LORAM_IN</action> |
pascal@170 | 558 </button> |
pascal@170 | 559 </hbox> |
pascal@170 | 560 <hbox> |
pascal@170 | 561 <text use-markup="true"> |
paul@173 | 562 <label>"<b>ISO output:</b>"</label> |
pascal@170 | 563 </text> |
pascal@170 | 564 <entry accept="filename"> |
pascal@170 | 565 <default>loram.iso</default> |
pascal@170 | 566 <variable>LORAM_OUT</variable> |
pascal@170 | 567 </entry> |
pascal@170 | 568 <button> |
pascal@170 | 569 <input file icon="go-next"></input> |
pascal@170 | 570 <label>"Build ISO"</label> |
pascal@170 | 571 <action>$BIN loram_action</action> |
pascal@170 | 572 </button> |
pascal@170 | 573 </hbox> |
pascal@170 | 574 </vbox> |
pascal@170 | 575 |
pascal@170 | 576 </frame> |
pascal@170 | 577 |
pankso@140 | 578 <frame Flavor config and packages list> |
pankso@140 | 579 |
pankso@140 | 580 <text wrap="true" width-chars="60" use-markup="true"> |
pankso@140 | 581 <label> |
pankso@74 | 582 " |
paul@184 | 583 Before editing files you must have a flavor description. A distro |
paul@138 | 584 script can be used to perform actions into the rootfs before |
pankso@136 | 585 compression. |
pankso@74 | 586 " |
pankso@140 | 587 </label> |
pankso@140 | 588 </text> |
pankso@140 | 589 |
pankso@140 | 590 <hbox> |
pankso@140 | 591 <text use-markup="true"> |
pankso@140 | 592 <label>"<b>Flavor config :</b>"</label> |
pankso@140 | 593 </text> |
pankso@140 | 594 <entry> |
pankso@140 | 595 <default>/home/slitaz/tazlito.conf</default> |
pankso@140 | 596 <variable>CONFIG_FILE</variable> |
pankso@140 | 597 </entry> |
pankso@140 | 598 <button> |
pankso@140 | 599 <input file icon="accessories-text-editor"></input> |
pankso@140 | 600 <action>editor $CONFIG_FILE</action> |
pankso@140 | 601 </button> |
pankso@140 | 602 </hbox> |
pankso@140 | 603 |
pankso@140 | 604 <hbox> |
pankso@140 | 605 <text use-markup="true"> |
pankso@140 | 606 <label>"<b>Packages list :</b>"</label> |
pankso@140 | 607 </text> |
pankso@140 | 608 <entry> |
pankso@140 | 609 <default>/home/slitaz/distro-packages.list</default> |
pankso@140 | 610 <variable>PKGS_LIST</variable> |
pankso@140 | 611 </entry> |
pankso@140 | 612 <button> |
pankso@140 | 613 <input file icon="accessories-text-editor"></input> |
pankso@140 | 614 <action>editor $PKGS_LIST</action> |
pankso@140 | 615 </button> |
pankso@140 | 616 </hbox> |
pankso@140 | 617 |
pankso@140 | 618 <hbox> |
pankso@140 | 619 <text use-markup="true"> |
pankso@140 | 620 <label>"<b>Distro script :</b> "</label> |
pankso@140 | 621 </text> |
pankso@140 | 622 <entry> |
pankso@140 | 623 <default>/home/slitaz/distro.sh</default> |
pankso@140 | 624 <variable>DISTRO_SCRIPT</variable> |
pankso@140 | 625 </entry> |
pankso@140 | 626 <button> |
pankso@140 | 627 <input file icon="accessories-text-editor"></input> |
pankso@140 | 628 <action>$BIN edit_distro_script</action> |
pankso@140 | 629 </button> |
pankso@140 | 630 </hbox> |
pankso@140 | 631 |
pankso@140 | 632 </frame> |
pankso@140 | 633 |
pankso@140 | 634 </notebook> |
pankso@140 | 635 |
pankso@140 | 636 <hbox> |
pankso@140 | 637 <button help> |
pankso@140 | 638 <input file icon="help-browser"></input> |
pankso@140 | 639 <action type="launch">HELP</action> |
pankso@140 | 640 </button> |
pankso@140 | 641 <button> |
pankso@140 | 642 <label>Exit</label> |
pankso@140 | 643 <input file icon="exit"></input> |
pankso@140 | 644 <action type="exit">Exit</action> |
pankso@140 | 645 </button> |
pankso@140 | 646 </hbox> |
pankso@140 | 647 |
pankso@140 | 648 </vbox> |
pankso@74 | 649 </window> |
pankso@74 | 650 ' |
pankso@74 | 651 |
pankso@133 | 652 case $1 in |
pankso@133 | 653 *_*) |
paul@216 | 654 # Exec all functions called by args (must have an underscore). |
pankso@133 | 655 $1 ;; |
pankso@133 | 656 *) |
pankso@136 | 657 # Tazlitobox action. |
pankso@133 | 658 check_root |
pankso@133 | 659 gtkdialog --center --program=TAZLITO_BOX ;; |
pankso@133 | 660 esac |
pankso@74 | 661 |
pankso@74 | 662 exit 0 |