Merge lp:~aacid/unity/better_build_script into lp:unity/phablet

Proposed by Albert Astals Cid
Status: Merged
Approved by: Nicolas d'Offay
Approved revision: no longer in the source branch.
Merged at revision: 464
Proposed branch: lp:~aacid/unity/better_build_script
Merge into: lp:unity/phablet
Diff against target: 274 lines (+56/-58)
3 files modified
build (+7/-19)
build_unity (+47/-37)
run_on_device (+2/-2)
To merge this branch: bzr merge lp:~aacid/unity/better_build_script
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Omer Akram (community) Approve
Michał Sawicz Needs Information
Nicolas d'Offay (community) Approve
Review via email: mp+153195@code.launchpad.net

Commit message

Easier to use build -s

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicolas d'Offay (nicolas-doffay) wrote :

I can vouch for this script.

review: Approve
Revision history for this message
Günter Schwann (schwann) wrote :

When on Raring running it using "./build -s; ./build; ./run", I get the following error on ./run :

ile:///home/schwann/Projects/manhattan/better_build_script/Shell.qml:160:5: Type VolumeControl unavailable
         VolumeControl {
         ^
file:///home/schwann/Projects/manhattan/better_build_script/VolumeControl.qml:2:1: module "QMenuModel" is not installed
     import QMenuModel 0.1
     ^

Revision history for this message
Albert Astals Cid (aacid) wrote :

running locally on raring still not supported, Saviq working on it

Revision history for this message
Michał Sawicz (saviq) wrote :

Can you check for nux in update_nux / compile_nux? i.e. if you `build_script -s --no-nux`, subsequent calls to build_script should assume you don't want nux.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

This should probably install demo-assets and unity-lens-mock, too?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

With the last commit it should work fine. The only issue I had was that after adding the super-friend ppa a few of the packages were missing since they were required to build HUD.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build'
2--- build 2013-02-04 08:34:20 +0000
3+++ build 2013-03-15 08:46:21 +0000
4@@ -5,24 +5,12 @@
5 SETUP=false
6 NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
7
8-ppas_warning() {
9- echo "You must have added the following PPAs to run the shell:"
10- echo " - manhattan-team release PPA (pkgconfig, libqtdee)"
11- echo " - chewie-team release PPA (indicators)"
12- echo " - algernon-team release PPA (SDK)"
13- echo " - anjali-team release PPA (libhud-client1-dev)"
14- echo ""
15- echo "Go to https://launchpad.net/~/+archivesubscriptions to retrieve"
16- echo "the corresponding sources.list entries."
17-}
18-
19 usage() {
20 echo "usage: build [OPTIONS]\n"
21 echo "Script to build the shell.\n"
22 echo "OPTIONS:"
23 echo " -s, --setup Setup the build environment and branch Unity"
24 echo ""
25- ppas_warning
26 exit 1
27 }
28
29@@ -40,11 +28,12 @@
30 done
31
32 install_dependencies() {
33- ppas_warning
34- echo "Installing build dependencies.."
35- sudo apt-get build-dep ${PACKAGE}
36- echo "Installing runtime dependencies.."
37- sudo apt-get install qt-components-ubuntu qtquick2.0-dee-3 indicators-client indicators-client-plugin-*
38+ sudo add-apt-repository -y ppa:phablet-team/desktop-deps
39+ sudo add-apt-repository -y ppa:canonical-qt5-edgers/qt5-proper
40+ sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa
41+ sudo apt-get update
42+ echo "Installing dependencies.."
43+ sudo apt-get install qt-components-ubuntu qml2-dee-3 indicators-client indicators-client-plugin-* qtbase5-dev qtdeclarative5-dev libdee-qt5-dev libpulse-dev qtdeclarative5-xmllistmodel-plugin unity-lens-mock demo-assets
44 }
45
46
47@@ -54,8 +43,7 @@
48 ./build_unity --setup
49 ./build_unity
50 else
51- PATH=/opt/qt5/bin:$PATH
52- PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig:$UNITY_CORE_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake .
53+ PKG_CONFIG_PATH=$UNITY_CORE_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake .
54 make -j$NUM_JOBS
55 fi
56
57
58=== modified file 'build_unity'
59--- build_unity 2013-02-15 20:09:31 +0000
60+++ build_unity 2013-03-15 08:46:21 +0000
61@@ -2,6 +2,7 @@
62
63 TARGET_DIR=$PWD/../unity_build
64 BUILD_DIR=$TARGET_DIR/build
65+NUX=true
66 SETUP=false
67 UPDATE=false
68 NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
69@@ -13,15 +14,17 @@
70 echo "OPTIONS:"
71 echo " -s, --setup Setup the build environment and branch Unity"
72 echo " -u, --update Update Unity's source code"
73+ echo " -n, --no-nux Don't build/install nux (for raring)"
74 exit 1
75 }
76
77-set -- `getopt -n$0 -u -a --longoptions="setup,update,help" "suh" "$@"`
78+set -- `getopt -n$0 -u -a --longoptions="no-nux,setup,update,help" "nsuh" "$@"`
79
80 # FIXME: giving incorrect arguments does not call usage and exit
81 while [ $# -gt 0 ]
82 do
83 case "$1" in
84+ -n|--no-nux) NUX=false;;
85 -s|--setup) SETUP=true;;
86 -u|--update) UPDATE=true;;
87 -h|--help) usage;;
88@@ -33,46 +36,50 @@
89 install_dependencies() {
90 echo "Installing build dependencies.."
91 [ -e /etc/apt/sources.list.d/super-friends*.list ] || \
92- sudo add-apt-repository ppa:super-friends/ppa
93- sudo apt-get build-dep libnux-3.0-dev libunity unity
94- sudo apt-get install libgtest-dev gnome-common libfolks-dev
95+ sudo add-apt-repository -y ppa:super-friends/ppa
96+ sudo apt-get update
97+ if $NUX; then sudo apt-get build-dep libnux-3.0-dev; fi
98+ sudo apt-get build-dep libunity unity
99+ sudo apt-get install libgtest-dev gnome-common libfolks-dev libtelepathy-glib-dev
100 # HUD dependencies
101- sudo apt-get install bamfdaemon bustle dbus-test-runner debhelper dh-autoreconf gir1.2-dee-1.0 gnome-common gnome-doc-utils gobject-introspection gtester2xunit 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 xvfb python3-dbusmock libpocketsphinx-dev libsphinxbase-dev julius libjulius-dev
102+ sudo apt-get install bamfdaemon bustle dbus-test-runner 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 xvfb python3-dbusmock libpocketsphinx-dev libsphinxbase-dev julius libjulius-dev
103 }
104
105 branch_nux() {
106 echo "Branching Nux.."
107- bzr branch lp:~anjali-team/anjali/nux.trunk $TARGET_DIR/nux.trunk
108+ bzr branch lp:nux/phablet $TARGET_DIR/nux
109 }
110
111-update_nux() {
112- echo "Updating Nux.."
113- bzr pull -d $TARGET_DIR/nux.trunk
114+branch_libunity() {
115+ echo "Branching libunity.."
116+ bzr branch lp:libunity/phablet $TARGET_DIR/libunity
117 }
118
119 branch_unity() {
120 echo "Branching Unity.."
121- bzr branch lp:~anjali-team/anjali/unity.trunk $TARGET_DIR/unity.trunk
122+ bzr branch lp:unity/phablet-mods $TARGET_DIR/unity
123 }
124
125-branch_indaba() {
126- echo "Branching indaba.."
127- bzr branch lp:indaba $TARGET_DIR/indaba
128+branch_people_lens() {
129+ echo "Branching people lens.."
130+ bzr branch lp:unity-lens-people $TARGET_DIR/people_lens
131 }
132
133 branch_hud() {
134 echo "Branching hud.."
135- bzr branch lp:~anjali-team/hud/trunk-small $TARGET_DIR/hud
136+ bzr branch lp:hud/phablet $TARGET_DIR/hud
137+}
138+
139+update_nux() {
140+ if [ -d $TARGET_DIR/nux ]; then
141+ echo "Updating Nux.."
142+ bzr pull -d $TARGET_DIR/nux
143+ fi
144 }
145
146 update_unity() {
147 echo "Updating Unity.."
148- bzr pull -d $TARGET_DIR/unity.trunk
149-}
150-
151-branch_libunity() {
152- echo "Branching libunity.."
153- bzr branch lp:~anjali-team/anjali/libunity $TARGET_DIR/libunity
154+ bzr pull -d $TARGET_DIR/unity
155 }
156
157 update_libunity() {
158@@ -80,9 +87,9 @@
159 bzr pull -d $TARGET_DIR/libunity
160 }
161
162-update_indaba() {
163- echo "Updating indaba.."
164- bzr pull -d $TARGET_DIR/indaba
165+update_people_lens() {
166+ echo "Updating people lens.."
167+ bzr pull -d $TARGET_DIR/people_lens
168 }
169
170 update_hud() {
171@@ -91,12 +98,14 @@
172 }
173
174 compile_nux() {
175- echo "Configuring Nux.."
176- cd $TARGET_DIR/nux.trunk
177- ./autogen.sh --prefix $BUILD_DIR --disable-debug --disable-documentation
178+ if [ -d $TARGET_DIR/nux ]; then
179+ echo "Configuring Nux.."
180+ cd $TARGET_DIR/nux
181+ ./autogen.sh --prefix $BUILD_DIR --disable-debug --disable-documentation
182
183- echo "Building Nux and installing in " $BUILD_DIR
184- make -j$NUM_JOBS install
185+ echo "Building Nux and installing in " $BUILD_DIR
186+ make -j$NUM_JOBS install
187+ fi
188 }
189
190 compile_libunity() {
191@@ -112,7 +121,7 @@
192
193 compile_unity_core() {
194 echo "Configuring Unity.."
195- cd $TARGET_DIR/unity.trunk
196+ cd $TARGET_DIR/unity
197 mkdir build
198 cd build
199 PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cmake .. -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=local -DGSETTINGS_LOCALINSTALL=ON -DCMAKE_INSTALL_PREFIX=$BUILD_DIR
200@@ -124,13 +133,13 @@
201
202 }
203
204-compile_indaba() {
205- echo "Configuring indaba.."
206- cd $TARGET_DIR/indaba
207+compile_people_lens() {
208+ echo "Configuring people lens.."
209+ cd $TARGET_DIR/people_lens
210
211 PKG_CONFIG_PATH=$BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH ./autogen.sh --prefix $BUILD_DIR --enable-localinstall
212
213- echo "Building indaba and installing in " $BUILD_DIR
214+ echo "Building people lens and installing in " $BUILD_DIR
215 MAINTAINER_VALAFLAGS="--vapidir=${BUILD_DIR}/share/vala/vapi" make -j$NUM_JOBS install
216
217 }
218@@ -148,6 +157,7 @@
219
220 link_lenses() {
221 echo "Linking system lenses.."
222+ mkdir -p $BUILD_DIR/share/unity/lenses/
223 for LENS in $LENSES; do
224 [ -e $BUILD_DIR/share/unity/lenses/$LENS ] || ln -ivs /usr/share/unity/lenses/$LENS $BUILD_DIR/share/unity/lenses/$LENS
225 done
226@@ -157,23 +167,23 @@
227 echo "Setting up environment for building Unity.."
228 install_dependencies
229 mkdir -p $TARGET_DIR
230- branch_nux
231+ if $NUX; then branch_nux; fi
232 branch_libunity
233 branch_unity
234- branch_indaba
235+ branch_people_lens
236 branch_hud
237 elif $UPDATE; then
238 update_nux
239 update_libunity
240 update_unity
241- update_indaba
242+ update_people_lens
243 update_hud
244 else
245 mkdir -p $BUILD_DIR
246 compile_nux
247 compile_libunity
248 compile_unity_core
249- compile_indaba
250+ compile_people_lens
251 compile_hud
252 link_lenses
253 fi
254
255=== modified file 'run_on_device'
256--- run_on_device 2013-02-06 15:31:59 +0000
257+++ run_on_device 2013-03-15 08:46:21 +0000
258@@ -16,7 +16,7 @@
259
260 usage() {
261 echo "usage: run_on_device [OPTIONS]\n"
262- echo "Script to setup a build environment for the shell and sync build and run it on the phone.\n"
263+ echo "Script to setup a build environment for the shell and sync build and run it on the device\n"
264 echo "OPTIONS:"
265 echo " -s, --setup Setup the build environment"
266 echo ""
267@@ -66,7 +66,7 @@
268 }
269
270 build() {
271- exec_with_ssh "cd $CODE_DIR/ && PATH=/usr/lib/ccache:/opt/qt5/bin:$PATH PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Debug ."
272+ exec_with_ssh "cd $CODE_DIR/ && PATH=/usr/lib/ccache:$PATH cmake -DCMAKE_BUILD_TYPE=Debug ."
273 exec_with_ssh PATH=/usr/lib/ccache:$PATH "make -j${NUM_JOBS}" --directory=$CODE_DIR/
274 }
275

Subscribers

People subscribed via source and target branches