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
=== modified file 'build'
--- build 2013-06-07 10:01:57 +0000
+++ build 2013-06-20 12:57:29 +0000
@@ -1,10 +1,9 @@
1#!/bin/sh1#!/bin/sh
22
3PACKAGE=unity8
4UNITY_BUILD_DIR=$PWD/../unity_build/build
5SETUP=false3SETUP=false
6CLEAN=false4CLEAN=false
7NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))5NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
6CODE_DIR=$( dirname `readlink -f $0` )
87
9usage() {8usage() {
10 echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&29 echo "usage: build [OPTIONS] [BUILD_TYPE]\n" >&2
@@ -37,13 +36,24 @@
37[ $# -eq 1 ] && BUILD_TYPE="$1"36[ $# -eq 1 ] && BUILD_TYPE="$1"
3837
39install_dependencies() {38install_dependencies() {
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 139 [ -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;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 [ -f /etc/apt/sources.list.d/ubuntu-sdk-team-ppa-${DISTRIB_CODENAME}.list ] || sudo add-apt-repository ppa:ubuntu-sdk-team/ppa || exit 341 [ -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 sudo apt-get update || exit 442 sudo apt-get update || exit 4
45 echo "Installing Unity 8 dependencies.."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 544 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
55mk_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}
4858
49if [ -f "/usr/bin/ninja" ] ; then59if [ -f "/usr/bin/ninja" ] ; then
@@ -56,13 +66,11 @@
5666
57if $SETUP; then67if $SETUP; then
58 install_dependencies68 install_dependencies
59 ./build_unity --setup || exit 1$?
60 ./build_unity || exit 1$?
61else69else
62 if $CLEAN; then rm -rf builddir; fi70 if $CLEAN; then rm -rf builddir; fi
63 mkdir -p builddir71 mkdir -p builddir
64 cd builddir72 cd builddir
65 PKG_CONFIG_PATH=$UNITY_BUILD_DIR/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. ${GENERATOR} || exit 673 mk_build_deps
74 cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CODE_DIR ${GENERATOR} || exit 6
66 ${BUILD_COMMAND} || exit 775 ${BUILD_COMMAND} || exit 7
67fi76fi
68
6977
=== removed file 'build_unity'
--- build_unity 2013-06-14 14:14:12 +0000
+++ build_unity 1970-01-01 00:00:00 +0000
@@ -1,158 +0,0 @@
1#!/bin/bash
2
3TARGET_DIR=$PWD/../unity_build
4BUILD_DIR=$TARGET_DIR/build
5SETUP=false
6UPDATE=false
7CLEAN=false
8NUM_JOBS=$(( `grep -c ^processor /proc/cpuinfo` + 1 ))
9
10# verified working revisions
11LIBUNITY_REV=228
12UNITY_REV=3343
13HUD_REV=252
14
15usage() {
16 echo "usage: build_unity [OPTIONS]\n"
17 echo "Script to build Unity on Ubuntu 12.10.\n"
18 echo "OPTIONS:"
19 echo " -s, --setup Setup the build environment and branch Unity"
20 echo " -u, --update Update Unity's source code"
21 echo " -c, --clean Clean build trees before building"
22 exit 1
23}
24
25set -- `getopt -n$0 -u -a --longoptions="setup,update,clean,help" "such" "$@"`
26
27# FIXME: giving incorrect arguments does not call usage and exit
28while [ $# -gt 0 ]
29do
30 case "$1" in
31 -s|--setup) SETUP=true;;
32 -u|--update) UPDATE=true;;
33 -c|--clean) CLEAN=true;;
34 -h|--help) usage;;
35 --) shift;break;;
36 esac
37 shift
38done
39
40install_utils() {
41 echo "Installing build utilities.."
42 sudo apt-get install devscripts equivs || exit 4
43}
44
45mk_build_deps() {
46 echo "Installing build dependencies.."
47 cd $TARGET_DIR
48 sudo mk-build-deps -B -i $TARGET_DIR/libunity/debian/control || exit 5
49 sudo mk-build-deps -B -i $TARGET_DIR/unity/debian/control || exit 6
50 sudo mk-build-deps -B -i $TARGET_DIR/hud/debian/control || exit 7
51}
52
53branch_libunity() {
54 echo "Branching libunity.."
55 bzr branch lp:libunity $TARGET_DIR/libunity || exit 8
56}
57
58branch_unity() {
59 echo "Branching Unity.."
60 bzr branch lp:unity $TARGET_DIR/unity || exit 9
61}
62
63branch_hud() {
64 echo "Branching hud.."
65 bzr branch lp:hud $TARGET_DIR/hud || exit 10
66}
67
68update_unity() {
69 echo "Updating Unity.."
70 bzr pull -d $TARGET_DIR/unity || exit 11
71}
72
73update_libunity() {
74 echo "Updating libunity.."
75 bzr pull -d $TARGET_DIR/libunity || exit 12
76}
77
78update_hud() {
79 echo "Updating hud"
80 bzr pull -d $TARGET_DIR/hud || exit 13
81}
82
83compile_libunity() {
84 echo "Configuring libunity.."
85
86 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/libunity --quiet --unknown --ignored --force; fi
87
88 cd $TARGET_DIR/libunity
89 bzr revert --quiet -r $LIBUNITY_REV || exit 14
90
91 mkdir $TARGET_DIR/libunity/build
92 cd $TARGET_DIR/libunity/build
93
94 ../autogen.sh --prefix $BUILD_DIR --disable-debug --with-pygi-overrides-dir=$BUILD_DIR/gi-overrides || exit 15
95
96 echo "Building libunity and installing in " $BUILD_DIR
97 make -j$NUM_JOBS install || exit 16
98
99}
100
101compile_unity_core() {
102 echo "Configuring Unity.."
103
104 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/unity --quiet --unknown --ignored --force; fi
105
106 cd $TARGET_DIR/unity
107 bzr revert --quiet -r $UNITY_REV || exit 17
108
109 mkdir $TARGET_DIR/unity/build
110 cd $TARGET_DIR/unity/build
111
112 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
113
114 echo "Building UnityCore and installing in " $BUILD_DIR
115 cd UnityCore
116 make -j$NUM_JOBS install || exit 19
117
118}
119
120compile_hud() {
121 echo "Configuring hud.."
122
123 if $CLEAN; then bzr clean-tree -d $TARGET_DIR/hud --quiet --unknown --ignored --force; fi
124
125 cd $TARGET_DIR/hud
126 bzr revert -r $HUD_REV || exit 20
127
128 mkdir $TARGET_DIR/hud/build
129 cd $TARGET_DIR/hud/build
130
131 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
132
133 echo "Building hud and installing in " $BUILD_DIR
134 make install || exit 22
135
136}
137
138if $SETUP; then
139 echo "Setting up environment for building Unity.."
140 install_utils
141 mkdir -p $TARGET_DIR
142 branch_libunity
143 branch_unity
144 branch_hud
145 mk_build_deps
146elif $UPDATE; then
147 update_libunity
148 update_unity
149 update_hud
150 mk_build_deps
151else
152 if $CLEAN; then rm -Rf $BUILD_DIR; fi
153 mkdir -p $BUILD_DIR
154 compile_libunity
155 compile_unity_core
156 compile_hud
157fi
158
1590
=== modified file 'run'
--- run 2013-06-06 12:18:34 +0000
+++ run 2013-06-20 12:57:29 +0000
@@ -1,7 +1,6 @@
1#!/bin/sh1#!/bin/sh
22
3QML_PHONE_SHELL_PATH=./builddir/unity83QML_PHONE_SHELL_PATH=./builddir/unity8
4export LD_LIBRARY_PATH=$PWD/../unity_build/build/lib
5GDB=false4GDB=false
6FAKE=false5FAKE=false
7PINLOCK=false6PINLOCK=false

Subscribers

People subscribed via source and target branches

to all changes: