~mterry/+junk/u8

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
2542.1.3 by Michael Zanetti
drop some legacy
18
install dependencies and build Unity 8
43.3.1 by Daniel d'Andrada
Update CODING
19
--------------------
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
20
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
21
$ cd ~/unity8/trunk
872.1.1 by Michał Sawicz
Suffix .sh to our scripts and clean up debian/rules.
22
$ ./build.sh
1 by Michał Sawicz
Inital unity8 commit.
23
2542.1.3 by Michael Zanetti
drop some legacy
24
  If its your first time, this will install the required dependencies to build and
25
  build it.
26
2542.1.6 by Michael Zanetti
unity-lens-applications -> unity-scope-click
27
  You might want to also install unity-scope-home and unity-scope-click which
2542.1.3 by Michael Zanetti
drop some legacy
28
  are technically "recommends", not strict dependencies
29
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
30
You may also rebuild with the -c for clean, which just deletes the build
31
directory.
1 by Michał Sawicz
Inital unity8 commit.
32
2.6.2 by Michał Sawicz
Do not add PPAs anymore and clean up build scripts and CODING accordingly.
33
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
34
Running Unity 8 on your desktop
35
===============================
1 by Michał Sawicz
Inital unity8 commit.
36
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
37
run the Unity 8 shell
38
---------------------
51.4.4 by Kevin Gunn
use trunk for suggested dir name & indent fixes
39
$ cd ~/unity8/trunk
2542.1.3 by Michael Zanetti
drop some legacy
40
$ cd builddir
41
42
Each component of unity8 can be ran independently for development and testing
43
For example:
44
$ make tryShell
45
$ make tryLauncher
46
$ make tryLockscreen
47
48
Check out the tests/qmltests/ directory for a list of things that can be ran.
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
49
1 by Michał Sawicz
Inital unity8 commit.
50
Notes
51
-----
52
- to navigate, utilize the mouse left button as you would your finger
2274.1.1 by Nick Dedekind
Sidestage load/unload redesign
53
- a three point drag (for side stage operations) can be performed by using
54
  the Shift+Control+Alt (all together) keyboard modifiers while using the mouse.
1 by Michał Sawicz
Inital unity8 commit.
55
- to get the translations work, currently you have to do make install to
56
  put the *.mo files into correct structure. We'll look for a better solution
57
  later.
58
  $ cd builddir; make install
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
59
- if you wish to populate contacts
60
  $ sudo apt-get install gir1.2-ebook-1.2
61
  $ manage-address-book.py create
62
  this will:
63
    - Create an EDS address book
64
    - Populate the address book with sample data
1 by Michał Sawicz
Inital unity8 commit.
65
2.6.2 by Michał Sawicz
Do not add PPAs anymore and clean up build scripts and CODING accordingly.
66
1.2.1 by Michał Sawicz
Update CODING for unity8 rename.
67
Running Unity 8 on devices
68
==========================
2542.1.3 by Michael Zanetti
drop some legacy
69
70
Running unity8 on a device should be done using crossbuilder.
2542.1.4 by Michael Zanetti
more detail
71
Go to 
72
* https://launchpad.net/crossbuilder and
73
* https://wiki.ubuntu.com/Touch/Crossbuilder 
74
for more details on crossbuilder.
75
76
unity8 will automatically restart on the phone once deployment
77
has finished due to post-build-steps set up in this repository.
1 by Michał Sawicz
Inital unity8 commit.
78
79
Coding guidelines
80
=================
81
The work-in-progress coding guidelines are available under:
82
https://launchpad.net/canonical-client-development-guidelines
83
84
85
Development Environment
86
=======================
45.1.1 by Kevin Gunn
updates to the CODING file for building & running
87
QtCreator (available via the Software Center) is the best IDE to hack on
88
Unity 8.
43.3.1 by Daniel d'Andrada
Update CODING
89
90
If using VIM, make sure you install some syntax highlighting for QML, like
91
https://github.com/peterhoeg/vim-qml
51.4.2 by Kevin Gunn
Update of CODING to reflect new unity8 & some user feedback
92
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
93
Running tests
94
=============
95
596.2.3 by Daniel d'Andrada
More info on the build directory
96
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.
97
the ./build.sh script).
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
98
99
To run the tests that do not require any graphical capability and therefore
100
are pretty fast run:
101
102
$ make test
103
104
or, alternatively:
105
106
$ ctest
107
108
To run all graphical tests, which can take a couple of minutes:
109
1831.2.1 by Albert Astals Cid
qmluitests changed name
110
$ make uitests
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
111
112
To run the tests for a single component/class:
113
114
$ make testComponentName
115
116
So, for the DragHandle component that would be:
117
118
$ make testDragHandle
119
1287.5.1 by Daniel d'Andrada
Add gdbTestComponentName build targets
120
To run the tests for a single component/class under gdb (so you can catch SEGFAULTS)
121
1287.5.4 by Daniel d'Andrada
s/gdbTest/gdbtest
122
$ make gdbtestComponentName
1287.5.1 by Daniel d'Andrada
Add gdbTestComponentName build targets
123
1777.3.2 by Michael Zanetti
move it a bit
124
To run a single test function of a single component/class:
125
126
$ make testComponentName FUNCTION="TestCaseName::functionName"
127
596.2.1 by Daniel d'Andrada
Update CODING with instructions on how to run tests
128
To run a test application that allow you to manually test or to simply try out
129
a given component:
130
131
$ make tryComponentName
132
133
So to try out, for instance, the DragHandle component, you would do:
134
135
$ make tryDragHandle
596.2.2 by Daniel d'Andrada
Add a note regarding lack of tryFoo targets for some classes
136
137
NB: Manual test or interation doesn't make sense for all components or classes,
138
particularly the non-graphical ones. In such cases no "tryFoo" make target is
139
provided.
621.2.1 by Albert Astals
Add some info about autopilot tests
140
141
Running autopilot tests
142
=======================
143
621.2.2 by Albert Astals
Make the autopilot target work
144
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.
145
the ./build.sh script).
621.2.2 by Albert Astals
Make the autopilot target work
146
635.2.14 by Leo Arias
Reverted the changes on CODING.
147
$ make autopilot
148
149
If you want you can also run tests individually, for that you need to install first,
150
otherwise the tests will run on the system-installed version
635.2.10 by Leo Arias
Fixed the install, updated the README.
151
152
$ make install
153
621.2.2 by Albert Astals
Make the autopilot target work
154
To see the list of existing autopilot tests you can do
155
1690.6.1 by Albert Astals Cid
We use autopilot3 now
156
$ PYTHONPATH=../tests/autopilot autopilot3 list unity8
621.2.1 by Albert Astals
Add some info about autopilot tests
157
158
And then run a single test with
159
1621.2.1 by Leo Arias
Removed the py2 support.
160
$ PYTHONPATH=../tests/autopilot autopilot3 run unity8.some.very.long.test.name
621.2.2 by Albert Astals
Make the autopilot target work
161
162
or run them all with
163
1621.2.1 by Leo Arias
Removed the py2 support.
164
$ PYTHONPATH=../tests/autopilot autopilot3 run unity8