Merge lp:~saviq/unity/8.clean-scripts into lp:unity/8.0

Proposed by Michał Sawicz
Status: Merged
Approved by: Albert Astals Cid
Approved revision: no longer in the source branch.
Merged at revision: 36
Proposed branch: lp:~saviq/unity/8.clean-scripts
Merge into: lp:unity/8.0
Diff against target: 233 lines (+16/-167)
3 files modified
build (+16/-8)
build_unity (+0/-158)
run (+0/-1)
To merge this branch: bzr merge lp:~saviq/unity/8.clean-scripts
Reviewer Review Type Date Requested Status
Albert Astals Cid (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+170604@code.launchpad.net

Commit message

Drop build_unity that's not needed anymore and clean up build/run scripts.

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
Albert Astals Cid (aacid) wrote :

Die die die unity_build!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build'
2--- build 2013-06-07 10:01:57 +0000
3+++ build 2013-06-20 12:57:29 +0000
4@@ -1,10 +1,9 @@
5 #!/bin/sh
6
7-PACKAGE=unity8
8-UNITY_BUILD_DIR=$PWD/../unity_build/build
9 SETUP=false
10 CLEAN=false
11 NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
12+CODE_DIR=$( dirname `readlink -f $0` )
13
14 usage() {
15 echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
16@@ -37,13 +36,24 @@
17 [ $# -eq 1 ] && BUILD_TYPE="$1"
18
19 install_dependencies() {
20- . /etc/lsb-release
21 [ -f /etc/apt/sources.list.d/phablet-team-desktop-deps-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:phablet-team/desktop-deps || exit 1
22 [ -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;
23 [ -f /etc/apt/sources.list.d/ubuntu-sdk-team-ppa-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:ubuntu-sdk-team/ppa || exit 3
24 sudo apt-get update || exit 4
25 echo "Installing Unity 8 dependencies.."
26- 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
27+ sudo apt-get install devscripts \
28+ equivs \
29+ qtdeclarative5-ubuntu-ui-toolkit-plugin \
30+ qtdeclarative5-dee-plugin \
31+ indicators-client \
32+ indicators-client-plugin-* \
33+ ubuntu-mobile-icons \
34+ unity-notifications-impl-1 \
35+ || exit 5
36+}
37+
38+mk_build_deps() {
39+ [ ! -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
40 }
41
42 if [ -f "/usr/bin/ninja" ] ; then
43@@ -56,13 +66,11 @@
44
45 if $SETUP; then
46 install_dependencies
47- ./build_unity --setup || exit 1$?
48- ./build_unity || exit 1$?
49 else
50 if $CLEAN; then rm -rf builddir; fi
51 mkdir -p builddir
52 cd builddir
53- PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR} || exit 6
54+ mk_build_deps
55+ cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
56 ${BUILD_COMMAND} || exit 7
57 fi
58-
59
60=== removed file 'build_unity'
61--- build_unity 2013-06-14 14:14:12 +0000
62+++ build_unity 1970-01-01 00:00:00 +0000
63@@ -1,158 +0,0 @@
64-#!/bin/bash
65-
66-TARGET_DIR=$PWD/../unity_build
67-BUILD_DIR=$TARGET_DIR/build
68-SETUP=false
69-UPDATE=false
70-CLEAN=false
71-NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
72-
73-# verified working revisions
74-LIBUNITY_REV=228
75-UNITY_REV=3343
76-HUD_REV=252
77-
78-usage() {
79- echo "usage: build_unity [OPTIONS]\n"
80- echo "Script to build Unity on Ubuntu 12.10.\n"
81- echo "OPTIONS:"
82- echo " -s, --setup Setup the build environment and branch Unity"
83- echo " -u, --update Update Unity's source code"
84- echo " -c, --clean Clean build trees before building"
85- exit 1
86-}
87-
88-set -- `getopt -n$0 -u -a --longoptions="setup,update,clean,help" "such" "$@"`
89-
90-# FIXME: giving incorrect arguments does not call usage and exit
91-while [ $# -gt 0 ]
92-do
93- case "$1" in
94- -s|--setup) SETUP=true;;
95- -u|--update) UPDATE=true;;
96- -c|--clean) CLEAN=true;;
97- -h|--help) usage;;
98- --) shift;break;;
99- esac
100- shift
101-done
102-
103-install_utils() {
104- echo "Installing build utilities.."
105- sudo apt-get install devscripts equivs || exit 4
106-}
107-
108-mk_build_deps() {
109- echo "Installing build dependencies.."
110- cd $TARGET_DIR
111- sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
112- sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
113- sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
114-}
115-
116-branch_libunity() {
117- echo "Branching libunity.."
118- bzr branch lp:libunity $TARGET_DIR/libunity || exit 8
119-}
120-
121-branch_unity() {
122- echo "Branching Unity.."
123- bzr branch lp:unity $TARGET_DIR/unity || exit 9
124-}
125-
126-branch_hud() {
127- echo "Branching hud.."
128- bzr branch lp:hud $TARGET_DIR/hud || exit 10
129-}
130-
131-update_unity() {
132- echo "Updating Unity.."
133- bzr pull -d $TARGET_DIR/unity || exit 11
134-}
135-
136-update_libunity() {
137- echo "Updating libunity.."
138- bzr pull -d $TARGET_DIR/libunity || exit 12
139-}
140-
141-update_hud() {
142- echo "Updating hud"
143- bzr pull -d $TARGET_DIR/hud || exit 13
144-}
145-
146-compile_libunity() {
147- echo "Configuring libunity.."
148-
149- if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
150-
151- cd $TARGET_DIR/libunity
152- bzr revert --quiet -r $LIBUNITY_REV || exit 14
153-
154- mkdir $TARGET_DIR/libunity/build
155- cd $TARGET_DIR/libunity/build
156-
157- ../autogen.sh --prefix $BUILD_DIR --disable-debug --with-pygi-overrides-dir=$BUILD_DIR/gi-overrides || exit 15
158-
159- echo "Building libunity and installing in " $BUILD_DIR
160- make -j$NUM_JOBS install || exit 16
161-
162-}
163-
164-compile_unity_core() {
165- echo "Configuring Unity.."
166-
167- if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
168-
169- cd $TARGET_DIR/unity
170- bzr revert --quiet -r $UNITY_REV || exit 17
171-
172- mkdir $TARGET_DIR/unity/build
173- cd $TARGET_DIR/unity/build
174-
175- 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
176-
177- echo "Building UnityCore and installing in " $BUILD_DIR
178- cd UnityCore
179- make -j$NUM_JOBS install || exit 19
180-
181-}
182-
183-compile_hud() {
184- echo "Configuring hud.."
185-
186- if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
187-
188- cd $TARGET_DIR/hud
189- bzr revert -r $HUD_REV || exit 20
190-
191- mkdir $TARGET_DIR/hud/build
192- cd $TARGET_DIR/hud/build
193-
194- 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
195-
196- echo "Building hud and installing in " $BUILD_DIR
197- make install || exit 22
198-
199-}
200-
201-if $SETUP; then
202- echo "Setting up environment for building Unity.."
203- install_utils
204- mkdir -p $TARGET_DIR
205- branch_libunity
206- branch_unity
207- branch_hud
208- mk_build_deps
209-elif $UPDATE; then
210- update_libunity
211- update_unity
212- update_hud
213- mk_build_deps
214-else
215- if $CLEAN; then rm -Rf $BUILD_DIR; fi
216- mkdir -p $BUILD_DIR
217- compile_libunity
218- compile_unity_core
219- compile_hud
220-fi
221-
222
223=== modified file 'run'
224--- run 2013-06-06 12:18:34 +0000
225+++ run 2013-06-20 12:57:29 +0000
226@@ -1,7 +1,6 @@
227 #!/bin/sh
228
229 QML_PHONE_SHELL_PATH=./builddir/unity8
230-export LD_LIBRARY_PATH=$PWD/../unity_build/build/lib
231 GDB=false
232 FAKE=false
233 PINLOCK=false

Subscribers

People subscribed via source and target branches

to all changes: