1903.4.1
by Pierre Bertet
Make export_qml_dir.sh compatible with ZSH |
1 |
#!/bin/sh
|
159.2.1
by Juhapekka Piiroinen
added script to check license |
2 |
#
|
1903.4.1
by Pierre Bertet
Make export_qml_dir.sh compatible with ZSH |
3 |
# Copyright 2012 - 2016 Canonical Ltd.
|
159.2.1
by Juhapekka Piiroinen
added script to check license |
4 |
#
|
5 |
# This program is free software; you can redistribute it and/or modify
|
|
6 |
# it under the terms of the GNU Lesser General Public License as published by
|
|
7 |
# the Free Software Foundation; version 3.
|
|
8 |
#
|
|
9 |
# This program is distributed in the hope that it will be useful,
|
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
# GNU Lesser General Public License for more details.
|
|
13 |
#
|
|
14 |
# You should have received a copy of the GNU Lesser General Public License
|
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16 |
#
|
|
17 |
||
1903.4.1
by Pierre Bertet
Make export_qml_dir.sh compatible with ZSH |
18 |
# Get the current script directory (compatible with Bash and ZSH)
|
19 |
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}` |
|
20 |
SCRIPT_DIR=`cd $SCRIPT_DIR && pwd` |
|
21 |
||
22 |
source "$SCRIPT_DIR/build_paths.inc" || return 1 |
|
1504.7.3
by Benjamin Zeller
Create docs again |
23 |
export QML_IMPORT_PATH=$BUILD_DIR/qml |
24 |
export QML2_IMPORT_PATH=$BUILD_DIR/qml |
|
25 |
export UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml |
|
1898.1.3
by Tim Peeters
add more directories to the library path |
26 |
UBUNTU_QML_ROOT=$BUILD_DIR/qml/Ubuntu |
27 |
UBUNTU_QML_DIRS=$UBUNTU_QML_ROOT/Components:$UBUNTU_QML_ROOT/Test:$UBUNTU_QML_ROOT/Layouts:$UBUNTU_QML_ROOT/PerformanceMetrics |
|
28 |
export LD_LIBRARY_PATH=$BUILD_DIR/lib:$UBUNTU_QML_DIRS$LD_LIBRARY_PATH |
|
1901.2.1
by Christian Dywan
Use export_qml_dir.sh in qmlapicheck and runtest |
29 |
# Build machines may not have initctl and don't need it
|
30 |
test -f /sbin/initctl || return 0 |
|
2000.2.1
by Tim Peeters
fix export_qml_dir.sh in container |
31 |
# initctl may be available but not working (for example in a lxd container without upstart)
|
32 |
/sbin/initctl list > /dev/null || return 0 |
|
1995.1.4
by Tim Peeters
revert change to export_qml_dir.sh |
33 |
/sbin/initctl set-env --global QML_IMPORT_PATH=$BUILD_DIR/qml |
34 |
/sbin/initctl set-env --global QML2_IMPORT_PATH=$BUILD_DIR/qml |
|
35 |
/sbin/initctl set-env --global UBUNTU_UI_TOOLKIT_THEMES_PATH=$BUILD_DIR/qml |
|
36 |
/sbin/initctl set-env --global LD_LIBRARY_PATH=$BUILD_DIR/lib |