tazlito diff tazlitobox @ rev 136

box: some code clean-up, add distro script editing and info
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jan 23 17:10:02 2010 +0100 (2010-01-23)
parents e2ca73f557c3
children 6b97ef60644a
line diff
     1.1 --- a/tazlitobox	Sat Jan 23 14:13:08 2010 +0000
     1.2 +++ b/tazlitobox	Sat Jan 23 17:10:02 2010 +0100
     1.3 @@ -17,13 +17,6 @@
     1.4  	fi
     1.5  }
     1.6  
     1.7 -# By default we go in /home/slitaz to download or gen flavors.
     1.8 -cd_flavors()
     1.9 -{
    1.10 -	mkdir -p /home/slitaz/flavors
    1.11 -	cd /home/slitaz
    1.12 -}
    1.13 -
    1.14  # We need to parse flavors.list for GTK tree.
    1.15  list_flavors()
    1.16  {
    1.17 @@ -47,11 +40,18 @@
    1.18  addfiles_action()
    1.19  {
    1.20  	cd /home/slitaz
    1.21 -	mkdir -p distro/addfiles/rootfs
    1.22 +	mkdir -p distro/addfiles/rootfs/usr/share/images
    1.23  	mkdir -p distro/addfiles/rootcd
    1.24  	file-manager distro/addfiles &
    1.25  }
    1.26  
    1.27 +writeiso_action()
    1.28 +{
    1.29 +	xterm -geometry 80x16 \
    1.30 +		-title "writeiso" \
    1.31 +		-e "tazlito writeiso $COMPRESSION"
    1.32 +}
    1.33 +
    1.34  export HELP='
    1.35  <window title="Tazlito Box - Help" icon-name="media-cdrom">
    1.36  <vbox>
    1.37 @@ -141,7 +141,7 @@
    1.38  
    1.39  </hbox>
    1.40  
    1.41 -    <notebook labels="Writeiso|Live flavor|Flavors list|Gen flavor|Configuration files">
    1.42 +    <notebook labels="Writeiso|Live flavor|Flavors list|Gen flavor|Configuration">
    1.43      
    1.44      <frame Filesystem to ISO>
    1.45      
    1.46 @@ -157,7 +157,7 @@
    1.47  
    1.48        <hbox>
    1.49          <text use-markup="true">
    1.50 -          <label>"<b>Compression :</b> (gzip,lzma,none)"</label>
    1.51 +          <label>"<b>Compression (gzip,lzma,none):</b>"</label>
    1.52          </text>
    1.53          <entry>
    1.54            <default>gzip</default>
    1.55 @@ -169,7 +169,7 @@
    1.56        <button>
    1.57            <label>Writeiso</label>
    1.58            <input file icon="forward"></input>
    1.59 -          <action>xterm -geometry 80x16 -title "writeiso" -e "tazlito writeiso $COMPRESSION"</action>
    1.60 +          <action>$BIN writeiso_action</action>
    1.61          </button>
    1.62        </hbox>
    1.63      </frame>
    1.64 @@ -224,7 +224,8 @@
    1.65          <label>
    1.66  "
    1.67  Get and build preconfigured flavors from the community. Flavors
    1.68 -list can be recharged from SliTaz mirror.
    1.69 +list can be recharged from SliTaz mirror. Somme addfiles can be
    1.70 +copied before generating the distro.
    1.71  "
    1.72          </label>
    1.73        </text>
    1.74 @@ -248,11 +249,18 @@
    1.75          <button>
    1.76            <label>Get flavor</label>
    1.77            <input file icon="forward"></input>
    1.78 +          <action>cd /home/slitaz</action>
    1.79            <action>xterm -geometry 80x16 -title "get-flavor $COMMUNITY_FLAVOR" -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close"</action>
    1.80          </button>
    1.81          <button>
    1.82 +          <label>Addfiles</label>
    1.83 +          <input file icon="gtk-open"></input>
    1.84 +          <action>$BIN addfiles_action</action>
    1.85 +        </button>
    1.86 +        <button>
    1.87            <label>Gen distro</label>
    1.88            <input file icon="forward"></input>
    1.89 +          <action>cd /home/slitaz</action>
    1.90            <action>xterm -geometry 80x16 -title "gen-distro" -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close"</action>
    1.91          </button>
    1.92          <button>
    1.93 @@ -269,7 +277,7 @@
    1.94          <label>
    1.95  "
    1.96  Gen Flavor will generate a new flavor file based on rootfs in 
    1.97 -home/slitaz/distro. All addfiles will be included in the flavor file.
    1.98 +/home/slitaz/distro. All addfiles will be included in the flavor file.
    1.99  "
   1.100          </label>
   1.101        </text>
   1.102 @@ -292,6 +300,7 @@
   1.103        <button>
   1.104            <label>Gen new flavor</label>
   1.105            <input file icon="forward"></input>
   1.106 +          <action>cd /home/slitaz</action>
   1.107            <action>xterm -geometry 80x16 -title "gen-flavor $GEN_FLAVOR_NAME" -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close"</action>
   1.108          </button>
   1.109        </hbox>
   1.110 @@ -301,7 +310,9 @@
   1.111        <text wrap="true" width-chars="60" use-markup="true">
   1.112          <label>
   1.113  "
   1.114 -Before editing files you must have a flavor description.
   1.115 +Before editing files you must have a flavor description. Distro
   1.116 +script can be used to perform action into the rootfs before
   1.117 +compression.
   1.118  "
   1.119          </label>
   1.120        </text>
   1.121 @@ -334,6 +345,22 @@
   1.122          </button>
   1.123        </hbox>
   1.124        
   1.125 +      <hbox>
   1.126 +        <text use-markup="true">
   1.127 +          <label>"<b>Distro script :</b> "</label>
   1.128 +        </text>
   1.129 +        <entry>
   1.130 +          <default>/home/slitaz/distro.sh</default>
   1.131 +          <variable>DISTRO_SCRIPT</variable>
   1.132 +        </entry>
   1.133 +        <button>
   1.134 +          <input file icon="accessories-text-editor"></input>
   1.135 +          <action>[ ! -f $DISTRO_SCRIPT ] && echo "#!/bin/sh" > $DISTRO_SCRIPT</action>
   1.136 +          <action>chmod +x $DISTRO_SCRIPT</action>
   1.137 +          <action>editor $DISTRO_SCRIPT</action>
   1.138 +        </button>
   1.139 +      </hbox>
   1.140 +      
   1.141      </frame>
   1.142   
   1.143      </notebook>
   1.144 @@ -359,9 +386,8 @@
   1.145  		# Exec all function called by args (must have an underscore).
   1.146  		$1 ;;
   1.147  	*)
   1.148 -		# Tazlitobox action
   1.149 +		# Tazlitobox action.
   1.150  		check_root
   1.151 -		cd_flavors
   1.152  		gtkdialog --center --program=TAZLITO_BOX ;;
   1.153  esac
   1.154