Merge lp:~alan-griffiths/mir/update-docs into lp:mir
- update-docs
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4245 |
Proposed branch: | lp:~alan-griffiths/mir/update-docs |
Merge into: | lp:mir |
Diff against target: |
756 lines (+282/-399) 10 files modified
HACKING.md (+1/-33) doc/Doxyfile.in (+3/-1) doc/building_source_for_pc.md (+0/-101) doc/demo_server_controls.md (+0/-69) doc/getting_and_using_mir.md (+106/-0) doc/getting_involved_in_mir.md (+106/-0) doc/installing_prebuilt_on_pc.md (+0/-8) doc/introducing_the_miral_api.md (+25/-0) doc/mainpage.md (+41/-96) doc/using_mir_on_pc.md (+0/-91) |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/update-docs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+330343@code.launchpad.net |
Commit message
Updating docs (including integrating MirAL documentation)
Description of the change
Alan Griffiths (alan-griffiths) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4242
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'HACKING.md' | |||
2 | --- HACKING.md 2017-05-08 03:04:26 +0000 | |||
3 | +++ HACKING.md 2017-09-07 10:01:02 +0000 | |||
4 | @@ -1,38 +1,6 @@ | |||
5 | 1 | Mir hacking guide | 1 | Mir hacking guide |
6 | 2 | ================= | 2 | ================= |
7 | 3 | 3 | ||
8 | 4 | Getting Mir | ||
9 | 5 | ----------- | ||
10 | 6 | |||
11 | 7 | If you're reading this file then you've probably solved this one. ;) | ||
12 | 8 | |||
13 | 9 | However, for completeness Mir is a project on LaunchPad (https://launchpad.net/mir) | ||
14 | 10 | to grab a copy use the command: | ||
15 | 11 | |||
16 | 12 | $ bzr branch lp:mir | ||
17 | 13 | |||
18 | 14 | |||
19 | 15 | Getting dependencies | ||
20 | 16 | -------------------- | ||
21 | 17 | To succesfully build Mir there are a few packages required: | ||
22 | 18 | |||
23 | 19 | $ apt-get install devscripts equivs cmake | ||
24 | 20 | $ mk-build-deps --install --tool "apt-get -y" --build-dep debian/control | ||
25 | 21 | |||
26 | 22 | |||
27 | 23 | Building Mir | ||
28 | 24 | ----------- | ||
29 | 25 | |||
30 | 26 | Mir is built using cmake. There are other options, but here's one way to | ||
31 | 27 | build the system: | ||
32 | 28 | |||
33 | 29 | $ mkdir build | ||
34 | 30 | $ cd build | ||
35 | 31 | $ cmake .. | ||
36 | 32 | $ make -j 8 | ||
37 | 33 | $ ctest | ||
38 | 34 | |||
39 | 35 | |||
40 | 36 | Coding Mir | 4 | Coding Mir |
41 | 37 | ---------- | 5 | ---------- |
42 | 38 | 6 | ||
43 | @@ -109,7 +77,7 @@ | |||
44 | 109 | you need to know to get it working, and also to prevent your existing X server | 77 | you need to know to get it working, and also to prevent your existing X server |
45 | 110 | from dying at the same time. | 78 | from dying at the same time. |
46 | 111 | 79 | ||
48 | 112 | - \ref using_mir_on_pc | 80 | - \ref getting_and_using_mir |
49 | 113 | 81 | ||
50 | 114 | You can configure Mir to provide runtime information helpful for debugging | 82 | You can configure Mir to provide runtime information helpful for debugging |
51 | 115 | by enabling component reports: | 83 | by enabling component reports: |
52 | 116 | 84 | ||
53 | === modified file 'doc/Doxyfile.in' | |||
54 | --- doc/Doxyfile.in 2017-08-25 10:02:30 +0000 | |||
55 | +++ doc/Doxyfile.in 2017-09-07 10:01:02 +0000 | |||
56 | @@ -876,7 +876,9 @@ | |||
57 | 876 | # exclude all test directories for example use the pattern */test/* | 876 | # exclude all test directories for example use the pattern */test/* |
58 | 877 | 877 | ||
59 | 878 | EXCLUDE_PATTERNS = *.capnp.c++ \ | 878 | EXCLUDE_PATTERNS = *.capnp.c++ \ |
61 | 879 | */examples/multi_stream.cpp | 879 | @CMAKE_CURRENT_SOURCE_DIR@/include/server/* \ |
62 | 880 | @CMAKE_CURRENT_SOURCE_DIR@/include/test/mir/* \ | ||
63 | 881 | @CMAKE_CURRENT_SOURCE_DIR@/examples/multi_stream.cpp | ||
64 | 880 | 882 | ||
65 | 881 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names | 883 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names |
66 | 882 | # (namespaces, classes, functions, etc.) that should be excluded from the | 884 | # (namespaces, classes, functions, etc.) that should be excluded from the |
67 | 883 | 885 | ||
68 | === removed file 'doc/building_source_for_pc.md' | |||
69 | --- doc/building_source_for_pc.md 2017-05-08 03:04:26 +0000 | |||
70 | +++ doc/building_source_for_pc.md 1970-01-01 00:00:00 +0000 | |||
71 | @@ -1,101 +0,0 @@ | |||
72 | 1 | Building the source for a PC {#building_source_for_pc} | ||
73 | 2 | ============================ | ||
74 | 3 | |||
75 | 4 | Getting Mir | ||
76 | 5 | ----------- | ||
77 | 6 | |||
78 | 7 | Mir is a project on Launchpad (https://launchpad.net/mir). To grab a copy use | ||
79 | 8 | the command: | ||
80 | 9 | |||
81 | 10 | $ bzr branch lp:mir | ||
82 | 11 | |||
83 | 12 | The command above will download the latest development version of Mir into | ||
84 | 13 | the 'mir' directory (called the 'project directory' from now on). | ||
85 | 14 | |||
86 | 15 | Getting dependencies | ||
87 | 16 | -------------------- | ||
88 | 17 | |||
89 | 18 | To succesfully build Mir there are a few packages required. The easiest way | ||
90 | 19 | to get them is to use the packaging build dependencies: | ||
91 | 20 | |||
92 | 21 | $ sudo apt-get install devscripts equivs cmake | ||
93 | 22 | |||
94 | 23 | Then, in the project directory: | ||
95 | 24 | |||
96 | 25 | $ sudo mk-build-deps -i | ||
97 | 26 | |||
98 | 27 | |||
99 | 28 | Building Mir | ||
100 | 29 | ------------ | ||
101 | 30 | |||
102 | 31 | Mir is built using CMake. You first need to create the build directory and | ||
103 | 32 | configure the build. In the project directory do: | ||
104 | 33 | |||
105 | 34 | $ mkdir build | ||
106 | 35 | $ cd build | ||
107 | 36 | $ cmake .. (possibly passing configuration options to CMake) | ||
108 | 37 | |||
109 | 38 | There are many configuration options for the Mir project. The default options | ||
110 | 39 | will work fine, but you may want to customize the build depending on your | ||
111 | 40 | needs. The best way to get an overview and set them is to use the cmake-gui | ||
112 | 41 | tool: | ||
113 | 42 | |||
114 | 43 | $ cmake-gui .. | ||
115 | 44 | |||
116 | 45 | The next step is to build the source and run the tests: | ||
117 | 46 | |||
118 | 47 | $ make (-j8) | ||
119 | 48 | $ ctest | ||
120 | 49 | |||
121 | 50 | |||
122 | 51 | Running Mir | ||
123 | 52 | ----------- | ||
124 | 53 | |||
125 | 54 | The binaries created in the bin subdirectory of the project directory can be | ||
126 | 55 | used directly. For example, | ||
127 | 56 | |||
128 | 57 | $ bin/mir_demo_server --launch-client bin/mir_demo_client_multiwin | ||
129 | 58 | |||
130 | 59 | Other examples described elsewhere in this documentation assume you're using the | ||
131 | 60 | installed version and simply need "bin/" adding to specify the local build. | ||
132 | 61 | |||
133 | 62 | |||
134 | 63 | Install Mir | ||
135 | 64 | ----------- | ||
136 | 65 | |||
137 | 66 | *It should not be necessary to install Mir for experimental purposes (see | ||
138 | 67 | "Running Mir" above).* Further, if you are using an Ubuntu derived disto then | ||
139 | 68 | there's likely to be existing Mir binaries elsewhere that may interact badly | ||
140 | 69 | with a second install. | ||
141 | 70 | |||
142 | 71 | To install Mir just use the normal make install command: | ||
143 | 72 | |||
144 | 73 | $ sudo make install | ||
145 | 74 | |||
146 | 75 | This will install the Mir libraries, executable, example clients and header | ||
147 | 76 | files to the configured installation location (/usr/local by default). | ||
148 | 77 | |||
149 | 78 | NB You may need "sudo ldconfig" to refresh the cache before the installed | ||
150 | 79 | programs work. | ||
151 | 80 | |||
152 | 81 | If you install to a non-standard location, keep in mind that you will probably | ||
153 | 82 | need to properly set the PKG_CONFIG_PATH environment variable to allow other | ||
154 | 83 | applications to build against Mir, and LD_LIBRARY_PATH to allow applications to | ||
155 | 84 | find the Mir libraries at runtime. | ||
156 | 85 | |||
157 | 86 | |||
158 | 87 | Building Mesa | ||
159 | 88 | ------------- | ||
160 | 89 | |||
161 | 90 | *The Mesa packages shipped with Ubuntu are already built with the relevant Mir patches | ||
162 | 91 | and should work out of the box with Mir.* | ||
163 | 92 | |||
164 | 93 | For GL accelerated clients to use Mir they need to use a patched version of Mesa | ||
165 | 94 | that supports Mir. | ||
166 | 95 | |||
167 | 96 | The patch is hosted on GitHub: | ||
168 | 97 | |||
169 | 98 | $ git clone https://github.com/RAOF/mesa.git | ||
170 | 99 | |||
171 | 100 | Compile as per normal instructions and pass --with-egl-platforms="mir,drm" to | ||
172 | 101 | the configure options. You will need libmirclient installed as shown above. | ||
173 | 102 | 0 | ||
174 | === removed file 'doc/demo_server_controls.md' | |||
175 | --- doc/demo_server_controls.md 2017-05-08 03:04:26 +0000 | |||
176 | +++ doc/demo_server_controls.md 1970-01-01 00:00:00 +0000 | |||
177 | @@ -1,69 +0,0 @@ | |||
178 | 1 | Demo Server {#demo_server} | ||
179 | 2 | =========== | ||
180 | 3 | |||
181 | 4 | Mir's demo server (`mir_demo_server`) is an example of using the Mir to | ||
182 | 5 | build a server. It uses only functionality supported by the public Mir API. | ||
183 | 6 | |||
184 | 7 | Running Demo Server | ||
185 | 8 | ------------------- | ||
186 | 9 | |||
187 | 10 | Remember to always run `mir_demo_server` as root on PC (not required on | ||
188 | 11 | Android), as this is required for input device support (open bug | ||
189 | 12 | https://bugs.launchpad.net/mir/+bug/1286252); | ||
190 | 13 | |||
191 | 14 | sudo mir_demo_server | ||
192 | 15 | |||
193 | 16 | And if you're not already on the VT you wish to use, that needs to be | ||
194 | 17 | specified: | ||
195 | 18 | |||
196 | 19 | sudo mir_demo_server --vt 1 | ||
197 | 20 | |||
198 | 21 | There are plenty more options available if you run: | ||
199 | 22 | |||
200 | 23 | mir_demo_server --help | ||
201 | 24 | |||
202 | 25 | The following operations are supported: | ||
203 | 26 | |||
204 | 27 | - Quit (shut down the Mir server): *Ctrl-Alt-Backspace* | ||
205 | 28 | - Switch back to X: *Ctrl-Alt-F7* | ||
206 | 29 | - Switch virtual terminals (VTs): *Ctrl-Alt-(F1-F12)* | ||
207 | 30 | - Switch apps: *Alt-Tab*, tap or click on the corresponding app | ||
208 | 31 | - Close app: *Alt-F4* | ||
209 | 32 | - Switch window within app: *Alt-`*, tap or click on the window | ||
210 | 33 | - Close surface: *Ctrl-F4* | ||
211 | 34 | - Move window: *Alt-leftmousebutton* drag | ||
212 | 35 | - Resize window: *Alt-middle_button* drag | ||
213 | 36 | - Maximize/restore current window: *Alt-F11* | ||
214 | 37 | - Vertically maximize/restore current window: *Shift-F11* | ||
215 | 38 | - Horizontally maximize/restore current window: *Ctrl-F11* | ||
216 | 39 | |||
217 | 40 | For those writing client code request to set the surface attribute | ||
218 | 41 | `mir_surface_attrib_state` are honoured: | ||
219 | 42 | - `mir_window_state_restored`: restores the window | ||
220 | 43 | - `mir_window_state_maximized`: maximizes size | ||
221 | 44 | - `mir_window_state_vertmaximized`: maximizes height | ||
222 | 45 | - `mir_window_state_horizmaximized`: maximizes width | ||
223 | 46 | |||
224 | 47 | For a quick demo try: | ||
225 | 48 | |||
226 | 49 | sudo DISPLAY= mir_demo_server --vt 1 --launch bin/mir_demo_client_egltriangle\ | ||
227 | 50 | --test-client bin/mir_demo_client_multiwin --test-timeout 60 | ||
228 | 51 | |||
229 | 52 | (Remember to unwrap the line) | ||
230 | 53 | |||
231 | 54 | ### Tiling Window Manager | ||
232 | 55 | |||
233 | 56 | One option that needs elaboration is "--window-manager tiling". | ||
234 | 57 | |||
235 | 58 | This starts a (rather primitive) tiling window manager. It tracks the available | ||
236 | 59 | displays and splits the available workspace into "tiles" (one per client). | ||
237 | 60 | |||
238 | 61 | For a quick demo try: | ||
239 | 62 | |||
240 | 63 | sudo DISPLAY= mir_demo_server --vt 1 --launch bin/mir_demo_client_egltriangle\ | ||
241 | 64 | --test-client bin/mir_demo_client_multiwin --test-timeout 60\ | ||
242 | 65 | --window-manager tiling | ||
243 | 66 | |||
244 | 67 | (Remember to unwrap the line) | ||
245 | 68 | |||
246 | 69 | Want more? Log your requests at: https://bugs.launchpad.net/mir/+filebug | ||
247 | 70 | 0 | ||
248 | === added file 'doc/getting_and_using_mir.md' | |||
249 | --- doc/getting_and_using_mir.md 1970-01-01 00:00:00 +0000 | |||
250 | +++ doc/getting_and_using_mir.md 2017-09-07 10:01:02 +0000 | |||
251 | @@ -0,0 +1,106 @@ | |||
252 | 1 | Getting and Using Mir {#getting_and_using_mir} | ||
253 | 2 | ===================== | ||
254 | 3 | |||
255 | 4 | Getting Mir examples | ||
256 | 5 | -------------------- | ||
257 | 6 | |||
258 | 7 | You can install the Mir examples as follows: | ||
259 | 8 | |||
260 | 9 | $ sudo apt install mir-demos qterminal | ||
261 | 10 | $ sudo apt install mir-graphics-drivers-desktop qtubuntu-desktop | ||
262 | 11 | |||
263 | 12 | Using Mir examples | ||
264 | 13 | ------------------ | ||
265 | 14 | |||
266 | 15 | For convenient testing there's a "miral-app" script that wraps the commands used | ||
267 | 16 | to start a server and then launches a terminal (as the current user): | ||
268 | 17 | |||
269 | 18 | $ miral-app | ||
270 | 19 | |||
271 | 20 | To run independently of X11 you need to grant access to the graphics hardware | ||
272 | 21 | (by running as root) and specify a VT to run in. There's a "miral-desktop" | ||
273 | 22 | script that wraps to start the server (as root) and then launch a terminal | ||
274 | 23 | (as the current user): | ||
275 | 24 | |||
276 | 25 | $ miral-desktop | ||
277 | 26 | |||
278 | 27 | For more options see *Options when running the Mir example shell* below. | ||
279 | 28 | |||
280 | 29 | ### Running applications on Mir | ||
281 | 30 | |||
282 | 31 | If you use the command-line launched by miral-app or miral-desktop native Mir | ||
283 | 32 | applications (which include native Mir clients and those that use SDL or the | ||
284 | 33 | GTK+, Qt toolkits) can be started as usual: | ||
285 | 34 | |||
286 | 35 | $ mir_demo_client_egltriangle | ||
287 | 36 | $ gedit | ||
288 | 37 | $ sudo apt install kate neverball | ||
289 | 38 | $ kate | ||
290 | 39 | $ neverball | ||
291 | 40 | |||
292 | 41 | From outside the MirAL session GTK+, Qt and SDL applications can still be run | ||
293 | 42 | using the miral-run script: | ||
294 | 43 | |||
295 | 44 | $ miral-run gedit | ||
296 | 45 | $ miral-run 7kaa | ||
297 | 46 | |||
298 | 47 | ### Running for X11 applications | ||
299 | 48 | |||
300 | 49 | If you want to run X11 applications that do not have native Mir support in the | ||
301 | 50 | toolkit they use then the answer is Xmir: an X11 server that runs on Mir. First | ||
302 | 51 | you need Xmir installed: | ||
303 | 52 | |||
304 | 53 | $ sudo apt install xmir | ||
305 | 54 | |||
306 | 55 | Then once you have started a miral shell (as above) you can use miral-xrun to | ||
307 | 56 | run applications under Xmir: | ||
308 | 57 | |||
309 | 58 | $ miral-xrun firefox | ||
310 | 59 | |||
311 | 60 | This automatically starts a Xmir X11 server on a new $DISPLAY for the | ||
312 | 61 | application to use. You can use miral-xrun both from a command-line outside the | ||
313 | 62 | miral-shell or, for example, from the terminal running in the shell. | ||
314 | 63 | |||
315 | 64 | ### Options when running the Mir example shell | ||
316 | 65 | |||
317 | 66 | #### Script Options | ||
318 | 67 | |||
319 | 68 | Both the "miral-app" and "miral-desktop" scripts provide options for using an | ||
320 | 69 | alternative example shell (miral-kiosk) and an alternative to gnome-terminal. | ||
321 | 70 | |||
322 | 71 | -kiosk use miral-kiosk instead of miral-shell | ||
323 | 72 | -launcher <launcher> use <launcher> instead of qterminal | ||
324 | 73 | |||
325 | 74 | In addition miral-desktop has the option to set the VT that is used: | ||
326 | 75 | |||
327 | 76 | -vt <termid> set the virtual terminal [4] | ||
328 | 77 | |||
329 | 78 | There are some additional options (listed with "-h") but those are the important | ||
330 | 79 | ones. | ||
331 | 80 | |||
332 | 81 | #### miral-shell Options | ||
333 | 82 | |||
334 | 83 | The scripts can also be used to pass options to Mir: they pass everything on | ||
335 | 84 | the command-line following the first thing they don't understand. These can be | ||
336 | 85 | listed by `miral-shell --help`. Most of these options are inherited from Mir, | ||
337 | 86 | but the following MirAL specific are likely to be of interest: | ||
338 | 87 | |||
339 | 88 | --window-management-trace log trace message | ||
340 | 89 | |||
341 | 90 | Probably the main use for MirAL is to test window-management (either of a | ||
342 | 91 | toolkit or of a server) and this logs all calls to and from the window | ||
343 | 92 | management policy. This option is supported directly in the MirAL library and | ||
344 | 93 | works for any MirAL based shell - even one you write yourself. | ||
345 | 94 | |||
346 | 95 | --keymap arg (=us) keymap <layout>[+<variant>[+<options>]] | ||
347 | 96 | , e,g, "gb" or "cz+qwerty" or | ||
348 | 97 | "de++compose:caps" | ||
349 | 98 | |||
350 | 99 | For those of us not in the USA this is very useful. Both the -shell and -kiosk | ||
351 | 100 | examples support this option. | ||
352 | 101 | |||
353 | 102 | --window-manager arg (=floating) window management strategy | ||
354 | 103 | [{floating|tiling|system-compositor}] | ||
355 | 104 | |||
356 | 105 | Is only supported by miral-shell and its main use is to allow an alternative | ||
357 | 106 | "tiling" window manager to be selected. | ||
358 | 0 | 107 | ||
359 | === added file 'doc/getting_involved_in_mir.md' | |||
360 | --- doc/getting_involved_in_mir.md 1970-01-01 00:00:00 +0000 | |||
361 | +++ doc/getting_involved_in_mir.md 2017-09-07 10:01:02 +0000 | |||
362 | @@ -0,0 +1,106 @@ | |||
363 | 1 | Getting Involved in Mir {#getting_involved_in_mir} | ||
364 | 2 | ======================= | ||
365 | 3 | |||
366 | 4 | Getting involved | ||
367 | 5 | ---------------- | ||
368 | 6 | |||
369 | 7 | The best place to ask questions and discuss about the Mir project is | ||
370 | 8 | the \#ubuntu-mir IRC channel on freenode. | ||
371 | 9 | |||
372 | 10 | The Mir project is hosted on Launchpad: https://launchpad.net/mir | ||
373 | 11 | |||
374 | 12 | Building Mir | ||
375 | 13 | ------------ | ||
376 | 14 | |||
377 | 15 | These instructions assume that you’re using Ubuntu 16.04LTS or later, I’ve not | ||
378 | 16 | earlier Ubuntu versions or other distributions. | ||
379 | 17 | |||
380 | 18 | You’ll need a few development and utility packages installed, along with the | ||
381 | 19 | Mir graphics drivers: | ||
382 | 20 | |||
383 | 21 | $ sudo apt install devscripts equivs bzr | ||
384 | 22 | $ sudo apt install mir-graphics-drivers-desktop | ||
385 | 23 | |||
386 | 24 | If you’re working on a phone or tablet use mir-graphics-drivers-android in | ||
387 | 25 | place of mir-graphics-drivers-desktop. (See \ref building_source_for_arm for | ||
388 | 26 | |||
389 | 27 | |||
390 | 28 | With these installed you can checkout and build Mir: | ||
391 | 29 | |||
392 | 30 | $ bzr branch lp:mir | ||
393 | 31 | $ sudo mk-build-deps -i | ||
394 | 32 | $ mkdir mir/build | ||
395 | 33 | $ cd mir/build | ||
396 | 34 | $ cmake .. | ||
397 | 35 | $ make | ||
398 | 36 | |||
399 | 37 | This creates an example shell (miral-shell) in the bin directory. This can be | ||
400 | 38 | run directly: | ||
401 | 39 | |||
402 | 40 | $ bin/miral-shell | ||
403 | 41 | |||
404 | 42 | With the default options this runs in a window on X (which is convenient for | ||
405 | 43 | development). | ||
406 | 44 | |||
407 | 45 | The miral-shell example is simple, don’t expect to see a sophisticated launcher | ||
408 | 46 | by default. You can start mir apps from the command-line. For example: | ||
409 | 47 | |||
410 | 48 | $ bin/miral-run gnome-terminal | ||
411 | 49 | |||
412 | 50 | That’s right, a lot of standard GTK+ applications will “just work” (the GDK | ||
413 | 51 | toolkit has a Mir backend). Any that assume the existence of an X11 and bypass | ||
414 | 52 | the toolkit my making X11 protocol calls will have problems though. | ||
415 | 53 | |||
416 | 54 | To exit from miral-shell press Ctrl-Alt-BkSp. | ||
417 | 55 | |||
418 | 56 | You can install the Mir examples, headers and libraries you've built with: | ||
419 | 57 | |||
420 | 58 | $ sudo make install | ||
421 | 59 | |||
422 | 60 | ### Preparing a VM to run Mir | ||
423 | 61 | |||
424 | 62 | Especially if you want to debug the shell without locking your system this might be a helpful setup: | ||
425 | 63 | |||
426 | 64 | - \ref setup_kvm_for_mir | ||
427 | 65 | - \ref setup_vmware_for_mir | ||
428 | 66 | |||
429 | 67 | ### Contributing to Mir | ||
430 | 68 | |||
431 | 69 | Currently, the Mir code activity is performed on a development branch: | ||
432 | 70 | lp:~mir-team/mir/development-branch | ||
433 | 71 | |||
434 | 72 | This development branch is promoted to the branch used for the ubuntu archive | ||
435 | 73 | and touch images. Please submit any merge proposals against the development | ||
436 | 74 | branch. | ||
437 | 75 | |||
438 | 76 | Please file bug reports at: https://bugs.launchpad.net/mir | ||
439 | 77 | |||
440 | 78 | The Mir development mailing list can be found at: https://lists.ubuntu.com/mailman/listinfo/Mir-devel | ||
441 | 79 | |||
442 | 80 | The Mir coding guidelines are [here](cppguide/index.html). | ||
443 | 81 | |||
444 | 82 | ### Working on Mir code | ||
445 | 83 | |||
446 | 84 | - \ref md_README "Mir Read me" | ||
447 | 85 | - \ref md_HACKING "Mir hacking guide" | ||
448 | 86 | - \ref component_reports | ||
449 | 87 | - \ref dso_versioning_guide | ||
450 | 88 | - \ref abi_compatibility_tools | ||
451 | 89 | - \ref performance_framework | ||
452 | 90 | - \ref latency "Measuring visual latency" | ||
453 | 91 | |||
454 | 92 | Building Mesa | ||
455 | 93 | ------------- | ||
456 | 94 | |||
457 | 95 | *The Mesa packages shipped with Ubuntu are already built with the relevant Mir patches | ||
458 | 96 | and should work out of the box with Mir.* | ||
459 | 97 | |||
460 | 98 | For GL accelerated clients to use Mir they need to use a patched version of Mesa | ||
461 | 99 | that supports Mir. | ||
462 | 100 | |||
463 | 101 | The patch is hosted on GitHub: | ||
464 | 102 | |||
465 | 103 | $ git clone https://github.com/RAOF/mesa.git | ||
466 | 104 | |||
467 | 105 | Compile as per normal instructions and pass --with-egl-platforms="mir,drm" to | ||
468 | 106 | the configure options. You will need libmirclient installed as shown above. | ||
469 | 0 | 107 | ||
470 | === removed file 'doc/installing_prebuilt_on_pc.md' | |||
471 | --- doc/installing_prebuilt_on_pc.md 2016-01-29 08:18:22 +0000 | |||
472 | +++ doc/installing_prebuilt_on_pc.md 1970-01-01 00:00:00 +0000 | |||
473 | @@ -1,8 +0,0 @@ | |||
474 | 1 | Installing pre-built packages on a PC {#installing_prebuilt_on_pc} | ||
475 | 2 | ===================================== | ||
476 | 3 | |||
477 | 4 | Install Ubuntu 13.10 or later if you haven't done so already. Uninstall any | ||
478 | 5 | proprietary drivers (-nvidia, -fglrx) and reboot on the FOSS drivers. | ||
479 | 6 | |||
480 | 7 | sudo apt-get update | ||
481 | 8 | sudo apt-get install mir-demos | ||
482 | 9 | 0 | ||
483 | === added file 'doc/introducing_the_miral_api.md' | |||
484 | --- doc/introducing_the_miral_api.md 1970-01-01 00:00:00 +0000 | |||
485 | +++ doc/introducing_the_miral_api.md 2017-09-07 10:01:02 +0000 | |||
486 | @@ -0,0 +1,25 @@ | |||
487 | 1 | Introducing the Miral API {#introducing_the_miral_api} | ||
488 | 2 | ========================= | ||
489 | 3 | |||
490 | 4 | The main() program | ||
491 | 5 | ------------------ | ||
492 | 6 | |||
493 | 7 | The main() program from miral-shell looks like this: | ||
494 | 8 | |||
495 | 9 | \include shell_main.cpp | ||
496 | 10 | |||
497 | 11 | This shell is providing FloatingWindowManagerPolicy, TilingWindowManagerPolicy | ||
498 | 12 | and SpinnerSplash. The rest is from MirAL. | ||
499 | 13 | |||
500 | 14 | If you look for the corresponding code in lp:qtmir and lp:mir you’ll find it | ||
501 | 15 | less clear, more verbose and scattered over multiple files. | ||
502 | 16 | |||
503 | 17 | A shell has to provide a window management policy (miral-shell provides two: | ||
504 | 18 | FloatingWindowManagerPolicy and TilingWindowManagerPolicy). A window management | ||
505 | 19 | policy needs to implement the \ref miral::WindowManagementPolicy interface for | ||
506 | 20 | handling a set of window management events. | ||
507 | 21 | |||
508 | 22 | The way these events are handled determines the behaviour of the shell. | ||
509 | 23 | |||
510 | 24 | The \ref miral::WindowManagerTools interface provides the principle methods for | ||
511 | 25 | a window management policy to control Mir. | ||
512 | 0 | 26 | ||
513 | === modified file 'doc/mainpage.md' | |||
514 | --- doc/mainpage.md 2017-09-06 11:04:56 +0000 | |||
515 | +++ doc/mainpage.md 2017-09-07 10:01:02 +0000 | |||
516 | @@ -3,103 +3,48 @@ | |||
517 | 3 | 3 | ||
518 | 4 | Mir is a next generation display server targeted as a replacement for the X | 4 | Mir is a next generation display server targeted as a replacement for the X |
519 | 5 | window server system to unlock next-generation user experiences for devices | 5 | window server system to unlock next-generation user experiences for devices |
523 | 6 | ranging from Linux desktop to mobile devices powered by Ubuntu. The primary | 6 | ranging from Linux desktop to mobile and IoT devices powered by Ubuntu. |
524 | 7 | purpose of Mir is to enable the development of the next generation | 7 | |
525 | 8 | [Unity](http://unity.ubuntu.com). | 8 | - If you just want to try out the Mir demos, see: \ref getting_and_using_mir |
526 | 9 | |||
527 | 10 | - If you want to get involved in Mir development, see: \ref getting_involved_in_mir | ||
528 | 11 | |||
529 | 12 | Using Mir for client development | ||
530 | 13 | -------------------------------- | ||
531 | 14 | |||
532 | 15 | Install the headers and libraries for using libmirclient in development: | ||
533 | 16 | |||
534 | 17 | $ sudo apt install libmirclient-dev | ||
535 | 18 | |||
536 | 19 | A `miral.pc` file is provided for use with `pkg-config` or other tools. For | ||
537 | 20 | example: | ||
538 | 21 | |||
539 | 22 | $ pkg-config --cflags mirclient | ||
540 | 23 | |||
541 | 24 | The client API documentation is here: \ref mir_toolkit | ||
542 | 25 | |||
543 | 26 | Using Mir for server development | ||
544 | 27 | -------------------------------- | ||
545 | 28 | |||
546 | 29 | Install the headers and libraries for using libmiral in development: | ||
547 | 30 | |||
548 | 31 | $ sudo apt install libmirserver-dev | ||
549 | 32 | |||
550 | 33 | A `miral.pc` file is provided for use with `pkg-config` or other tools. For | ||
551 | 34 | example: | ||
552 | 35 | |||
553 | 36 | $ pkg-config --cflags miral | ||
554 | 37 | |||
555 | 38 | The server API is introduced here: \ref introducing_the_miral_api | ||
556 | 39 | |||
557 | 40 | The Mir Documentation | ||
558 | 41 | --------------------- | ||
559 | 42 | |||
560 | 43 | The Mir documentation can be installed and read like this: | ||
561 | 44 | |||
562 | 45 | $ sudo apt install mir-doc | ||
563 | 46 | $ xdg-open /usr/share/doc/mir-doc/html/index.html | ||
564 | 9 | 47 | ||
565 | 10 | More detailed information about the motivation, scope, and high-level design | 48 | More detailed information about the motivation, scope, and high-level design |
566 | 11 | of Mir can be found at http://wiki.ubuntu.com/MirSpec . | 49 | of Mir can be found at http://wiki.ubuntu.com/MirSpec . |
567 | 12 | 50 | ||
568 | 13 | Getting and installing Mir | ||
569 | 14 | -------------------------- | ||
570 | 15 | |||
571 | 16 | ### Using pre-built packages | ||
572 | 17 | |||
573 | 18 | If you just want to try out mir, or write client applications, then the easiest | ||
574 | 19 | way is to use the pre-built packages: | ||
575 | 20 | |||
576 | 21 | - \ref installing_prebuilt_on_pc | ||
577 | 22 | |||
578 | 23 | ### Building and installing from source | ||
579 | 24 | |||
580 | 25 | If you are curious about Mir internals or intend to contribute to it, you should | ||
581 | 26 | get the source and build it: | ||
582 | 27 | |||
583 | 28 | - \ref building_source_for_pc | ||
584 | 29 | - \ref building_source_for_arm | ||
585 | 30 | |||
586 | 31 | ### Preparing a VM to run Mir | ||
587 | 32 | |||
588 | 33 | Especially if you want to debug the shell without locking your system this might be a helpful setup: | ||
589 | 34 | |||
590 | 35 | - \ref setup_kvm_for_mir | ||
591 | 36 | - \ref setup_vmware_for_mir | ||
592 | 37 | |||
593 | 38 | Using Mir | ||
594 | 39 | --------- | ||
595 | 40 | |||
596 | 41 | - \ref using_mir_on_pc | ||
597 | 42 | - \ref demo_server | ||
598 | 43 | |||
599 | 44 | Getting involved | ||
600 | 45 | ---------------- | ||
601 | 46 | |||
602 | 47 | The best place to ask questions and discuss about the Mir project is | ||
603 | 48 | the \#ubuntu-mir IRC channel on freenode. | ||
604 | 49 | |||
605 | 50 | The Mir project is hosted on Launchpad: https://launchpad.net/mir | ||
606 | 51 | |||
607 | 52 | Currently, the Mir code activity is performed on a development branch: | ||
608 | 53 | lp:~mir-team/mir/development-branch | ||
609 | 54 | |||
610 | 55 | Approximately fortnightly, this development branch is promoted to the branch | ||
611 | 56 | used for the ubuntu archive and touch images. Please submit any merge proposals | ||
612 | 57 | against the development branch. | ||
613 | 58 | |||
614 | 59 | Please file bug reports at: https://bugs.launchpad.net/mir | ||
615 | 60 | |||
616 | 61 | The Mir development mailing list can be found at: https://lists.ubuntu.com/mailman/listinfo/Mir-devel | ||
617 | 62 | |||
618 | 63 | The Mir coding guidelines are [here](cppguide/index.html). | ||
619 | 64 | |||
620 | 65 | Writing client applications | ||
621 | 66 | --------------------------- | ||
622 | 67 | |||
623 | 68 | - \ref mir_toolkit "Mir API Documentation" | ||
624 | 69 | - \subpage basic.c "basic.c: A basic Mir client (which does nothing)" | ||
625 | 70 | |||
626 | 71 | Writing server applications | ||
627 | 72 | --------------------------- | ||
628 | 73 | |||
629 | 74 | Mir server is written as a library which allows the server code to be adapted | ||
630 | 75 | for bespoke applications. | ||
631 | 76 | |||
632 | 77 | - \subpage server_example.cpp | ||
633 | 78 | "server_example.cpp: a test executable hosting the following" | ||
634 | 79 | - \subpage server_example_input_event_filter.cpp | ||
635 | 80 | "server_example_input_event_filter.cpp: provide a Quit command" | ||
636 | 81 | - \subpage server_example_display_configuration_policy.cpp | ||
637 | 82 | "server_example_display_configuration_policy.cpp: configuring display layout" | ||
638 | 83 | - \subpage server_example_input_filter.cpp | ||
639 | 84 | "server_example_input_filter.cpp: print input events to stdout" | ||
640 | 85 | - \subpage server_example_log_options.cpp | ||
641 | 86 | "server_example_log_options.cpp: replace Mir logger with glog" | ||
642 | 87 | - \subpage server_example_basic_window_manager.h | ||
643 | 88 | "server_example_basic_window_manager.h: How to wire up a window manager" | ||
644 | 89 | - \subpage server_example_window_management.cpp | ||
645 | 90 | "server_example_window_management.cpp: simple window management examples" | ||
646 | 91 | - \subpage server_example_canonical_window_manager.cpp | ||
647 | 92 | "server_example_canonical_window_manager.cpp: canonical window management policy" | ||
648 | 93 | - \subpage server_example_custom_compositor.cpp | ||
649 | 94 | "server_example_custom_compositor.cpp: demonstrate writing an alternative GL rendering code" | ||
650 | 95 | |||
651 | 96 | Working on Mir code | ||
652 | 97 | ------------------- | ||
653 | 98 | |||
654 | 99 | - \ref md_README "Mir Read me" | ||
655 | 100 | - \ref md_HACKING "Mir hacking guide" | ||
656 | 101 | - \ref component_reports | ||
657 | 102 | - \ref dso_versioning_guide | ||
658 | 103 | - \ref abi_compatibility_tools | ||
659 | 104 | - \ref performance_framework | ||
660 | 105 | - \ref latency "Measuring visual latency" | ||
661 | 106 | 51 | ||
662 | === removed file 'doc/using_mir_on_pc.md' | |||
663 | --- doc/using_mir_on_pc.md 2016-01-29 08:18:22 +0000 | |||
664 | +++ doc/using_mir_on_pc.md 1970-01-01 00:00:00 +0000 | |||
665 | @@ -1,91 +0,0 @@ | |||
666 | 1 | Using Mir on a PC {#using_mir_on_pc} | ||
667 | 2 | ================= | ||
668 | 3 | |||
669 | 4 | Before you begin | ||
670 | 5 | ---------------- | ||
671 | 6 | |||
672 | 7 | Make sure your hardware is supported. That means you're using a Mesa driver, | ||
673 | 8 | of which intel, radeon, and nouveau families are supported. If you're logged | ||
674 | 9 | in to X then run this command to verify an appropriate DRI driver is active: | ||
675 | 10 | |||
676 | 11 | sudo pmap `pidof X` | grep dri.so | ||
677 | 12 | |||
678 | 13 | or | ||
679 | 14 | |||
680 | 15 | lsmod | grep drm | ||
681 | 16 | |||
682 | 17 | Before you can use Mir you need to ensure you have the proper custom Mesa | ||
683 | 18 | build installed. If you are running Ubuntu 13.10 or later | ||
684 | 19 | (see \ref installing_prebuilt_on_pc), you should be good to go. | ||
685 | 20 | |||
686 | 21 | If you built Mir from source code (see \ref building_source_for_pc), you | ||
687 | 22 | need to ensure you are using the proper Mesa at runtime. You can do that by | ||
688 | 23 | installing the Mesa packages from Ubuntu 13.10 (or later) or by building the | ||
689 | 24 | custom Mesa yourself and ensuring it can be found by Mir, e.g., by using | ||
690 | 25 | `LD_LIBRARY_PATH`. | ||
691 | 26 | |||
692 | 27 | ### Getting some example client applications | ||
693 | 28 | |||
694 | 29 | You can get some example programs by installing the `mir-demos` package: | ||
695 | 30 | |||
696 | 31 | $ sudo apt-get install mir-demos | ||
697 | 32 | |||
698 | 33 | If you are building from source you can find client applications in the `bin/` | ||
699 | 34 | subdirectory of the build directory. | ||
700 | 35 | |||
701 | 36 | Running Mir | ||
702 | 37 | ----------- | ||
703 | 38 | |||
704 | 39 | Mir can run run either natively on mesa-kms or as an X application. | ||
705 | 40 | |||
706 | 41 | ### Running Mir on X | ||
707 | 42 | |||
708 | 43 | To run Mir as an X client start it from an X terminal: | ||
709 | 44 | |||
710 | 45 | $ mir_demo_server --launch-client mir_demo_client_multiwin | ||
711 | 46 | |||
712 | 47 | You can start additional Mir clients, for example (in a new terminal): | ||
713 | 48 | |||
714 | 49 | $ mir_demo_egltriangle | ||
715 | 50 | |||
716 | 51 | To exit from Mir: | ||
717 | 52 | |||
718 | 53 | <Ctrl+Alt+BkSp> | ||
719 | 54 | |||
720 | 55 | Note: up to Mir 0.18 it is also necessary to specify `--platform-input-lib` when | ||
721 | 56 | starting the server: | ||
722 | 57 | - for Mir-0.17 add: `--platform-input-lib server-mesa-x11.so.6` | ||
723 | 58 | - for Mir-0.18 add: `--platform-input-lib server-mesa-x11.so.7` | ||
724 | 59 | |||
725 | 60 | ### Running Mir natively | ||
726 | 61 | |||
727 | 62 | To run Mir natively on a PC/desktop/laptop: | ||
728 | 63 | |||
729 | 64 | $ sudo DISPLAY= mir_demo_server --vt 1 --arw-file | ||
730 | 65 | |||
731 | 66 | This will switch you to a Mir session on VT1. Switch back to your X-based | ||
732 | 67 | desktop: | ||
733 | 68 | |||
734 | 69 | <Ctrl+Alt+F7> | ||
735 | 70 | |||
736 | 71 | In a new terminal: | ||
737 | 72 | |||
738 | 73 | $ mir_demo_client_multiwin -m /tmp/mir_socket | ||
739 | 74 | |||
740 | 75 | Switch back to Mir. | ||
741 | 76 | |||
742 | 77 | <Ctrl+Alt+F1> | ||
743 | 78 | |||
744 | 79 | Watch your friends be amazed! | ||
745 | 80 | |||
746 | 81 | To exit from Mir: | ||
747 | 82 | |||
748 | 83 | <Ctrl+Alt+BkSp> | ||
749 | 84 | |||
750 | 85 | In case you accidentally killed your X login and ended up with a failsafe | ||
751 | 86 | screen, you might find on subsequent reboots you can't log in to X at all any | ||
752 | 87 | more (it instantly and silently takes you back to the login screen). The fix | ||
753 | 88 | for this is to log in to a VT and: | ||
754 | 89 | |||
755 | 90 | $ rm .Xauthority | ||
756 | 91 | $ sudo restart lightdm |
To test the generated docs:
$ make doc-show