~mzanetti/unity8/launcher-follow-unity-api

« back to all changes in this revision

Viewing changes to build

  • Committer: Michael Zanetti
  • Date: 2013-06-26 09:26:51 UTC
  • mfrom: (22.1.24 unity)
  • Revision ID: michael.zanetti@canonical.com-20130626092651-ku85xmvlt2pjgypx
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
PACKAGE=unity8
4
 
UNITY_BUILD_DIR=$PWD/../unity_build/build
5
3
SETUP=false
6
4
CLEAN=false
7
5
NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
 
6
CODE_DIR=$( dirname `readlink -f $0` )
8
7
 
9
8
usage() {
10
9
    echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
37
36
[ $# -eq 1 ] && BUILD_TYPE="$1"
38
37
 
39
38
install_dependencies() {
40
 
    . /etc/lsb-release
41
39
    [ -f /etc/apt/sources.list.d/phablet-team-desktop-deps-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:phablet-team/desktop-deps || exit 1
42
40
    [ -f /etc/apt/sources.list.d/canonical-qt5-edgers-qt5-proper-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:canonical-qt5-edgers/qt5-proper || exit 2;
43
41
    [ -f /etc/apt/sources.list.d/ubuntu-sdk-team-ppa-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:ubuntu-sdk-team/ppa || exit 3
44
42
    sudo apt-get update || exit 4
45
43
    echo "Installing Unity 8 dependencies.."
46
 
    sudo apt-get install qtdeclarative5-ubuntu-ui-toolkit-plugin qtdeclarative5-dee-plugin indicators-client indicators-client-plugin-* qtbase5-dev qtbase5-private-dev qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-test-plugin libdee-qt5-dev libpulse-dev qtdeclarative5-xmllistmodel-plugin unity-lens-mock demo-assets ubuntu-mobile-icons || exit 5
 
44
    sudo apt-get install devscripts \
 
45
                         equivs \
 
46
                         qtdeclarative5-ubuntu-ui-toolkit-plugin \
 
47
                         qtdeclarative5-dee-plugin \
 
48
                         indicators-client \
 
49
                         indicators-client-plugin-* \
 
50
                         ubuntu-mobile-icons \
 
51
                         unity-notifications-impl-1 \
 
52
        || exit 5
 
53
}
 
54
 
 
55
mk_build_deps() {
 
56
    [ ! -f unity8-build-deps*deb -o $CODE_DIR/debian/control -nt unity8-build-deps*deb ] && mk-build-deps --install --root-cmd sudo $CODE_DIR/debian/control
47
57
}
48
58
 
49
59
if [ -f "/usr/bin/ninja" ] ; then
56
66
 
57
67
if $SETUP; then
58
68
    install_dependencies
59
 
    ./build_unity --setup || exit 1$?
60
 
    ./build_unity || exit 1$?
61
69
else
62
70
    if $CLEAN; then rm -rf builddir; fi
63
71
    mkdir -p builddir
64
72
    cd builddir
65
 
    PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR} || exit 6
 
73
    mk_build_deps
 
74
    cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
66
75
    ${BUILD_COMMAND} || exit 7
67
76
fi
68