on xenial help sign in
Drop people lens from local build and fix build scripts.

* transition from manual build dependencies installation to mk-build-deps * make sure qml-phone-shell is still taken into account in /etc/device-services * make the build_unity script fail if something goes wrong * ask before adding PPAs / installing dependencies on the host * shadow-build libunity. Approved by PS Jenkins bot, Nick Dedekind, Nicolas d'Offay.

commit65a5c7da6356cb27e093728e8d6f7ae5bb1e44ba authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 7 Jun 2013, 13:21 (13 years ago) parentdc7b34f66db144
4 files changed+48−75
CODING+1−11 build+10−9 build_unity+31−51 run_on_device+6−4
CODING+1−11
@@ -17,7 +17,7 @@ If its your first time, download & build deps
1717$ ./build -s
1818 this will:
1919 - add ppa:phablet-team/desktop-deps, ppa:canonical-qt5-edgers/qt5-proper, ppa:ubuntu-sdk-team
20− - build and install lp:libunity/phablet, lp:unity/phablet-mods, lp:hud/phablet and lp:unity-lens-people locally
20+ - build and install lp:libunity/phablet, lp:unity/phablet-mods, lp:hud/phablet locally
2121 - install build dependencies
2222
2323build UnityNext
@@ -33,10 +33,6 @@ $ ./build_unity
3333Running UnityNext on your desktop
3434=================================
3535
36−run the People lens daemon
37−--------------------------
38−$ ~/unity/unity_build/libexec/unity-people-daemon
39−
4036run the UnityNext shell
4137-----------------------
4238$ cd ~/unity/unity-next
@@ -45,12 +41,6 @@ $ ./run
4541Notes
4642-----
4743- to navigate, utilize the mouse left button as you would your finger
48−- if your contacts are empty
49− $ sudo apt-get install gir1.2-ebook-1.2
50− $ manage-address-book.py create
51− this will:
52− - create an EDS address book
53− - populate the address book with sample data
5444- to get the translations work, currently you have to do make install to
5545 put the *.mo files into correct structure. We'll look for a better solution
5646 later.
build+10−9
@@ -37,12 +37,13 @@ BUILD_TYPE="debug"
3737[ $# -eq 1 ] && BUILD_TYPE="$1"
3838
3939install_dependencies() {
40− sudo add-apt-repository -y ppa:phablet-team/desktop-deps || exit 1
41− sudo add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper || exit 2;
42− sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa || exit 3
40+ . /etc/lsb-release
41+ [ -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+ [ -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+ [ -f /etc/apt/sources.list.d/ubuntu-sdk-team-ppa-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:ubuntu-sdk-team/ppa || exit 3
4344 sudo apt-get update || exit 4
44− echo "Installing dependencies.."
45− sudo apt-get install -y 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 6
45+ 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
4647}
4748
4849if [ -f "/usr/bin/ninja" ] ; then
@@ -55,13 +56,13 @@ fi
5556
5657if $SETUP; then
5758 install_dependencies
58− ./build_unity --setup || exit 6
59− ./build_unity
59+ ./build_unity --setup || exit 1$?
60+ ./build_unity || exit 1$?
6061else
6162 if $CLEAN; then rm -rf builddir; fi
6263 mkdir -p builddir
6364 cd builddir
64− PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR}
65− ${BUILD_COMMAND}
65+ PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR} || exit 6
66+ ${BUILD_COMMAND} || exit 7
6667fi
6768
build_unity+31−51
@@ -11,7 +11,6 @@ LENSES="applications mockmusic mockvideos"
1111# verified working revisions
1212LIBUNITY_REV=215
1313UNITY_REV=3260
14−PEOPLE_LENS_REV=74
1514HUD_REV=252
1615
1716usage() {
@@ -39,52 +38,47 @@ do
3938 shift
4039done
4140
42−install_dependencies() {
41+install_utils() {
42+ echo "Installing build utilities.."
43+ sudo apt-get install devscripts equivs || exit 4
44+}
45+
46+mk_build_deps() {
4347 echo "Installing build dependencies.."
44− sudo apt-get build-dep -y libunity unity || exit 4
45− sudo apt-get install -y libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev || exit 5
46− # HUD dependencies
47− sudo apt-get install -y bamfdaemon debhelper dh-autoreconf gir1.2-dee-1.0 gnome-common gnome-doc-utils gobject-introspection gtk-doc-tools indicator-application indicator-appmenu indicator-appmenu-tools intltool libappindicator3-dev libbamf3-dev libdbusmenu-glib-dev libdbusmenu-gtk3-dev libdbusmenu-jsonloader-dev libdbustest1-dev libdee-dev libgirepository1.0-dev libgtk-3-dev libncurses5-dev libreadline-dev libsqlite3-dev metacity sqlite3 valac-0.18 libpocketsphinx-dev libsphinxbase-dev || exit 6
48+ cd $TARGET_DIR
49+ sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
50+ sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
51+ sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
4852}
4953
5054branch_libunity() {
5155 echo "Branching libunity.."
52− bzr branch lp:libunity/phablet $TARGET_DIR/libunity
56+ bzr branch lp:libunity/phablet $TARGET_DIR/libunity || exit 8
5357}
5458
5559branch_unity() {
5660 echo "Branching Unity.."
57− bzr branch lp:unity/phablet-mods $TARGET_DIR/unity
58−}
59−
60−branch_people_lens() {
61− echo "Branching people lens.."
62− bzr branch lp:unity-lens-people $TARGET_DIR/people_lens
61+ bzr branch lp:unity/phablet-mods $TARGET_DIR/unity || exit 9
6362}
6463
6564branch_hud() {
6665 echo "Branching hud.."
67− bzr branch lp:hud $TARGET_DIR/hud
66+ bzr branch lp:hud $TARGET_DIR/hud || exit 10
6867}
6968
7069update_unity() {
7170 echo "Updating Unity.."
72− bzr pull -d $TARGET_DIR/unity
71+ bzr pull -d $TARGET_DIR/unity || exit 11
7372}
7473
7574update_libunity() {
7675 echo "Updating libunity.."
77− bzr pull -d $TARGET_DIR/libunity
78−}
79−
80−update_people_lens() {
81− echo "Updating people lens.."
82− bzr pull -d $TARGET_DIR/people_lens
76+ bzr pull -d $TARGET_DIR/libunity || exit 12
8377}
8478
8579update_hud() {
8680 echo "Updating hud"
87− bzr pull -d $TARGET_DIR/hud
81+ bzr pull -d $TARGET_DIR/hud || exit 13
8882}
8983
9084compile_libunity() {
@@ -93,12 +87,15 @@ compile_libunity() {
9387 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
9488
9589 cd $TARGET_DIR/libunity
96− bzr revert --quiet -r $LIBUNITY_REV || exit 8
90+ bzr revert --quiet -r $LIBUNITY_REV || exit 14
91+
92+ mkdir $TARGET_DIR/libunity/build
93+ cd $TARGET_DIR/libunity/build
9794
98− ./autogen.sh --prefix $BUILD_DIR --disable-debug
95+ ../autogen.sh --prefix $BUILD_DIR --disable-debug || exit 15
9996
10097 echo "Building libunity and installing in " $BUILD_DIR
101− make -j$NUM_JOBS install
98+ make -j$NUM_JOBS install || exit 16
10299
103100}
104101
@@ -108,32 +105,16 @@ compile_unity_core() {
108105 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
109106
110107 cd $TARGET_DIR/unity
111− bzr revert --quiet -r $UNITY_REV || exit 9
108+ bzr revert --quiet -r $UNITY_REV || exit 17
112109
113110 mkdir $TARGET_DIR/unity/build
114111 cd $TARGET_DIR/unity/build
115112
116− PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cmake $TARGET_DIR/unity -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON
113+ PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cmake $TARGET_DIR/unity -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON || exit 18
117114
118115 echo "Building UnityCore and installing in " $BUILD_DIR
119116 cd UnityCore
120− make -j$NUM_JOBS
121− make install
122−
123−}
124−
125−compile_people_lens() {
126− echo "Configuring people lens.."
127−
128− if $CLEAN; then bzr clean-tree -d $TARGET_DIR/people_lens --quiet --unknown --ignored --force; fi
129−
130− cd $TARGET_DIR/people_lens
131− bzr revert --quiet -r $PEOPLE_LENS_REV || exit 10
132−
133− PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH ./autogen.sh --prefix $BUILD_DIR --enable-localinstall
134−
135− echo "Building people lens and installing in " $BUILD_DIR
136− MAINTAINER_VALAFLAGS="--vapidir=${BUILD_DIR}/share/vala/vapi" make -j$NUM_JOBS install
117+ make -j$NUM_JOBS install || exit 19
137118
138119}
139120
@@ -143,15 +124,15 @@ compile_hud() {
143124 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
144125
145126 cd $TARGET_DIR/hud
146− bzr revert -r $HUD_REV || exit 11
127+ bzr revert -r $HUD_REV || exit 20
147128
148129 mkdir $TARGET_DIR/hud/build
149130 cd $TARGET_DIR/hud/build
150131
151− cmake $TARGET_DIR/hud/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCMAKE_INSTALL_LIBDIR=lib -DLOCAL_INSTALL=ON -DENABLE_TESTS=OFF
132+ cmake $TARGET_DIR/hud/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$BUILD_DIR -DCMAKE_INSTALL_LIBDIR=lib -DLOCAL_INSTALL=ON -DENABLE_TESTS=OFF || exit 21
152133
153134 echo "Building hud and installing in " $BUILD_DIR
154− make install
135+ make install || exit 22
155136
156137}
157138
@@ -165,23 +146,22 @@ link_lenses() {
165146
166147if $SETUP; then
167148 echo "Setting up environment for building Unity.."
168− install_dependencies
149+ install_utils
169150 mkdir -p $TARGET_DIR
170151 branch_libunity
171152 branch_unity
172− branch_people_lens
173153 branch_hud
154+ mk_build_deps
174155elif $UPDATE; then
175156 update_libunity
176157 update_unity
177− update_people_lens
178158 update_hud
159+ mk_build_deps
179160else
180161 if $CLEAN; then rm -Rf $BUILD_DIR; fi
181162 mkdir -p $BUILD_DIR
182163 compile_libunity
183164 compile_unity_core
184− compile_people_lens
185165 compile_hud
186166 link_lenses
187167fi
run_on_device+6−4
@@ -33,6 +33,7 @@ exec_with_ssh() {
3333exec_with_adb() {
3434 adb shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
3535}
36+
3637adb_root() {
3738 adb root
3839 adb wait-for-device
@@ -55,11 +56,10 @@ setup_adb_forwarding() {
5556
5657install_dependencies() {
5758 exec_with_adb apt-get -y install openssh-server
58− exec_with_ssh $SUDO apt-get -y install build-essential rsync bzr ccache gdb ninja-build
59+ exec_with_ssh $SUDO apt-get -y install build-essential rsync bzr ccache gdb ninja-build devscripts equivs
5960 exec_with_ssh $SUDO add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper
6061 exec_with_ssh $SUDO add-apt-repository -s -y ppa:phablet-team/ppa
6162 exec_with_ssh $SUDO apt-get update
62− exec_with_ssh $SUDO apt-get -y build-dep $PACKAGE
6363}
6464
6565sync_code() {
@@ -69,19 +69,21 @@ sync_code() {
6969}
7070
7171build() {
72+ exec_with_ssh "[ $CODE_DIR/debian/control -nt unity8-build-deps*deb ] && $SUDO mk-build-deps --tool=\\\"apt-get -y --no-install-recommends\\\" --build-dep --install $CODE_DIR/debian/control"
7273 exec_with_ssh PATH=/usr/lib/ccache:$PATH "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH ./build"
7374}
7475
7576run() {
7677 SERVICEFILE="/data/ubuntu/etc/device-services"
77− adb shell "grep $BINARY $SERVICEFILE"
78+ adb shell "egrep '$BINARY|qml-phone-shell' $SERVICEFILE"
7879 CONTAINS_SHELL=$?
7980 if [ $CONTAINS_SHELL -eq 0 ]; then
8081 echo "Modifying $SERVICEFILE on device. Old contents will be saved in $SERVICEFILE.backup"
8182 adb shell cp $SERVICEFILE $SERVICEFILE.backup
82− adb shell sed -i /$BINARY/d $SERVICEFILE
83+ adb shell sed -i "/$BINARY\\\\\|qml-phone-shell/d" $SERVICEFILE
8384 adb shell "chroot /data/ubuntu /usr/bin/service ubuntu-session restart"
8485 fi
86+ adb shell pkill qml-phone-shell
8587 adb shell pkill $BINARY
8688 if $GDB; then
8789 exec_with_ssh "cd $CODE_DIR/ && ./run --gdb --nomousetouch -- $RUN_OPTIONS"