on xenial help sign in
Drop people lens from local build and fix build scripts.
65a5c7dMichał Sawicz
CODING+1−11
@@ -17,7 +17,7 @@ If its your first time, download & build deps
17$ ./build -s
17$ ./build -s
18 this will:
18 this will:
19 - add ppa:phablet-team/desktop-deps, ppa:canonical-qt5-edgers/qt5-proper, ppa:ubuntu-sdk-team
19 - 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
21 - install build dependencies
21 - install build dependencies
22
22
23build UnityNext
23build UnityNext
@@ -33,10 +33,6 @@ $ ./build_unity
33Running UnityNext on your desktop
33Running UnityNext on your desktop
34=================================
34=================================
35
35
36−run the People lens daemon
37−--------------------------
38−$ ~/unity/unity_build/libexec/unity-people-daemon
39−
40run the UnityNext shell
36run the UnityNext shell
41-----------------------
37-----------------------
42$ cd ~/unity/unity-next
38$ cd ~/unity/unity-next
@@ -45,12 +41,6 @@ $ ./run
45Notes
41Notes
46-----
42-----
47- to navigate, utilize the mouse left button as you would your finger
43- 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
54- to get the translations work, currently you have to do make install to
44- to get the translations work, currently you have to do make install to
55 put the *.mo files into correct structure. We'll look for a better solution
45 put the *.mo files into correct structure. We'll look for a better solution
56 later.
46 later.
build+10−9
@@ -37,12 +37,13 @@ BUILD_TYPE="debug"
37[ $# -eq 1 ] && BUILD_TYPE="$1"
37[ $# -eq 1 ] && BUILD_TYPE="$1"
38
38
39install_dependencies() {
39install_dependencies() {
40+ . /etc/lsb-release
40− sudo add-apt-repository -y ppa:phablet-team/desktop-deps || exit 1
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
41− sudo add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper || exit 2;
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;
42− sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa || exit 3
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
43 sudo apt-get update || exit 4
44 sudo apt-get update || exit 4
44− echo "Installing dependencies.."
45+ echo "Installing Unity 8 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
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
46}
47}
47
48
48if [ -f "/usr/bin/ninja" ] ; then
49if [ -f "/usr/bin/ninja" ] ; then
@@ -55,13 +56,13 @@ fi
55
56
56if $SETUP; then
57if $SETUP; then
57 install_dependencies
58 install_dependencies
58− ./build_unity --setup || exit 6
59+ ./build_unity --setup || exit 1$?
59− ./build_unity
60+ ./build_unity || exit 1$?
60else
61else
61 if $CLEAN; then rm -rf builddir; fi
62 if $CLEAN; then rm -rf builddir; fi
62 mkdir -p builddir
63 mkdir -p builddir
63 cd builddir
64 cd builddir
64− PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR}
65+ PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR} || exit 6
65− ${BUILD_COMMAND}
66+ ${BUILD_COMMAND} || exit 7
66fi
67fi
67
68
build_unity+31−51
@@ -11,7 +11,6 @@ LENSES="applications mockmusic mockvideos"
11# verified working revisions
11# verified working revisions
12LIBUNITY_REV=215
12LIBUNITY_REV=215
13UNITY_REV=3260
13UNITY_REV=3260
14−PEOPLE_LENS_REV=74
15HUD_REV=252
14HUD_REV=252
16
15
17usage() {
16usage() {
@@ -39,52 +38,47 @@ do
39 shift
38 shift
40done
39done
41
40
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() {
43 echo "Installing build dependencies.."
47 echo "Installing build dependencies.."
44− sudo apt-get build-dep -y libunity unity || exit 4
48+ cd $TARGET_DIR
45− sudo apt-get install -y libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev || exit 5
49+ sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
46− # HUD dependencies
50+ sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
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
51+ sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
48}
52}
49
53
50branch_libunity() {
54branch_libunity() {
51 echo "Branching libunity.."
55 echo "Branching libunity.."
52− bzr branch lp:libunity/phablet $TARGET_DIR/libunity
56+ bzr branch lp:libunity/phablet $TARGET_DIR/libunity || exit 8
53}
57}
54
58
55branch_unity() {
59branch_unity() {
56 echo "Branching Unity.."
60 echo "Branching Unity.."
57− bzr branch lp:unity/phablet-mods $TARGET_DIR/unity
61+ bzr branch lp:unity/phablet-mods $TARGET_DIR/unity || exit 9
58−}
59−
60−branch_people_lens() {
61− echo "Branching people lens.."
62− bzr branch lp:unity-lens-people $TARGET_DIR/people_lens
63}
62}
64
63
65branch_hud() {
64branch_hud() {
66 echo "Branching hud.."
65 echo "Branching hud.."
67− bzr branch lp:hud $TARGET_DIR/hud
66+ bzr branch lp:hud $TARGET_DIR/hud || exit 10
68}
67}
69
68
70update_unity() {
69update_unity() {
71 echo "Updating Unity.."
70 echo "Updating Unity.."
72− bzr pull -d $TARGET_DIR/unity
71+ bzr pull -d $TARGET_DIR/unity || exit 11
73}
72}
74
73
75update_libunity() {
74update_libunity() {
76 echo "Updating libunity.."
75 echo "Updating libunity.."
77− bzr pull -d $TARGET_DIR/libunity
76+ bzr pull -d $TARGET_DIR/libunity || exit 12
78−}
79−
80−update_people_lens() {
81− echo "Updating people lens.."
82− bzr pull -d $TARGET_DIR/people_lens
83}
77}
84
78
85update_hud() {
79update_hud() {
86 echo "Updating hud"
80 echo "Updating hud"
87− bzr pull -d $TARGET_DIR/hud
81+ bzr pull -d $TARGET_DIR/hud || exit 13
88}
82}
89
83
90compile_libunity() {
84compile_libunity() {
@@ -93,12 +87,15 @@ compile_libunity() {
93 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
87 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
94
88
95 cd $TARGET_DIR/libunity
89 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
97
94
98− ./autogen.sh --prefix $BUILD_DIR --disable-debug
95+ ../autogen.sh --prefix $BUILD_DIR --disable-debug || exit 15
99
96
100 echo "Building libunity and installing in " $BUILD_DIR
97 echo "Building libunity and installing in " $BUILD_DIR
101− make -j$NUM_JOBS install
98+ make -j$NUM_JOBS install || exit 16
102
99
103}
100}
104
101
@@ -108,32 +105,16 @@ compile_unity_core() {
108 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
105 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
109
106
110 cd $TARGET_DIR/unity
107 cd $TARGET_DIR/unity
111− bzr revert --quiet -r $UNITY_REV || exit 9
108+ bzr revert --quiet -r $UNITY_REV || exit 17
112
109
113 mkdir $TARGET_DIR/unity/build
110 mkdir $TARGET_DIR/unity/build
114 cd $TARGET_DIR/unity/build
111 cd $TARGET_DIR/unity/build
115
112
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
117
114
118 echo "Building UnityCore and installing in " $BUILD_DIR
115 echo "Building UnityCore and installing in " $BUILD_DIR
119 cd UnityCore
116 cd UnityCore
120− make -j$NUM_JOBS
117+ make -j$NUM_JOBS install || exit 19
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
137
118
138}
119}
139
120
@@ -143,15 +124,15 @@ compile_hud() {
143 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
124 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
144
125
145 cd $TARGET_DIR/hud
126 cd $TARGET_DIR/hud
146− bzr revert -r $HUD_REV || exit 11
127+ bzr revert -r $HUD_REV || exit 20
147
128
148 mkdir $TARGET_DIR/hud/build
129 mkdir $TARGET_DIR/hud/build
149 cd $TARGET_DIR/hud/build
130 cd $TARGET_DIR/hud/build
150
131
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
152
133
153 echo "Building hud and installing in " $BUILD_DIR
134 echo "Building hud and installing in " $BUILD_DIR
154− make install
135+ make install || exit 22
155
136
156}
137}
157
138
@@ -165,23 +146,22 @@ link_lenses() {
165
146
166if $SETUP; then
147if $SETUP; then
167 echo "Setting up environment for building Unity.."
148 echo "Setting up environment for building Unity.."
168− install_dependencies
149+ install_utils
169 mkdir -p $TARGET_DIR
150 mkdir -p $TARGET_DIR
170 branch_libunity
151 branch_libunity
171 branch_unity
152 branch_unity
172− branch_people_lens
173 branch_hud
153 branch_hud
154+ mk_build_deps
174elif $UPDATE; then
155elif $UPDATE; then
175 update_libunity
156 update_libunity
176 update_unity
157 update_unity
177− update_people_lens
178 update_hud
158 update_hud
159+ mk_build_deps
179else
160else
180 if $CLEAN; then rm -Rf $BUILD_DIR; fi
161 if $CLEAN; then rm -Rf $BUILD_DIR; fi
181 mkdir -p $BUILD_DIR
162 mkdir -p $BUILD_DIR
182 compile_libunity
163 compile_libunity
183 compile_unity_core
164 compile_unity_core
184− compile_people_lens
185 compile_hud
165 compile_hud
186 link_lenses
166 link_lenses
187fi
167fi
run_on_device+6−4
@@ -33,6 +33,7 @@ exec_with_ssh() {
33exec_with_adb() {
33exec_with_adb() {
34 adb shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
34 adb shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
35}
35}
36+
36adb_root() {
37adb_root() {
37 adb root
38 adb root
38 adb wait-for-device
39 adb wait-for-device
@@ -55,11 +56,10 @@ setup_adb_forwarding() {
55
56
56install_dependencies() {
57install_dependencies() {
57 exec_with_adb apt-get -y install openssh-server
58 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
59 exec_with_ssh $SUDO add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper
60 exec_with_ssh $SUDO add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper
60 exec_with_ssh $SUDO add-apt-repository -s -y ppa:phablet-team/ppa
61 exec_with_ssh $SUDO add-apt-repository -s -y ppa:phablet-team/ppa
61 exec_with_ssh $SUDO apt-get update
62 exec_with_ssh $SUDO apt-get update
62− exec_with_ssh $SUDO apt-get -y build-dep $PACKAGE
63}
63}
64
64
65sync_code() {
65sync_code() {
@@ -69,19 +69,21 @@ sync_code() {
69}
69}
70
70
71build() {
71build() {
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"
72 exec_with_ssh PATH=/usr/lib/ccache:$PATH "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH ./build"
73 exec_with_ssh PATH=/usr/lib/ccache:$PATH "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH ./build"
73}
74}
74
75
75run() {
76run() {
76 SERVICEFILE="/data/ubuntu/etc/device-services"
77 SERVICEFILE="/data/ubuntu/etc/device-services"
77− adb shell "grep $BINARY $SERVICEFILE"
78+ adb shell "egrep '$BINARY|qml-phone-shell' $SERVICEFILE"
78 CONTAINS_SHELL=$?
79 CONTAINS_SHELL=$?
79 if [ $CONTAINS_SHELL -eq 0 ]; then
80 if [ $CONTAINS_SHELL -eq 0 ]; then
80 echo "Modifying $SERVICEFILE on device. Old contents will be saved in $SERVICEFILE.backup"
81 echo "Modifying $SERVICEFILE on device. Old contents will be saved in $SERVICEFILE.backup"
81 adb shell cp $SERVICEFILE $SERVICEFILE.backup
82 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
83 adb shell "chroot /data/ubuntu /usr/bin/service ubuntu-session restart"
84 adb shell "chroot /data/ubuntu /usr/bin/service ubuntu-session restart"
84 fi
85 fi
86+ adb shell pkill qml-phone-shell
85 adb shell pkill $BINARY
87 adb shell pkill $BINARY
86 if $GDB; then
88 if $GDB; then
87 exec_with_ssh "cd $CODE_DIR/ && ./run --gdb --nomousetouch -- $RUN_OPTIONS"
89 exec_with_ssh "cd $CODE_DIR/ && ./run --gdb --nomousetouch -- $RUN_OPTIONS"