Build w/o .po files.
[e.git] / xnest.sh
blob8a28e5d12dc5619eae6f2d7bea42db9e17241ade
1 #!/usr/bin/env bash
3 #export REDRAW_DEBUG=1 # To cause redraw- to happen slovly and obviously.
4 #export ECORE_ERROR_ABORT=1 # To cause ecore to abort on errors.
5 #export EVAS_NOCLEAN=1 # To cause evas to not unload modules.
7 disp_num=":1" # Which display do you want the xnest to be on?
9 main=$DISPLAY
10 tmp=`mktemp` || exit 1
11 echo -e "run\nbt\nq\ny" > $tmp
13 case "$1" in
14 "") action="gdb -x $tmp --args" ; main=$disp_num ;;
15 "-b") action="gdb -x $tmp --args" ; main=$disp_num ;;
16 "-c") action="cgdb" ; main=$disp_num ;;
17 "-d") action="ddd -display $main --args" ;;
18 "-e") action="" ; e_args="-display $disp_num" ;;
19 "-g") action="gdb --args" ; main=$disp_num ;;
20 "-l") action="valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --log-file=valgrind_log" ; main=$disp_num ;;
21 "-m") action="valgrind --tool=memcheck --log-file=valgrind_log" ; main=$disp_num ;;
22 "-p") action="memprof --display=$main" ; main=$disp_num ;;
23 "-r") action="memprof_raster --display=$main" ; main=$disp_num ;;
24 "-s") action="strace -F -o strace_log" ;;
25 "-v") action="valkyrie -display $main" ; main=$disp_num ;;
26 *) echo -e "Usage : xnest.sh [debugger] ([enlightenment options])"
27 echo -e "\tdefault option is -b"
28 echo -e "\t-b use text debugger with auto backtrace\tgdb"
29 echo -e "\t-c use curses debugger\t\t\t\tcgdb"
30 echo -e "\t-d use the GUI debugger\t\t\t\tddd"
31 echo -e "\t-e enlightenment with no debugging"
32 echo -e "\t-g use text debugger\t\t\t\tgdb"
33 echo -e "\t-l leak check\t\t\t\t\tvalgrind"
34 echo -e "\t-m memory check\t\t\t\t\tvalgrind"
35 echo -e "\t-p memory profiling\t\t\t\tmemprof"
36 echo -e "\t-r raster's memory profiling\t\t\tmemprof_raster"
37 echo -e "\t-s show syscalls\t\t\t\tstrace"
38 echo -e "\t-v GUI memory check\t\t\t\tvalkyrie"
39 echo -e ""
40 echo -e "When you have finished with the text debugger, use the q command to quit."
41 echo -e "The valgrind options will leave a log file with a name beginning with valgrind_log"
42 exit
44 esac
45 e_args="`echo -- $@ | cut -d' ' -f2-` $e_args"
47 Xnest $disp_num -ac &
49 sleep 2 # Someone reported that it starts E before X has started properly.
51 export DISPLAY=$main; export E_START="enlightenment_start"; $action enlightenment $e_args
53 rm -f $tmp
54 killall -TERM Xnest