~ci-train-bot/unity8/unity8-ubuntu-zesty-2167

« back to all changes in this revision

Viewing changes to run

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
QML_PHONE_SHELL_PATH=./builddir/unity8
 
4
export LD_LIBRARY_PATH=$PWD/../unity_build/build/lib
 
5
GDB=false
 
6
FAKE=false
 
7
MOUSE_TOUCH=true
 
8
 
 
9
usage() {
 
10
    echo "usage: "$0" [OPTIONS]\n" >&2
 
11
    echo "Script to run the shell.\n" >&2
 
12
    echo "OPTIONS:" >&2
 
13
    echo " -f, --fake Force use of fake Qml modules." >&2
 
14
    echo " -g, --gdb Run through gdb." >&2
 
15
    echo " -h, --help Show this help." >&2
 
16
    echo " -m, --nomousetouch Run without -mousetouch argument." >&2
 
17
    echo >&2
 
18
    exit 1
 
19
}
 
20
 
 
21
ARGS=`getopt -n$0 -u -a --longoptions="fake,gdb,help,nomousetouch" -o "fghm" -- "$@"`
 
22
[ $? -ne 0 ] && usage
 
23
eval set -- "$ARGS"
 
24
 
 
25
while [ $# -gt 0 ]
 
26
do
 
27
    case "$1" in
 
28
       -f|--fake)  FAKE=true;;
 
29
       -g|--gdb)   GDB=true;;
 
30
       -h|--help)  usage;;
 
31
       -m|--nomousetouch)  MOUSE_TOUCH=false;;
 
32
       --)         shift;break;;
 
33
    esac
 
34
    shift
 
35
done
 
36
 
 
37
if $FAKE; then
 
38
  export QML2_IMPORT_PATH=$PWD/builddir/tests/mocks:$PWD/builddir/plugins
 
39
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/LightDM/single
 
40
fi
 
41
 
 
42
# Force icon theme if running on the desktop, otherwise gnome theme (if running
 
43
# on Ubuntu Desktop) will be used and icons won't be found
 
44
if [ -n "$DESKTOP_SESSION" ]; then
 
45
  export UBUNTU_ICON_THEME=ubuntu-mobile
 
46
fi
 
47
 
 
48
QML_PHONE_SHELL_ARGS=""
 
49
if $MOUSE_TOUCH; then
 
50
  QML_PHONE_SHELL_ARGS="$QML_PHONE_SHELL_ARGS -mousetouch"
 
51
fi
 
52
 
 
53
if $GDB; then
 
54
  gdb -ex run --args $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
 
55
else
 
56
  $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
 
57
fi