on 7.85+14.04.20140404.is.7.85+14.04.20140403.1-0ubuntu1 help sign in
unity8/run
75 lines 2.4 kB history raw
1#!/bin/sh
3. /etc/environment
4export QML2_IMPORT_PATH
6QML_PHONE_SHELL_PATH=./builddir/src/unity8
7GDB=false
8FAKE=false
9PINLOCK=false
10KEYLOCK=false
11MOUSE_TOUCH=true
13usage() {
14 echo "usage: "$0" [OPTIONS]\n" >&2
15 echo "Script to run the shell.\n" >&2
16 echo "OPTIONS:" >&2
17 echo " -f, --fake Force use of fake Qml modules." >&2
18 echo " -p, --pinlock Use a pin protected user." >&2
19 echo " -k, --keylock Use a passphrase protected user." >&2
20 echo " -g, --gdb Run through gdb." >&2
21 echo " -h, --help Show this help." >&2
22 echo " -m, --nomousetouch Run without -mousetouch argument." >&2
23 echo >&2
24 exit 1
27ARGS=`getopt -n$0 -u -a --longoptions="fake,pinlock,keylock,gdb,help,nomousetouch" -o "fpkghm" -- "$@"`
28[ $? -ne 0 ] && usage
29eval set -- "$ARGS"
31while [ $# -gt 0 ]
32do
33 case "$1" in
34 -f|--fake) FAKE=true;;
35 -p|--pinlock) PINLOCK=true;;
36 -k|--keylock) KEYLOCK=true;;
37 -g|--gdb) GDB=true;;
38 -h|--help) usage;;
39 -m|--nomousetouch) MOUSE_TOUCH=false;;
40 --) shift;break;;
41 esac
42 shift
43done
45if $FAKE; then
46 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
47 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single
48fi
50if $PINLOCK; then
51 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
52 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-pin
53fi
55if $KEYLOCK; then
56 export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$PWD/builddir/tests/mocks:$PWD/builddir/plugins:$PWD/builddir/modules
57 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/builddir/tests/mocks/libusermetrics:$PWD/builddir/tests/mocks/LightDM/single-passphrase
58fi
60# Force icon theme if running on the desktop, otherwise gnome theme (if running
61# on Ubuntu Desktop) will be used and icons won't be found
62if [ -n "$DESKTOP_SESSION" ]; then
63 export UBUNTU_ICON_THEME=ubuntu-mobile
64fi
66QML_PHONE_SHELL_ARGS=""
67if $MOUSE_TOUCH; then
68 QML_PHONE_SHELL_ARGS="$QML_PHONE_SHELL_ARGS -mousetouch"
69fi
71if $GDB; then
72 gdb -ex run --args $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
73else
74 $QML_PHONE_SHELL_PATH $QML_PHONE_SHELL_ARGS $@
75fi