slitaz-tools rev 31
Add 'burnbox' a gtkdialog box to burn ISO
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Jan 06 22:51:00 2008 +0100 (2008-01-06) |
parents | 8b08bedb53b4 |
children | d9ce64aa6d2e |
files | tinyutils/burnbox |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tinyutils/burnbox Sun Jan 06 22:51:00 2008 +0100 1.3 @@ -0,0 +1,115 @@ 1.4 +#! /bin/sh 1.5 +# 1.6 +# Gtkdialog box to burn ISO images using Wodim with basic options. 1.7 +# - SliTaz GNU/Linux 2008. 1.8 +# 1.9 +VERSION=20080106 1.10 + 1.11 +# Burn/wodim dialog box. Sleep a bit with progress bar to let user cancel 1.12 +# ISO burning and exit when finished. 1.13 +# 1.14 +export BURN_DIALOG=' 1.15 +<vbox> 1.16 + <text> 1.17 + <label>Burning ISO image</label> 1.18 + </text> 1.19 + <progressbar> 1.20 + <label>Please wait...</label> 1.21 + <input>for i in $(seq 0 10 100); do echo $i; sleep 1; done</input> 1.22 + <action>wodim speed=$SPEED dev=$DEVICE $OPTIONS $ISO_IMAGE</action> 1.23 + <action type="exit">Ready</action> 1.24 + </progressbar> 1.25 + <hbox> 1.26 + <button cancel></button> 1.27 + </hbox> 1.28 + </vbox> 1.29 +' 1.30 + 1.31 +# We need at least devive, speed and ISO image path. 1.32 +# 1.33 +export MOUNT_DIALOG=' 1.34 +<vbox> 1.35 + 1.36 + <text use-markup="true"> 1.37 + <label> 1.38 +" 1.39 +<b>SliTaz - Burnbox</b>" 1.40 + </label> 1.41 + </text> 1.42 + <text wrap="true" width-chars="54" use-markup="true"> 1.43 + <label> 1.44 +" 1.45 +Burn ISO images to CD or DVD writer using Wodim from cdrkit. 1.46 +Please verify device writer setting, add options if wanted or 1.47 +needed and select an ISO image file. Note : You can manipulate 1.48 +ISO images with ISO Master utility. 1.49 +" 1.50 + </label> 1.51 + </text> 1.52 + 1.53 + <frame Configuration> 1.54 + <hbox> 1.55 + <text use-markup="true"> 1.56 + <label>"<b>Device : </b>"</label> 1.57 + </text> 1.58 + <entry> 1.59 + <default>/dev/cdrom</default> 1.60 + <variable>DEVICE</variable> 1.61 + </entry> 1.62 + </hbox> 1.63 + <hbox> 1.64 + <text use-markup="true"> 1.65 + <label>"<b>Speed : </b>"</label> 1.66 + </text> 1.67 + <entry> 1.68 + <default>8</default> 1.69 + <variable>SPEED</variable> 1.70 + </entry> 1.71 + </hbox> 1.72 + <hbox> 1.73 + <text use-markup="true"> 1.74 + <label>"<b>Options : </b>"</label> 1.75 + </text> 1.76 + <entry> 1.77 + <default>-eject -multi</default> 1.78 + <variable>OPTIONS</variable> 1.79 + </entry> 1.80 + </hbox> 1.81 + </frame> 1.82 + 1.83 + <frame ISO image> 1.84 + <hbox> 1.85 + <text use-markup="true"> 1.86 + <label>"<b>File : </b>"</label> 1.87 + </text> 1.88 + <entry> 1.89 + <variable>ISO_IMAGE</variable> 1.90 + </entry> 1.91 + <button> 1.92 + <input file stock="gtk-open"></input> 1.93 + <action type="fileselect">ISO_IMAGE</action> 1.94 + </button> 1.95 + </hbox> 1.96 + </frame> 1.97 + 1.98 + <hbox> 1.99 + <button> 1.100 + <label>Burn</label> 1.101 + <input file icon="forward"></input> 1.102 + <action>echo "Burning $ISO_IMAGE..."</action> 1.103 + <action>gtkdialog --program=BURN_DIALOG</action> 1.104 + </button> 1.105 + 1.106 + <button> 1.107 + <input file icon="exit"></input> 1.108 + <action type="exit">Exit</action> 1.109 + </button> 1.110 + </hbox> 1.111 + 1.112 +</vbox> 1.113 +' 1.114 + 1.115 +# Execute main dialog. 1.116 +gtkdialog --program=MOUNT_DIALOG 1.117 + 1.118 +exit 0