~mzanetti/unity8/async-dashcommunicator

1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
1
Building Unity 8
2
================
1 by Michał Sawicz
Inital unity8 commit.
3
581.3.1 by Michael Hall
Update CODING to reflect the fact that only 14.04 is supported currently
4
Only Ubuntu 14.04 (trusty) is supported as a developement environment.
43.3.1 by Daniel d'Andrada
Update CODING
5
1 by Michał Sawicz
Inital unity8 commit.
6
download source
7
---------------
43.3.1 by Daniel d'Andrada
Update CODING
8
- create a parent folder to not pollute your setup. so that you can have different unity
9
  branches there (trunk, WIP etc)
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
10
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
11
  $ mkdir ~/unity8
1 by Michał Sawicz
Inital unity8 commit.
12
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
13
- fetch Unity 8 source
1 by Michał Sawicz
Inital unity8 commit.
14
  $ sudo apt-get install bzr
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
15
  $ bzr branch lp:unity8 ~/unity8/trunk
16
  $ cd ~/unity8/trunk
1 by Michał Sawicz
Inital unity8 commit.
17
43.3.1 by Daniel d'Andrada
Update CODING
18
install dependencies
19
--------------------
20
If its your first time, install build dependencies
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
21
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
22
$ cd ~/unity8/trunk
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
23
$ ./build.sh --setup
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
24
1 by Michał Sawicz
Inital unity8 commit.
25
  this will:
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
26
  - install the required dependencies to build, as well as run on the desktop
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
27
  - it should also install unity-scope-home and unity-lens-application which 
28
    are technically "recommends", not strict dependencies
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
29
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
30
build Unity 8
31
-------------
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
32
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
33
$ cd ~/unity8/trunk
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
34
$ ./build.sh
1 by Michał Sawicz
Inital unity8 commit.
35
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
36
You may also rebuild with the -c for clean, which just deletes the build
37
directory.
1 by Michał Sawicz
Inital unity8 commit.
38
2.6.2 by Michał Sawicz
Do not add PPAs anymore and clean up build scripts and CODING accordingly.
39
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
40
Running Unity 8 on your desktop
41
===============================
1 by Michał Sawicz
Inital unity8 commit.
42
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
43
run the Unity 8 shell
44
---------------------
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
45
$ cd ~/unity8/trunk
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
46
$ ./run.sh
1 by Michał Sawicz
Inital unity8 commit.
47
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
48
Options can be passed to test the lock screen
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
49
$ ./run.sh -p OR -k
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
50
51
-p is for pin lock, for which the default prompt answer is "1234"
52
-k is for keylock passphrase, for which the default prompt answer is "password"
53
1 by Michał Sawicz
Inital unity8 commit.
54
Notes
55
-----
56
- to navigate, utilize the mouse left button as you would your finger
57
- to get the translations work, currently you have to do make install to
58
  put the *.mo files into correct structure. We'll look for a better solution
59
  later.
60
  $ cd builddir; make install
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
61
- if you wish to populate contacts
62
  $ sudo apt-get install gir1.2-ebook-1.2
63
  $ manage-address-book.py create
64
  this will:
65
    - Create an EDS address book
66
    - Populate the address book with sample data
1 by Michał Sawicz
Inital unity8 commit.
67
2.6.2 by Michał Sawicz
Do not add PPAs anymore and clean up build scripts and CODING accordingly.
68
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
69
Running Unity 8 on devices
70
==========================
581.3.1 by Michael Hall
Update CODING to reflect the fact that only 14.04 is supported currently
71
- Ubuntu Touch builds are currently only available in 14.04 flavour
150.1.2 by Michał Sawicz
Fix some words.
72
- supported hardware should match one of those listed here
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
73
  https://wiki.ubuntu.com/Touch/Devices#Running_fine
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
74
- follow the Ubuntu Touch install instructions for your chosen device
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
75
  https://wiki.ubuntu.com/Touch/Install
150.1.2 by Michał Sawicz
Fix some words.
76
- make sure your device is connected to a network
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
77
- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
78
  on the device yourself)
1 by Michał Sawicz
Inital unity8 commit.
79
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
80
$ cd ~/unity/trunk
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
81
$ ./run_on_device.sh --setup
1 by Michał Sawicz
Inital unity8 commit.
82
  this will:
83
  - install your public SSH key on the device
84
  - install the needed dependencies
85
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
86
$ ./run_on_device.sh
1 by Michał Sawicz
Inital unity8 commit.
87
  this will:
88
  - rsync the code to the device
89
  - build on the device
90
  - replace the running shell
91
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
92
Options can be passed to test the lock screen
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
93
$ ./run_on_device.sh -p OR -k
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
94
95
-p is for pin lock, for which the default prompt answer is "1234"
96
-k is for keylock passphrase, for which the default prompt answer is "password"
97
1 by Michał Sawicz
Inital unity8 commit.
98
Notes
99
-----
100
- using adb over TCP has some advantages, Google will be of help here
2.6.2 by Michał Sawicz
Do not add PPAs anymore and clean up build scripts and CODING accordingly.
101
  - NOTE: this is not yet available for flipped images
1 by Michał Sawicz
Inital unity8 commit.
102
  - TL;DR: `adb tcpip 5555; adb connect $your_device_ip`
103
  - you can persist the above via `adb shell setprop persist.adb.tcp.port 5555`
104
  - it's unsafe - anyone can connect to your device
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
105
  - with TCP the Nexus 10 doesn't drop the adb connection when locking
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
106
    the screen
107
- exporting ANDROID_SERIAL=$your_device_serial or 
108
  ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about 
109
  multiple devices
872.1.2 by Michał Sawicz
Two more run_on_device.
110
- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device.sh
1 by Michał Sawicz
Inital unity8 commit.
111
  to not use adb forwarding - useful if you use multiple devices
872.1.2 by Michał Sawicz
Two more run_on_device.
112
- using Ninja (package ninja-build - run_on_device.sh -s installs this now)
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
113
  will improve build times (especially in the nothing-to-build case)
1 by Michał Sawicz
Inital unity8 commit.
114
115
116
Coding guidelines
117
=================
118
The work-in-progress coding guidelines are available under:
119
https://launchpad.net/canonical-client-development-guidelines
120
121
122
Development Environment
123
=======================
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
124
QtCreator (available via the Software Center) is the best IDE to hack on
125
Unity 8.
43.3.1 by Daniel d'Andrada
Update CODING
126
127
If using VIM, make sure you install some syntax highlighting for QML, like
128
https://github.com/peterhoeg/vim-qml
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
129
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
130
Running tests
131
=============
132
596.2.3 by Daniel d'Andrada
More info on the build directory
133
Tests are run from the build directory (which will be ./builddir if you used
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
134
the ./build.sh script).
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
135
136
To run the tests that do not require any graphical capability and therefore
137
are pretty fast run:
138
139
$ make test
140
141
or, alternatively:
142
143
$ ctest
144
145
To run all graphical tests, which can take a couple of minutes:
146
147
$ make qmluitests
148
149
To run the tests for a single component/class:
150
151
$ make testComponentName
152
153
So, for the DragHandle component that would be:
154
155
$ make testDragHandle
156
157
To run a test application that allow you to manually test or to simply try out
158
a given component:
159
160
$ make tryComponentName
161
162
So to try out, for instance, the DragHandle component, you would do:
163
164
$ make tryDragHandle
596.2.2 by Daniel d'Andrada
Add a note regarding lack of tryFoo targets for some classes
165
166
NB: Manual test or interation doesn't make sense for all components or classes,
167
particularly the non-graphical ones. In such cases no "tryFoo" make target is
168
provided.
621.2.1 by Albert Astals
Add some info about autopilot tests
169
170
Running autopilot tests
171
=======================
172
621.2.2 by Albert Astals
Make the autopilot target work
173
Autopilot tests are run from the build directory (which will be ./builddir if you used
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
174
the ./build.sh script).
621.2.2 by Albert Astals
Make the autopilot target work
175
635.2.14 by Leo Arias
Reverted the changes on CODING.
176
$ make autopilot
177
178
If you want you can also run tests individually, for that you need to install first,
179
otherwise the tests will run on the system-installed version
635.2.10 by Leo Arias
Fixed the install, updated the README.
180
181
$ make install
182
621.2.2 by Albert Astals
Make the autopilot target work
183
To see the list of existing autopilot tests you can do
184
185
$ PYTHONPATH=../tests/autopilot autopilot list unity8
621.2.1 by Albert Astals
Add some info about autopilot tests
186
187
And then run a single test with
188
621.2.2 by Albert Astals
Make the autopilot target work
189
$ PYTHONPATH=../tests/autopilot autopilot run unity8.some.very.long.test.name
190
191
or run them all with
192
193
$ PYTHONPATH=../tests/autopilot autopilot run unity8