on xenial help sign in
update CODING instructions for building & running.

Approved by Daniel d'Andrada, PS Jenkins bot.

commit417b196ad0f5f97bbdd9c9ae5be75125124675e5 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateFri 28 Jun 2013, 20:21 (13 years ago) parentdc9964e1ab80f9
2 files changed+78−29
CODING+75−29 build+3
CODING+75−29
@@ -1,43 +1,64 @@
11Building Unity 8
22================
33
4+Only Ubuntu 13.10 (saucy) is supported as a developement environment.
5+
46download source
57---------------
6−- the build requires some additional dependencies, so create the parent folder to not pollute your setup
7− $ mkdir ~/unity
8+- create a parent folder to not pollute your setup. so that you can have different unity
9+ branches there (trunk, WIP etc)
10+
11+ $ mkdir ~/unity8
812
913- fetch Unity 8 source
1014 $ sudo apt-get install bzr
11− $ bzr branch lp:unity/8.0 ~/unity/unity8
12− $ cd ~/unity/unity8
15+ $ bzr branch lp:unity8 ~/unity8/trunk
16+ $ cd ~/unity8/trunk
17+
18+install dependencies
19+--------------------
20+If its your first time, install build dependencies
21+
22+$ cd ~/unity8/trunk
23+$ ./build --setup
1324
14−build dependencies
15−------------------
16−If its your first time, download & build deps
17−$ ./build -s
1825 this will:
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 locally
21− - install build dependencies
26+ - add the following PPA's
27+ - ppa:phablet-team/desktop-deps
28+ - ppa:canonical-qt5-edgers/qt5-proper
29+ - ppa:ubuntu-sdk-team
30+ - install the required dependencies to build, as well as run on the desktop
31+ - it should also install unity-scope-home and unity-lens-application which
32+ are technically "recommends", not strict dependencies
33+
34+Note, once the PPA's are added, the script runs apt-get update, if you have
35+any failures associated with it, the build script will bail out of the setup
36+and fail to install all the required dependencies.
37+
2238
2339build Unity 8
2440-------------
25−$ ./build
2641
27−subsequent updates of the dependencies
28−--------------------------------------
29−$ ./build_unity -u
30−$ ./build_unity
42+$ cd ~/unity8/trunk
43+$ ./build
3144
45+You may also rebuild with the -c for clean, which just deletes the build
46+directory.
3247
3348Running Unity 8 on your desktop
3449===============================
3550
3651run the Unity 8 shell
3752---------------------
38−$ cd ~/unity/unity8
53+$ cd ~/unity8/trunk
3954$ ./run
4055
56+Options can be passed to test the lock screen
57+$ ./run -p OR -k
58+
59+-p is for pin lock, for which the default prompt answer is "1234"
60+-k is for keylock passphrase, for which the default prompt answer is "password"
61+
4162Notes
4263-----
4364- to navigate, utilize the mouse left button as you would your finger
@@ -45,17 +66,29 @@ Notes
4566 put the *.mo files into correct structure. We'll look for a better solution
4667 later.
4768 $ cd builddir; make install
69+- if you wish to populate contacts
70+ $ sudo apt-get install gir1.2-ebook-1.2
71+ $ manage-address-book.py create
72+ this will:
73+ - Create an EDS address book
74+ - Populate the address book with sample data
4875
4976Running Unity 8 on devices
5077==========================
5178- Ubuntu Touch builds are currently only available in 13.10 flavour
52−- supported hardware should match one those listed here https://wiki.ubuntu.com/Touch/Devices#Running_fine
53−- follow the Ubuntu Touch install instructions for your chosen device https://wiki.ubuntu.com/Touch/Install
79+- supported hardware should match one those listed here
80+ https://wiki.ubuntu.com/Touch/Devices#Running_fine
81+- follow the Ubuntu Touch install instructions for your chosen device
82+ https://wiki.ubuntu.com/Touch/Install
5483- make sure your device is connected to a WiFi network
55−- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one on the device yourself)
56−
57−$ cd ~/unity/unity8
58−$ ./run_on_device -s
84+- If you haven’t already or if you’ve just freshly flashed your device
85+ make sure you run phablet-network-setup which will allow package updates to
86+ the device
87+- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one
88+ on the device yourself)
89+
90+$ cd ~/unity/trunk
91+$ ./run_on_device --setup
5992 this will:
6093 - install your public SSH key on the device
6194 - add ppa:canonical-qt5-edgers/qt5-proper and ppa:phablet-team
@@ -67,19 +100,27 @@ $ ./run_on_device
67100 - build on the device
68101 - replace the running shell
69102
103+Options can be passed to test the lock screen
104+$ ./run_on_device -p OR -k
105+
106+-p is for pin lock, for which the default prompt answer is "1234"
107+-k is for keylock passphrase, for which the default prompt answer is "password"
108+
70109Notes
71110-----
72111- using adb over TCP has some advantages, Google will be of help here
73112 - TL;DR: `adb tcpip 5555; adb connect $your_device_ip`
74113 - you can persist the above via `adb shell setprop persist.adb.tcp.port 5555`
75114 - it's unsafe - anyone can connect to your device
76− - with TCP the Nexus 10 doesn't drop the adb connection when locking the screen
77−- exporting ANDROID_SERIAL=$your_device_serial or ANDROID_SERIAL=$your_device_ip:5555
78− will make adb not complain about multiple devices
115+ - with TCP the Nexus 10 doesn't drop the adb connection when locking
116+ the screen
117+- exporting ANDROID_SERIAL=$your_device_serial or
118+ ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
119+ multiple devices
79120- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device
80121 to not use adb forwarding - useful if you use multiple devices
81−- using Ninja (package ninja-build - run_on_device -s installs this now) will improve
82− build times (especially in the nothing-to-build case)
122+- using Ninja (package ninja-build - run_on_device -s installs this now)
123+ will improve build times (especially in the nothing-to-build case)
83124
84125
85126Coding guidelines
@@ -90,4 +131,9 @@ https://launchpad.net/canonical-client-development-guidelines
90131
91132Development Environment
92133=======================
93−QtCreator (available via the Software Center) is the best IDE to hack on Unity 8.
134+QtCreator (available via the Software Center) is the best IDE to hack on
135+Unity 8.
136+
137+If using VIM, make sure you install some syntax highlighting for QML, like
138+https://github.com/peterhoeg/vim-qml
139+
build+3
@@ -49,6 +49,9 @@ install_dependencies() {
4949 indicators-client-plugin-* \
5050 ubuntu-mobile-icons \
5151 unity-notifications-impl-1 \
52+ unity-scope-home \
53+ unity-lens-applications \
54+
5255 || exit 5
5356}
5457