on f2c2cdb help sign in
unity8/CODING
138 lines 4.4 kB history raw
1Building Unity 8
2================
4Only Ubuntu 13.10 (saucy) is supported as a developement environment.
6download source
7---------------
8- create a parent folder to not pollute your setup. so that you can have different unity
9 branches there (trunk, WIP etc)
11 $ mkdir ~/unity8
13- fetch Unity 8 source
14 $ sudo apt-get install bzr
15 $ bzr branch lp:unity8 ~/unity8/trunk
16 $ cd ~/unity8/trunk
18install dependencies
19--------------------
20If its your first time, install build dependencies
22$ cd ~/unity8/trunk
23$ ./build --setup
25 this will:
26 - add ppa:ubuntu-unity/next
27 - install the required dependencies to build, as well as run on the desktop
28 - it should also install unity-scope-home and unity-lens-application which
29 are technically "recommends", not strict dependencies
31Note, once the PPA is added, the script runs apt-get update, if you have
32any failures associated with it, the build script will bail out of the setup
33and fail to install all the required dependencies.
36build Unity 8
37-------------
39$ cd ~/unity8/trunk
40$ ./build
42You may also rebuild with the -c for clean, which just deletes the build
43directory.
46Running Unity 8 on your desktop
47===============================
49run the Unity 8 shell
50---------------------
51$ cd ~/unity8/trunk
52$ ./run
54Options can be passed to test the lock screen
55$ ./run -p OR -k
57-p is for pin lock, for which the default prompt answer is "1234"
58-k is for keylock passphrase, for which the default prompt answer is "password"
60Notes
61-----
62- to navigate, utilize the mouse left button as you would your finger
63- to get the translations work, currently you have to do make install to
64 put the *.mo files into correct structure. We'll look for a better solution
65 later.
66 $ cd builddir; make install
67- if you wish to populate contacts
68 $ sudo apt-get install gir1.2-ebook-1.2
69 $ manage-address-book.py create
70 this will:
71 - Create an EDS address book
72 - Populate the address book with sample data
75Running Unity 8 on devices
76==========================
77- Ubuntu Touch builds are currently only available in 13.10 flavour
78- supported hardware should match one those listed here
79 https://wiki.ubuntu.com/Touch/Devices#Running_fine
80- follow the Ubuntu Touch install instructions for your chosen device
81 https://wiki.ubuntu.com/Touch/Install
82- make sure your device is connected to a WiFi network
83- If you haven’t already or if you’ve just freshly flashed your device
84 make sure you run phablet-network-setup which will allow package updates to
85 the device
86- also make sure you have your SSH key in ~/.ssh/id_rsa.pub (or install one
87 on the device yourself)
89$ cd ~/unity/trunk
90$ ./run_on_device --setup
91 this will:
92 - install your public SSH key on the device
93 - install the needed dependencies
95$ ./run_on_device
96 this will:
97 - rsync the code to the device
98 - build on the device
99 - replace the running shell
101Options can be passed to test the lock screen
102$ ./run_on_device -p OR -k
104-p is for pin lock, for which the default prompt answer is "1234"
105-k is for keylock passphrase, for which the default prompt answer is "password"
107Notes
108-----
109- using adb over TCP has some advantages, Google will be of help here
110 - NOTE: this is not yet available for flipped images
111 - TL;DR: `adb tcpip 5555; adb connect $your_device_ip`
112 - you can persist the above via `adb shell setprop persist.adb.tcp.port 5555`
113 - it's unsafe - anyone can connect to your device
114 - with TCP the Nexus 10 doesn't drop the adb connection when locking
115 the screen
116- exporting ANDROID_SERIAL=$your_device_serial or
117 ANDROID_SERIAL=$your_device_ip:5555 will make adb not complain about
118 multiple devices
119- you can export TARGET_IP=$your_device_ip TARGET_SSH_PORT=22 for run_on_device
120 to not use adb forwarding - useful if you use multiple devices
121- using Ninja (package ninja-build - run_on_device -s installs this now)
122 will improve build times (especially in the nothing-to-build case)
125Coding guidelines
126=================
127The work-in-progress coding guidelines are available under:
128https://launchpad.net/canonical-client-development-guidelines
131Development Environment
132=======================
133QtCreator (available via the Software Center) is the best IDE to hack on
134Unity 8.
136If using VIM, make sure you install some syntax highlighting for QML, like
137https://github.com/peterhoeg/vim-qml