# HG changeset patch # User Christophe Lincoln # Date 1331680209 -3600 # Node ID 24b1f91ec9b2fb76f044562032c02ed5d6666c18 # Parent 75bedb57f7244b46e0441ad0213291a66d9880da Move tazlitobox to oldstuff diff -r 75bedb57f724 -r 24b1f91ec9b2 COPYING --- a/COPYING Tue Mar 13 21:38:18 2012 +0100 +++ b/COPYING Wed Mar 14 00:10:09 2012 +0100 @@ -2,7 +2,7 @@ =============================================================================== -Copyright (c) 2007-2011 SliTaz GNU/Linux +Copyright (c) 2007-2012 SliTaz GNU/Linux Français diff -r 75bedb57f724 -r 24b1f91ec9b2 Makefile --- a/Makefile Tue Mar 13 21:38:18 2012 +0100 +++ b/Makefile Wed Mar 14 00:10:09 2012 +0100 @@ -11,19 +11,20 @@ # i18n. pot: - xgettext -o po/tazlitobox/tazlitobox.pot -L Shell ./tazlitobox + xgettext -o po/tazlito-wiz/tazlito-wiz.pot -L Shell \ + --package-name="TazLito Wiz" ./tazlito-wiz msgmerge: @for l in $(LINGUAS); do \ echo -n "Updating $$l po file."; \ - msgmerge -U po/tazlitobox/$$l.po po/tazlitobox/tazlitobox.pot ; \ + msgmerge -U po/tazlito-wiz/$$l.po po/tazlito-wiz/tazlito-wiz.pot ; \ done; msgfmt: @for l in $(LINGUAS); do \ echo "Compiling $$l mo file..."; \ mkdir -p po/mo/$$l/LC_MESSAGES; \ - msgfmt -o po/mo/$$l/LC_MESSAGES/tazlitobox.mo po/tazlitobox/$$l.po ; \ + msgfmt -o po/mo/$$l/LC_MESSAGES/tazlito-wiz.mo po/tazlito-wiz/$$l.po ; \ done; # Installation. @@ -32,13 +33,12 @@ install: msgfmt @echo "Installing Tazlito into $(PREFIX)/bin..." install -g root -o root -m 0777 tazlito $(PREFIX)/bin - install -g root -o root -m 0777 tazlitobox $(PREFIX)/bin + install -g root -o root -m 0777 tazlito-wiz $(PREFIX)/bin install -g root -o root -m 0755 -d /etc/tazlito install -g root -o root -m 0644 tazlito.conf /etc/tazlito - #install -g root -o root -m 0644 distro-packages.list /etc/tazlito @echo "Installing Tazlito documentation..." install -g root -o root -m 0755 -d /usr/share/doc/tazlito - install -g root -o root -m 0644 doc/tazlito.en.html /usr/share/doc/tazlito + install -g root -o root -m 0644 doc/*.html /usr/share/doc/tazlito # i18n mkdir -p $(DESTDIR)$(PREFIX)/share/locale cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale @@ -47,7 +47,7 @@ uninstall: rm -f $(PREFIX)/bin/tazlito - rm -f $(PREFIX)/bin/tazlitobox + rm -f $(PREFIX)/bin/tazlito-wiz rm -rf /etc/tazlito rm -rf /usr/share/doc/tazlito rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazlito*.mo diff -r 75bedb57f724 -r 24b1f91ec9b2 applications/tazlito-wiz.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/applications/tazlito-wiz.desktop Wed Mar 14 00:10:09 2012 +0100 @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Create a LiveCD +Name[fr]=Créer un LiveCD +Exec=subox tazlito-wiz +Icon=slitaz-icon +Type=Application +Categories=System; diff -r 75bedb57f724 -r 24b1f91ec9b2 applications/tazlitobox.desktop --- a/applications/tazlitobox.desktop Tue Mar 13 21:38:18 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Create a LiveCD -Name[fr]=Créer un LiveCD -Exec=subox tazlitobox -Icon=tazlito -Type=Application -Categories=System; diff -r 75bedb57f724 -r 24b1f91ec9b2 oldstuff/tazlito.png Binary file oldstuff/tazlito.png has changed diff -r 75bedb57f724 -r 24b1f91ec9b2 oldstuff/tazlitobox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/oldstuff/tazlitobox Wed Mar 14 00:10:09 2012 +0100 @@ -0,0 +1,662 @@ +#!/bin/sh +# +# Gtkdialog box for Tazlito - SliTaz Live Tool. +# Tabs are used for indent and all actions should go into functions to +# separate the GUI and commands. +# +# (C) GNU gpl v3 - SliTaz GNU/Linux 2011. +# +VERSION=4.0 + +# Include gettext helper script. +. /usr/bin/gettext.sh + +# Export package name for gettext. +TEXTDOMAIN='tazusbbox' +export TEXTDOMAIN + +export BIN=$0 + +# Check if user is root. +check_root() +{ + if test $(id -u) != 0 ; then + echo -e " +You must be root to run `basename $0`. Please type 'su' and +root password to become super-user.\n" + exit 0 + fi +} + +# We need to parse flavors.list for GTK tree. +list_flavors() +{ + tazlito list-flavors | grep ^[a-z] | while read line + do + info=`echo -n $line | awk '{print $1 " " $2 " " $3}'` + printinfo=`echo -n $line | awk '{print $1 "|" $2 "|" $3}'` + echo "$printinfo|`echo $line | sed s/\"$info\"//`" + done +} + +recharge_list() +{ + xterm -geometry 90x14 \ + -title "list-flavors --recharge" \ + -e "tazlito list-flavors --recharge | grep ^[a-z] && sleep 2" +} + +# When using gen-liveflavor, gen-flavor or gen-distro, a user can put some +# addfiles copied into the rootfs. +addfiles_action() +{ + cd /home/slitaz + mkdir -p distro/addfiles/rootfs/usr/share/images + mkdir -p distro/addfiles/rootcd + file-manager distro/addfiles & +} + +writeiso_action() +{ + xterm -geometry 80x16 \ + -title "writeiso" \ + -e "tazlito writeiso $COMPRESSION" +} + +gen_liveflavor_action() +{ + cd /home/slitaz + sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" \ + /etc/tazlito/tazlito.conf + xterm -geometry 80x16 \ + -title "gen-liveflavor" \ + -e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" +} + +clean_distro_action() +{ + cd /home/slitaz + xterm -geometry 80x16 \ + -title "clean-distro" \ + -e "tazlito clean-distro && sleep 1" +} + +show_flavors() +{ + tazlito list-flavors | \ + awk '{if (show && $1 != "") print $1} /^==/ {show=1}' +} + +get_flavor_action() +{ + cd /home/slitaz + xterm -geometry 80x16 \ + -title "get-flavor $COMMUNITY_FLAVOR" \ + -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close" +} + +gen_distro_action() +{ + cd /home/slitaz + xterm -geometry 80x16 \ + -title "gen-distro" \ + -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close" +} + +gen_flavor_action() +{ + cd /home/slitaz + xterm -geometry 80x16 \ + -title "gen-flavor $GEN_FLAVOR_NAME" \ + -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" +} + +edit_distro_script() +{ + [ ! -f $DISTRO_SCRIPT ] && echo "#!/bin/sh" > $DISTRO_SCRIPT + chmod +x $DISTRO_SCRIPT + editor $DISTRO_SCRIPT +} + +loram_action() +{ + case "$LORAM_RAM$LORAM_CDROM$LORAM_CDROM_SMALL" in + falsefalsetrue) type=smallcdrom ;; + falsetruefalse) type=cdrom ;; + *) type=ram ;; + esac + xterm -geometry 80x16 \ + -title "build loram iso image $LORAM_OUT" \ + -e "tazlito build-loram $LORAM_IN $LORAM_OUT $type ; echo -e \"----\nENTER to continue...\" && read close" +} + +merge_input() +{ + set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) + while [ -n "$2" ]; do + echo "$2 | $1" + shift 2 + done +} + +merge_add() +{ + echo -n " $ISO_IN $ISO_RAM" >> /tmp/tazlito.mergelist +} + +merge_del() +{ + set -- $(cat /tmp/tazlito.mergelist) + ARGS="" + while [ -n "$2" ]; do + case "$1" in + $ISO_ITEM) ;; + *) [ -n "$ARGS" ] && ARGS="$ARGS " + ARGS="$ARGS$1 $2" ;; + esac + shift 2 + done + echo -n "$ARGS" > /tmp/tazlito.mergelist +} + +merge_args() +{ + first=true + while [ -n "$2" ]; do + echo "$(stat -c "%s" $1) $1 $2" + shift 2 + done | sort -nr | while read size file ram; do + if $first; then + cp $file $ISO_OUT + echo -n "$ram $ISO_OUT " + first=false + continue + fi + dir=$tmp/$(basename $file) + mkdir $dir + mount -o loop,ro $file $dir + echo -n "$ram $dir/boot/rootfs.gz " + done +} + +merge_action() +{ + set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) + rm -f /tmp/tazlito.mergelist + tmp=/tmp/tazlitobox$$ + mkdir $tmp + [ -n "$4" ] || return + xterm -geometry 80x16 -title "build meta iso image $ISO_OUT" \ + -e "script -c 'tazlito merge $(merge_args $@)' && echo -e \"----\nENTER to continue...\" && read close" + mv $ISO_OUT.merged $ISO_OUT + for i in $tmp/*; do + umount -d $i + done + rm -rf $tmp +} + +# Boxes + +export HELP=' + + + + + + + + + + + + + + + + + + + + + + + + +' + +# List all flavors on the mirror. +export LIST_FLAVORS_BOX=' + + + + 500200 + COMMUNITY_FLAVOR + + $BIN list_flavors + + + + + + +' + +# Execute tazlito commands in a XTerm. Notebook: tab-pos="GTK_POS_LEFT" +export TAZLITO_BOX=' + + + + + + + + + /usr/share/pixmaps/tazlito.png + + + + + + + + + + + + + + + + + COMPRESSION + gzip + lzma + none + + + + + + + + + + + + + + + + + + slitaz + GEN_LIVEFLAVOR_NAME + + + + + + + + + + + + + + + + + + + + + + + core + COMMUNITY_FLAVOR + + + + + + + + + + + + + + + + + + + + + + + + slitaz + GEN_FLAVOR_NAME + + + + + + + + + + + + + + + + + + + + + + + + ISO_IN + + + + + + + + + 128M + ISO_RAM + + + + + + 14050 + + ISO_ITEM + $BIN merge_input + $BIN merge_del + refresh:ISO_ITEM + + + + + + + + meta.iso + ISO_OUT + + + + + + + + + + + + + + + + + + + LORAM_RAM + + + + LORAM_CDROM_SMALL + + + + LORAM_CDROM + + + + + + + + + LORAM_IN + + + + + + + + + loram.iso + LORAM_OUT + + + + + + + + + + + + + + + + + + + /home/slitaz/tazlito.conf + CONFIG_FILE + + + + + + + + + + /home/slitaz/distro-packages.list + PKGS_LIST + + + + + + + + + + /home/slitaz/distro.sh + DISTRO_SCRIPT + + + + + + + + + + + + + + + +' + +case $1 in + *_*) + # Exec all functions called by args (must have an underscore). + $1 ;; + *) + # Tazlitobox action. + check_root + gtkdialog --center --program=TAZLITO_BOX ;; +esac + +exit 0 diff -r 75bedb57f724 -r 24b1f91ec9b2 pixmaps/tazlito.png Binary file pixmaps/tazlito.png has changed diff -r 75bedb57f724 -r 24b1f91ec9b2 tazlito --- a/tazlito Tue Mar 13 21:38:18 2012 +0100 +++ b/tazlito Wed Mar 14 00:10:09 2012 +0100 @@ -7,12 +7,12 @@ # and/or a new ISO. Most commands must be run by root, except the stats # and the configuration file manipulation. # -# (C) 2007-2011 SliTaz - GNU General Public License. +# (C) 2007-2012 SliTaz - GNU General Public License. # # Authors : Christophe Lincoln # Pascal Bellard # -VERSION=4.3.1 +VERSION=4.5 # Tazlito configuration variables to be shorter # and to use words rather than numbers. diff -r 75bedb57f724 -r 24b1f91ec9b2 tazlitobox --- a/tazlitobox Tue Mar 13 21:38:18 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,662 +0,0 @@ -#!/bin/sh -# -# Gtkdialog box for Tazlito - SliTaz Live Tool. -# Tabs are used for indent and all actions should go into functions to -# separate the GUI and commands. -# -# (C) GNU gpl v3 - SliTaz GNU/Linux 2011. -# -VERSION=4.0 - -# Include gettext helper script. -. /usr/bin/gettext.sh - -# Export package name for gettext. -TEXTDOMAIN='tazusbbox' -export TEXTDOMAIN - -export BIN=$0 - -# Check if user is root. -check_root() -{ - if test $(id -u) != 0 ; then - echo -e " -You must be root to run `basename $0`. Please type 'su' and -root password to become super-user.\n" - exit 0 - fi -} - -# We need to parse flavors.list for GTK tree. -list_flavors() -{ - tazlito list-flavors | grep ^[a-z] | while read line - do - info=`echo -n $line | awk '{print $1 " " $2 " " $3}'` - printinfo=`echo -n $line | awk '{print $1 "|" $2 "|" $3}'` - echo "$printinfo|`echo $line | sed s/\"$info\"//`" - done -} - -recharge_list() -{ - xterm -geometry 90x14 \ - -title "list-flavors --recharge" \ - -e "tazlito list-flavors --recharge | grep ^[a-z] && sleep 2" -} - -# When using gen-liveflavor, gen-flavor or gen-distro, a user can put some -# addfiles copied into the rootfs. -addfiles_action() -{ - cd /home/slitaz - mkdir -p distro/addfiles/rootfs/usr/share/images - mkdir -p distro/addfiles/rootcd - file-manager distro/addfiles & -} - -writeiso_action() -{ - xterm -geometry 80x16 \ - -title "writeiso" \ - -e "tazlito writeiso $COMPRESSION" -} - -gen_liveflavor_action() -{ - cd /home/slitaz - sed -i "s/ISO_NAME=.*/ISO_NAME=\"slitaz-$GEN_LIVEFLAVOR_NAME\"/" \ - /etc/tazlito/tazlito.conf - xterm -geometry 80x16 \ - -title "gen-liveflavor" \ - -e "tazlito gen-liveflavor $GEN_LIVEFLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" -} - -clean_distro_action() -{ - cd /home/slitaz - xterm -geometry 80x16 \ - -title "clean-distro" \ - -e "tazlito clean-distro && sleep 1" -} - -show_flavors() -{ - tazlito list-flavors | \ - awk '{if (show && $1 != "") print $1} /^==/ {show=1}' -} - -get_flavor_action() -{ - cd /home/slitaz - xterm -geometry 80x16 \ - -title "get-flavor $COMMUNITY_FLAVOR" \ - -e "tazlito get-flavor $COMMUNITY_FLAVOR && echo -e \"----\nENTER to continue...\" && read close" -} - -gen_distro_action() -{ - cd /home/slitaz - xterm -geometry 80x16 \ - -title "gen-distro" \ - -e "tazlito gen-distro && echo -e \"----\nENTER to continue...\" && read close" -} - -gen_flavor_action() -{ - cd /home/slitaz - xterm -geometry 80x16 \ - -title "gen-flavor $GEN_FLAVOR_NAME" \ - -e "tazlito gen-flavor $GEN_FLAVOR_NAME && echo -e \"----\nENTER to continue...\" && read close" -} - -edit_distro_script() -{ - [ ! -f $DISTRO_SCRIPT ] && echo "#!/bin/sh" > $DISTRO_SCRIPT - chmod +x $DISTRO_SCRIPT - editor $DISTRO_SCRIPT -} - -loram_action() -{ - case "$LORAM_RAM$LORAM_CDROM$LORAM_CDROM_SMALL" in - falsefalsetrue) type=smallcdrom ;; - falsetruefalse) type=cdrom ;; - *) type=ram ;; - esac - xterm -geometry 80x16 \ - -title "build loram iso image $LORAM_OUT" \ - -e "tazlito build-loram $LORAM_IN $LORAM_OUT $type ; echo -e \"----\nENTER to continue...\" && read close" -} - -merge_input() -{ - set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) - while [ -n "$2" ]; do - echo "$2 | $1" - shift 2 - done -} - -merge_add() -{ - echo -n " $ISO_IN $ISO_RAM" >> /tmp/tazlito.mergelist -} - -merge_del() -{ - set -- $(cat /tmp/tazlito.mergelist) - ARGS="" - while [ -n "$2" ]; do - case "$1" in - $ISO_ITEM) ;; - *) [ -n "$ARGS" ] && ARGS="$ARGS " - ARGS="$ARGS$1 $2" ;; - esac - shift 2 - done - echo -n "$ARGS" > /tmp/tazlito.mergelist -} - -merge_args() -{ - first=true - while [ -n "$2" ]; do - echo "$(stat -c "%s" $1) $1 $2" - shift 2 - done | sort -nr | while read size file ram; do - if $first; then - cp $file $ISO_OUT - echo -n "$ram $ISO_OUT " - first=false - continue - fi - dir=$tmp/$(basename $file) - mkdir $dir - mount -o loop,ro $file $dir - echo -n "$ram $dir/boot/rootfs.gz " - done -} - -merge_action() -{ - set -- $(cat /tmp/tazlito.mergelist 2> /dev/null) - rm -f /tmp/tazlito.mergelist - tmp=/tmp/tazlitobox$$ - mkdir $tmp - [ -n "$4" ] || return - xterm -geometry 80x16 -title "build meta iso image $ISO_OUT" \ - -e "script -c 'tazlito merge $(merge_args $@)' && echo -e \"----\nENTER to continue...\" && read close" - mv $ISO_OUT.merged $ISO_OUT - for i in $tmp/*; do - umount -d $i - done - rm -rf $tmp -} - -# Boxes - -export HELP=' - - - - - - - - - - - - - - - - - - - - - - - - -' - -# List all flavors on the mirror. -export LIST_FLAVORS_BOX=' - - - - 500200 - COMMUNITY_FLAVOR - - $BIN list_flavors - - - - - - -' - -# Execute tazlito commands in a XTerm. Notebook: tab-pos="GTK_POS_LEFT" -export TAZLITO_BOX=' - - - - - - - - - /usr/share/pixmaps/tazlito.png - - - - - - - - - - - - - - - - - COMPRESSION - gzip - lzma - none - - - - - - - - - - - - - - - - - - slitaz - GEN_LIVEFLAVOR_NAME - - - - - - - - - - - - - - - - - - - - - - - core - COMMUNITY_FLAVOR - - - - - - - - - - - - - - - - - - - - - - - - slitaz - GEN_FLAVOR_NAME - - - - - - - - - - - - - - - - - - - - - - - - ISO_IN - - - - - - - - - 128M - ISO_RAM - - - - - - 14050 - - ISO_ITEM - $BIN merge_input - $BIN merge_del - refresh:ISO_ITEM - - - - - - - - meta.iso - ISO_OUT - - - - - - - - - - - - - - - - - - - LORAM_RAM - - - - LORAM_CDROM_SMALL - - - - LORAM_CDROM - - - - - - - - - LORAM_IN - - - - - - - - - loram.iso - LORAM_OUT - - - - - - - - - - - - - - - - - - - /home/slitaz/tazlito.conf - CONFIG_FILE - - - - - - - - - - /home/slitaz/distro-packages.list - PKGS_LIST - - - - - - - - - - /home/slitaz/distro.sh - DISTRO_SCRIPT - - - - - - - - - - - - - - - -' - -case $1 in - *_*) - # Exec all functions called by args (must have an underscore). - $1 ;; - *) - # Tazlitobox action. - check_root - gtkdialog --center --program=TAZLITO_BOX ;; -esac - -exit 0