Merge lp:~alan-griffiths/mir/0.28.1-to-ubuntu into lp:mir/ubuntu
- 0.28.1-to-ubuntu
- Merge into ubuntu
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1308 |
Proposed branch: | lp:~alan-griffiths/mir/0.28.1-to-ubuntu |
Merge into: | lp:mir/ubuntu |
Diff against target: |
2619 lines (+704/-854) 58 files modified
CMakeLists.txt (+16/-5) benchmarks/frame-uniformity/CMakeLists.txt (+0/-6) cmake/ABICheck.cmake (+0/-114) cmake/FindGtestGmock.cmake (+55/-91) debian/changelog (+29/-0) debian/control (+0/-2) doc/abi_compatibility_tools.md (+0/-26) doc/getting_and_using_mir.md (+4/-1) doc/getting_involved_in_mir.md (+32/-17) examples/CMakeLists.txt (+93/-180) examples/miral-kiosk/CMakeLists.txt (+5/-0) examples/miral-shell/miral-app.sh (+8/-2) examples/miral-shell/miral-desktop.sh (+8/-2) examples/miral-shell/miral-run.sh (+12/-1) examples/miral-shell/miral-xrun.sh (+8/-3) examples/miral-shell/shell_main.cpp (+1/-1) examples/miral-shell/spinner/eglspinner.cpp (+17/-2) examples/miral-shell/titlebar_config.cpp (+19/-1) include/core/mir/optional_value.h (+5/-0) include/server/mir/server_action_queue.h (+10/-0) include/server/mir/shell/persistent_surface_store.h (+1/-1) src/CMakeLists.txt (+2/-1) src/capnproto/CMakeLists.txt (+6/-1) src/include/server/mir/glib_main_loop.h (+5/-0) src/miral/CMakeLists.txt (+12/-7) src/miral/runner.cpp (+2/-2) src/platforms/eglstream-kms/server/display.cpp (+0/-1) src/platforms/eglstream-kms/server/egl_output.cpp (+1/-1) src/platforms/mesa/server/buffer_allocator.cpp (+2/-3) src/platforms/mesa/server/kms/cursor.cpp (+0/-1) src/platforms/mesa/server/kms/display_buffer.cpp (+4/-6) src/protobuf/symbols.map (+24/-0) src/server/CMakeLists.txt (+7/-0) src/server/frontend/wayland/wayland_connector.cpp (+130/-18) src/server/frontend/wayland/wayland_connector.h (+5/-1) src/server/frontend/wayland/wayland_default_configuration.cpp (+1/-0) src/server/glib_main_loop.cpp (+55/-1) src/server/input/default_input_device_hub.cpp (+8/-7) src/server/shell/default_persistent_surface_store.cpp (+1/-1) src/utils/CMakeLists.txt (+2/-0) src/utils/run.cpp (+1/-1) tests/CMakeLists.txt (+2/-1) tests/include/mir/test/doubles/triggered_main_loop.h (+1/-0) tests/integration-tests/CMakeLists.txt (+1/-2) tests/mir_test_doubles/CMakeLists.txt (+2/-2) tests/mir_test_doubles/triggered_main_loop.cpp (+6/-0) tests/mir_test_framework/CMakeLists.txt (+2/-2) tests/mir_test_framework/canonical_window_manager.cpp (+1/-1) tests/miral/drag_and_drop.cpp (+1/-1) tests/performance-tests/CMakeLists.txt (+1/-1) tests/unit-tests/CMakeLists.txt (+2/-4) tests/unit-tests/platforms/mesa/kms/test_cursor.cpp (+6/-7) tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp (+1/-1) tests/unit-tests/scene/test_mediating_display_changer.cpp (+6/-0) tests/unit-tests/test_glib_main_loop.cpp (+70/-0) tests/unit-tests/test_raii.cpp (+2/-0) tools/abi_check.sh (+0/-315) tools/setup-partial-armhf-chroot.sh (+9/-10) |
To merge this branch: | bzr merge lp:~alan-griffiths/mir/0.28.1-to-ubuntu |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Abstain | ||
Mir CI Bot | continuous-integration | Approve | |
Review via email: mp+332861@code.launchpad.net |
Commit message
Mir 0.28.1 release to ubuntu
Description of the change
Mir CI Bot (mir-ci-bot) wrote : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1309
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:/
Alan Griffiths (alan-griffiths) wrote : | # |
The (build-time) code that locates the miral-shell titlebar font fails to find any font on the build machine (as it doesn't have desktop options installed).
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1310
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:/
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1311
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:/
Alan Griffiths (alan-griffiths) wrote : | # |
> The (build-time) code that locates the miral-shell titlebar font fails to find
> any font on the build machine (as it doesn't have desktop options installed).
Sorted
Alan Griffiths (alan-griffiths) wrote : | # |
I'm still seeing bug 1720223 on the mesa-drm platform
Alan Griffiths (alan-griffiths) wrote : | # |
> I'm still seeing bug 1720223 on the mesa-drm platform
Actually, that was bug 1728574
But still voting "needs fixing" as the following test is failing on artful:
Mir-on-Mir
Use an X11 based desktop (Unity, Gnome, etc.). These tests run for a default 10 seconds.
Start two terminal sessions, one for a "host" server, one to launch the tests.
Start a "host" server: $ mir_demo_server --window-manager system-compositor
Test that S/W rendering clients run and can be moved(resized) with Alt+Left(
...
$ mir_demo_server --no-file --host $XDG_RUNTIME_
When resizing the triangle, the nested server crashes. (Doesn't happen with the same code built for Zesty.)
Alan Griffiths (alan-griffiths) wrote : | # |
> > I'm still seeing bug 1720223 on the mesa-drm platform
>
> Actually, that was bug 1728574
>
> But still voting "needs fixing" as the following test is failing on artful:
>
> Mir-on-Mir
>
> Use an X11 based desktop (Unity, Gnome, etc.). These tests run for a
> default 10 seconds.
> Start two terminal sessions, one for a "host" server, one to launch the
> tests.
>
> Start a "host" server: $ mir_demo_server --window-manager system-
> compositor
> Test that S/W rendering clients run and can be moved(resized) with
> Alt+Left(
>
> ...
>
> $ mir_demo_server --no-file --host $XDG_RUNTIME_
> timeout 10 --test-client mir_demo_
>
> When resizing the triangle, the nested server crashes. (Doesn't happen with
> the same code built for Zesty.)
Mmm, this happens with 0.28.0 too.
What was different when testing 0.20.0? It was shortly before the Artful releasee and my laptop had been upgraded to Artful (and had U7 installed). Since then Artful has been released and re-installed on the laptop from an ISO image.
Alan Griffiths (alan-griffiths) wrote : | # |
> Mmm, this happens with 0.28.0 too.
Logged as bug 1728613
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2017-10-11 15:00:09 +0000 | |||
3 | +++ CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
4 | @@ -1,4 +1,4 @@ | |||
6 | 1 | # Copyright © 2012 Canonical Ltd. | 1 | # Copyright © 2012-2017 Canonical Ltd. |
7 | 2 | # | 2 | # |
8 | 3 | # This program is free software: you can redistribute it and/or modify | 3 | # This program is free software: you can redistribute it and/or modify |
9 | 4 | # it under the terms of the GNU General Public License version 2 or 3 as | 4 | # it under the terms of the GNU General Public License version 2 or 3 as |
10 | @@ -29,7 +29,7 @@ | |||
11 | 29 | 29 | ||
12 | 30 | set(MIR_VERSION_MAJOR 0) | 30 | set(MIR_VERSION_MAJOR 0) |
13 | 31 | set(MIR_VERSION_MINOR 28) | 31 | set(MIR_VERSION_MINOR 28) |
15 | 32 | set(MIR_VERSION_PATCH 0) | 32 | set(MIR_VERSION_PATCH 1) |
16 | 33 | 33 | ||
17 | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) | 34 | add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
18 | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) | 35 | add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
19 | @@ -275,6 +275,16 @@ | |||
20 | 275 | pkg_check_modules(DRM REQUIRED libdrm) | 275 | pkg_check_modules(DRM REQUIRED libdrm) |
21 | 276 | endif() | 276 | endif() |
22 | 277 | 277 | ||
23 | 278 | # This incantation gets the MIR_EGL_SUPPORTED default right for Mesa | ||
24 | 279 | execute_process(COMMAND grep mir_toolkit /usr/include/EGL/eglplatform.h | ||
25 | 280 | OUTPUT_VARIABLE MIR_EGL_SUPPORTED_OUT) | ||
26 | 281 | |||
27 | 282 | if (MIR_EGL_SUPPORTED_OUT STREQUAL "") | ||
28 | 283 | option(MIR_EGL_SUPPORTED "Build examples that depend on Mir EGL." OFF) | ||
29 | 284 | else() | ||
30 | 285 | option(MIR_EGL_SUPPORTED "Build examples that depend on Mir EGL." ON) | ||
31 | 286 | endif() | ||
32 | 287 | |||
33 | 278 | set(MIR_TRACEPOINT_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/mir/tools) | 288 | set(MIR_TRACEPOINT_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/mir/tools) |
34 | 279 | 289 | ||
35 | 280 | set(MIR_GENERATED_INCLUDE_DIRECTORIES) | 290 | set(MIR_GENERATED_INCLUDE_DIRECTORIES) |
36 | @@ -288,9 +298,10 @@ | |||
37 | 288 | add_definitions(-DMIR_LIBINPUT_HAS_ACCEL_PROFILE=1) | 298 | add_definitions(-DMIR_LIBINPUT_HAS_ACCEL_PROFILE=1) |
38 | 289 | endif () | 299 | endif () |
39 | 290 | 300 | ||
40 | 291 | add_subdirectory(benchmarks/) | ||
41 | 292 | add_subdirectory(examples/) | 301 | add_subdirectory(examples/) |
43 | 293 | add_subdirectory(playground/) | 302 | if (MIR_EGL_SUPPORTED) |
44 | 303 | add_subdirectory(playground/) | ||
45 | 304 | endif() | ||
46 | 294 | add_subdirectory(guides/) | 305 | add_subdirectory(guides/) |
47 | 295 | add_subdirectory(cmake/) | 306 | add_subdirectory(cmake/) |
48 | 296 | 307 | ||
49 | @@ -299,6 +310,7 @@ | |||
50 | 299 | pkg_check_modules(LIBEVDEV REQUIRED libevdev) | 310 | pkg_check_modules(LIBEVDEV REQUIRED libevdev) |
51 | 300 | include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR}) | 311 | include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR}) |
52 | 301 | add_subdirectory(tests/) | 312 | add_subdirectory(tests/) |
53 | 313 | add_subdirectory(benchmarks/) | ||
54 | 302 | 314 | ||
55 | 303 | # There's no nice way to format this. Thanks CMake. | 315 | # There's no nice way to format this. Thanks CMake. |
56 | 304 | mir_add_test(NAME LGPL-required | 316 | mir_add_test(NAME LGPL-required |
57 | @@ -313,7 +325,6 @@ | |||
58 | 313 | endif () | 325 | endif () |
59 | 314 | 326 | ||
60 | 315 | enable_coverage_report(mirserver) | 327 | enable_coverage_report(mirserver) |
61 | 316 | include (cmake/ABICheck.cmake) | ||
62 | 317 | 328 | ||
63 | 318 | add_custom_target(ptest | 329 | add_custom_target(ptest |
64 | 319 | COMMAND "${CMAKE_SOURCE_DIR}/tools/run_ctests.sh" "--cost-file" "${CMAKE_BINARY_DIR}/ptest_ctest_cost_data.txt" "sh ${CMAKE_BINARY_DIR}/discover_all_tests.sh" "--" "$$ARGS" | 330 | COMMAND "${CMAKE_SOURCE_DIR}/tools/run_ctests.sh" "--cost-file" "${CMAKE_BINARY_DIR}/ptest_ctest_cost_data.txt" "sh ${CMAKE_BINARY_DIR}/discover_all_tests.sh" "--" "$$ARGS" |
65 | 320 | 331 | ||
66 | === modified file 'benchmarks/frame-uniformity/CMakeLists.txt' | |||
67 | --- benchmarks/frame-uniformity/CMakeLists.txt 2017-08-25 06:41:20 +0000 | |||
68 | +++ benchmarks/frame-uniformity/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
69 | @@ -28,8 +28,6 @@ | |||
70 | 28 | mirserver | 28 | mirserver |
71 | 29 | mirclient | 29 | mirclient |
72 | 30 | mirplatform | 30 | mirplatform |
73 | 31 | |||
74 | 32 | mir-test-assist | ||
75 | 33 | 31 | ||
76 | 34 | # needed for fake_event_hub_server_configuration.h (which relies on private APIs) | 32 | # needed for fake_event_hub_server_configuration.h (which relies on private APIs) |
77 | 35 | mir-test-framework-static | 33 | mir-test-framework-static |
78 | @@ -37,9 +35,5 @@ | |||
79 | 37 | # needed for vsync_simulating_graphics_platform.cpp | 35 | # needed for vsync_simulating_graphics_platform.cpp |
80 | 38 | mir-test-doubles-static | 36 | mir-test-doubles-static |
81 | 39 | 37 | ||
82 | 40 | ${Boost_LIBRARIES} | ||
83 | 41 | ${GTEST_BOTH_LIBRARIES} | ||
84 | 42 | ${GMOCK_LIBRARY} | ||
85 | 43 | ${GMOCK_MAIN_LIBRARY} | ||
86 | 44 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 38 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
87 | 45 | ) | 39 | ) |
88 | 46 | 40 | ||
89 | === removed file 'cmake/ABICheck.cmake' | |||
90 | --- cmake/ABICheck.cmake 2017-05-08 03:04:26 +0000 | |||
91 | +++ cmake/ABICheck.cmake 1970-01-01 00:00:00 +0000 | |||
92 | @@ -1,114 +0,0 @@ | |||
93 | 1 | cmake_minimum_required (VERSION 2.6) | ||
94 | 2 | |||
95 | 3 | find_program(ABI_COMPLIANCE_CHECKER abi-compliance-checker) | ||
96 | 4 | if (NOT ABI_COMPLIANCE_CHECKER) | ||
97 | 5 | message(WARNING "no ABI checks possible: abi-compliance-checker was not found") | ||
98 | 6 | return() | ||
99 | 7 | endif() | ||
100 | 8 | |||
101 | 9 | set(ENABLE_ABI_CHECK_TEST $ENV{MIR_ENABLE_ABI_CHECK_TEST}) | ||
102 | 10 | execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE ABI_CHECK_TARGET_MACH OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
103 | 11 | |||
104 | 12 | set(ABI_DUMPS_DIR "${CMAKE_BINARY_DIR}/abi_dumps/${ABI_CHECK_TARGET_MACH}") | ||
105 | 13 | |||
106 | 14 | # Given a list of key value pairs such as "key1 value1 key2 value2...keyN valueN" | ||
107 | 15 | # extract the value corresponding to the given key | ||
108 | 16 | function(get_value_for_key a_list key value) | ||
109 | 17 | list(FIND a_list ${key} idx) | ||
110 | 18 | if (idx GREATER -1) | ||
111 | 19 | math(EXPR idx "${idx} + 1") | ||
112 | 20 | list(GET a_list ${idx} tmp_value) | ||
113 | 21 | set(${value} "${tmp_value}" PARENT_SCOPE) | ||
114 | 22 | endif() | ||
115 | 23 | endfunction() | ||
116 | 24 | |||
117 | 25 | # Makes a one-entry per line list of all include paths used | ||
118 | 26 | # to compile the given library target | ||
119 | 27 | function(get_includes libname output) | ||
120 | 28 | get_property(lib_includes TARGET ${libname} PROPERTY INCLUDE_DIRECTORIES) | ||
121 | 29 | list(REMOVE_DUPLICATES lib_includes) | ||
122 | 30 | string(REPLACE ";" "\n " tmp_out "${lib_includes}") | ||
123 | 31 | set(${output} "${tmp_out}" PARENT_SCOPE) | ||
124 | 32 | endfunction() | ||
125 | 33 | |||
126 | 34 | # Creates the XML descriptor file that describes the given library target | ||
127 | 35 | # suitable for abi-compliance-checker | ||
128 | 36 | function(make_lib_descriptor name) | ||
129 | 37 | set(libname "mir${name}") | ||
130 | 38 | |||
131 | 39 | # Optional argument LIBRARY_HEADER - use the given header to describe | ||
132 | 40 | # the binary library instead of assuming its described by include/<name> | ||
133 | 41 | get_value_for_key("${ARGN}" "LIBRARY_HEADER" library_header) | ||
134 | 42 | if ("${library_header}" STREQUAL "") | ||
135 | 43 | set(LIB_DESC_HEADERS "${CMAKE_SOURCE_DIR}/include/${name}\n ${private_headers}") | ||
136 | 44 | else() | ||
137 | 45 | set(LIB_DESC_HEADERS ${library_header}) | ||
138 | 46 | endif() | ||
139 | 47 | |||
140 | 48 | # FIXME: Property "LOCATION" is now deprecated | ||
141 | 49 | if (NOT ${CMAKE_MAJOR_VERSION} LESS 3) | ||
142 | 50 | cmake_policy(SET CMP0026 OLD) | ||
143 | 51 | endif() | ||
144 | 52 | get_property(LIB_DESC_LIBS TARGET ${libname} PROPERTY LOCATION) | ||
145 | 53 | |||
146 | 54 | get_includes(${libname} LIB_DESC_INCLUDE_PATHS) | ||
147 | 55 | set(LIB_DESC_GCC_OPTS "${CMAKE_CXX_FLAGS}") | ||
148 | 56 | |||
149 | 57 | # Optional EXCLUDE_HEADERS - a list | ||
150 | 58 | # while attempting an abi dump | ||
151 | 59 | get_value_for_key("${ARGN}" "EXCLUDE_HEADERS" LIB_DESC_SKIP_HEADERS) | ||
152 | 60 | |||
153 | 61 | configure_file(${CMAKE_SOURCE_DIR}/tools/lib_descriptor.xml.skel ${libname}_desc.xml) | ||
154 | 62 | endfunction() | ||
155 | 63 | |||
156 | 64 | #These headers are not part of the libmirplatform ABI | ||
157 | 65 | set(mirplatform-exclude-headers "${CMAKE_SOURCE_DIR}/include/platform/mir/input") | ||
158 | 66 | |||
159 | 67 | make_lib_descriptor(core) | ||
160 | 68 | make_lib_descriptor(client) | ||
161 | 69 | make_lib_descriptor(server) | ||
162 | 70 | make_lib_descriptor(common) | ||
163 | 71 | make_lib_descriptor(cookie) | ||
164 | 72 | make_lib_descriptor(platform EXCLUDE_HEADERS ${mirplatform-exclude-headers}) | ||
165 | 73 | if(MIR_BUILD_PLATFORM_MESA_KMS) | ||
166 | 74 | make_lib_descriptor(clientplatformmesa LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/src/include/client/mir/client_platform_factory.h) | ||
167 | 75 | make_lib_descriptor(platformgraphicsmesakms LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/graphics/platform.h) | ||
168 | 76 | endif() | ||
169 | 77 | make_lib_descriptor(platforminputevdev LIBRARY_HEADER ${CMAKE_SOURCE_DIR}/include/platform/mir/input/) | ||
170 | 78 | |||
171 | 79 | |||
172 | 80 | macro(_define_abi_dump_for libname) | ||
173 | 81 | set(ABI_DUMP_NAME ${ABI_DUMPS_DIR}/${libname}_next.abi.tar.gz) | ||
174 | 82 | |||
175 | 83 | add_custom_command(OUTPUT ${ABI_DUMP_NAME} | ||
176 | 84 | COMMAND abi-compliance-checker -gcc-path ${CMAKE_CXX_COMPILER} -l ${libname} -v1 next -dump-path ${ABI_DUMP_NAME} -dump-abi ${libname}_desc.xml | ||
177 | 85 | DEPENDS ${libname} | ||
178 | 86 | ) | ||
179 | 87 | add_custom_target(abi-dump-${libname} DEPENDS ${ABI_DUMP_NAME}) | ||
180 | 88 | endmacro(_define_abi_dump_for) | ||
181 | 89 | |||
182 | 90 | macro(_define_abi_check_for libname) | ||
183 | 91 | add_custom_target(abi-check-${libname} | ||
184 | 92 | COMMAND /bin/bash -c '${CMAKE_SOURCE_DIR}/tools/abi_check.sh ${libname} ${ABI_DUMPS_DIR} ${CMAKE_SOURCE_DIR}' | ||
185 | 93 | DEPENDS abi-dump-${libname} | ||
186 | 94 | ) | ||
187 | 95 | endmacro(_define_abi_check_for) | ||
188 | 96 | |||
189 | 97 | set(the_libs mircore mirserver mirclient mircommon mirplatform mircookie mirplatforminputevdev) | ||
190 | 98 | if(MIR_BUILD_PLATFORM_MESA_KMS) | ||
191 | 99 | set(the_libs ${the_libs} mirclientplatformmesa mirplatformgraphicsmesakms) | ||
192 | 100 | endif() | ||
193 | 101 | |||
194 | 102 | foreach(libname ${the_libs}) | ||
195 | 103 | _define_abi_dump_for(${libname}) | ||
196 | 104 | _define_abi_check_for(${libname}) | ||
197 | 105 | list(APPEND abi-dump-list abi-dump-${libname}) | ||
198 | 106 | list(APPEND abi-check-list abi-check-${libname}) | ||
199 | 107 | endforeach(libname) | ||
200 | 108 | |||
201 | 109 | add_custom_target(abi-dump DEPENDS ${abi-dump-list}) | ||
202 | 110 | add_custom_target(abi-check DEPENDS ${abi-check-list}) | ||
203 | 111 | |||
204 | 112 | if (MIR_ENABLE_TESTS AND ENABLE_ABI_CHECK_TEST) | ||
205 | 113 | add_test(abi-compliance-check make abi-check) | ||
206 | 114 | endif() | ||
207 | 115 | 0 | ||
208 | === modified file 'cmake/FindGtestGmock.cmake' | |||
209 | --- cmake/FindGtestGmock.cmake 2017-09-07 05:58:13 +0000 | |||
210 | +++ cmake/FindGtestGmock.cmake 2017-10-27 17:26:09 +0000 | |||
211 | @@ -1,96 +1,60 @@ | |||
212 | 1 | include(ExternalProject) | ||
213 | 2 | include(FindPackageHandleStandardArgs) | 1 | include(FindPackageHandleStandardArgs) |
214 | 3 | 2 | ||
241 | 4 | # | 3 | find_package(GTest) |
242 | 5 | # When cross compiling MIR_CHROOT points to our chroot. | 4 | |
243 | 6 | # When not cross compiling, it should be blank to use the host system. | 5 | if (NOT GTEST_FOUND) |
244 | 7 | # | 6 | include(ExternalProject) |
245 | 8 | set(usr ${MIR_CHROOT}/usr) | 7 | |
246 | 9 | 8 | find_path(GTEST_ROOT | |
247 | 10 | if (EXISTS ${usr}/src/googletest) | 9 | NAMES CMakeLists.txt |
248 | 11 | set (USING_GOOGLETEST_1_8 TRUE) | 10 | PATHS /usr/src/gtest /usr/src/googletest/googletest/ |
249 | 12 | set (GTEST_INSTALL_DIR ${usr}/src/googletest/googletest/include) | 11 | DOC "Path to GTest CMake project") |
250 | 13 | else() | 12 | |
251 | 14 | set (GTEST_INSTALL_DIR ${usr}/src/gmock/gtest/include) | 13 | ExternalProject_Add(GTest PREFIX ./gtest |
252 | 15 | endif() | 14 | SOURCE_DIR ${GTEST_ROOT} |
253 | 16 | 15 | CMAKE_ARGS | |
254 | 17 | #gtest | 16 | -DCMAKE_CXX_COMPILER_WORKS=1 |
255 | 18 | find_path( | 17 | -DCMAKE_CXX_FLAGS='${CMAKE_CXX_FLAGS}' |
256 | 19 | GTEST_INCLUDE_DIR gtest/gtest.h | 18 | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} |
257 | 20 | HINTS ${GTEST_INSTALL_DIR} | 19 | INSTALL_COMMAND true) |
258 | 21 | ) | 20 | |
259 | 22 | 21 | ExternalProject_Get_Property(GTest binary_dir) | |
260 | 23 | #gmock | 22 | |
261 | 24 | find_path( | 23 | add_library(gtest UNKNOWN IMPORTED) |
262 | 25 | GMOCK_INSTALL_DIR CMakeLists.txt | 24 | set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${binary_dir}/libgtest.a) |
263 | 26 | HINTS ${usr}/src/googletest ${usr}/src/gmock) | 25 | add_dependencies(gtest GTest) |
264 | 27 | if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND") | 26 | set(GTEST_LIBRARY "gtest") |
265 | 28 | message(FATAL_ERROR "google-mock package not found") | 27 | |
266 | 29 | endif() | 28 | add_library(gtest_main UNKNOWN IMPORTED) |
267 | 29 | set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${binary_dir}/libgtest_main.a) | ||
268 | 30 | add_dependencies(gtest_main GTest) | ||
269 | 31 | set(GTEST_MAIN_LIBRARY "gtest_main") | ||
270 | 32 | |||
271 | 33 | set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY}) | ||
272 | 34 | find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h) | ||
273 | 35 | find_package_handle_standard_args(GTest GTEST_LIBRARY GTEST_BOTH_LIBRARIES GTEST_INCLUDE_DIRS) | ||
274 | 36 | endif() | ||
275 | 37 | |||
276 | 38 | find_file(GMOCK_SOURCE | ||
277 | 39 | NAMES gmock-all.cc | ||
278 | 40 | DOC "GMock source" | ||
279 | 41 | PATHS /usr/src/googletest/googlemock/src/ /usr/src/gmock/ /usr/src/gmock/src) | ||
280 | 42 | |||
281 | 43 | message(STATUS "GMOCK_SOURCE=${GMOCK_SOURCE}") | ||
282 | 30 | 44 | ||
283 | 31 | find_path(GMOCK_INCLUDE_DIR gmock/gmock.h) | 45 | find_path(GMOCK_INCLUDE_DIR gmock/gmock.h) |
284 | 32 | 46 | ||
349 | 33 | if (USING_GOOGLETEST_1_8) | 47 | add_library(GMock STATIC ${GMOCK_SOURCE}) |
350 | 34 | set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs) | 48 | |
351 | 35 | set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}/googlemock) | 49 | if (EXISTS /usr/src/googletest/googlemock/src) |
352 | 36 | set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest) | 50 | set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/googletest/googlemock") |
353 | 37 | else() | 51 | endif() |
354 | 38 | set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs) | 52 | |
355 | 39 | set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}) | 53 | if (EXISTS /usr/src/gmock/src) |
356 | 40 | set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest) | 54 | set_source_files_properties(${GMOCK_SOURCE} PROPERTIES COMPILE_FLAGS "-I/usr/src/gmock") |
357 | 41 | endif() | 55 | endif() |
358 | 42 | 56 | ||
359 | 43 | set(GTEST_CXX_FLAGS "-fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64") | 57 | find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_INCLUDE_DIR) |
360 | 44 | if (cmake_build_type_lower MATCHES "threadsanitizer") | 58 | |
361 | 45 | set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread") | 59 | set(GMOCK_LIBRARY GMock) |
362 | 46 | elseif (cmake_build_type_lower MATCHES "ubsanitizer") | 60 | set(GMOCK_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARY}) |
299 | 47 | set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=undefined") | ||
300 | 48 | endif() | ||
301 | 49 | |||
302 | 50 | set(GTEST_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${GTEST_CXX_FLAGS}") | ||
303 | 51 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}) | ||
304 | 52 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) | ||
305 | 53 | |||
306 | 54 | if (USING_GOOGLETEST_1_8) | ||
307 | 55 | list(APPEND GTEST_CMAKE_ARGS -DBUILD_GTEST=ON) | ||
308 | 56 | endif() | ||
309 | 57 | |||
310 | 58 | if (cmake_build_type_lower MATCHES "threadsanitizer") | ||
311 | 59 | #Skip compiler check, since if GCC is the compiler, we need to link against -ltsan | ||
312 | 60 | #explicitly; specifying additional linker flags doesn't seem possible for external projects | ||
313 | 61 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=1) | ||
314 | 62 | endif() | ||
315 | 63 | if (${CMAKE_CROSSCOMPILING}) | ||
316 | 64 | if(DEFINED MIR_CHROOT) | ||
317 | 65 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_MODULE_PATH}/LinuxCrossCompile.cmake) | ||
318 | 66 | else() | ||
319 | 67 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) | ||
320 | 68 | list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}) | ||
321 | 69 | endif() | ||
322 | 70 | endif() | ||
323 | 71 | |||
324 | 72 | ExternalProject_Add( | ||
325 | 73 | GMock | ||
326 | 74 | #where to build in source tree | ||
327 | 75 | PREFIX ${GMOCK_PREFIX} | ||
328 | 76 | #where the source is external to the project | ||
329 | 77 | SOURCE_DIR ${GMOCK_INSTALL_DIR} | ||
330 | 78 | #forward the compilers to the subproject so cross-arch builds work | ||
331 | 79 | CMAKE_ARGS ${GTEST_CMAKE_ARGS} | ||
332 | 80 | BINARY_DIR ${GMOCK_BASE_BINARY_DIR} | ||
333 | 81 | |||
334 | 82 | #we don't need to install, so skip | ||
335 | 83 | INSTALL_COMMAND "" | ||
336 | 84 | ) | ||
337 | 85 | |||
338 | 86 | set(GMOCK_LIBRARY ${GMOCK_BINARY_DIR}/libgmock.a) | ||
339 | 87 | set(GMOCK_MAIN_LIBRARY ${GMOCK_BINARY_DIR}/libgmock_main.a) | ||
340 | 88 | set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY}) | ||
341 | 89 | set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a) | ||
342 | 90 | set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a) | ||
343 | 91 | set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY}) | ||
344 | 92 | set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES}) | ||
345 | 93 | |||
346 | 94 | find_package_handle_standard_args(GTest DEFAULT_MSG | ||
347 | 95 | GMOCK_INCLUDE_DIR | ||
348 | 96 | GTEST_INCLUDE_DIR) | ||
363 | 97 | 61 | ||
364 | === modified file 'debian/changelog' | |||
365 | --- debian/changelog 2017-10-11 15:06:23 +0000 | |||
366 | +++ debian/changelog 2017-10-27 17:26:09 +0000 | |||
367 | @@ -1,3 +1,32 @@ | |||
368 | 1 | mir (0.28.1) UNRELEASED; urgency=medium | ||
369 | 2 | |||
370 | 3 | * New upstream release 0.28.1(https://launchpad.net/mir/+milestone/0.28.1) | ||
371 | 4 | - ABI summary: | ||
372 | 5 | . mirclient ABI unchanged at 9 | ||
373 | 6 | . miral ABI unchanged at 2 | ||
374 | 7 | . mirserver ABI unchanged to 45 | ||
375 | 8 | . mircommon ABI unchanged at 7 | ||
376 | 9 | . mirplatform ABI unchanged at 61 | ||
377 | 10 | . mirprotobuf ABI unchanged at 3 | ||
378 | 11 | . mirplatformgraphics ABI unchanged at 13 | ||
379 | 12 | . mirclientplatform ABI unchanged at 5 | ||
380 | 13 | . mirinputplatform ABI unchanged at 7 | ||
381 | 14 | . mircore ABI unchanged at 1 | ||
382 | 15 | - Enhancements: | ||
383 | 16 | . Fix build (and add instructions) for Fedora | ||
384 | 17 | . Wayland support for keymaps | ||
385 | 18 | . Don't use Mir EGL if it isn't available. | ||
386 | 19 | . [miral-app, miral-desktop] Default to using SDL's Wayland support. | ||
387 | 20 | . Use system GMock detection (unless cross-compiling) | ||
388 | 21 | - Bugs fixed: | ||
389 | 22 | . Wayland demo client doesn't cross-compile. (LP: #1723971) | ||
390 | 23 | . mir fails to find drm.h. (LP: #1722147) | ||
391 | 24 | . Don't treat failing to bypass buffers as a fatal error. (LP: #1723235) | ||
392 | 25 | . Build process depends on Debian toolchain. (LP: #1724202) | ||
393 | 26 | . XWayland clients updates not causing redraw (LP: #1720223) | ||
394 | 27 | |||
395 | 28 | -- Alan Griffiths <alan@Octopull-desktop> Tue, 17 Oct 2017 14:14:37 +0100 | ||
396 | 29 | |||
397 | 1 | mir (0.28.0+17.10.20171011.1-0ubuntu1) artful; urgency=medium | 30 | mir (0.28.0+17.10.20171011.1-0ubuntu1) artful; urgency=medium |
398 | 2 | 31 | ||
399 | 3 | * New upstream release 0.28.0(https://launchpad.net/mir/+milestone/0.28.0) | 32 | * New upstream release 0.28.0(https://launchpad.net/mir/+milestone/0.28.0) |
400 | 4 | 33 | ||
401 | === modified file 'debian/control' | |||
402 | --- debian/control 2017-10-08 14:03:45 +0000 | |||
403 | +++ debian/control 2017-10-27 17:26:09 +0000 | |||
404 | @@ -22,7 +22,6 @@ | |||
405 | 22 | libgbm-dev, | 22 | libgbm-dev, |
406 | 23 | libglm-dev, | 23 | libglm-dev, |
407 | 24 | libprotobuf-dev, | 24 | libprotobuf-dev, |
408 | 25 | pkg-config, | ||
409 | 26 | libgoogle-glog-dev, | 25 | libgoogle-glog-dev, |
410 | 27 | liblttng-ust-dev, | 26 | liblttng-ust-dev, |
411 | 28 | libxkbcommon-dev (>= 0.5), | 27 | libxkbcommon-dev (>= 0.5), |
412 | @@ -36,7 +35,6 @@ | |||
413 | 36 | valgrind [amd64 i386 armhf arm64], | 35 | valgrind [amd64 i386 armhf arm64], |
414 | 37 | libglib2.0-dev, | 36 | libglib2.0-dev, |
415 | 38 | libfreetype6-dev, | 37 | libfreetype6-dev, |
416 | 39 | abi-compliance-checker, | ||
417 | 40 | libevdev-dev, | 38 | libevdev-dev, |
418 | 41 | libinput-dev (>= 0.21), | 39 | libinput-dev (>= 0.21), |
419 | 42 | uuid-dev, | 40 | uuid-dev, |
420 | 43 | 41 | ||
421 | === removed file 'doc/abi_compatibility_tools.md' | |||
422 | --- doc/abi_compatibility_tools.md 2017-05-08 03:04:26 +0000 | |||
423 | +++ doc/abi_compatibility_tools.md 1970-01-01 00:00:00 +0000 | |||
424 | @@ -1,26 +0,0 @@ | |||
425 | 1 | Tracking ABI compatibility {#abi_compatibility_tools} | ||
426 | 2 | ================================ | ||
427 | 3 | |||
428 | 4 | A few make targets exist to help us track ABI compatibility across | ||
429 | 5 | different Mir versions and ensure we increase the ABI version properly. | ||
430 | 6 | These targets invoke the abi-compliance-checker tool for the actual ABI check. | ||
431 | 7 | |||
432 | 8 | The targets are: | ||
433 | 9 | |||
434 | 10 | * **make abi-check** | ||
435 | 11 | |||
436 | 12 | Compiles all the public libraries in the current tree and checks their ABI against the latest released archive version | ||
437 | 13 | |||
438 | 14 | * **make abi-check-\<library>** | ||
439 | 15 | |||
440 | 16 | Compiles only the specified library in the current tree and checks its ABI against the latest released archive version | ||
441 | 17 | |||
442 | 18 | - *library* can be any of the public library targets such as mirclient, mirserver, mirplatform, mircommon, etc. | ||
443 | 19 | |||
444 | 20 | Sample usage | ||
445 | 21 | ------------ | ||
446 | 22 | |||
447 | 23 | $ bzr branch lp:mir && cd mir | ||
448 | 24 | $ debian/rules override_dh_auto_configure | ||
449 | 25 | $ cd <build-dir> | ||
450 | 26 | $ make abi-check | ||
451 | 27 | 0 | ||
452 | === modified file 'doc/getting_and_using_mir.md' | |||
453 | --- doc/getting_and_using_mir.md 2017-09-07 09:53:20 +0000 | |||
454 | +++ doc/getting_and_using_mir.md 2017-10-27 17:26:09 +0000 | |||
455 | @@ -4,7 +4,10 @@ | |||
456 | 4 | Getting Mir examples | 4 | Getting Mir examples |
457 | 5 | -------------------- | 5 | -------------------- |
458 | 6 | 6 | ||
460 | 7 | You can install the Mir examples as follows: | 7 | These instructions assume that you’re using Ubuntu 17.10 later. For |
461 | 8 | earlier releases of Ubuntu or other distributions see \ref getting_involved_in_mir. | ||
462 | 9 | |||
463 | 10 | You can install the Mir examples along with the Mir graphics drivers as follows: | ||
464 | 8 | 11 | ||
465 | 9 | $ sudo apt install mir-demos qterminal | 12 | $ sudo apt install mir-demos qterminal |
466 | 10 | $ sudo apt install mir-graphics-drivers-desktop qtubuntu-desktop | 13 | $ sudo apt install mir-graphics-drivers-desktop qtubuntu-desktop |
467 | 11 | 14 | ||
468 | === modified file 'doc/getting_involved_in_mir.md' | |||
469 | --- doc/getting_involved_in_mir.md 2017-09-07 09:53:20 +0000 | |||
470 | +++ doc/getting_involved_in_mir.md 2017-10-27 17:26:09 +0000 | |||
471 | @@ -9,26 +9,41 @@ | |||
472 | 9 | 9 | ||
473 | 10 | The Mir project is hosted on Launchpad: https://launchpad.net/mir | 10 | The Mir project is hosted on Launchpad: https://launchpad.net/mir |
474 | 11 | 11 | ||
475 | 12 | |||
476 | 13 | Getting Mir source & dependencies | ||
477 | 14 | --------------------------------- | ||
478 | 15 | ### On Ubuntu | ||
479 | 16 | |||
480 | 17 | These instructions assume that you’re using Ubuntu 16.04LTS or later. | ||
481 | 18 | |||
482 | 19 | You’ll need a few development tools installed: | ||
483 | 20 | |||
484 | 21 | $ sudo apt install devscripts equivs bzr | ||
485 | 22 | |||
486 | 23 | With these installed you can checkout Mir and get the remaining dependencies: | ||
487 | 24 | |||
488 | 25 | $ bzr branch lp:mir | ||
489 | 26 | $ sudo mk-build-deps -i | ||
490 | 27 | |||
491 | 28 | ### On Fedora | ||
492 | 29 | |||
493 | 30 | You’ll need some development tools and packages installed: | ||
494 | 31 | |||
495 | 32 | $ sudo dnf install bzr cmake gcc-c++ boost-devel mesa-libEGL-devel \ | ||
496 | 33 | mesa-libGLES-devel glm-devel protobuf-lite-devel protobuf-compiler \ | ||
497 | 34 | capnproto-devel capnproto glog-devel gflags-devel systemd-devel \ | ||
498 | 35 | glib2-devel wayland-devel mesa-libgbm-devel libepoxy-devel nettle-devel \ | ||
499 | 36 | libinput-devel libxml++-devel libuuid-devel libxkbcommon-devel \ | ||
500 | 37 | freetype-devel lttng-ust-devel libatomic qterminal qt5-qtwayland \ | ||
501 | 38 | python3-pillow libevdev-devel umockdev-devel gtest-devel gmock-devel | ||
502 | 39 | |||
503 | 40 | With these installed you can checkout Mir: | ||
504 | 41 | |||
505 | 42 | $ bzr branch lp:mir | ||
506 | 43 | |||
507 | 12 | Building Mir | 44 | Building Mir |
508 | 13 | ------------ | 45 | ------------ |
509 | 14 | 46 | ||
510 | 15 | These instructions assume that you’re using Ubuntu 16.04LTS or later, I’ve not | ||
511 | 16 | earlier Ubuntu versions or other distributions. | ||
512 | 17 | |||
513 | 18 | You’ll need a few development and utility packages installed, along with the | ||
514 | 19 | Mir graphics drivers: | ||
515 | 20 | |||
516 | 21 | $ sudo apt install devscripts equivs bzr | ||
517 | 22 | $ sudo apt install mir-graphics-drivers-desktop | ||
518 | 23 | |||
519 | 24 | If you’re working on a phone or tablet use mir-graphics-drivers-android in | ||
520 | 25 | place of mir-graphics-drivers-desktop. (See \ref building_source_for_arm for | ||
521 | 26 | |||
522 | 27 | |||
523 | 28 | With these installed you can checkout and build Mir: | ||
524 | 29 | |||
525 | 30 | $ bzr branch lp:mir | ||
526 | 31 | $ sudo mk-build-deps -i | ||
527 | 32 | $ mkdir mir/build | 47 | $ mkdir mir/build |
528 | 33 | $ cd mir/build | 48 | $ cd mir/build |
529 | 34 | $ cmake .. | 49 | $ cmake .. |
530 | 35 | 50 | ||
531 | === modified file 'examples/CMakeLists.txt' | |||
532 | --- examples/CMakeLists.txt 2017-09-07 05:58:13 +0000 | |||
533 | +++ examples/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
534 | @@ -3,10 +3,7 @@ | |||
535 | 3 | 3 | ||
536 | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -fno-strict-aliasing -Wextra") | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -fno-strict-aliasing -Wextra") |
537 | 5 | 5 | ||
542 | 6 | add_library(eglapp STATIC | 6 | add_library(mirdraw STATIC graphics_utils.cpp) |
539 | 7 | eglapp.c | ||
540 | 8 | client_helpers.cpp | ||
541 | 9 | ) | ||
543 | 10 | 7 | ||
544 | 11 | add_library(exampleserverconfig STATIC | 8 | add_library(exampleserverconfig STATIC |
545 | 12 | server_example_input_device_config.cpp | 9 | server_example_input_device_config.cpp |
546 | @@ -20,150 +17,26 @@ | |||
547 | 20 | 17 | ||
548 | 21 | target_link_libraries(exampleserverconfig mirserver) | 18 | target_link_libraries(exampleserverconfig mirserver) |
549 | 22 | 19 | ||
646 | 23 | target_link_libraries(eglapp | 20 | mir_add_wrapped_executable(mir_demo_client_basic basic.c) |
647 | 24 | mirclient | 21 | target_link_libraries (mir_demo_client_basic mirclient ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) |
552 | 25 | ${EGL_LIBRARIES} | ||
553 | 26 | ${GLESv2_LIBRARIES} | ||
554 | 27 | ) | ||
555 | 28 | |||
556 | 29 | mir_add_wrapped_executable(mir_demo_client_animated_cursor | ||
557 | 30 | animated_cursor_demo_client.c | ||
558 | 31 | ) | ||
559 | 32 | target_link_libraries(mir_demo_client_animated_cursor | ||
560 | 33 | eglapp | ||
561 | 34 | ) | ||
562 | 35 | mir_add_wrapped_executable(mir_demo_client_eglflash | ||
563 | 36 | eglflash.c | ||
564 | 37 | ) | ||
565 | 38 | target_link_libraries(mir_demo_client_eglflash | ||
566 | 39 | eglapp | ||
567 | 40 | ) | ||
568 | 41 | mir_add_wrapped_executable(mir_demo_client_egltriangle | ||
569 | 42 | egltriangle.c | ||
570 | 43 | ) | ||
571 | 44 | target_link_libraries(mir_demo_client_egltriangle | ||
572 | 45 | eglapp | ||
573 | 46 | ) | ||
574 | 47 | mir_add_wrapped_executable(mir_demo_client_target | ||
575 | 48 | target.c | ||
576 | 49 | ) | ||
577 | 50 | target_link_libraries(mir_demo_client_target | ||
578 | 51 | eglapp | ||
579 | 52 | ) | ||
580 | 53 | mir_add_wrapped_executable(mir_demo_client_pointer_confinement | ||
581 | 54 | pointer_confinement.c | ||
582 | 55 | ) | ||
583 | 56 | target_link_libraries(mir_demo_client_pointer_confinement | ||
584 | 57 | eglapp | ||
585 | 58 | ) | ||
586 | 59 | mir_add_wrapped_executable(mir_demo_client_camera | ||
587 | 60 | camera.c | ||
588 | 61 | ) | ||
589 | 62 | target_link_libraries(mir_demo_client_camera | ||
590 | 63 | eglapp | ||
591 | 64 | ) | ||
592 | 65 | mir_add_wrapped_executable(mir_demo_client_eglcounter | ||
593 | 66 | eglcounter.cpp | ||
594 | 67 | ) | ||
595 | 68 | target_link_libraries(mir_demo_client_eglcounter | ||
596 | 69 | eglapp | ||
597 | 70 | ) | ||
598 | 71 | mir_add_wrapped_executable(mir_demo_client_eglplasma | ||
599 | 72 | eglplasma.c | ||
600 | 73 | ) | ||
601 | 74 | target_link_libraries(mir_demo_client_eglplasma | ||
602 | 75 | eglapp | ||
603 | 76 | ) | ||
604 | 77 | mir_add_wrapped_executable(mir_demo_client_cursors | ||
605 | 78 | cursors_demo_client.c | ||
606 | 79 | ) | ||
607 | 80 | target_link_libraries(mir_demo_client_cursors | ||
608 | 81 | eglapp | ||
609 | 82 | ) | ||
610 | 83 | mir_add_wrapped_executable(mir_demo_client_eglstateswitcher | ||
611 | 84 | eglstateswitcher.c | ||
612 | 85 | ) | ||
613 | 86 | target_link_libraries(mir_demo_client_eglstateswitcher | ||
614 | 87 | eglapp | ||
615 | 88 | ) | ||
616 | 89 | |||
617 | 90 | mir_add_wrapped_executable(mir_demo_client_tooltip | ||
618 | 91 | tooltip.c | ||
619 | 92 | ) | ||
620 | 93 | target_link_libraries(mir_demo_client_tooltip | ||
621 | 94 | eglapp | ||
622 | 95 | ) | ||
623 | 96 | |||
624 | 97 | mir_add_wrapped_executable(mir_demo_client_touch_validator | ||
625 | 98 | client_touch_validator.cpp | ||
626 | 99 | ) | ||
627 | 100 | target_link_libraries(mir_demo_client_touch_validator | ||
628 | 101 | eglapp | ||
629 | 102 | ) | ||
630 | 103 | |||
631 | 104 | mir_add_wrapped_executable(mir_demo_client_basic | ||
632 | 105 | basic.c | ||
633 | 106 | ) | ||
634 | 107 | |||
635 | 108 | mir_add_wrapped_executable(mir_demo_client_input_shapes | ||
636 | 109 | input_shapes.cpp | ||
637 | 110 | ) | ||
638 | 111 | target_link_libraries(mir_demo_client_input_shapes eglapp) | ||
639 | 112 | |||
640 | 113 | target_link_libraries(mir_demo_client_basic | ||
641 | 114 | mirclient | ||
642 | 115 | |||
643 | 116 | ${Boost_LIBRARIES} | ||
644 | 117 | ${CMAKE_THREAD_LIBS_INIT} | ||
645 | 118 | ) | ||
648 | 119 | 22 | ||
649 | 120 | mir_add_wrapped_executable(mir_demo_client_release_at_exit release_at_exit.c) | 23 | mir_add_wrapped_executable(mir_demo_client_release_at_exit release_at_exit.c) |
651 | 121 | target_link_libraries(mir_demo_client_release_at_exit mirclient) | 24 | target_link_libraries (mir_demo_client_release_at_exit mirclient) |
652 | 122 | 25 | ||
653 | 123 | mir_add_wrapped_executable(mir_demo_client_multiwin multiwin.c) | 26 | mir_add_wrapped_executable(mir_demo_client_multiwin multiwin.c) |
655 | 124 | target_link_libraries(mir_demo_client_multiwin mirclient) | 27 | target_link_libraries (mir_demo_client_multiwin mirclient) |
656 | 125 | 28 | ||
657 | 126 | mir_add_wrapped_executable(mir_demo_client_fingerpaint fingerpaint.c) | 29 | mir_add_wrapped_executable(mir_demo_client_fingerpaint fingerpaint.c) |
659 | 127 | target_link_libraries(mir_demo_client_fingerpaint mirclient) | 30 | target_link_libraries (mir_demo_client_fingerpaint mirclient) |
660 | 128 | 31 | ||
661 | 129 | mir_add_wrapped_executable(mir_demo_client_progressbar progressbar.c) | 32 | mir_add_wrapped_executable(mir_demo_client_progressbar progressbar.c) |
694 | 130 | target_link_libraries(mir_demo_client_progressbar mirclient) | 33 | target_link_libraries (mir_demo_client_progressbar mirclient) |
695 | 131 | 34 | ||
696 | 132 | mir_add_wrapped_executable(mir_demo_client_display_config demo_client_display_config.c) | 35 | mir_add_wrapped_executable(mir_demo_client_flicker flicker.c) |
697 | 133 | target_link_libraries(mir_demo_client_display_config eglapp) | 36 | target_link_libraries (mir_demo_client_flicker mirclient ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) |
666 | 134 | |||
667 | 135 | mir_add_wrapped_executable(mir_demo_client_eglsquare eglsquare.cpp) | ||
668 | 136 | target_link_libraries(mir_demo_client_eglsquare eglapp) | ||
669 | 137 | |||
670 | 138 | if ("${CMAKE_CXX_COMPILER}" MATCHES "clang") | ||
671 | 139 | target_link_libraries(mir_demo_client_eglsquare atomic) | ||
672 | 140 | endif() | ||
673 | 141 | |||
674 | 142 | mir_add_wrapped_executable(mir_demo_client_flicker | ||
675 | 143 | flicker.c | ||
676 | 144 | ) | ||
677 | 145 | |||
678 | 146 | target_link_libraries(mir_demo_client_flicker | ||
679 | 147 | mirclient | ||
680 | 148 | |||
681 | 149 | ${Boost_LIBRARIES} | ||
682 | 150 | ${CMAKE_THREAD_LIBS_INIT} | ||
683 | 151 | ) | ||
684 | 152 | |||
685 | 153 | mir_add_wrapped_executable(mir_demo_client_scroll | ||
686 | 154 | scroll.cpp | ||
687 | 155 | ) | ||
688 | 156 | |||
689 | 157 | target_link_libraries(mir_demo_client_scroll | ||
690 | 158 | eglapp | ||
691 | 159 | mirdraw | ||
692 | 160 | ${GLESv2_LIBRARIES} | ||
693 | 161 | ) | ||
698 | 162 | 37 | ||
699 | 163 | mir_add_wrapped_executable(mir_demo_client_prompt_session prompt_session.c) | 38 | mir_add_wrapped_executable(mir_demo_client_prompt_session prompt_session.c) |
703 | 164 | target_link_libraries(mir_demo_client_prompt_session mirclient) | 39 | target_link_libraries (mir_demo_client_prompt_session mirclient) |
701 | 165 | |||
702 | 166 | add_library(mirdraw STATIC graphics_utils.cpp) | ||
704 | 167 | 40 | ||
705 | 168 | include_directories( | 41 | include_directories( |
706 | 169 | ${PROJECT_SOURCE_DIR}/include/miral | 42 | ${PROJECT_SOURCE_DIR}/include/miral |
707 | @@ -238,51 +111,91 @@ | |||
708 | 238 | endif () | 111 | endif () |
709 | 239 | endif () | 112 | endif () |
710 | 240 | 113 | ||
746 | 241 | mir_add_wrapped_executable(mir_demo_client_multistream | 114 | mir_add_wrapped_executable(mir_demo_client_prerendered_frames prerendered_frames.c) |
747 | 242 | multi_stream.cpp | 115 | target_link_libraries (mir_demo_client_prerendered_frames mirclient m) |
748 | 243 | ) | 116 | |
749 | 244 | 117 | mir_add_wrapped_executable(mir_demo_client_chain_jumping_buffers chain_jumping_buffers.c) | |
750 | 245 | target_link_libraries(mir_demo_client_multistream | 118 | target_link_libraries (mir_demo_client_chain_jumping_buffers mirclient) |
716 | 246 | mirclient | ||
717 | 247 | eglapp | ||
718 | 248 | ${Boost_LIBRARIES} | ||
719 | 249 | ) | ||
720 | 250 | |||
721 | 251 | mir_add_wrapped_executable(mir_demo_client_render_surface | ||
722 | 252 | render_surface.cpp | ||
723 | 253 | ) | ||
724 | 254 | |||
725 | 255 | target_link_libraries(mir_demo_client_render_surface | ||
726 | 256 | mirclient | ||
727 | 257 | eglapp | ||
728 | 258 | ) | ||
729 | 259 | |||
730 | 260 | mir_add_wrapped_executable(mir_demo_client_prerendered_frames | ||
731 | 261 | prerendered_frames.c | ||
732 | 262 | ) | ||
733 | 263 | |||
734 | 264 | target_link_libraries(mir_demo_client_prerendered_frames | ||
735 | 265 | mirclient | ||
736 | 266 | m | ||
737 | 267 | ) | ||
738 | 268 | |||
739 | 269 | mir_add_wrapped_executable(mir_demo_client_chain_jumping_buffers | ||
740 | 270 | chain_jumping_buffers.c | ||
741 | 271 | ) | ||
742 | 272 | |||
743 | 273 | target_link_libraries(mir_demo_client_chain_jumping_buffers | ||
744 | 274 | mirclient | ||
745 | 275 | ) | ||
751 | 276 | 119 | ||
752 | 277 | include_directories(${MIR_GENERATED_INCLUDE_DIRECTORIES}) | 120 | include_directories(${MIR_GENERATED_INCLUDE_DIRECTORIES}) |
753 | 278 | 121 | ||
754 | 279 | mir_add_wrapped_executable(mir_demo_client_wayland wayland_client.c) | 122 | mir_add_wrapped_executable(mir_demo_client_wayland wayland_client.c) |
759 | 280 | target_link_libraries(mir_demo_client_wayland | 123 | target_link_libraries (mir_demo_client_wayland ${WAYLAND_CLIENT_LDFLAGS} ${WAYLAND_CLIENT_LIBRARIES}) |
756 | 281 | |||
757 | 282 | ${WAYLAND_CLIENT_LIBRARIES} | ||
758 | 283 | ) | ||
760 | 284 | 124 | ||
761 | 285 | mir_add_wrapped_executable(mir_demo_client_screencast screencast.cpp) | 125 | mir_add_wrapped_executable(mir_demo_client_screencast screencast.cpp) |
765 | 286 | 126 | target_link_libraries (mir_demo_client_screencast mirclient) | |
766 | 287 | target_link_libraries(mir_demo_client_screencast mirclient) | 127 | |
767 | 288 | 128 | ||
768 | 129 | # The remaining examples are dependent on Mir EGL being supported. | ||
769 | 130 | if (MIR_EGL_SUPPORTED) | ||
770 | 131 | |||
771 | 132 | add_library(eglapp STATIC | ||
772 | 133 | eglapp.c | ||
773 | 134 | client_helpers.cpp | ||
774 | 135 | ) | ||
775 | 136 | |||
776 | 137 | target_link_libraries(eglapp | ||
777 | 138 | mirclient | ||
778 | 139 | ${EGL_LIBRARIES} | ||
779 | 140 | ${GLESv2_LIBRARIES} | ||
780 | 141 | ) | ||
781 | 142 | |||
782 | 143 | mir_add_wrapped_executable(mir_demo_client_animated_cursor animated_cursor_demo_client.c) | ||
783 | 144 | target_link_libraries (mir_demo_client_animated_cursor eglapp) | ||
784 | 145 | |||
785 | 146 | mir_add_wrapped_executable(mir_demo_client_eglflash eglflash.c) | ||
786 | 147 | target_link_libraries (mir_demo_client_eglflash eglapp) | ||
787 | 148 | |||
788 | 149 | mir_add_wrapped_executable(mir_demo_client_egltriangle egltriangle.c) | ||
789 | 150 | target_link_libraries (mir_demo_client_egltriangle eglapp) | ||
790 | 151 | |||
791 | 152 | mir_add_wrapped_executable(mir_demo_client_target target.c) | ||
792 | 153 | target_link_libraries (mir_demo_client_target eglapp) | ||
793 | 154 | |||
794 | 155 | mir_add_wrapped_executable(mir_demo_client_pointer_confinement pointer_confinement.c) | ||
795 | 156 | target_link_libraries (mir_demo_client_pointer_confinement eglapp) | ||
796 | 157 | |||
797 | 158 | mir_add_wrapped_executable(mir_demo_client_camera camera.c) | ||
798 | 159 | target_link_libraries (mir_demo_client_camera eglapp) | ||
799 | 160 | |||
800 | 161 | mir_add_wrapped_executable(mir_demo_client_eglcounter eglcounter.cpp) | ||
801 | 162 | target_link_libraries (mir_demo_client_eglcounter eglapp) | ||
802 | 163 | |||
803 | 164 | mir_add_wrapped_executable(mir_demo_client_eglplasma eglplasma.c) | ||
804 | 165 | target_link_libraries (mir_demo_client_eglplasma eglapp) | ||
805 | 166 | |||
806 | 167 | mir_add_wrapped_executable(mir_demo_client_cursors cursors_demo_client.c) | ||
807 | 168 | target_link_libraries (mir_demo_client_cursors eglapp) | ||
808 | 169 | |||
809 | 170 | mir_add_wrapped_executable(mir_demo_client_eglstateswitcher eglstateswitcher.c) | ||
810 | 171 | target_link_libraries (mir_demo_client_eglstateswitcher eglapp) | ||
811 | 172 | |||
812 | 173 | mir_add_wrapped_executable(mir_demo_client_tooltip tooltip.c) | ||
813 | 174 | target_link_libraries (mir_demo_client_tooltip eglapp) | ||
814 | 175 | |||
815 | 176 | mir_add_wrapped_executable(mir_demo_client_touch_validator client_touch_validator.cpp) | ||
816 | 177 | target_link_libraries (mir_demo_client_touch_validator eglapp) | ||
817 | 178 | |||
818 | 179 | mir_add_wrapped_executable(mir_demo_client_display_config demo_client_display_config.c) | ||
819 | 180 | target_link_libraries (mir_demo_client_display_config eglapp) | ||
820 | 181 | |||
821 | 182 | mir_add_wrapped_executable(mir_demo_client_eglsquare eglsquare.cpp) | ||
822 | 183 | target_link_libraries (mir_demo_client_eglsquare eglapp) | ||
823 | 184 | |||
824 | 185 | if ("${CMAKE_CXX_COMPILER}" MATCHES "clang") | ||
825 | 186 | target_link_libraries (mir_demo_client_eglsquare atomic) | ||
826 | 187 | endif() | ||
827 | 188 | |||
828 | 189 | mir_add_wrapped_executable(mir_demo_client_input_shapes input_shapes.cpp) | ||
829 | 190 | target_link_libraries (mir_demo_client_input_shapes eglapp) | ||
830 | 191 | |||
831 | 192 | mir_add_wrapped_executable(mir_demo_client_scroll scroll.cpp) | ||
832 | 193 | target_link_libraries (mir_demo_client_scroll eglapp mirdraw ${GLESv2_LIBRARIES}) | ||
833 | 194 | |||
834 | 195 | mir_add_wrapped_executable(mir_demo_client_multistream multi_stream.cpp) | ||
835 | 196 | target_link_libraries (mir_demo_client_multistream mirclient eglapp ${Boost_LIBRARIES}) | ||
836 | 197 | |||
837 | 198 | mir_add_wrapped_executable(mir_demo_client_render_surface render_surface.cpp) | ||
838 | 199 | target_link_libraries (mir_demo_client_render_surface mirclient eglapp) | ||
839 | 200 | |||
840 | 201 | endif() # MIR_EGL_SUPPORTED | ||
841 | 289 | 202 | ||
842 | === modified file 'examples/miral-kiosk/CMakeLists.txt' | |||
843 | --- examples/miral-kiosk/CMakeLists.txt 2017-08-31 15:12:09 +0000 | |||
844 | +++ examples/miral-kiosk/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
845 | @@ -10,3 +10,8 @@ | |||
846 | 10 | ) | 10 | ) |
847 | 11 | 11 | ||
848 | 12 | target_link_libraries(miral-kiosk miral) | 12 | target_link_libraries(miral-kiosk miral) |
849 | 13 | |||
850 | 14 | # I'm not sure why this is needed in a chroot, but it's not worth finding out | ||
851 | 15 | if(DEFINED MIR_CHROOT) | ||
852 | 16 | target_link_libraries(miral-kiosk EGL ${GLESv2_LIBRARIES}) | ||
853 | 17 | endif() | ||
854 | 13 | 18 | ||
855 | === modified file 'examples/miral-shell/miral-app.sh' | |||
856 | --- examples/miral-shell/miral-app.sh 2017-09-25 17:59:37 +0000 | |||
857 | +++ examples/miral-shell/miral-app.sh 2017-10-27 17:26:09 +0000 | |||
858 | @@ -45,14 +45,20 @@ | |||
859 | 45 | if [ -e "${socket}" ]; then echo "Error: session endpoint '${socket}' already exists"; exit 1 ;fi | 45 | if [ -e "${socket}" ]; then echo "Error: session endpoint '${socket}' already exists"; exit 1 ;fi |
860 | 46 | if [ -e "${XDG_RUNTIME_DIR}/${wayland_display}" ]; then echo "Error: wayland endpoint '${wayland_display}' already exists"; exit 1 ;fi | 46 | if [ -e "${XDG_RUNTIME_DIR}/${wayland_display}" ]; then echo "Error: wayland endpoint '${wayland_display}' already exists"; exit 1 ;fi |
861 | 47 | 47 | ||
862 | 48 | qt_qpa_platform=ubuntumirclient | ||
863 | 48 | qtubuntu_desktop_installed=$(apt list qtubuntu-desktop 2>/dev/null | grep installed | wc -l) | 49 | qtubuntu_desktop_installed=$(apt list qtubuntu-desktop 2>/dev/null | grep installed | wc -l) |
865 | 49 | if [ "${qtubuntu_desktop_installed}" == "0" ]; then echo "Need qtubuntu-desktop - run \"sudo apt install qtubuntu-desktop\""; exit 1 ;fi | 50 | if [ "${qtubuntu_desktop_installed}" == "0" ] |
866 | 51 | then | ||
867 | 52 | echo "** Warning ** defaulting to Wayland backend for Qt" | ||
868 | 53 | echo "For the best experience install qtubuntu-desktop - run \"sudo apt install qtubuntu-desktop\"" | ||
869 | 54 | qt_qpa_platform=wayland | ||
870 | 55 | fi | ||
871 | 50 | 56 | ||
872 | 51 | sh -c "${bindir}${miral_server} $* ${hostsocket} --file ${socket} --wayland-socket-name ${wayland_display} --desktop_file_hint=miral-shell.desktop"& | 57 | sh -c "${bindir}${miral_server} $* ${hostsocket} --file ${socket} --wayland-socket-name ${wayland_display} --desktop_file_hint=miral-shell.desktop"& |
873 | 52 | 58 | ||
874 | 53 | while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done | 59 | while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done |
875 | 54 | 60 | ||
876 | 55 | unset QT_QPA_PLATFORMTHEME | 61 | unset QT_QPA_PLATFORMTHEME |
878 | 56 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir WAYLAND_DISPLAY=${wayland_display} dbus-run-session -- ${launcher} | 62 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=${qt_qpa_platform} SDL_VIDEODRIVER=wayland WAYLAND_DISPLAY=${wayland_display} dbus-run-session -- ${launcher} |
879 | 57 | killall ${bindir}${miral_server} | 63 | killall ${bindir}${miral_server} |
880 | 58 | 64 | ||
881 | 59 | 65 | ||
882 | === modified file 'examples/miral-shell/miral-desktop.sh' | |||
883 | --- examples/miral-shell/miral-desktop.sh 2017-09-19 08:52:48 +0000 | |||
884 | +++ examples/miral-shell/miral-desktop.sh 2017-10-27 17:26:09 +0000 | |||
885 | @@ -37,8 +37,14 @@ | |||
886 | 37 | if [ -e "${socket}" ]; then echo "Error: session endpoint '${socket}' already exists"; exit 1 ;fi | 37 | if [ -e "${socket}" ]; then echo "Error: session endpoint '${socket}' already exists"; exit 1 ;fi |
887 | 38 | if [ -e "${XDG_RUNTIME_DIR}/${wayland_display}" ]; then echo "Error: wayland endpoint '${wayland_display}' already exists"; exit 1 ;fi | 38 | if [ -e "${XDG_RUNTIME_DIR}/${wayland_display}" ]; then echo "Error: wayland endpoint '${wayland_display}' already exists"; exit 1 ;fi |
888 | 39 | 39 | ||
889 | 40 | qt_qpa_platform=ubuntumirclient | ||
890 | 40 | qtubuntu_desktop_installed=$(apt list qtubuntu-desktop 2>/dev/null | grep installed | wc -l) | 41 | qtubuntu_desktop_installed=$(apt list qtubuntu-desktop 2>/dev/null | grep installed | wc -l) |
892 | 41 | if [ "${qtubuntu_desktop_installed}" == "0" ]; then echo "Need qtubuntu-desktop - run \"sudo apt install qtubuntu-desktop\""; exit 1 ;fi | 42 | if [ "${qtubuntu_desktop_installed}" == "0" ] |
893 | 43 | then | ||
894 | 44 | echo "** Warning ** defaulting to Wayland backend for Qt" | ||
895 | 45 | echo "For the best experience install qtubuntu-desktop - run \"sudo apt install qtubuntu-desktop\"" | ||
896 | 46 | qt_qpa_platform=wayland | ||
897 | 47 | fi | ||
898 | 42 | 48 | ||
899 | 43 | sudo ls >> /dev/null | 49 | sudo ls >> /dev/null |
900 | 44 | oldvt=$(sudo fgconsole) | 50 | oldvt=$(sudo fgconsole) |
901 | @@ -47,6 +53,6 @@ | |||
902 | 47 | while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done | 53 | while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done |
903 | 48 | 54 | ||
904 | 49 | unset QT_QPA_PLATFORMTHEME | 55 | unset QT_QPA_PLATFORMTHEME |
906 | 50 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir WAYLAND_DISPLAY=${wayland_display} dbus-run-session -- ${launcher} | 56 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=${qt_qpa_platform} SDL_VIDEODRIVER=wayland WAYLAND_DISPLAY=${wayland_display} dbus-run-session -- ${launcher} |
907 | 51 | sudo killall ${bindir}${miral_server} | 57 | sudo killall ${bindir}${miral_server} |
908 | 52 | 58 | ||
909 | 53 | 59 | ||
910 | === modified file 'examples/miral-shell/miral-run.sh' | |||
911 | --- examples/miral-shell/miral-run.sh 2017-08-21 15:58:34 +0000 | |||
912 | +++ examples/miral-shell/miral-run.sh 2017-10-27 17:26:09 +0000 | |||
913 | @@ -14,4 +14,15 @@ | |||
914 | 14 | then extras='--app-id com.canonical.miral.Terminal' | 14 | then extras='--app-id com.canonical.miral.Terminal' |
915 | 15 | fi | 15 | fi |
916 | 16 | unset QT_QPA_PLATFORMTHEME | 16 | unset QT_QPA_PLATFORMTHEME |
918 | 17 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir "$@" ${extras}& | 17 | |
919 | 18 | qt_qpa_platform=ubuntumirclient | ||
920 | 19 | qtubuntu_desktop_installed=$(apt list qtubuntu-desktop | ||
921 | 20 | 2>/dev/null | grep installed | wc -l) | ||
922 | 21 | if [ "${qtubuntu_desktop_installed}" == "0" ] | ||
923 | 22 | then | ||
924 | 23 | echo "** Warning ** defaulting to Wayland backend for Qt" | ||
925 | 24 | echo "For the best experience install qtubuntu-desktop - run \"sudo apt install qtubuntu-desktop\"" | ||
926 | 25 | qt_qpa_platform=wayland | ||
927 | 26 | fi | ||
928 | 27 | |||
929 | 28 | MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=${qt_qpa_platform} SDL_VIDEODRIVER=wayland "$@" ${extras}& | ||
930 | 18 | 29 | ||
931 | === modified file 'examples/miral-shell/miral-xrun.sh' | |||
932 | --- examples/miral-shell/miral-xrun.sh 2017-09-29 16:19:42 +0000 | |||
933 | +++ examples/miral-shell/miral-xrun.sh 2017-10-27 17:26:09 +0000 | |||
934 | @@ -41,7 +41,6 @@ | |||
935 | 41 | else | 41 | else |
936 | 42 | echo "Error: Cannot detect Mir endpoint"; exit 1 | 42 | echo "Error: Cannot detect Mir endpoint"; exit 1 |
937 | 43 | fi | 43 | fi |
938 | 44 | MIR_SOCKET=${socket_value} | ||
939 | 45 | x11_server_args=-rootless | 44 | x11_server_args=-rootless |
940 | 46 | elif [ "${x11_server}" == "Xwayland" ]; | 45 | elif [ "${x11_server}" == "Xwayland" ]; |
941 | 47 | then | 46 | then |
942 | @@ -51,10 +50,15 @@ | |||
943 | 51 | if [ -e "${XDG_RUNTIME_DIR}/miral_wayland" ]; | 50 | if [ -e "${XDG_RUNTIME_DIR}/miral_wayland" ]; |
944 | 52 | then | 51 | then |
945 | 53 | socket_value=miral_wayland | 52 | socket_value=miral_wayland |
946 | 53 | elif [ -e "${XDG_RUNTIME_DIR}/wayland-1" ] | ||
947 | 54 | then | ||
948 | 55 | socket_value=wayland-1 | ||
949 | 56 | elif [ -e "${XDG_RUNTIME_DIR}/wayland-0" ] | ||
950 | 57 | then | ||
951 | 58 | socket_value=wayland-0 | ||
952 | 54 | else | 59 | else |
953 | 55 | echo "Error: Cannot detect Mir-Wayland endpoint"; exit 1 | 60 | echo "Error: Cannot detect Mir-Wayland endpoint"; exit 1 |
954 | 56 | fi | 61 | fi |
955 | 57 | WAYLAND_DISPLAY=${socket_value} | ||
956 | 58 | x11_server_args= | 62 | x11_server_args= |
957 | 59 | fi | 63 | fi |
958 | 60 | 64 | ||
959 | @@ -64,6 +68,7 @@ | |||
960 | 64 | let port+=1 | 68 | let port+=1 |
961 | 65 | done | 69 | done |
962 | 66 | 70 | ||
964 | 67 | ${x11_server} ${x11_server_args} :${port} & pid=$! | 71 | MIR_SOCKET=${socket_value} WAYLAND_DISPLAY=${socket_value} ${x11_server} ${x11_server_args} :${port} & pid=$! |
965 | 72 | while [ ! -e "/tmp/.X11-unix/X${port}" ]; do echo "waiting for DISPLAY=:${port}"; sleep 1 ;done | ||
966 | 68 | DISPLAY=:${port} "$@" | 73 | DISPLAY=:${port} "$@" |
967 | 69 | kill ${pid} | 74 | kill ${pid} |
968 | 70 | 75 | ||
969 | === modified file 'examples/miral-shell/shell_main.cpp' | |||
970 | --- examples/miral-shell/shell_main.cpp 2017-08-21 15:58:34 +0000 | |||
971 | +++ examples/miral-shell/shell_main.cpp 2017-10-27 17:26:09 +0000 | |||
972 | @@ -83,7 +83,7 @@ | |||
973 | 83 | { | 83 | { |
974 | 84 | CommandLineOption{[&](std::string const& ) { }, | 84 | CommandLineOption{[&](std::string const& ) { }, |
975 | 85 | "desktop_file_hint", "Ignored for Unity8 compatibility", "miral-shell.desktop"}, | 85 | "desktop_file_hint", "Ignored for Unity8 compatibility", "miral-shell.desktop"}, |
977 | 86 | CursorTheme{"DMZ-White"}, | 86 | CursorTheme{"default"}, |
978 | 87 | window_managers, | 87 | window_managers, |
979 | 88 | display_configuration_options, | 88 | display_configuration_options, |
980 | 89 | launcher, | 89 | launcher, |
981 | 90 | 90 | ||
982 | === modified file 'examples/miral-shell/spinner/eglspinner.cpp' | |||
983 | --- examples/miral-shell/spinner/eglspinner.cpp 2017-08-21 15:58:34 +0000 | |||
984 | +++ examples/miral-shell/spinner/eglspinner.cpp 2017-10-27 17:26:09 +0000 | |||
985 | @@ -1,5 +1,5 @@ | |||
986 | 1 | /* | 1 | /* |
988 | 2 | * Copyright © 2013-2015 Canonical Ltd. | 2 | * Copyright © 2013-2017 Canonical Ltd. |
989 | 3 | * | 3 | * |
990 | 4 | * This program is free software: you can redistribute it and/or modify | 4 | * This program is free software: you can redistribute it and/or modify |
991 | 5 | * under the terms of the GNU General Public License version 2 or 3 as as | 5 | * under the terms of the GNU General Public License version 2 or 3 as as |
992 | @@ -19,6 +19,14 @@ | |||
993 | 19 | * Kevin DuBois <kevin.dubois@canonical.com> | 19 | * Kevin DuBois <kevin.dubois@canonical.com> |
994 | 20 | */ | 20 | */ |
995 | 21 | 21 | ||
996 | 22 | // Ugly way to detect the Mir EGL patch to mesa | ||
997 | 23 | // NB this has to be before any other includes | ||
998 | 24 | #define MIR_EGL_PLATFORM | ||
999 | 25 | #include <EGL/eglplatform.h> | ||
1000 | 26 | #ifndef MIR_CLIENT_API_VERSION | ||
1001 | 27 | #define MIR_EGL_UNAVAILABLE | ||
1002 | 28 | #endif | ||
1003 | 29 | |||
1004 | 22 | #include "splash.h" | 30 | #include "splash.h" |
1005 | 23 | 31 | ||
1006 | 24 | #include <chrono> | 32 | #include <chrono> |
1007 | @@ -143,7 +151,7 @@ | |||
1008 | 143 | //1.) 0.0 - 0.6: logo fades in fully | 151 | //1.) 0.0 - 0.6: logo fades in fully |
1009 | 144 | //2.) 0.0 - 6.0: logo does one full spin 360° | 152 | //2.) 0.0 - 6.0: logo does one full spin 360° |
1010 | 145 | //3.) 6.0 - 6.833: glow fades in fully, black-background fades out to 50% | 153 | //3.) 6.0 - 6.833: glow fades in fully, black-background fades out to 50% |
1012 | 146 | //4.) 6.833 - 7.666: glow fades out fully, black-background fades out to 0% | 154 | //4.) 6.833 - 7.666: glow fades out fully, black-background fades out to 0% |
1013 | 147 | //5.) 7.666 - 8.266: logo fades out fully | 155 | //5.) 7.666 - 8.266: logo fades out fully |
1014 | 148 | //8.266..: now spinner can be closed as all its elements are faded out | 156 | //8.266..: now spinner can be closed as all its elements are faded out |
1015 | 149 | 157 | ||
1016 | @@ -221,11 +229,14 @@ | |||
1017 | 221 | "} \n"; | 229 | "} \n"; |
1018 | 222 | 230 | ||
1019 | 223 | std::atomic<bool> dying{false}; | 231 | std::atomic<bool> dying{false}; |
1020 | 232 | |||
1021 | 233 | #ifndef MIR_EGL_UNAVAILABLE | ||
1022 | 224 | void lifecycle_event_callback(MirConnection* /*connection*/, MirLifecycleState state, void* context) | 234 | void lifecycle_event_callback(MirConnection* /*connection*/, MirLifecycleState state, void* context) |
1023 | 225 | { | 235 | { |
1024 | 226 | if (state == mir_lifecycle_connection_lost) | 236 | if (state == mir_lifecycle_connection_lost) |
1025 | 227 | static_cast<decltype(dying)*>(context)->store(true); | 237 | static_cast<decltype(dying)*>(context)->store(true); |
1026 | 228 | } | 238 | } |
1027 | 239 | #endif | ||
1028 | 229 | } | 240 | } |
1029 | 230 | 241 | ||
1030 | 231 | struct SpinnerSplash::Self | 242 | struct SpinnerSplash::Self |
1031 | @@ -254,6 +265,7 @@ | |||
1032 | 254 | void SpinnerSplash::operator()(MirConnection* const connection) | 265 | void SpinnerSplash::operator()(MirConnection* const connection) |
1033 | 255 | try | 266 | try |
1034 | 256 | { | 267 | { |
1035 | 268 | #ifndef MIR_EGL_UNAVAILABLE | ||
1036 | 257 | GLuint prog[2]; | 269 | GLuint prog[2]; |
1037 | 258 | GLuint texture[2]; | 270 | GLuint texture[2]; |
1038 | 259 | GLint vpos[2]; | 271 | GLint vpos[2]; |
1039 | @@ -365,6 +377,9 @@ | |||
1040 | 365 | 377 | ||
1041 | 366 | glDeleteTextures(2, texture); | 378 | glDeleteTextures(2, texture); |
1042 | 367 | g_timer_destroy (timer); | 379 | g_timer_destroy (timer); |
1043 | 380 | #else | ||
1044 | 381 | (void)connection; | ||
1045 | 382 | #endif | ||
1046 | 368 | } | 383 | } |
1047 | 369 | catch (std::exception const& x) | 384 | catch (std::exception const& x) |
1048 | 370 | { | 385 | { |
1049 | 371 | 386 | ||
1050 | === modified file 'examples/miral-shell/titlebar_config.cpp' | |||
1051 | --- examples/miral-shell/titlebar_config.cpp 2017-08-21 15:58:34 +0000 | |||
1052 | +++ examples/miral-shell/titlebar_config.cpp 2017-10-27 17:26:09 +0000 | |||
1053 | @@ -17,12 +17,30 @@ | |||
1054 | 17 | */ | 17 | */ |
1055 | 18 | 18 | ||
1056 | 19 | #include "titlebar_config.h" | 19 | #include "titlebar_config.h" |
1057 | 20 | #include <unistd.h> | ||
1058 | 20 | #include <mutex> | 21 | #include <mutex> |
1059 | 21 | 22 | ||
1060 | 22 | namespace | 23 | namespace |
1061 | 23 | { | 24 | { |
1062 | 25 | auto default_font() -> std::string | ||
1063 | 26 | { | ||
1064 | 27 | for (std::string const file : { "Ubuntu-B.ttf", "FreeSansBold.ttf" }) | ||
1065 | 28 | { | ||
1066 | 29 | for (auto const path : { "/usr/share/fonts/truetype/ubuntu-font-family/", // Ubuntu Ubuntu-B.ttf | ||
1067 | 30 | "/usr/share/fonts/truetype/freefont/", // Debian FreeSansBold.ttf | ||
1068 | 31 | "/usr/share/fonts/gnu-free/"}) // Fedora FreeSansBold.ttf | ||
1069 | 32 | { | ||
1070 | 33 | auto const full_path = path + file; | ||
1071 | 34 | if (access(full_path.c_str(), R_OK) == 0) | ||
1072 | 35 | return full_path; | ||
1073 | 36 | } | ||
1074 | 37 | } | ||
1075 | 38 | |||
1076 | 39 | return "/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf"; | ||
1077 | 40 | } | ||
1078 | 41 | |||
1079 | 24 | std::mutex mutex; | 42 | std::mutex mutex; |
1081 | 25 | std::string font_file{"/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-B.ttf"}; | 43 | std::string font_file{default_font()}; |
1082 | 26 | } | 44 | } |
1083 | 27 | 45 | ||
1084 | 28 | void titlebar::font_file(std::string const& font_file) | 46 | void titlebar::font_file(std::string const& font_file) |
1085 | 29 | 47 | ||
1086 | === modified file 'include/core/mir/optional_value.h' | |||
1087 | --- include/core/mir/optional_value.h 2017-07-28 17:00:43 +0000 | |||
1088 | +++ include/core/mir/optional_value.h 2017-10-27 17:26:09 +0000 | |||
1089 | @@ -59,6 +59,11 @@ | |||
1090 | 59 | return std::move(value_); | 59 | return std::move(value_); |
1091 | 60 | } | 60 | } |
1092 | 61 | 61 | ||
1093 | 62 | operator bool() const | ||
1094 | 63 | { | ||
1095 | 64 | return is_set(); | ||
1096 | 65 | } | ||
1097 | 66 | |||
1098 | 62 | private: | 67 | private: |
1099 | 63 | void die_if_unset() const | 68 | void die_if_unset() const |
1100 | 64 | { | 69 | { |
1101 | 65 | 70 | ||
1102 | === modified file 'include/server/mir/server_action_queue.h' | |||
1103 | --- include/server/mir/server_action_queue.h 2017-07-28 17:00:43 +0000 | |||
1104 | +++ include/server/mir/server_action_queue.h 2017-10-27 17:26:09 +0000 | |||
1105 | @@ -32,6 +32,16 @@ | |||
1106 | 32 | virtual ~ServerActionQueue() = default; | 32 | virtual ~ServerActionQueue() = default; |
1107 | 33 | 33 | ||
1108 | 34 | virtual void enqueue(void const* owner, ServerAction const& action) = 0; | 34 | virtual void enqueue(void const* owner, ServerAction const& action) = 0; |
1109 | 35 | /** | ||
1110 | 36 | * Enqueue an action to be run, guaranteeing that it *will* be run. | ||
1111 | 37 | * | ||
1112 | 38 | * The action will be run even if the queue is not normally being drained | ||
1113 | 39 | * (for example, if the main loop is suspended). If running on the queue is | ||
1114 | 40 | * not possible, the action will be run on the caller's thread. | ||
1115 | 41 | * | ||
1116 | 42 | * \param [in] action Functor to invoke. | ||
1117 | 43 | */ | ||
1118 | 44 | virtual void enqueue_with_guaranteed_execution(ServerAction const& action) = 0; | ||
1119 | 35 | virtual void pause_processing_for(void const* owner) = 0; | 45 | virtual void pause_processing_for(void const* owner) = 0; |
1120 | 36 | virtual void resume_processing_for(void const* owner) = 0; | 46 | virtual void resume_processing_for(void const* owner) = 0; |
1121 | 37 | 47 | ||
1122 | 38 | 48 | ||
1123 | === modified file 'include/server/mir/shell/persistent_surface_store.h' | |||
1124 | --- include/server/mir/shell/persistent_surface_store.h 2017-07-28 17:00:43 +0000 | |||
1125 | +++ include/server/mir/shell/persistent_surface_store.h 2017-10-27 17:26:09 +0000 | |||
1126 | @@ -22,7 +22,7 @@ | |||
1127 | 22 | #include <memory> | 22 | #include <memory> |
1128 | 23 | #include <vector> | 23 | #include <vector> |
1129 | 24 | #include <array> | 24 | #include <array> |
1131 | 25 | #include <uuid/uuid.h> | 25 | #include <uuid.h> |
1132 | 26 | 26 | ||
1133 | 27 | 27 | ||
1134 | 28 | namespace mir | 28 | namespace mir |
1135 | 29 | 29 | ||
1136 | === modified file 'src/CMakeLists.txt' | |||
1137 | --- src/CMakeLists.txt 2017-09-08 13:26:03 +0000 | |||
1138 | +++ src/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1139 | @@ -18,7 +18,6 @@ | |||
1140 | 18 | # Add the core and platform implementations before exposing any private APIs | 18 | # Add the core and platform implementations before exposing any private APIs |
1141 | 19 | add_subdirectory(core) | 19 | add_subdirectory(core) |
1142 | 20 | add_subdirectory(platforms/) | 20 | add_subdirectory(platforms/) |
1143 | 21 | add_subdirectory(miral/) | ||
1144 | 22 | 21 | ||
1145 | 23 | # the src/include/... directories should be private to the implementation | 22 | # the src/include/... directories should be private to the implementation |
1146 | 24 | include_directories(${PROJECT_SOURCE_DIR}/src/include/common) | 23 | include_directories(${PROJECT_SOURCE_DIR}/src/include/common) |
1147 | @@ -31,6 +30,7 @@ | |||
1148 | 31 | 30 | ||
1149 | 32 | add_subdirectory(platform/) | 31 | add_subdirectory(platform/) |
1150 | 33 | add_subdirectory(server/) | 32 | add_subdirectory(server/) |
1151 | 33 | add_subdirectory(miral/) | ||
1152 | 34 | add_subdirectory(client/) | 34 | add_subdirectory(client/) |
1153 | 35 | add_subdirectory(utils/) | 35 | add_subdirectory(utils/) |
1154 | 36 | add_subdirectory(renderer/) | 36 | add_subdirectory(renderer/) |
1155 | @@ -54,6 +54,7 @@ | |||
1156 | 54 | set(MIR_PLATFORM_REFERENCES ${MIR_PLATFORM_REFERENCES} PARENT_SCOPE) | 54 | set(MIR_PLATFORM_REFERENCES ${MIR_PLATFORM_REFERENCES} PARENT_SCOPE) |
1157 | 55 | set(MIR_CLIENT_PLATFORM_PATH ${MIR_CLIENT_PLATFORM_PATH} PARENT_SCOPE) | 55 | set(MIR_CLIENT_PLATFORM_PATH ${MIR_CLIENT_PLATFORM_PATH} PARENT_SCOPE) |
1158 | 56 | set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE) | 56 | set(MIR_SERVER_PLATFORM_PATH ${MIR_SERVER_PLATFORM_PATH} PARENT_SCOPE) |
1159 | 57 | set(MIRSERVER_INCLUDE_DIRS ${MIRSERVER_INCLUDE_DIRS} PARENT_SCOPE) | ||
1160 | 57 | 58 | ||
1161 | 58 | # We need the ABI versions in the tests | 59 | # We need the ABI versions in the tests |
1162 | 59 | set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE) | 60 | set(MIR_SERVER_GRAPHICS_PLATFORM_ABI ${MIR_SERVER_GRAPHICS_PLATFORM_ABI} PARENT_SCOPE) |
1163 | 60 | 61 | ||
1164 | === modified file 'src/capnproto/CMakeLists.txt' | |||
1165 | --- src/capnproto/CMakeLists.txt 2017-07-28 17:00:43 +0000 | |||
1166 | +++ src/capnproto/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1167 | @@ -20,7 +20,12 @@ | |||
1168 | 20 | capnp_generate_cpp(CAPNPROTO_INPUT_CONFIG_SRC CAPNPROTO_INPUT_CONFIG_HDRS mir_input_config.capnp) | 20 | capnp_generate_cpp(CAPNPROTO_INPUT_CONFIG_SRC CAPNPROTO_INPUT_CONFIG_HDRS mir_input_config.capnp) |
1169 | 21 | 21 | ||
1170 | 22 | add_library(mircapnproto STATIC ${CAPNPROTO_EVENT_SRC} ${CAPNPROTO_INPUT_CONFIG_SRC}) | 22 | add_library(mircapnproto STATIC ${CAPNPROTO_EVENT_SRC} ${CAPNPROTO_INPUT_CONFIG_SRC}) |
1172 | 23 | target_link_libraries(mircapnproto ${CAPNP_LIBRARIES_LITE}) | 23 | |
1173 | 24 | if (DEFINED CAPNP_LIBRARIES_LITE) | ||
1174 | 25 | target_link_libraries(mircapnproto ${CAPNP_LIBRARIES_LITE}) | ||
1175 | 26 | else() | ||
1176 | 27 | target_link_libraries(mircapnproto $<TARGET_FILE:CapnProto::capnp> $<TARGET_FILE:CapnProto::kj>) | ||
1177 | 28 | endif() | ||
1178 | 24 | 29 | ||
1179 | 25 | list(APPEND MIR_GENERATED_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}) | 30 | list(APPEND MIR_GENERATED_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}) |
1180 | 26 | 31 | ||
1181 | 27 | 32 | ||
1182 | === modified file 'src/include/server/mir/glib_main_loop.h' | |||
1183 | --- src/include/server/mir/glib_main_loop.h 2017-07-28 17:00:43 +0000 | |||
1184 | +++ src/include/server/mir/glib_main_loop.h 2017-10-27 17:26:09 +0000 | |||
1185 | @@ -28,6 +28,7 @@ | |||
1186 | 28 | #include <exception> | 28 | #include <exception> |
1187 | 29 | 29 | ||
1188 | 30 | #include <glib.h> | 30 | #include <glib.h> |
1189 | 31 | #include <deque> | ||
1190 | 31 | 32 | ||
1191 | 32 | namespace mir | 33 | namespace mir |
1192 | 33 | { | 34 | { |
1193 | @@ -76,6 +77,8 @@ | |||
1194 | 76 | void unregister_fd_handler(void const* owner) override; | 77 | void unregister_fd_handler(void const* owner) override; |
1195 | 77 | 78 | ||
1196 | 78 | void enqueue(void const* owner, ServerAction const& action) override; | 79 | void enqueue(void const* owner, ServerAction const& action) override; |
1197 | 80 | void enqueue_with_guaranteed_execution(ServerAction const& action) override; | ||
1198 | 81 | |||
1199 | 79 | void pause_processing_for(void const* owner) override; | 82 | void pause_processing_for(void const* owner) override; |
1200 | 80 | void resume_processing_for(void const* owner) override; | 83 | void resume_processing_for(void const* owner) override; |
1201 | 81 | 84 | ||
1202 | @@ -100,6 +103,8 @@ | |||
1203 | 100 | detail::SignalSources signal_sources; | 103 | detail::SignalSources signal_sources; |
1204 | 101 | std::mutex do_not_process_mutex; | 104 | std::mutex do_not_process_mutex; |
1205 | 102 | std::vector<void const*> do_not_process; | 105 | std::vector<void const*> do_not_process; |
1206 | 106 | std::mutex run_on_halt_mutex; | ||
1207 | 107 | std::deque<ServerAction> run_on_halt_queue; | ||
1208 | 103 | std::function<void()> before_iteration_hook; | 108 | std::function<void()> before_iteration_hook; |
1209 | 104 | std::exception_ptr main_loop_exception; | 109 | std::exception_ptr main_loop_exception; |
1210 | 105 | }; | 110 | }; |
1211 | 106 | 111 | ||
1212 | === modified file 'src/miral/CMakeLists.txt' | |||
1213 | --- src/miral/CMakeLists.txt 2017-09-15 09:43:35 +0000 | |||
1214 | +++ src/miral/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1215 | @@ -96,13 +96,18 @@ | |||
1216 | 96 | 96 | ||
1217 | 97 | # clang generates slightly different symbols (but we don't care) | 97 | # clang generates slightly different symbols (but we don't care) |
1218 | 98 | if (CMAKE_COMPILER_IS_GNUCXX) | 98 | if (CMAKE_COMPILER_IS_GNUCXX) |
1226 | 99 | add_custom_target(check-miral-symbols ALL | 99 | # Using dpkg-gensymbols only makes sense on Debian based distros |
1227 | 100 | DEPENDS miral ${PROJECT_SOURCE_DIR}/debian/libmiral${MIRAL_ABI}.symbols | 100 | if (EXISTS /etc/debian_version) |
1228 | 101 | COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/libmiral${MIRAL_ABI}.symbols | 101 | find_program(MIR_DPKG_GENSYMBOLS dpkg-gensymbols) |
1229 | 102 | COMMAND dpkg-gensymbols -e${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libmiral.so.${MIRAL_ABI} -plibmiral${MIRAL_ABI} -v${MIRAL_VERSION} -O${CMAKE_CURRENT_BINARY_DIR}/libmiral${MIRAL_ABI}.symbols | 102 | if (MIR_DPKG_GENSYMBOLS) |
1230 | 103 | WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" | 103 | add_custom_target(check-miral-symbols ALL |
1231 | 104 | VERBATIM | 104 | DEPENDS miral ${PROJECT_SOURCE_DIR}/debian/libmiral${MIRAL_ABI}.symbols |
1232 | 105 | ) | 105 | COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/libmiral${MIRAL_ABI}.symbols |
1233 | 106 | COMMAND dpkg-gensymbols -e${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libmiral.so.${MIRAL_ABI} -plibmiral${MIRAL_ABI} -v${MIRAL_VERSION} -O${CMAKE_CURRENT_BINARY_DIR}/libmiral${MIRAL_ABI}.symbols | ||
1234 | 107 | WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" | ||
1235 | 108 | VERBATIM) | ||
1236 | 109 | endif() | ||
1237 | 110 | endif() | ||
1238 | 106 | endif() | 111 | endif() |
1239 | 107 | 112 | ||
1240 | 108 | set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") | 113 | set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") |
1241 | 109 | 114 | ||
1242 | === modified file 'src/miral/runner.cpp' | |||
1243 | --- src/miral/runner.cpp 2017-08-21 14:18:55 +0000 | |||
1244 | +++ src/miral/runner.cpp 2017-10-27 17:26:09 +0000 | |||
1245 | @@ -48,7 +48,7 @@ | |||
1246 | 48 | int const argc; | 48 | int const argc; |
1247 | 49 | char const** const argv; | 49 | char const** const argv; |
1248 | 50 | std::string const config_file; | 50 | std::string const config_file; |
1250 | 51 | 51 | ||
1251 | 52 | std::mutex mutex; | 52 | std::mutex mutex; |
1252 | 53 | std::function<void()> start_callback{[]{}}; | 53 | std::function<void()> start_callback{[]{}}; |
1253 | 54 | std::function<void()> stop_callback{[this]{ join_client_threads(weak_server.lock().get()); }}; | 54 | std::function<void()> stop_callback{[this]{ join_client_threads(weak_server.lock().get()); }}; |
1254 | @@ -103,7 +103,7 @@ | |||
1255 | 103 | setenv("GDK_BACKEND", "mir", true); // configure GTK to use Mir | 103 | setenv("GDK_BACKEND", "mir", true); // configure GTK to use Mir |
1256 | 104 | setenv("QT_QPA_PLATFORM", "ubuntumirclient", true); // configure Qt to use Mir | 104 | setenv("QT_QPA_PLATFORM", "ubuntumirclient", true); // configure Qt to use Mir |
1257 | 105 | unsetenv("QT_QPA_PLATFORMTHEME"); // Discourage Qt from unsupported theme | 105 | unsetenv("QT_QPA_PLATFORMTHEME"); // Discourage Qt from unsupported theme |
1259 | 106 | setenv("SDL_VIDEODRIVER", "mir", true); // configure SDL to use Mir | 106 | setenv("SDL_VIDEODRIVER", "wayland", true); // configure SDL to use Wayland |
1260 | 107 | 107 | ||
1261 | 108 | // gnome-terminal is the (only known) special case | 108 | // gnome-terminal is the (only known) special case |
1262 | 109 | char const* exec_args[] = { "gnome-terminal", "--app-id", "com.canonical.miral.Terminal", nullptr }; | 109 | char const* exec_args[] = { "gnome-terminal", "--app-id", "com.canonical.miral.Terminal", nullptr }; |
1263 | 110 | 110 | ||
1264 | === modified file 'src/platforms/eglstream-kms/server/display.cpp' | |||
1265 | --- src/platforms/eglstream-kms/server/display.cpp 2017-07-28 17:00:43 +0000 | |||
1266 | +++ src/platforms/eglstream-kms/server/display.cpp 2017-10-27 17:26:09 +0000 | |||
1267 | @@ -34,7 +34,6 @@ | |||
1268 | 34 | #include "mir/renderer/gl/render_target.h" | 34 | #include "mir/renderer/gl/render_target.h" |
1269 | 35 | #include "mir/renderer/gl/context.h" | 35 | #include "mir/renderer/gl/context.h" |
1270 | 36 | 36 | ||
1271 | 37 | #include <drm/drm.h> | ||
1272 | 38 | #include <xf86drmMode.h> | 37 | #include <xf86drmMode.h> |
1273 | 39 | #include <sys/ioctl.h> | 38 | #include <sys/ioctl.h> |
1274 | 40 | #include <system_error> | 39 | #include <system_error> |
1275 | 41 | 40 | ||
1276 | === modified file 'src/platforms/eglstream-kms/server/egl_output.cpp' | |||
1277 | --- src/platforms/eglstream-kms/server/egl_output.cpp 2017-07-28 17:00:43 +0000 | |||
1278 | +++ src/platforms/eglstream-kms/server/egl_output.cpp 2017-10-27 17:26:09 +0000 | |||
1279 | @@ -23,7 +23,7 @@ | |||
1280 | 23 | #include "kms-utils/kms_connector.h" | 23 | #include "kms-utils/kms_connector.h" |
1281 | 24 | 24 | ||
1282 | 25 | #include <cstring> | 25 | #include <cstring> |
1284 | 26 | #include <drm/drm.h> | 26 | #include <drm.h> |
1285 | 27 | #include <sys/ioctl.h> | 27 | #include <sys/ioctl.h> |
1286 | 28 | #include <vector> | 28 | #include <vector> |
1287 | 29 | #include <boost/throw_exception.hpp> | 29 | #include <boost/throw_exception.hpp> |
1288 | 30 | 30 | ||
1289 | === modified file 'src/platforms/mesa/server/buffer_allocator.cpp' | |||
1290 | --- src/platforms/mesa/server/buffer_allocator.cpp 2017-09-27 20:44:14 +0000 | |||
1291 | +++ src/platforms/mesa/server/buffer_allocator.cpp 2017-10-27 17:26:09 +0000 | |||
1292 | @@ -421,8 +421,6 @@ | |||
1293 | 421 | 421 | ||
1294 | 422 | if (egl_image == EGL_NO_IMAGE_KHR) | 422 | if (egl_image == EGL_NO_IMAGE_KHR) |
1295 | 423 | BOOST_THROW_EXCEPTION(mg::egl_error("Failed to create EGLImage")); | 423 | BOOST_THROW_EXCEPTION(mg::egl_error("Failed to create EGLImage")); |
1296 | 424 | |||
1297 | 425 | on_consumed(); | ||
1298 | 426 | } | 424 | } |
1299 | 427 | lock.unlock(); | 425 | lock.unlock(); |
1300 | 428 | 426 | ||
1301 | @@ -436,6 +434,7 @@ | |||
1302 | 436 | 434 | ||
1303 | 437 | void secure_for_render() override | 435 | void secure_for_render() override |
1304 | 438 | { | 436 | { |
1305 | 437 | on_consumed(); | ||
1306 | 439 | } | 438 | } |
1307 | 440 | 439 | ||
1308 | 441 | std::shared_ptr<mir::graphics::NativeBuffer> native_buffer_handle() const override | 440 | std::shared_ptr<mir::graphics::NativeBuffer> native_buffer_handle() const override |
1309 | @@ -537,7 +536,7 @@ | |||
1310 | 537 | 536 | ||
1311 | 538 | std::shared_ptr<mg::EGLExtensions> const extensions; | 537 | std::shared_ptr<mg::EGLExtensions> const extensions; |
1312 | 539 | 538 | ||
1314 | 540 | std::function<void()> on_consumed; | 539 | std::function<void()> const on_consumed; |
1315 | 541 | }; | 540 | }; |
1316 | 542 | } | 541 | } |
1317 | 543 | 542 | ||
1318 | 544 | 543 | ||
1319 | === modified file 'src/platforms/mesa/server/kms/cursor.cpp' | |||
1320 | --- src/platforms/mesa/server/kms/cursor.cpp 2017-07-31 08:58:34 +0000 | |||
1321 | +++ src/platforms/mesa/server/kms/cursor.cpp 2017-10-27 17:26:09 +0000 | |||
1322 | @@ -25,7 +25,6 @@ | |||
1323 | 25 | #include "mir/graphics/cursor_image.h" | 25 | #include "mir/graphics/cursor_image.h" |
1324 | 26 | 26 | ||
1325 | 27 | #include <xf86drm.h> | 27 | #include <xf86drm.h> |
1326 | 28 | #include <drm/drm.h> | ||
1327 | 29 | 28 | ||
1328 | 30 | #include <boost/exception/errinfo_errno.hpp> | 29 | #include <boost/exception/errinfo_errno.hpp> |
1329 | 31 | 30 | ||
1330 | 32 | 31 | ||
1331 | === modified file 'src/platforms/mesa/server/kms/display_buffer.cpp' | |||
1332 | --- src/platforms/mesa/server/kms/display_buffer.cpp 2017-07-28 17:00:43 +0000 | |||
1333 | +++ src/platforms/mesa/server/kms/display_buffer.cpp 2017-10-27 17:26:09 +0000 | |||
1334 | @@ -32,7 +32,7 @@ | |||
1335 | 32 | #include <EGL/eglext.h> | 32 | #include <EGL/eglext.h> |
1336 | 33 | #include MIR_SERVER_GL_H | 33 | #include MIR_SERVER_GL_H |
1337 | 34 | #include <GLES2/gl2ext.h> | 34 | #include <GLES2/gl2ext.h> |
1339 | 35 | #include <drm/drm_fourcc.h> | 35 | #include <drm_fourcc.h> |
1340 | 36 | 36 | ||
1341 | 37 | #include <sstream> | 37 | #include <sstream> |
1342 | 38 | #include <stdexcept> | 38 | #include <stdexcept> |
1343 | @@ -504,7 +504,7 @@ | |||
1344 | 504 | make_current(); | 504 | make_current(); |
1345 | 505 | 505 | ||
1346 | 506 | listener->report_successful_egl_make_current_on_construction(); | 506 | listener->report_successful_egl_make_current_on_construction(); |
1348 | 507 | 507 | ||
1349 | 508 | glClear(GL_COLOR_BUFFER_BIT); | 508 | glClear(GL_COLOR_BUFFER_BIT); |
1350 | 509 | 509 | ||
1351 | 510 | surface.swap_buffers(); | 510 | surface.swap_buffers(); |
1352 | @@ -591,9 +591,7 @@ | |||
1353 | 591 | { | 591 | { |
1354 | 592 | auto bypass_buffer = (*bypass_it)->buffer(); | 592 | auto bypass_buffer = (*bypass_it)->buffer(); |
1355 | 593 | auto native = std::dynamic_pointer_cast<mgm::NativeBuffer>(bypass_buffer->native_buffer_handle()); | 593 | auto native = std::dynamic_pointer_cast<mgm::NativeBuffer>(bypass_buffer->native_buffer_handle()); |
1359 | 594 | if (!native) | 594 | if (native && native->flags & mir_buffer_flag_can_scanout && |
1357 | 595 | BOOST_THROW_EXCEPTION(std::invalid_argument("could not convert NativeBuffer")); | ||
1358 | 596 | if (native->flags & mir_buffer_flag_can_scanout && | ||
1360 | 597 | bypass_buffer->size() == surface.size() && | 595 | bypass_buffer->size() == surface.size() && |
1361 | 598 | !needs_bounce_buffer(*outputs.front(), native->bo)) | 596 | !needs_bounce_buffer(*outputs.front(), native->bo)) |
1362 | 599 | { | 597 | { |
1363 | @@ -776,7 +774,7 @@ | |||
1364 | 776 | 774 | ||
1365 | 777 | visible_bypass_frame = scheduled_bypass_frame; | 775 | visible_bypass_frame = scheduled_bypass_frame; |
1366 | 778 | scheduled_bypass_frame = nullptr; | 776 | scheduled_bypass_frame = nullptr; |
1368 | 779 | 777 | ||
1369 | 780 | visible_composite_frame = std::move(scheduled_composite_frame); | 778 | visible_composite_frame = std::move(scheduled_composite_frame); |
1370 | 781 | scheduled_composite_frame = nullptr; | 779 | scheduled_composite_frame = nullptr; |
1371 | 782 | } | 780 | } |
1372 | 783 | 781 | ||
1373 | === modified file 'src/protobuf/symbols.map' | |||
1374 | --- src/protobuf/symbols.map 2017-05-25 08:58:03 +0000 | |||
1375 | +++ src/protobuf/symbols.map 2017-10-27 17:26:09 +0000 | |||
1376 | @@ -1158,3 +1158,27 @@ | |||
1377 | 1158 | vtable?for?mir::protobuf::RequestWithAuthority; | 1158 | vtable?for?mir::protobuf::RequestWithAuthority; |
1378 | 1159 | }; | 1159 | }; |
1379 | 1160 | } MIR_PROTOBUF_0.26; | 1160 | } MIR_PROTOBUF_0.26; |
1380 | 1161 | |||
1381 | 1162 | # When building with the Fedora 26 toolchain these are needed | ||
1382 | 1163 | MIR_PROTOBUF_FEDORA { | ||
1383 | 1164 | global: | ||
1384 | 1165 | extern "C++" { | ||
1385 | 1166 | mir::protobuf::_Buffer_default_instance_; | ||
1386 | 1167 | mir::protobuf::_BufferRequest_default_instance_; | ||
1387 | 1168 | mir::protobuf::_BufferStream_default_instance_; | ||
1388 | 1169 | mir::protobuf::_BufferStreamId_default_instance_; | ||
1389 | 1170 | mir::protobuf::_Cookie_default_instance_; | ||
1390 | 1171 | mir::protobuf::_DisplayConfiguration_default_instance_; | ||
1391 | 1172 | mir::protobuf::_LifecycleEvent_default_instance_; | ||
1392 | 1173 | mir::protobuf::_ModuleProperties_default_instance_; | ||
1393 | 1174 | mir::protobuf::_PersistentSurfaceId_default_instance_; | ||
1394 | 1175 | mir::protobuf::_PingEvent_default_instance_; | ||
1395 | 1176 | mir::protobuf::_Platform_default_instance_; | ||
1396 | 1177 | mir::protobuf::_ScreencastId_default_instance_; | ||
1397 | 1178 | mir::protobuf::_StructuredError_default_instance_; | ||
1398 | 1179 | mir::protobuf::_SurfaceAspectRatio_default_instance_; | ||
1399 | 1180 | mir::protobuf::_SurfaceId_default_instance_; | ||
1400 | 1181 | mir::protobuf::_SurfaceSpecification_default_instance_; | ||
1401 | 1182 | mir::protobuf::_Rectangle_default_instance_; | ||
1402 | 1183 | }; | ||
1403 | 1184 | } MIR_PROTOBUF_0.27; | ||
1404 | 1161 | 1185 | ||
1405 | === modified file 'src/server/CMakeLists.txt' | |||
1406 | --- src/server/CMakeLists.txt 2017-09-25 22:34:08 +0000 | |||
1407 | +++ src/server/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1408 | @@ -125,6 +125,13 @@ | |||
1409 | 125 | atomic | 125 | atomic |
1410 | 126 | ) | 126 | ) |
1411 | 127 | 127 | ||
1412 | 128 | target_include_directories(mirshell | ||
1413 | 129 | PUBLIC | ||
1414 | 130 | ${UUID_INCLUDE_DIRS} | ||
1415 | 131 | ) | ||
1416 | 132 | |||
1417 | 133 | set(MIRSERVER_INCLUDE_DIRS ${UUID_INCLUDE_DIRS} PARENT_SCOPE) | ||
1418 | 134 | |||
1419 | 128 | install(TARGETS mirserver | 135 | install(TARGETS mirserver |
1420 | 129 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | 136 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
1421 | 130 | ) | 137 | ) |
1422 | 131 | 138 | ||
1423 | === modified file 'src/server/frontend/wayland/wayland_connector.cpp' | |||
1424 | --- src/server/frontend/wayland/wayland_connector.cpp 2017-10-08 02:12:58 +0000 | |||
1425 | +++ src/server/frontend/wayland/wayland_connector.cpp 2017-10-27 17:26:09 +0000 | |||
1426 | @@ -43,6 +43,11 @@ | |||
1427 | 43 | 43 | ||
1428 | 44 | #include "mir/client/event.h" | 44 | #include "mir/client/event.h" |
1429 | 45 | 45 | ||
1430 | 46 | #include "mir/input/device.h" | ||
1431 | 47 | #include "mir/input/mir_keyboard_config.h" | ||
1432 | 48 | #include "mir/input/input_device_hub.h" | ||
1433 | 49 | #include "mir/input/input_device_observer.h" | ||
1434 | 50 | |||
1435 | 46 | #include <system_error> | 51 | #include <system_error> |
1436 | 47 | #include <sys/eventfd.h> | 52 | #include <sys/eventfd.h> |
1437 | 48 | #include <wayland-server-core.h> | 53 | #include <wayland-server-core.h> |
1438 | @@ -75,6 +80,7 @@ | |||
1439 | 75 | namespace ms = mir::scene; | 80 | namespace ms = mir::scene; |
1440 | 76 | namespace geom = mir::geometry; | 81 | namespace geom = mir::geometry; |
1441 | 77 | namespace mcl = mir::client; | 82 | namespace mcl = mir::client; |
1442 | 83 | namespace mi = mir::input; | ||
1443 | 78 | 84 | ||
1444 | 79 | namespace mir | 85 | namespace mir |
1445 | 80 | { | 86 | { |
1446 | @@ -798,6 +804,7 @@ | |||
1447 | 798 | wl_client* client, | 804 | wl_client* client, |
1448 | 799 | wl_resource* parent, | 805 | wl_resource* parent, |
1449 | 800 | uint32_t id, | 806 | uint32_t id, |
1450 | 807 | mir::input::Keymap const& initial_keymap, | ||
1451 | 801 | std::function<void(WlKeyboard*)> const& on_destroy, | 808 | std::function<void(WlKeyboard*)> const& on_destroy, |
1452 | 802 | std::shared_ptr<mir::Executor> const& executor) | 809 | std::shared_ptr<mir::Executor> const& executor) |
1453 | 803 | : Keyboard(client, parent, id), | 810 | : Keyboard(client, parent, id), |
1454 | @@ -811,19 +818,14 @@ | |||
1455 | 811 | // TODO: We should really grab the keymap for the focused surface when | 818 | // TODO: We should really grab the keymap for the focused surface when |
1456 | 812 | // we receive focus. | 819 | // we receive focus. |
1457 | 813 | 820 | ||
1471 | 814 | xkb_rule_names default_rules; | 821 | // TODO: Maintain per-device keymaps, and send the appropriate map before |
1472 | 815 | memset(&default_rules, 0, sizeof(default_rules)); | 822 | // sending an event from a keyboard with a different map. |
1473 | 816 | 823 | ||
1474 | 817 | keymap = decltype(keymap){ | 824 | /* The wayland::Keyboard constructor has already run, creating the keyboard |
1475 | 818 | xkb_keymap_new_from_names( | 825 | * resource. It is thus safe to send a keymap event to it; the client will receive |
1476 | 819 | context.get(), | 826 | * the keyboard object before this event. |
1477 | 820 | &default_rules, | 827 | */ |
1478 | 821 | XKB_KEYMAP_COMPILE_NO_FLAGS), | 828 | set_keymap(initial_keymap); |
1466 | 822 | &xkb_keymap_unref}; | ||
1467 | 823 | |||
1468 | 824 | state = decltype(state){ | ||
1469 | 825 | xkb_state_new(keymap.get()), | ||
1470 | 826 | &xkb_state_unref}; | ||
1479 | 827 | } | 829 | } |
1480 | 828 | 830 | ||
1481 | 829 | ~WlKeyboard() | 831 | ~WlKeyboard() |
1482 | @@ -966,6 +968,38 @@ | |||
1483 | 966 | state = decltype(state)(xkb_state_new(keymap.get()), &xkb_state_unref); | 968 | state = decltype(state)(xkb_state_new(keymap.get()), &xkb_state_unref); |
1484 | 967 | } | 969 | } |
1485 | 968 | 970 | ||
1486 | 971 | void set_keymap(mir::input::Keymap const& new_keymap) | ||
1487 | 972 | { | ||
1488 | 973 | xkb_rule_names const names = { | ||
1489 | 974 | "evdev", | ||
1490 | 975 | new_keymap.model.c_str(), | ||
1491 | 976 | new_keymap.layout.c_str(), | ||
1492 | 977 | new_keymap.variant.c_str(), | ||
1493 | 978 | new_keymap.options.c_str() | ||
1494 | 979 | }; | ||
1495 | 980 | keymap = decltype(keymap){ | ||
1496 | 981 | xkb_keymap_new_from_names( | ||
1497 | 982 | context.get(), | ||
1498 | 983 | &names, | ||
1499 | 984 | XKB_KEYMAP_COMPILE_NO_FLAGS), | ||
1500 | 985 | &xkb_keymap_unref}; | ||
1501 | 986 | |||
1502 | 987 | // TODO: We might need to copy across the existing depressed keys? | ||
1503 | 988 | state = decltype(state)(xkb_state_new(keymap.get()), &xkb_state_unref); | ||
1504 | 989 | |||
1505 | 990 | auto buffer = xkb_keymap_get_as_string(keymap.get(), XKB_KEYMAP_FORMAT_TEXT_V1); | ||
1506 | 991 | auto length = strlen(buffer); | ||
1507 | 992 | |||
1508 | 993 | mir::AnonymousShmFile shm_buffer{length}; | ||
1509 | 994 | memcpy(shm_buffer.base_ptr(), buffer, length); | ||
1510 | 995 | |||
1511 | 996 | wl_keyboard_send_keymap( | ||
1512 | 997 | resource, | ||
1513 | 998 | WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, | ||
1514 | 999 | shm_buffer.fd(), | ||
1515 | 1000 | length); | ||
1516 | 1001 | } | ||
1517 | 1002 | |||
1518 | 969 | private: | 1003 | private: |
1519 | 970 | std::unique_ptr<xkb_keymap, decltype(&xkb_keymap_unref)> keymap; | 1004 | std::unique_ptr<xkb_keymap, decltype(&xkb_keymap_unref)> keymap; |
1520 | 971 | std::unique_ptr<xkb_state, decltype(&xkb_state_unref)> state; | 1005 | std::unique_ptr<xkb_state, decltype(&xkb_state_unref)> state; |
1521 | @@ -1320,8 +1354,20 @@ | |||
1522 | 1320 | class WlSeat | 1354 | class WlSeat |
1523 | 1321 | { | 1355 | { |
1524 | 1322 | public: | 1356 | public: |
1527 | 1323 | WlSeat(wl_display* display, std::shared_ptr<mir::Executor> const& executor) | 1357 | WlSeat( |
1528 | 1324 | : executor{executor}, | 1358 | wl_display* display, |
1529 | 1359 | std::shared_ptr<mi::InputDeviceHub> const& input_hub, | ||
1530 | 1360 | std::shared_ptr<mir::Executor> const& executor) | ||
1531 | 1361 | : config_observer{ | ||
1532 | 1362 | std::make_shared<ConfigObserver>( | ||
1533 | 1363 | keymap, | ||
1534 | 1364 | [this](mir::input::Keymap const& new_keymap) | ||
1535 | 1365 | { | ||
1536 | 1366 | keymap = new_keymap; | ||
1537 | 1367 | |||
1538 | 1368 | })}, | ||
1539 | 1369 | input_hub{input_hub}, | ||
1540 | 1370 | executor{executor}, | ||
1541 | 1325 | global{wl_global_create( | 1371 | global{wl_global_create( |
1542 | 1326 | display, | 1372 | display, |
1543 | 1327 | &wl_seat_interface, | 1373 | &wl_seat_interface, |
1544 | @@ -1333,10 +1379,12 @@ | |||
1545 | 1333 | { | 1379 | { |
1546 | 1334 | BOOST_THROW_EXCEPTION(std::runtime_error("Failed to export wl_seat interface")); | 1380 | BOOST_THROW_EXCEPTION(std::runtime_error("Failed to export wl_seat interface")); |
1547 | 1335 | } | 1381 | } |
1548 | 1382 | input_hub->add_observer(config_observer); | ||
1549 | 1336 | } | 1383 | } |
1550 | 1337 | 1384 | ||
1551 | 1338 | ~WlSeat() | 1385 | ~WlSeat() |
1552 | 1339 | { | 1386 | { |
1553 | 1387 | input_hub->remove_observer(config_observer); | ||
1554 | 1340 | wl_global_destroy(global); | 1388 | wl_global_destroy(global); |
1555 | 1341 | } | 1389 | } |
1556 | 1342 | 1390 | ||
1557 | @@ -1350,9 +1398,38 @@ | |||
1558 | 1350 | } | 1398 | } |
1559 | 1351 | 1399 | ||
1560 | 1352 | private: | 1400 | private: |
1561 | 1401 | class ConfigObserver : public mi::InputDeviceObserver | ||
1562 | 1402 | { | ||
1563 | 1403 | public: | ||
1564 | 1404 | ConfigObserver( | ||
1565 | 1405 | mir::input::Keymap const& keymap, | ||
1566 | 1406 | std::function<void(mir::input::Keymap const&)> const& on_keymap_commit) | ||
1567 | 1407 | : current_keymap{keymap}, | ||
1568 | 1408 | on_keymap_commit{on_keymap_commit} | ||
1569 | 1409 | { | ||
1570 | 1410 | } | ||
1571 | 1411 | |||
1572 | 1412 | void device_added(std::shared_ptr<input::Device> const& device) override; | ||
1573 | 1413 | void device_changed(std::shared_ptr<input::Device> const& device) override; | ||
1574 | 1414 | void device_removed(std::shared_ptr<input::Device> const& device) override; | ||
1575 | 1415 | void changes_complete() override; | ||
1576 | 1416 | |||
1577 | 1417 | private: | ||
1578 | 1418 | mir::input::Keymap const& current_keymap; | ||
1579 | 1419 | mir::input::Keymap pending_keymap; | ||
1580 | 1420 | std::function<void(mir::input::Keymap const&)> const on_keymap_commit; | ||
1581 | 1421 | }; | ||
1582 | 1422 | |||
1583 | 1423 | mir::input::Keymap keymap; | ||
1584 | 1424 | std::shared_ptr<ConfigObserver> const config_observer; | ||
1585 | 1425 | |||
1586 | 1353 | std::unordered_map<wl_client*, InputCtx<WlPointer>> mutable pointer; | 1426 | std::unordered_map<wl_client*, InputCtx<WlPointer>> mutable pointer; |
1587 | 1354 | std::unordered_map<wl_client*, InputCtx<WlKeyboard>> mutable keyboard; | 1427 | std::unordered_map<wl_client*, InputCtx<WlKeyboard>> mutable keyboard; |
1588 | 1355 | std::unordered_map<wl_client*, InputCtx<WlTouch>> mutable touch; | 1428 | std::unordered_map<wl_client*, InputCtx<WlTouch>> mutable touch; |
1589 | 1429 | |||
1590 | 1430 | std::shared_ptr<mi::InputDeviceHub> const input_hub; | ||
1591 | 1431 | |||
1592 | 1432 | |||
1593 | 1356 | std::shared_ptr<mir::Executor> const executor; | 1433 | std::shared_ptr<mir::Executor> const executor; |
1594 | 1357 | 1434 | ||
1595 | 1358 | static void bind(struct wl_client* client, void* data, uint32_t version, uint32_t id) | 1435 | static void bind(struct wl_client* client, void* data, uint32_t version, uint32_t id) |
1596 | @@ -1413,6 +1490,7 @@ | |||
1597 | 1413 | client, | 1490 | client, |
1598 | 1414 | resource, | 1491 | resource, |
1599 | 1415 | id, | 1492 | id, |
1600 | 1493 | me->keymap, | ||
1601 | 1416 | [&input_ctx](WlKeyboard* listener) | 1494 | [&input_ctx](WlKeyboard* listener) |
1602 | 1417 | { | 1495 | { |
1603 | 1418 | input_ctx.unregister_listener(listener); | 1496 | input_ctx.unregister_listener(listener); |
1604 | @@ -1435,8 +1513,10 @@ | |||
1605 | 1435 | }, | 1513 | }, |
1606 | 1436 | me->executor}); | 1514 | me->executor}); |
1607 | 1437 | } | 1515 | } |
1610 | 1438 | static void release(struct wl_client* /*client*/, struct wl_resource* /*resource*/) {} | 1516 | static void release(struct wl_client* /*client*/, struct wl_resource* us) |
1611 | 1439 | 1517 | { | |
1612 | 1518 | wl_resource_destroy(us); | ||
1613 | 1519 | } | ||
1614 | 1440 | 1520 | ||
1615 | 1441 | wl_global* const global; | 1521 | wl_global* const global; |
1616 | 1442 | static struct wl_seat_interface const vtable; | 1522 | static struct wl_seat_interface const vtable; |
1617 | @@ -1464,6 +1544,37 @@ | |||
1618 | 1464 | return touch[client]; | 1544 | return touch[client]; |
1619 | 1465 | } | 1545 | } |
1620 | 1466 | 1546 | ||
1621 | 1547 | void WlSeat::ConfigObserver::device_added(std::shared_ptr<input::Device> const& device) | ||
1622 | 1548 | { | ||
1623 | 1549 | if (auto keyboard_config = device->keyboard_configuration()) | ||
1624 | 1550 | { | ||
1625 | 1551 | if (current_keymap != keyboard_config.value().device_keymap()) | ||
1626 | 1552 | { | ||
1627 | 1553 | pending_keymap = keyboard_config.value().device_keymap(); | ||
1628 | 1554 | } | ||
1629 | 1555 | } | ||
1630 | 1556 | } | ||
1631 | 1557 | |||
1632 | 1558 | void WlSeat::ConfigObserver::device_changed(std::shared_ptr<input::Device> const& device) | ||
1633 | 1559 | { | ||
1634 | 1560 | if (auto keyboard_config = device->keyboard_configuration()) | ||
1635 | 1561 | { | ||
1636 | 1562 | if (current_keymap != keyboard_config.value().device_keymap()) | ||
1637 | 1563 | { | ||
1638 | 1564 | pending_keymap = keyboard_config.value().device_keymap(); | ||
1639 | 1565 | } | ||
1640 | 1566 | } | ||
1641 | 1567 | } | ||
1642 | 1568 | |||
1643 | 1569 | void WlSeat::ConfigObserver::device_removed(std::shared_ptr<input::Device> const& /*device*/) | ||
1644 | 1570 | { | ||
1645 | 1571 | } | ||
1646 | 1572 | |||
1647 | 1573 | void WlSeat::ConfigObserver::changes_complete() | ||
1648 | 1574 | { | ||
1649 | 1575 | on_keymap_commit(pending_keymap); | ||
1650 | 1576 | } | ||
1651 | 1577 | |||
1652 | 1467 | void WaylandEventSink::send_buffer(BufferStreamId /*id*/, graphics::Buffer& /*buffer*/, graphics::BufferIpcMsgType) | 1578 | void WaylandEventSink::send_buffer(BufferStreamId /*id*/, graphics::Buffer& /*buffer*/, graphics::BufferIpcMsgType) |
1653 | 1468 | { | 1579 | { |
1654 | 1469 | } | 1580 | } |
1655 | @@ -2055,6 +2166,7 @@ | |||
1656 | 2055 | optional_value<std::string> const& display_name, | 2166 | optional_value<std::string> const& display_name, |
1657 | 2056 | std::shared_ptr<mf::Shell> const& shell, | 2167 | std::shared_ptr<mf::Shell> const& shell, |
1658 | 2057 | DisplayChanger& display_config, | 2168 | DisplayChanger& display_config, |
1659 | 2169 | std::shared_ptr<mi::InputDeviceHub> const& input_hub, | ||
1660 | 2058 | std::shared_ptr<mg::GraphicBufferAllocator> const& allocator, | 2170 | std::shared_ptr<mg::GraphicBufferAllocator> const& allocator, |
1661 | 2059 | bool arw_socket) | 2171 | bool arw_socket) |
1662 | 2060 | : display{wl_display_create(), &cleanup_display}, | 2172 | : display{wl_display_create(), &cleanup_display}, |
1663 | @@ -2089,7 +2201,7 @@ | |||
1664 | 2089 | display.get(), | 2201 | display.get(), |
1665 | 2090 | executor, | 2202 | executor, |
1666 | 2091 | this->allocator); | 2203 | this->allocator); |
1668 | 2092 | seat_global = std::make_unique<mf::WlSeat>(display.get(), executor); | 2204 | seat_global = std::make_unique<mf::WlSeat>(display.get(), input_hub, executor); |
1669 | 2093 | output_manager = std::make_unique<mf::OutputManager>( | 2205 | output_manager = std::make_unique<mf::OutputManager>( |
1670 | 2094 | display.get(), | 2206 | display.get(), |
1671 | 2095 | display_config); | 2207 | display_config); |
1672 | 2096 | 2208 | ||
1673 | === modified file 'src/server/frontend/wayland/wayland_connector.h' | |||
1674 | --- src/server/frontend/wayland/wayland_connector.h 2017-09-15 16:34:13 +0000 | |||
1675 | +++ src/server/frontend/wayland/wayland_connector.h 2017-10-27 17:26:09 +0000 | |||
1676 | @@ -29,7 +29,10 @@ | |||
1677 | 29 | namespace mir | 29 | namespace mir |
1678 | 30 | { | 30 | { |
1679 | 31 | 31 | ||
1681 | 32 | 32 | namespace input | |
1682 | 33 | { | ||
1683 | 34 | class InputDeviceHub; | ||
1684 | 35 | } | ||
1685 | 33 | namespace graphics | 36 | namespace graphics |
1686 | 34 | { | 37 | { |
1687 | 35 | class GraphicBufferAllocator; | 38 | class GraphicBufferAllocator; |
1688 | @@ -54,6 +57,7 @@ | |||
1689 | 54 | optional_value<std::string> const& display_name, | 57 | optional_value<std::string> const& display_name, |
1690 | 55 | std::shared_ptr<Shell> const& shell, | 58 | std::shared_ptr<Shell> const& shell, |
1691 | 56 | DisplayChanger& display_config, | 59 | DisplayChanger& display_config, |
1692 | 60 | std::shared_ptr<input::InputDeviceHub> const& input_hub, | ||
1693 | 57 | std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator, | 61 | std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator, |
1694 | 58 | bool arw_socket); | 62 | bool arw_socket); |
1695 | 59 | 63 | ||
1696 | 60 | 64 | ||
1697 | === modified file 'src/server/frontend/wayland/wayland_default_configuration.cpp' | |||
1698 | --- src/server/frontend/wayland/wayland_default_configuration.cpp 2017-09-15 16:34:13 +0000 | |||
1699 | +++ src/server/frontend/wayland/wayland_default_configuration.cpp 2017-10-27 17:26:09 +0000 | |||
1700 | @@ -42,6 +42,7 @@ | |||
1701 | 42 | display_name, | 42 | display_name, |
1702 | 43 | the_frontend_shell(), | 43 | the_frontend_shell(), |
1703 | 44 | *the_frontend_display_changer(), | 44 | *the_frontend_display_changer(), |
1704 | 45 | the_input_device_hub(), | ||
1705 | 45 | the_buffer_allocator(), | 46 | the_buffer_allocator(), |
1706 | 46 | arw_socket); | 47 | arw_socket); |
1707 | 47 | }); | 48 | }); |
1708 | 48 | 49 | ||
1709 | === modified file 'src/server/glib_main_loop.cpp' | |||
1710 | --- src/server/glib_main_loop.cpp 2017-07-28 17:00:43 +0000 | |||
1711 | +++ src/server/glib_main_loop.cpp 2017-10-27 17:26:09 +0000 | |||
1712 | @@ -154,7 +154,19 @@ | |||
1713 | 154 | detail::add_idle_gsource(main_context, G_PRIORITY_HIGH, | 154 | detail::add_idle_gsource(main_context, G_PRIORITY_HIGH, |
1714 | 155 | [this] | 155 | [this] |
1715 | 156 | { | 156 | { |
1717 | 157 | running = false; | 157 | { |
1718 | 158 | std::lock_guard<std::mutex> lock{run_on_halt_mutex}; | ||
1719 | 159 | running = false; | ||
1720 | 160 | } | ||
1721 | 161 | // We know any other thread sees running == false here, so don't need | ||
1722 | 162 | // to lock run_on_halt_queue. | ||
1723 | 163 | for (auto& action : run_on_halt_queue) | ||
1724 | 164 | { | ||
1725 | 165 | try { action(); } | ||
1726 | 166 | catch (...) { handle_exception(std::current_exception()); } | ||
1727 | 167 | } | ||
1728 | 168 | run_on_halt_queue.clear(); | ||
1729 | 169 | |||
1730 | 158 | g_main_context_wakeup(main_context); | 170 | g_main_context_wakeup(main_context); |
1731 | 159 | }); | 171 | }); |
1732 | 160 | } | 172 | } |
1733 | @@ -246,6 +258,48 @@ | |||
1734 | 246 | }); | 258 | }); |
1735 | 247 | } | 259 | } |
1736 | 248 | 260 | ||
1737 | 261 | |||
1738 | 262 | void mir::GLibMainLoop::enqueue_with_guaranteed_execution(mir::ServerAction const& action) | ||
1739 | 263 | { | ||
1740 | 264 | auto const action_with_exception_handling = | ||
1741 | 265 | [this] | ||
1742 | 266 | { | ||
1743 | 267 | try | ||
1744 | 268 | { | ||
1745 | 269 | mir::ServerAction action; | ||
1746 | 270 | { | ||
1747 | 271 | std::lock_guard<std::mutex> lock{run_on_halt_mutex}; | ||
1748 | 272 | action = run_on_halt_queue.front(); | ||
1749 | 273 | run_on_halt_queue.pop_front(); | ||
1750 | 274 | } | ||
1751 | 275 | action(); | ||
1752 | 276 | } | ||
1753 | 277 | catch (...) | ||
1754 | 278 | { | ||
1755 | 279 | handle_exception(std::current_exception()); | ||
1756 | 280 | } | ||
1757 | 281 | }; | ||
1758 | 282 | |||
1759 | 283 | { | ||
1760 | 284 | std::lock_guard<std::mutex> lock{run_on_halt_mutex}; | ||
1761 | 285 | |||
1762 | 286 | if (!running) | ||
1763 | 287 | { | ||
1764 | 288 | action(); | ||
1765 | 289 | return; | ||
1766 | 290 | } | ||
1767 | 291 | else | ||
1768 | 292 | { | ||
1769 | 293 | run_on_halt_queue.push_back(action); | ||
1770 | 294 | } | ||
1771 | 295 | } | ||
1772 | 296 | |||
1773 | 297 | detail::add_idle_gsource( | ||
1774 | 298 | main_context, | ||
1775 | 299 | G_PRIORITY_DEFAULT, | ||
1776 | 300 | action_with_exception_handling); | ||
1777 | 301 | } | ||
1778 | 302 | |||
1779 | 249 | void mir::GLibMainLoop::pause_processing_for(void const* owner) | 303 | void mir::GLibMainLoop::pause_processing_for(void const* owner) |
1780 | 250 | { | 304 | { |
1781 | 251 | std::lock_guard<std::mutex> lock{do_not_process_mutex}; | 305 | std::lock_guard<std::mutex> lock{do_not_process_mutex}; |
1782 | 252 | 306 | ||
1783 | === modified file 'src/server/input/default_input_device_hub.cpp' | |||
1784 | --- src/server/input/default_input_device_hub.cpp 2017-07-28 17:00:43 +0000 | |||
1785 | +++ src/server/input/default_input_device_hub.cpp 2017-10-27 17:26:09 +0000 | |||
1786 | @@ -88,25 +88,26 @@ | |||
1787 | 88 | auto observer = obs.lock(); | 88 | auto observer = obs.lock(); |
1788 | 89 | if (observer) | 89 | if (observer) |
1789 | 90 | { | 90 | { |
1790 | 91 | std::mutex mutex; | ||
1791 | 92 | std::condition_variable cv; | 91 | std::condition_variable cv; |
1794 | 93 | std::unique_lock<decltype(mutex)> lock{mutex}; | 92 | std::atomic<bool> removed{false}; |
1793 | 94 | bool removed{false}; | ||
1795 | 95 | 93 | ||
1798 | 96 | data->observer_queue->enqueue( | 94 | data->observer_queue->enqueue_with_guaranteed_execution( |
1797 | 97 | data.get(), | ||
1799 | 98 | [&,this] | 95 | [&,this] |
1800 | 99 | { | 96 | { |
1801 | 100 | // Unless remove() is on the same thread as add() external synchronization would be needed | 97 | // Unless remove() is on the same thread as add() external synchronization would be needed |
1802 | 101 | data->observers.remove(observer); | 98 | data->observers.remove(observer); |
1803 | 102 | 99 | ||
1805 | 103 | std::lock_guard<decltype(mutex)> lock{mutex}; | 100 | // We do *not* take a lock and instead rely on removed being atomic, |
1806 | 101 | // as enqueue_with_guaranteed_execution may run on our stack. | ||
1807 | 104 | removed = true; | 102 | removed = true; |
1808 | 105 | cv.notify_one(); | 103 | cv.notify_one(); |
1809 | 106 | }); | 104 | }); |
1810 | 107 | 105 | ||
1811 | 106 | std::mutex mutex; | ||
1812 | 107 | std::unique_lock<decltype(mutex)> lock{mutex}; | ||
1813 | 108 | |||
1814 | 108 | // Before returning wait for the remove - otherwise notifications can still happen | 109 | // Before returning wait for the remove - otherwise notifications can still happen |
1816 | 109 | cv.wait(lock, [&] { return removed; }); | 110 | cv.wait(lock, [&] { return removed.load(); }); |
1817 | 110 | } | 111 | } |
1818 | 111 | } | 112 | } |
1819 | 112 | 113 | ||
1820 | 113 | 114 | ||
1821 | === modified file 'src/server/shell/default_persistent_surface_store.cpp' | |||
1822 | --- src/server/shell/default_persistent_surface_store.cpp 2017-08-14 02:48:54 +0000 | |||
1823 | +++ src/server/shell/default_persistent_surface_store.cpp 2017-10-27 17:26:09 +0000 | |||
1824 | @@ -17,7 +17,7 @@ | |||
1825 | 17 | */ | 17 | */ |
1826 | 18 | 18 | ||
1827 | 19 | #include "default_persistent_surface_store.h" | 19 | #include "default_persistent_surface_store.h" |
1829 | 20 | #include <uuid/uuid.h> | 20 | #include <uuid.h> |
1830 | 21 | #include <algorithm> | 21 | #include <algorithm> |
1831 | 22 | #include <unordered_map> | 22 | #include <unordered_map> |
1832 | 23 | #include <boost/throw_exception.hpp> | 23 | #include <boost/throw_exception.hpp> |
1833 | 24 | 24 | ||
1834 | === modified file 'src/utils/CMakeLists.txt' | |||
1835 | --- src/utils/CMakeLists.txt 2017-05-08 03:04:26 +0000 | |||
1836 | +++ src/utils/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1837 | @@ -10,9 +10,11 @@ | |||
1838 | 10 | mir_add_wrapped_executable(mirout out.c) | 10 | mir_add_wrapped_executable(mirout out.c) |
1839 | 11 | target_link_libraries(mirout mirclient m) | 11 | target_link_libraries(mirout mirclient m) |
1840 | 12 | 12 | ||
1841 | 13 | if (MIR_EGL_SUPPORTED) | ||
1842 | 13 | mir_add_wrapped_executable(mirvanity vanity.c) | 14 | mir_add_wrapped_executable(mirvanity vanity.c) |
1843 | 14 | target_include_directories(mirvanity PRIVATE ${PROJECT_SOURCE_DIR}/examples) | 15 | target_include_directories(mirvanity PRIVATE ${PROJECT_SOURCE_DIR}/examples) |
1844 | 15 | target_link_libraries(mirvanity eglapp) | 16 | target_link_libraries(mirvanity eglapp) |
1845 | 17 | endif() | ||
1846 | 16 | 18 | ||
1847 | 17 | mir_add_wrapped_executable(mirin in.cpp) | 19 | mir_add_wrapped_executable(mirin in.cpp) |
1848 | 18 | target_link_libraries(mirin mirclient) | 20 | target_link_libraries(mirin mirclient) |
1849 | 19 | 21 | ||
1850 | === modified file 'src/utils/run.cpp' | |||
1851 | --- src/utils/run.cpp 2017-07-28 17:00:43 +0000 | |||
1852 | +++ src/utils/run.cpp 2017-10-27 17:26:09 +0000 | |||
1853 | @@ -85,7 +85,7 @@ | |||
1854 | 85 | setenv("GDK_BACKEND", "mir", true); // configure GTK to use Mir | 85 | setenv("GDK_BACKEND", "mir", true); // configure GTK to use Mir |
1855 | 86 | setenv("QT_QPA_PLATFORM", "ubuntumirclient", true); // configure Qt to use Mir | 86 | setenv("QT_QPA_PLATFORM", "ubuntumirclient", true); // configure Qt to use Mir |
1856 | 87 | unsetenv("QT_QPA_PLATFORMTHEME"); // Discourage Qt from unsupported theme | 87 | unsetenv("QT_QPA_PLATFORMTHEME"); // Discourage Qt from unsupported theme |
1858 | 88 | setenv("SDL_VIDEODRIVER", "mir", true); // configure SDL to use Mir | 88 | setenv("SDL_VIDEODRIVER", "wayland", true); // configure SDL to use Wayland |
1859 | 89 | 89 | ||
1860 | 90 | if (auto const client_platform = getenv("MIR_CLIENT_PLATFORM_PATH")) | 90 | if (auto const client_platform = getenv("MIR_CLIENT_PLATFORM_PATH")) |
1861 | 91 | setenv("MIR_CLIENT_PLATFORM_PATH", canonicalize(client_platform).c_str(), true); | 91 | setenv("MIR_CLIENT_PLATFORM_PATH", canonicalize(client_platform).c_str(), true); |
1862 | 92 | 92 | ||
1863 | === modified file 'tests/CMakeLists.txt' | |||
1864 | --- tests/CMakeLists.txt 2017-09-18 10:57:00 +0000 | |||
1865 | +++ tests/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1866 | @@ -45,6 +45,7 @@ | |||
1867 | 45 | ${PROJECT_SOURCE_DIR}/include/platform | 45 | ${PROJECT_SOURCE_DIR}/include/platform |
1868 | 46 | ${PROJECT_SOURCE_DIR}/include/miral | 46 | ${PROJECT_SOURCE_DIR}/include/miral |
1869 | 47 | ${PROJECT_SOURCE_DIR}/include/server | 47 | ${PROJECT_SOURCE_DIR}/include/server |
1870 | 48 | ${MIRSERVER_INCLUDE_DIRS} | ||
1871 | 48 | ${PROJECT_SOURCE_DIR}/include/client | 49 | ${PROJECT_SOURCE_DIR}/include/client |
1872 | 49 | ${PROJECT_SOURCE_DIR}/include/common | 50 | ${PROJECT_SOURCE_DIR}/include/common |
1873 | 50 | ${PROJECT_SOURCE_DIR}/include/test | 51 | ${PROJECT_SOURCE_DIR}/include/test |
1874 | @@ -109,9 +110,9 @@ | |||
1875 | 109 | mir-test-doubles-platform-static | 110 | mir-test-doubles-platform-static |
1876 | 110 | ${Boost_LIBRARIES} | 111 | ${Boost_LIBRARIES} |
1877 | 111 | ${GTEST_BOTH_LIBRARIES} | 112 | ${GTEST_BOTH_LIBRARIES} |
1878 | 112 | ${GMOCK_LIBRARY} | ||
1879 | 113 | PRIVATE | 113 | PRIVATE |
1880 | 114 | ${GMOCK_MAIN_LIBRARY} | 114 | ${GMOCK_MAIN_LIBRARY} |
1881 | 115 | ${GMOCK_LIBRARIES} | ||
1882 | 115 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 116 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
1883 | 116 | ) | 117 | ) |
1884 | 117 | 118 | ||
1885 | 118 | 119 | ||
1886 | === modified file 'tests/include/mir/test/doubles/triggered_main_loop.h' | |||
1887 | --- tests/include/mir/test/doubles/triggered_main_loop.h 2017-07-28 17:00:43 +0000 | |||
1888 | +++ tests/include/mir/test/doubles/triggered_main_loop.h 2017-10-27 17:26:09 +0000 | |||
1889 | @@ -41,6 +41,7 @@ | |||
1890 | 41 | void unregister_fd_handler(void const* owner) override; | 41 | void unregister_fd_handler(void const* owner) override; |
1891 | 42 | std::unique_ptr<mir::time::Alarm> create_alarm(callback const& call) override; | 42 | std::unique_ptr<mir::time::Alarm> create_alarm(callback const& call) override; |
1892 | 43 | void enqueue(void const* owner, ServerAction const& action) override; | 43 | void enqueue(void const* owner, ServerAction const& action) override; |
1893 | 44 | void enqueue_with_guaranteed_execution(ServerAction const& action) override; | ||
1894 | 44 | 45 | ||
1895 | 45 | void spawn(std::function<void()>&& work) override; | 46 | void spawn(std::function<void()>&& work) override; |
1896 | 46 | 47 | ||
1897 | 47 | 48 | ||
1898 | === modified file 'tests/integration-tests/CMakeLists.txt' | |||
1899 | --- tests/integration-tests/CMakeLists.txt 2017-08-25 06:41:20 +0000 | |||
1900 | +++ tests/integration-tests/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1901 | @@ -69,8 +69,7 @@ | |||
1902 | 69 | 69 | ||
1903 | 70 | ${Boost_LIBRARIES} | 70 | ${Boost_LIBRARIES} |
1904 | 71 | ${GTEST_BOTH_LIBRARIES} | 71 | ${GTEST_BOTH_LIBRARIES} |
1907 | 72 | ${GMOCK_LIBRARY} | 72 | ${GMOCK_LIBRARIES} |
1906 | 73 | ${GMOCK_MAIN_LIBRARY} | ||
1908 | 74 | # Mesa platform dependencies | 73 | # Mesa platform dependencies |
1909 | 75 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} | 74 | ${DRM_LDFLAGS} ${DRM_LIBRARIES} |
1910 | 76 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} | 75 | ${GBM_LDFLAGS} ${GBM_LIBRARIES} |
1911 | 77 | 76 | ||
1912 | === modified file 'tests/mir_test_doubles/CMakeLists.txt' | |||
1913 | --- tests/mir_test_doubles/CMakeLists.txt 2017-08-25 06:41:20 +0000 | |||
1914 | +++ tests/mir_test_doubles/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1915 | @@ -86,7 +86,7 @@ | |||
1916 | 86 | mirserver | 86 | mirserver |
1917 | 87 | 87 | ||
1918 | 88 | ${Boost_LIBRARIES} | 88 | ${Boost_LIBRARIES} |
1920 | 89 | ${GMOCK_LIBRARY} | 89 | ${GMOCK_LIBRARIES} |
1921 | 90 | ${GMOCK_MAIN_LIBRARY} | 90 | ${GMOCK_MAIN_LIBRARY} |
1922 | 91 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 91 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
1923 | 92 | ) | 92 | ) |
1924 | @@ -104,7 +104,7 @@ | |||
1925 | 104 | mir-test-doubles-platform-static | 104 | mir-test-doubles-platform-static |
1926 | 105 | 105 | ||
1927 | 106 | -ldl | 106 | -ldl |
1929 | 107 | ${GMOCK_LIBRARY} | 107 | ${GMOCK_LIBRARIES} |
1930 | 108 | ${GMOCK_MAIN_LIBRARY} | 108 | ${GMOCK_MAIN_LIBRARY} |
1931 | 109 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 109 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
1932 | 110 | ) | 110 | ) |
1933 | 111 | 111 | ||
1934 | === modified file 'tests/mir_test_doubles/triggered_main_loop.cpp' | |||
1935 | --- tests/mir_test_doubles/triggered_main_loop.cpp 2017-07-28 17:00:43 +0000 | |||
1936 | +++ tests/mir_test_doubles/triggered_main_loop.cpp 2017-10-27 17:26:09 +0000 | |||
1937 | @@ -81,6 +81,12 @@ | |||
1938 | 81 | actions.push_back(action); | 81 | actions.push_back(action); |
1939 | 82 | } | 82 | } |
1940 | 83 | 83 | ||
1941 | 84 | void mtd::TriggeredMainLoop::enqueue_with_guaranteed_execution(ServerAction const& action) | ||
1942 | 85 | { | ||
1943 | 86 | base::enqueue(nullptr, action); | ||
1944 | 87 | actions.push_back(action); | ||
1945 | 88 | } | ||
1946 | 89 | |||
1947 | 84 | void mtd::TriggeredMainLoop::trigger_server_actions() | 90 | void mtd::TriggeredMainLoop::trigger_server_actions() |
1948 | 85 | { | 91 | { |
1949 | 86 | for (auto const& action : actions) | 92 | for (auto const& action : actions) |
1950 | 87 | 93 | ||
1951 | === modified file 'tests/mir_test_framework/CMakeLists.txt' | |||
1952 | --- tests/mir_test_framework/CMakeLists.txt 2017-09-25 13:39:41 +0000 | |||
1953 | +++ tests/mir_test_framework/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1954 | @@ -85,11 +85,11 @@ | |||
1955 | 85 | 85 | ||
1956 | 86 | target_link_libraries(mir-test-framework-static | 86 | target_link_libraries(mir-test-framework-static |
1957 | 87 | 87 | ||
1958 | 88 | mirserver | ||
1959 | 88 | mirclient | 89 | mirclient |
1960 | 89 | ${Boost_LIBRARIES} | 90 | ${Boost_LIBRARIES} |
1961 | 90 | ${GTEST_BOTH_LIBRARIES} | 91 | ${GTEST_BOTH_LIBRARIES} |
1964 | 91 | ${GMOCK_LIBRARY} | 92 | ${GMOCK_LIBRARIES} |
1963 | 92 | ${GMOCK_MAIN_LIBRARY} | ||
1965 | 93 | ${UMOCKDEV_LIBRARIES} | 93 | ${UMOCKDEV_LIBRARIES} |
1966 | 94 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 94 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
1967 | 95 | ) | 95 | ) |
1968 | 96 | 96 | ||
1969 | === modified file 'tests/mir_test_framework/canonical_window_manager.cpp' | |||
1970 | --- tests/mir_test_framework/canonical_window_manager.cpp 2017-08-30 11:59:08 +0000 | |||
1971 | +++ tests/mir_test_framework/canonical_window_manager.cpp 2017-10-27 17:26:09 +0000 | |||
1972 | @@ -24,7 +24,7 @@ | |||
1973 | 24 | #include "mir/shell/surface_ready_observer.h" | 24 | #include "mir/shell/surface_ready_observer.h" |
1974 | 25 | #include "mir/shell/display_layout.h" | 25 | #include "mir/shell/display_layout.h" |
1975 | 26 | 26 | ||
1977 | 27 | #include <uuid/uuid.h> | 27 | #include <uuid.h> |
1978 | 28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
1979 | 29 | #include <csignal> | 29 | #include <csignal> |
1980 | 30 | 30 | ||
1981 | 31 | 31 | ||
1982 | === modified file 'tests/miral/drag_and_drop.cpp' | |||
1983 | --- tests/miral/drag_and_drop.cpp 2017-08-23 16:15:03 +0000 | |||
1984 | +++ tests/miral/drag_and_drop.cpp 2017-10-27 17:26:09 +0000 | |||
1985 | @@ -41,7 +41,7 @@ | |||
1986 | 41 | #include <gtest/gtest.h> | 41 | #include <gtest/gtest.h> |
1987 | 42 | 42 | ||
1988 | 43 | #include <linux/input.h> | 43 | #include <linux/input.h> |
1990 | 44 | #include <uuid/uuid.h> | 44 | #include <uuid.h> |
1991 | 45 | 45 | ||
1992 | 46 | #include <boost/throw_exception.hpp> | 46 | #include <boost/throw_exception.hpp> |
1993 | 47 | #include <atomic> | 47 | #include <atomic> |
1994 | 48 | 48 | ||
1995 | === modified file 'tests/performance-tests/CMakeLists.txt' | |||
1996 | --- tests/performance-tests/CMakeLists.txt 2017-09-18 10:57:00 +0000 | |||
1997 | +++ tests/performance-tests/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
1998 | @@ -28,8 +28,8 @@ | |||
1999 | 28 | test_compositor.cpp | 28 | test_compositor.cpp |
2000 | 29 | ) | 29 | ) |
2001 | 30 | target_link_libraries(mir_compositor_performance_test | 30 | target_link_libraries(mir_compositor_performance_test |
2002 | 31 | mir_system_performance_test | ||
2003 | 31 | ${GTEST_BOTH_LIBRARIES} | 32 | ${GTEST_BOTH_LIBRARIES} |
2004 | 32 | mir_system_performance_test | ||
2005 | 33 | ) | 33 | ) |
2006 | 34 | 34 | ||
2007 | 35 | mir_add_wrapped_executable(mir_client_startup_performance_test | 35 | mir_add_wrapped_executable(mir_client_startup_performance_test |
2008 | 36 | 36 | ||
2009 | === modified file 'tests/unit-tests/CMakeLists.txt' | |||
2010 | --- tests/unit-tests/CMakeLists.txt 2017-09-07 05:58:13 +0000 | |||
2011 | +++ tests/unit-tests/CMakeLists.txt 2017-10-27 17:26:09 +0000 | |||
2012 | @@ -136,8 +136,7 @@ | |||
2013 | 136 | 136 | ||
2014 | 137 | ${PROTOBUF_LITE_LIBRARIES} | 137 | ${PROTOBUF_LITE_LIBRARIES} |
2015 | 138 | ${GTEST_BOTH_LIBRARIES} | 138 | ${GTEST_BOTH_LIBRARIES} |
2018 | 139 | ${GMOCK_LIBRARY} | 139 | ${GMOCK_LIBRARIES} |
2017 | 140 | ${GMOCK_MAIN_LIBRARY} | ||
2019 | 141 | ${Boost_LIBRARIES} | 140 | ${Boost_LIBRARIES} |
2020 | 142 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 141 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
2021 | 143 | ) | 142 | ) |
2022 | @@ -176,8 +175,7 @@ | |||
2023 | 176 | 175 | ||
2024 | 177 | ${PROTOBUF_LITE_LIBRARIES} | 176 | ${PROTOBUF_LITE_LIBRARIES} |
2025 | 178 | ${GTEST_BOTH_LIBRARIES} | 177 | ${GTEST_BOTH_LIBRARIES} |
2028 | 179 | ${GMOCK_LIBRARY} | 178 | ${GMOCK_LIBRARIES} |
2027 | 180 | ${GMOCK_MAIN_LIBRARY} | ||
2029 | 181 | ${Boost_LIBRARIES} | 179 | ${Boost_LIBRARIES} |
2030 | 182 | ${UMOCKDEV_LIBRARIES} | 180 | ${UMOCKDEV_LIBRARIES} |
2031 | 183 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 181 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
2032 | 184 | 182 | ||
2033 | === modified file 'tests/unit-tests/platforms/mesa/kms/test_cursor.cpp' | |||
2034 | --- tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-07-31 08:58:34 +0000 | |||
2035 | +++ tests/unit-tests/platforms/mesa/kms/test_cursor.cpp 2017-10-27 17:26:09 +0000 | |||
2036 | @@ -24,7 +24,6 @@ | |||
2037 | 24 | #include "mir/graphics/cursor_image.h" | 24 | #include "mir/graphics/cursor_image.h" |
2038 | 25 | 25 | ||
2039 | 26 | #include <xf86drm.h> | 26 | #include <xf86drm.h> |
2040 | 27 | #include <drm/drm.h> | ||
2041 | 28 | 27 | ||
2042 | 29 | #include "mir/test/doubles/mock_gbm.h" | 28 | #include "mir/test/doubles/mock_gbm.h" |
2043 | 30 | #include "mir/test/doubles/mock_drm.h" | 29 | #include "mir/test/doubles/mock_drm.h" |
2044 | @@ -265,7 +264,7 @@ | |||
2045 | 265 | { | 264 | { |
2046 | 266 | return geom::Size{geom::Width{64}, geom::Height{64}}; | 265 | return geom::Size{geom::Width{64}, geom::Height{64}}; |
2047 | 267 | } | 266 | } |
2049 | 268 | geom::Displacement hotspot() const | 267 | geom::Displacement hotspot() const |
2050 | 269 | { | 268 | { |
2051 | 270 | return geom::Displacement{0, 0}; | 269 | return geom::Displacement{0, 0}; |
2052 | 271 | } | 270 | } |
2053 | @@ -425,7 +424,7 @@ | |||
2054 | 425 | if (pixels[i] != 0x0) | 424 | if (pixels[i] != 0x0) |
2055 | 426 | return false; | 425 | return false; |
2056 | 427 | } | 426 | } |
2058 | 428 | return true; | 427 | return true; |
2059 | 429 | } | 428 | } |
2060 | 430 | 429 | ||
2061 | 431 | TEST_F(MesaCursorTest, show_cursor_pads_missing_data) | 430 | TEST_F(MesaCursorTest, show_cursor_pads_missing_data) |
2062 | @@ -680,7 +679,7 @@ | |||
2063 | 680 | 679 | ||
2064 | 681 | cursor.hide(); | 680 | cursor.hide(); |
2065 | 682 | cursor.move_to({17, 29}); | 681 | cursor.move_to({17, 29}); |
2067 | 683 | 682 | ||
2068 | 684 | output_container.verify_and_clear_expectations(); | 683 | output_container.verify_and_clear_expectations(); |
2069 | 685 | } | 684 | } |
2070 | 686 | 685 | ||
2071 | @@ -772,7 +771,7 @@ | |||
2072 | 772 | cursor.show(stub_image); // ensures initial_cursor_location | 771 | cursor.show(stub_image); // ensures initial_cursor_location |
2073 | 773 | 772 | ||
2074 | 774 | static geom::Displacement hotspot_displacement{10, 10}; | 773 | static geom::Displacement hotspot_displacement{10, 10}; |
2076 | 775 | 774 | ||
2077 | 776 | static geom::Point const | 775 | static geom::Point const |
2078 | 777 | initial_cursor_location = {0, 0}, | 776 | initial_cursor_location = {0, 0}, |
2079 | 778 | cursor_location_1 = {20, 20}, | 777 | cursor_location_1 = {20, 20}, |
2080 | @@ -788,8 +787,8 @@ | |||
2081 | 788 | return hotspot_displacement; | 787 | return hotspot_displacement; |
2082 | 789 | } | 788 | } |
2083 | 790 | }; | 789 | }; |
2086 | 791 | 790 | ||
2087 | 792 | 791 | ||
2088 | 793 | EXPECT_CALL(mock_gbm, gbm_bo_write(_, _, _)).Times(AnyNumber()); | 792 | EXPECT_CALL(mock_gbm, gbm_bo_write(_, _, _)).Times(AnyNumber()); |
2089 | 794 | EXPECT_CALL(*output_container.outputs[0], set_cursor(_)).Times(AnyNumber()); | 793 | EXPECT_CALL(*output_container.outputs[0], set_cursor(_)).Times(AnyNumber()); |
2090 | 795 | 794 | ||
2091 | 796 | 795 | ||
2092 | === modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp' | |||
2093 | --- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-08-25 06:41:20 +0000 | |||
2094 | +++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-10-27 17:26:09 +0000 | |||
2095 | @@ -155,7 +155,7 @@ | |||
2096 | 155 | auto edid_size = mir_output_get_edid_size(output); | 155 | auto edid_size = mir_output_get_edid_size(output); |
2097 | 156 | 156 | ||
2098 | 157 | ASSERT_NE(nullptr, edid_start); | 157 | ASSERT_NE(nullptr, edid_start); |
2100 | 158 | ASSERT_NE(0, edid_size); | 158 | ASSERT_NE(0u, edid_size); |
2101 | 159 | 159 | ||
2102 | 160 | std::vector<uint8_t> host_edid(edid_start, edid_start+edid_size); | 160 | std::vector<uint8_t> host_edid(edid_start, edid_start+edid_size); |
2103 | 161 | 161 | ||
2104 | 162 | 162 | ||
2105 | === modified file 'tests/unit-tests/scene/test_mediating_display_changer.cpp' | |||
2106 | --- tests/unit-tests/scene/test_mediating_display_changer.cpp 2017-08-09 11:30:59 +0000 | |||
2107 | +++ tests/unit-tests/scene/test_mediating_display_changer.cpp 2017-10-27 17:26:09 +0000 | |||
2108 | @@ -100,6 +100,10 @@ | |||
2109 | 100 | { | 100 | { |
2110 | 101 | action(); | 101 | action(); |
2111 | 102 | } | 102 | } |
2112 | 103 | void enqueue_with_guaranteed_execution(mir::ServerAction const& action) override | ||
2113 | 104 | { | ||
2114 | 105 | action(); | ||
2115 | 106 | } | ||
2116 | 103 | 107 | ||
2117 | 104 | void pause_processing_for(void const* /*owner*/) override {} | 108 | void pause_processing_for(void const* /*owner*/) override {} |
2118 | 105 | void resume_processing_for(void const* /*owner*/) override {} | 109 | void resume_processing_for(void const* /*owner*/) override {} |
2119 | @@ -110,8 +114,10 @@ | |||
2120 | 110 | MockServerActionQueue() | 114 | MockServerActionQueue() |
2121 | 111 | { | 115 | { |
2122 | 112 | ON_CALL(*this, enqueue(_, _)).WillByDefault(InvokeArgument<1>()); | 116 | ON_CALL(*this, enqueue(_, _)).WillByDefault(InvokeArgument<1>()); |
2123 | 117 | ON_CALL(*this, enqueue_with_guaranteed_execution(_)).WillByDefault(InvokeArgument<0>()); | ||
2124 | 113 | } | 118 | } |
2125 | 114 | MOCK_METHOD2(enqueue, void(void const*, mir::ServerAction const&)); | 119 | MOCK_METHOD2(enqueue, void(void const*, mir::ServerAction const&)); |
2126 | 120 | MOCK_METHOD1(enqueue_with_guaranteed_execution, void(mir::ServerAction const&)); | ||
2127 | 115 | MOCK_METHOD1(pause_processing_for, void(void const*)); | 121 | MOCK_METHOD1(pause_processing_for, void(void const*)); |
2128 | 116 | MOCK_METHOD1(resume_processing_for, void(void const*)); | 122 | MOCK_METHOD1(resume_processing_for, void(void const*)); |
2129 | 117 | }; | 123 | }; |
2130 | 118 | 124 | ||
2131 | === modified file 'tests/unit-tests/test_glib_main_loop.cpp' | |||
2132 | --- tests/unit-tests/test_glib_main_loop.cpp 2017-07-28 17:00:43 +0000 | |||
2133 | +++ tests/unit-tests/test_glib_main_loop.cpp 2017-10-27 17:26:09 +0000 | |||
2134 | @@ -833,6 +833,76 @@ | |||
2135 | 833 | destroy_glib_main_loop); | 833 | destroy_glib_main_loop); |
2136 | 834 | } | 834 | } |
2137 | 835 | 835 | ||
2138 | 836 | TEST_F(GLibMainLoopTest, enqueue_with_guaranteed_execution_executes_before_run) | ||
2139 | 837 | { | ||
2140 | 838 | using namespace testing; | ||
2141 | 839 | |||
2142 | 840 | int num_actions{0}; | ||
2143 | 841 | |||
2144 | 842 | ml.enqueue_with_guaranteed_execution( | ||
2145 | 843 | [&num_actions] | ||
2146 | 844 | { | ||
2147 | 845 | ++num_actions; | ||
2148 | 846 | }); | ||
2149 | 847 | |||
2150 | 848 | EXPECT_THAT(num_actions, Eq(1)); | ||
2151 | 849 | } | ||
2152 | 850 | |||
2153 | 851 | TEST_F(GLibMainLoopTest, enqueue_with_guaranteed_execution_executes_after_stop) | ||
2154 | 852 | { | ||
2155 | 853 | using namespace testing; | ||
2156 | 854 | |||
2157 | 855 | int num_actions{0}; | ||
2158 | 856 | |||
2159 | 857 | ml.enqueue( | ||
2160 | 858 | nullptr, | ||
2161 | 859 | [this]() | ||
2162 | 860 | { | ||
2163 | 861 | ml.stop(); | ||
2164 | 862 | }); | ||
2165 | 863 | |||
2166 | 864 | ml.run(); | ||
2167 | 865 | |||
2168 | 866 | ml.enqueue_with_guaranteed_execution( | ||
2169 | 867 | [&num_actions] | ||
2170 | 868 | { | ||
2171 | 869 | ++num_actions; | ||
2172 | 870 | }); | ||
2173 | 871 | |||
2174 | 872 | EXPECT_THAT(num_actions, Eq(1)); | ||
2175 | 873 | } | ||
2176 | 874 | |||
2177 | 875 | TEST_F(GLibMainLoopTest, enqueue_with_guaranteed_execution_executes_on_mainloop) | ||
2178 | 876 | { | ||
2179 | 877 | using namespace testing; | ||
2180 | 878 | |||
2181 | 879 | mt::Signal loop_running; | ||
2182 | 880 | mt::Signal loop_finished; | ||
2183 | 881 | |||
2184 | 882 | ml.enqueue( | ||
2185 | 883 | nullptr, | ||
2186 | 884 | [&loop_running]() { loop_running.raise(); }); | ||
2187 | 885 | |||
2188 | 886 | mt::AutoJoinThread t{ | ||
2189 | 887 | [&] | ||
2190 | 888 | { | ||
2191 | 889 | ml.run(); | ||
2192 | 890 | loop_finished.raise(); | ||
2193 | 891 | }}; | ||
2194 | 892 | |||
2195 | 893 | ASSERT_TRUE(loop_running.wait_for(std::chrono::seconds{5})); | ||
2196 | 894 | |||
2197 | 895 | ml.enqueue_with_guaranteed_execution( | ||
2198 | 896 | [main_thread = std::this_thread::get_id()]() | ||
2199 | 897 | { | ||
2200 | 898 | EXPECT_THAT(std::this_thread::get_id(), Ne(main_thread)); | ||
2201 | 899 | }); | ||
2202 | 900 | |||
2203 | 901 | ml.stop(); | ||
2204 | 902 | |||
2205 | 903 | EXPECT_TRUE(loop_finished.wait_for(std::chrono::seconds{30})); | ||
2206 | 904 | } | ||
2207 | 905 | |||
2208 | 836 | namespace | 906 | namespace |
2209 | 837 | { | 907 | { |
2210 | 838 | 908 | ||
2211 | 839 | 909 | ||
2212 | === modified file 'tests/unit-tests/test_raii.cpp' | |||
2213 | --- tests/unit-tests/test_raii.cpp 2017-07-28 17:00:43 +0000 | |||
2214 | +++ tests/unit-tests/test_raii.cpp 2017-10-27 17:26:09 +0000 | |||
2215 | @@ -21,6 +21,8 @@ | |||
2216 | 21 | #include <gtest/gtest.h> | 21 | #include <gtest/gtest.h> |
2217 | 22 | #include <gmock/gmock.h> | 22 | #include <gmock/gmock.h> |
2218 | 23 | 23 | ||
2219 | 24 | #include <functional> | ||
2220 | 25 | |||
2221 | 24 | namespace | 26 | namespace |
2222 | 25 | { | 27 | { |
2223 | 26 | struct RaiiTest : public ::testing::Test | 28 | struct RaiiTest : public ::testing::Test |
2224 | 27 | 29 | ||
2225 | === removed file 'tools/abi_check.sh' | |||
2226 | --- tools/abi_check.sh 2017-05-08 03:04:26 +0000 | |||
2227 | +++ tools/abi_check.sh 1970-01-01 00:00:00 +0000 | |||
2228 | @@ -1,315 +0,0 @@ | |||
2229 | 1 | #!/bin/bash | ||
2230 | 2 | |||
2231 | 3 | set -e | ||
2232 | 4 | |||
2233 | 5 | declare -A abi_var_for=(\ | ||
2234 | 6 | ["mircore"]="MIRCORE_ABI" \ | ||
2235 | 7 | ["mirclient"]="MIRCLIENT_ABI" \ | ||
2236 | 8 | ["mircommon"]="MIRCOMMON_ABI" \ | ||
2237 | 9 | ["mirplatform"]="MIRPLATFORM_ABI" \ | ||
2238 | 10 | ["mirserver"]="MIRSERVER_ABI" \ | ||
2239 | 11 | ["mircookie"]="MIRCOOKIE_ABI" \ | ||
2240 | 12 | ["mirclientplatformmesa"]="MIR_CLIENT_PLATFORM_ABI" \ | ||
2241 | 13 | ["mirplatformgraphicsmesakms"]="MIR_SERVER_GRAPHICS_PLATFORM_ABI" \ | ||
2242 | 14 | ["mirplatforminputevdev"]="MIR_SERVER_INPUT_PLATFORM_ABI" ) | ||
2243 | 15 | |||
2244 | 16 | declare -A libtype=(\ | ||
2245 | 17 | ["mirclientplatformmesa"]="plugin-client" \ | ||
2246 | 18 | ["mirplatformgraphicsmesakms"]="plugin" \ | ||
2247 | 19 | ["mirplatforminputevdev"]="plugin" ) | ||
2248 | 20 | |||
2249 | 21 | declare -A package_name=(\ | ||
2250 | 22 | ["mirclientplatformmesa"]="mir-client-platform-mesa" \ | ||
2251 | 23 | ["mirplatformgraphicsmesakms"]="mir-platform-graphics-mesa-kms" \ | ||
2252 | 24 | ["mirplatforminputevdev"]="mir-platform-input-evdev" ) | ||
2253 | 25 | |||
2254 | 26 | declare -A libsoname=(\ | ||
2255 | 27 | ["mirclientplatformmesa"]="mir/client-platform/mesa" \ | ||
2256 | 28 | ["mirplatformgraphicsmesakms"]="mir/server-platform/graphics-mesa-kms" \ | ||
2257 | 29 | ["mirplatforminputevdev"]="mir/server-platform/input-evdev" ) | ||
2258 | 30 | |||
2259 | 31 | declare -A headers_for=(\ | ||
2260 | 32 | ["mirclientplatformmesa"]="src/include/client/mir/client_platform_factory.h" \ | ||
2261 | 33 | ["mirplatformgraphicsmesakms"]="mirplatform/mir/graphics/platform.h" \ | ||
2262 | 34 | ["mirplatforminputevdev"]="mirplatform/mir/input" ) | ||
2263 | 35 | |||
2264 | 36 | declare -A exclusions_for=(\ | ||
2265 | 37 | ["mirplatform"]="mir/input" \ | ||
2266 | 38 | ["mirserver"]="mir/input/input_device_hub.h" ) | ||
2267 | 39 | |||
2268 | 40 | function print_help_and_exit() | ||
2269 | 41 | { | ||
2270 | 42 | local prog=$(basename $0) | ||
2271 | 43 | |||
2272 | 44 | local all_libs=${!abi_var_for[@]} | ||
2273 | 45 | local all_libs=${all_libs// /|} | ||
2274 | 46 | echo "Usage: $prog <libname> <abi_dump_dir> <source_dir>" | ||
2275 | 47 | echo "Runs a full ABI check on the given library." | ||
2276 | 48 | echo "" | ||
2277 | 49 | echo " libname=[${all_libs}]" | ||
2278 | 50 | exit 0 | ||
2279 | 51 | } | ||
2280 | 52 | |||
2281 | 53 | function get_abi_number() | ||
2282 | 54 | { | ||
2283 | 55 | local abi_var=${1} | ||
2284 | 56 | local search_dir=${2} | ||
2285 | 57 | grep -hR --include=CMakeLists.txt "set($abi_var [[:digit:]]\+)" ${search_dir}/src | grep -o '[[:digit:]]\+' | ||
2286 | 58 | } | ||
2287 | 59 | |||
2288 | 60 | function is_plugin() | ||
2289 | 61 | { | ||
2290 | 62 | local name=${1} | ||
2291 | 63 | if [[ ${libtype[${name}]} == "plugin"* ]]; | ||
2292 | 64 | then | ||
2293 | 65 | return 0 | ||
2294 | 66 | else | ||
2295 | 67 | return 1 | ||
2296 | 68 | fi | ||
2297 | 69 | } | ||
2298 | 70 | |||
2299 | 71 | function package_abi_for() | ||
2300 | 72 | { | ||
2301 | 73 | local name=${1} | ||
2302 | 74 | local pkg_name=lib${name} | ||
2303 | 75 | |||
2304 | 76 | if is_plugin ${name}; | ||
2305 | 77 | then | ||
2306 | 78 | pkg_name=${package_name[${name}]} | ||
2307 | 79 | fi | ||
2308 | 80 | |||
2309 | 81 | apt-cache show ${pkg_name}* | grep Package: | grep -o '[[:digit:]]\+' | sort -n -r | head -n 1 | ||
2310 | 82 | } | ||
2311 | 83 | |||
2312 | 84 | function needs_abi_check() | ||
2313 | 85 | { | ||
2314 | 86 | local name=${1} | ||
2315 | 87 | local source_dir=${2} | ||
2316 | 88 | local abi_var=${abi_var_for[${name}]} | ||
2317 | 89 | |||
2318 | 90 | local old_abi=$(package_abi_for ${name}) | ||
2319 | 91 | local new_abi=$(get_abi_number ${abi_var} ${source_dir}) | ||
2320 | 92 | if [ -z "${old_abi}" ]; | ||
2321 | 93 | then | ||
2322 | 94 | echo "Failed to find old ${abi_var}" >&2 | ||
2323 | 95 | exit 1 | ||
2324 | 96 | fi | ||
2325 | 97 | |||
2326 | 98 | if [ -z "${new_abi}" ]; | ||
2327 | 99 | then | ||
2328 | 100 | echo "Failed to find new ${abi_var}" >&2 | ||
2329 | 101 | exit 1 | ||
2330 | 102 | fi | ||
2331 | 103 | echo "Detected ${abi_var}_new=${new_abi}" | ||
2332 | 104 | echo "Detected ${abi_var}_old=${old_abi}" | ||
2333 | 105 | |||
2334 | 106 | if [ "${old_abi}" == "${new_abi}" ]; | ||
2335 | 107 | then | ||
2336 | 108 | return 0 | ||
2337 | 109 | else | ||
2338 | 110 | return 1 | ||
2339 | 111 | fi | ||
2340 | 112 | } | ||
2341 | 113 | |||
2342 | 114 | function prepare_pkg_dir() | ||
2343 | 115 | { | ||
2344 | 116 | local pkg_dir=${1} | ||
2345 | 117 | |||
2346 | 118 | # "partial" is required by apt-get | ||
2347 | 119 | mkdir -p ${pkg_dir}/partial | ||
2348 | 120 | } | ||
2349 | 121 | |||
2350 | 122 | function package_name_for() | ||
2351 | 123 | { | ||
2352 | 124 | local name=${1} | ||
2353 | 125 | local pkg_name=lib${name} | ||
2354 | 126 | |||
2355 | 127 | if is_plugin ${name}; | ||
2356 | 128 | then | ||
2357 | 129 | pkg_name=${package_name[${name}]} | ||
2358 | 130 | fi | ||
2359 | 131 | |||
2360 | 132 | local abi_number=$(package_abi_for ${name}) | ||
2361 | 133 | echo ${pkg_name}${abi_number} | ||
2362 | 134 | } | ||
2363 | 135 | |||
2364 | 136 | function header_packages_for() | ||
2365 | 137 | { | ||
2366 | 138 | local name=${1} | ||
2367 | 139 | local pkg=lib${name}-dev | ||
2368 | 140 | |||
2369 | 141 | if is_plugin ${name}; | ||
2370 | 142 | then | ||
2371 | 143 | # Some plugin headers are defined in this package | ||
2372 | 144 | pkg="libmirplatform-dev" | ||
2373 | 145 | fi | ||
2374 | 146 | |||
2375 | 147 | # Only interested in other mir dev package deps | ||
2376 | 148 | local dev_deps=$(apt-cache depends ${pkg} | grep Depends: | grep -o "\<libmir.*-dev\>"| tr '\n' ' ') | ||
2377 | 149 | |||
2378 | 150 | # Workaround missing dependency | ||
2379 | 151 | if [ ${name} == "mirserver" ] || [ ${name} == "mirplatforminputevdev" ]; | ||
2380 | 152 | then | ||
2381 | 153 | dev_deps="${dev_deps} libmirclient-dev" | ||
2382 | 154 | fi | ||
2383 | 155 | |||
2384 | 156 | echo "${pkg} ${dev_deps}" | ||
2385 | 157 | } | ||
2386 | 158 | |||
2387 | 159 | function soname_for() | ||
2388 | 160 | { | ||
2389 | 161 | local name=${1} | ||
2390 | 162 | local pkg_dir=${2} | ||
2391 | 163 | local arch=$(gcc -dumpmachine) | ||
2392 | 164 | local abi_number=$(package_abi_for ${name}) | ||
2393 | 165 | local so_name=lib${name} | ||
2394 | 166 | |||
2395 | 167 | if is_plugin ${name}; | ||
2396 | 168 | then | ||
2397 | 169 | so_name=${libsoname[${name}]} | ||
2398 | 170 | fi | ||
2399 | 171 | |||
2400 | 172 | echo ${pkg_dir}/usr/lib/${arch}/${so_name}.so.${abi_number} | ||
2401 | 173 | } | ||
2402 | 174 | |||
2403 | 175 | function download_packages() | ||
2404 | 176 | { | ||
2405 | 177 | local name=${1} | ||
2406 | 178 | local pkg_dir=${2} | ||
2407 | 179 | local pkg_name=$(package_name_for ${name}) | ||
2408 | 180 | local header_pkgs=$(header_packages_for ${name}) | ||
2409 | 181 | |||
2410 | 182 | echo "Downloading: ${pkg_name} ${header_pkgs} for ${name}" | ||
2411 | 183 | apt-get -d -o Dir::Cache=${pkg_dir} -o Debug::NoLocking=1 install --reinstall -y ${pkg_name} ${header_pkgs} | ||
2412 | 184 | } | ||
2413 | 185 | |||
2414 | 186 | function download_mir_source_into() | ||
2415 | 187 | { | ||
2416 | 188 | local pkg_dir=${1} | ||
2417 | 189 | pushd ${pkg_dir} > /dev/null | ||
2418 | 190 | |||
2419 | 191 | apt-get source --download-only mir | ||
2420 | 192 | mkdir -p mirsource | ||
2421 | 193 | |||
2422 | 194 | local src_pkg=$(apt-cache showsrc mir | grep -o "mir.*orig.tar.gz" | head -n 1) | ||
2423 | 195 | tar xf ${src_pkg} -C mirsource --strip-components 1 | ||
2424 | 196 | |||
2425 | 197 | popd > /dev/null | ||
2426 | 198 | } | ||
2427 | 199 | |||
2428 | 200 | function unpack_debs() | ||
2429 | 201 | { | ||
2430 | 202 | local pkg_dir=${1} | ||
2431 | 203 | |||
2432 | 204 | for deb in ${pkg_dir}/archives/* ; | ||
2433 | 205 | do | ||
2434 | 206 | if [ ! -d ${deb} ] ; then | ||
2435 | 207 | echo "unpacking: ${deb}" | ||
2436 | 208 | dpkg -x ${deb} ${pkg_dir} | ||
2437 | 209 | fi | ||
2438 | 210 | done | ||
2439 | 211 | } | ||
2440 | 212 | |||
2441 | 213 | function make_lib_descriptor() | ||
2442 | 214 | { | ||
2443 | 215 | local name=${1} | ||
2444 | 216 | local pkg_dir=${2} | ||
2445 | 217 | local descriptor_file=${3} | ||
2446 | 218 | |||
2447 | 219 | local abi_number=$(package_abi_for ${name}) | ||
2448 | 220 | local lib=$(soname_for ${name} ${pkg_dir}) | ||
2449 | 221 | |||
2450 | 222 | local lib_includes= | ||
2451 | 223 | for path in $(ls ${pkg_dir}/usr/include); | ||
2452 | 224 | do | ||
2453 | 225 | lib_includes=${lib_includes}${pkg_dir}/usr/include/${path}"\n" | ||
2454 | 226 | done | ||
2455 | 227 | |||
2456 | 228 | local lib_headers=${pkg_dir}/usr/include/${name} | ||
2457 | 229 | local lib_skip_headers= | ||
2458 | 230 | for path in ${exclusions_for[${name}]}; | ||
2459 | 231 | do | ||
2460 | 232 | lib_skip_headers=${lib_excludes}${pkg_dir}/usr/include/${name}/${path}"\n" | ||
2461 | 233 | done | ||
2462 | 234 | |||
2463 | 235 | if [ "${libtype[${name}]}" == "plugin-client" ]; | ||
2464 | 236 | then | ||
2465 | 237 | download_mir_source_into ${pkg_dir} | ||
2466 | 238 | lib_headers=${pkg_dir}/mirsource/${headers_for[${name}]} | ||
2467 | 239 | elif [ "${libtype[${name}]}" == "plugin" ]; | ||
2468 | 240 | then | ||
2469 | 241 | lib_headers=${pkg_dir}/usr/include/${headers_for[${name}]} | ||
2470 | 242 | fi | ||
2471 | 243 | |||
2472 | 244 | cp ${SOURCE_DIR}/tools/lib_descriptor.xml.skel ${descriptor_file} | ||
2473 | 245 | sed -i 's@${LIB_DESC_LIBS}@'${lib}'@g' ${descriptor_file} | ||
2474 | 246 | sed -i 's@${LIB_DESC_HEADERS}@'${lib_headers}'@g' ${descriptor_file} | ||
2475 | 247 | sed -i 's@${LIB_DESC_INCLUDE_PATHS}@'${lib_includes}'@g' ${descriptor_file} | ||
2476 | 248 | sed -i 's/${LIB_DESC_GCC_OPTS}/-std=c++14/g' ${descriptor_file} | ||
2477 | 249 | sed -i 's@${LIB_DESC_SKIP_HEADERS}@'${lib_skip_headers}'@g' ${descriptor_file} | ||
2478 | 250 | sed -i 's/${LIB_DESC_DEFINES}//g' ${descriptor_file} | ||
2479 | 251 | } | ||
2480 | 252 | |||
2481 | 253 | function dump_abi_for_prev_release() | ||
2482 | 254 | { | ||
2483 | 255 | local name=${1} | ||
2484 | 256 | local abi_dump_dir=${2} | ||
2485 | 257 | local abi_dump=${3} | ||
2486 | 258 | local pkg_dir=${abi_dump_dir}/prev-release-pkgs | ||
2487 | 259 | |||
2488 | 260 | if [ ! -s "${abi_dump}" ]; | ||
2489 | 261 | then | ||
2490 | 262 | echo "Generating ${abi_dump}" | ||
2491 | 263 | prepare_pkg_dir ${pkg_dir} | ||
2492 | 264 | download_packages ${name} ${pkg_dir} | ||
2493 | 265 | unpack_debs ${pkg_dir} | ||
2494 | 266 | |||
2495 | 267 | local descriptor_file=${pkg_dir}/${name}_desc.xml | ||
2496 | 268 | make_lib_descriptor ${name} ${pkg_dir} ${descriptor_file} | ||
2497 | 269 | |||
2498 | 270 | abi-compliance-checker -gcc-path g++ -l ${name} -v1 previous -dump-path ${abi_dump} -dump-abi ${descriptor_file} | ||
2499 | 271 | fi | ||
2500 | 272 | |||
2501 | 273 | if [ ! -s "${abi_dump}" ]; | ||
2502 | 274 | then | ||
2503 | 275 | echo "Error: failed to generate abi dump for ${name}" | ||
2504 | 276 | exit 1; | ||
2505 | 277 | fi | ||
2506 | 278 | } | ||
2507 | 279 | |||
2508 | 280 | function run_abi_check() | ||
2509 | 281 | { | ||
2510 | 282 | local name=${1} | ||
2511 | 283 | local old_dump=${2} | ||
2512 | 284 | local new_dump=${3} | ||
2513 | 285 | local skip_symbols_file=${4} | ||
2514 | 286 | |||
2515 | 287 | if [ -f ${skip_symbols_file} ]; | ||
2516 | 288 | then | ||
2517 | 289 | local skip_symbols_opt="-skip-symbols ${skip_symbols_file}" | ||
2518 | 290 | fi | ||
2519 | 291 | |||
2520 | 292 | echo "Running abi-compliance-checker for ${name}" | ||
2521 | 293 | abi-compliance-checker -l ${NAME} -old "${old_dump}" -new "${new_dump}" ${skip_symbols_opt} | ||
2522 | 294 | } | ||
2523 | 295 | |||
2524 | 296 | if [ $# -ne 3 ]; | ||
2525 | 297 | then | ||
2526 | 298 | print_help_and_exit | ||
2527 | 299 | fi | ||
2528 | 300 | |||
2529 | 301 | NAME=${1} | ||
2530 | 302 | ABI_DUMP_DIR=${2} | ||
2531 | 303 | SOURCE_DIR=${3} | ||
2532 | 304 | |||
2533 | 305 | OLD_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_prev.abi.tar.gz | ||
2534 | 306 | NEW_ABI_DUMP_FILE=${ABI_DUMP_DIR}/${NAME}_next.abi.tar.gz | ||
2535 | 307 | SKIP_SYMBOLS_FILE=${SOURCE_DIR}/tools/abi-check-${NAME}-skip-symbols | ||
2536 | 308 | |||
2537 | 309 | if needs_abi_check ${NAME} ${SOURCE_DIR}; | ||
2538 | 310 | then | ||
2539 | 311 | dump_abi_for_prev_release ${NAME} ${ABI_DUMP_DIR} ${OLD_ABI_DUMP_FILE} | ||
2540 | 312 | run_abi_check ${NAME} ${OLD_ABI_DUMP_FILE} ${NEW_ABI_DUMP_FILE} ${SKIP_SYMBOLS_FILE} | ||
2541 | 313 | else | ||
2542 | 314 | echo "No need for abi-compliance-checker, ABI has already been bumped for ${NAME}" | ||
2543 | 315 | fi | ||
2544 | 316 | 0 | ||
2545 | === modified file 'tools/setup-partial-armhf-chroot.sh' | |||
2546 | --- tools/setup-partial-armhf-chroot.sh 2017-05-08 03:04:26 +0000 | |||
2547 | +++ tools/setup-partial-armhf-chroot.sh 2017-10-27 17:26:09 +0000 | |||
2548 | @@ -10,9 +10,9 @@ | |||
2549 | 10 | usage() { | 10 | usage() { |
2550 | 11 | echo "Usage: ${name} [options] mychroot-dir" | 11 | echo "Usage: ${name} [options] mychroot-dir" |
2551 | 12 | echo "options:" | 12 | echo "options:" |
2555 | 13 | echo " -a arch Select architecture, i.e. armhf, arm64, ppc... Default is armhf" | 13 | echo " -a arch Select architecture, i.e. armhf, arm64, ppc... Default is armhf" |
2556 | 14 | echo " -d dist Select distribution, i.e. vivid, wily. Default is vivid" | 14 | echo " -d dist Select distribution, i.e. vivid, wily. Default is vivid" |
2557 | 15 | echo " -r rep Select an additional repository for bootstrap. Default is none" | 15 | echo " -r rep Select an additional repository for bootstrap. Default is none" |
2558 | 16 | echo | 16 | echo |
2559 | 17 | echo "please supply at least a directory to create partial chroot in. (eg, ./setup-partial-armhf-chroot.sh mychroot-dir)" | 17 | echo "please supply at least a directory to create partial chroot in. (eg, ./setup-partial-armhf-chroot.sh mychroot-dir)" |
2560 | 18 | } | 18 | } |
2561 | @@ -39,7 +39,7 @@ | |||
2562 | 39 | sources="$sources source$sourceid" | 39 | sources="$sources source$sourceid" |
2563 | 40 | ;; | 40 | ;; |
2564 | 41 | :) | 41 | :) |
2566 | 42 | echo "Option -$OPTARG requires an argument" | 42 | echo "Option -$OPTARG requires an argument" |
2567 | 43 | usage | 43 | usage |
2568 | 44 | exit 1 | 44 | exit 1 |
2569 | 45 | ;; | 45 | ;; |
2570 | @@ -48,7 +48,7 @@ | |||
2571 | 48 | exit 0 | 48 | exit 0 |
2572 | 49 | ;; | 49 | ;; |
2573 | 50 | \?) | 50 | \?) |
2575 | 51 | echo "Invalid option: -$OPTARG" | 51 | echo "Invalid option: -$OPTARG" |
2576 | 52 | usage | 52 | usage |
2577 | 53 | exit 1 | 53 | exit 1 |
2578 | 54 | ;; | 54 | ;; |
2579 | @@ -66,7 +66,7 @@ | |||
2580 | 66 | echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}" | 66 | echo "creating phablet-compatible $arch partial chroot for mir compilation in directory ${directory}" |
2581 | 67 | 67 | ||
2582 | 68 | if [ ! -d ${directory} ]; then | 68 | if [ ! -d ${directory} ]; then |
2584 | 69 | mkdir -p ${directory} | 69 | mkdir -p ${directory} |
2585 | 70 | fi | 70 | fi |
2586 | 71 | 71 | ||
2587 | 72 | DEBCONTROL=$(pwd)/../debian/control | 72 | DEBCONTROL=$(pwd)/../debian/control |
2588 | @@ -83,7 +83,7 @@ | |||
2589 | 83 | # dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr | 83 | # dpkg-checkbuilddeps returns non-zero when dependencies are not met and the list is sent to stderr |
2590 | 84 | builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 ) | 84 | builddeps=$(dpkg-checkbuilddeps -a ${arch} --admindir=. ${DEBCONTROL} 2>&1 ) |
2591 | 85 | if [ $? -eq 0 ] ; then | 85 | if [ $? -eq 0 ] ; then |
2593 | 86 | exit 0 | 86 | exit 0 |
2594 | 87 | fi | 87 | fi |
2595 | 88 | echo "${builddeps}" | 88 | echo "${builddeps}" |
2596 | 89 | 89 | ||
2597 | @@ -97,7 +97,6 @@ | |||
2598 | 97 | -e 's/Unmet build dependencies://g' \ | 97 | -e 's/Unmet build dependencies://g' \ |
2599 | 98 | -e 's/build-essential:native//g') | 98 | -e 's/build-essential:native//g') |
2600 | 99 | builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g') | 99 | builddeps=$(echo ${builddeps} | sed 's/([^)]*)//g') |
2601 | 100 | builddeps=$(echo ${builddeps} | sed -e 's/abi-compliance-checker//g') | ||
2602 | 101 | builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g') | 100 | builddeps=$(echo ${builddeps} | sed -e 's/multistrap//g') |
2603 | 102 | 101 | ||
2604 | 103 | case ${arch} in | 102 | case ${arch} in |
2605 | @@ -143,7 +142,7 @@ | |||
2606 | 143 | done | 142 | done |
2607 | 144 | 143 | ||
2608 | 145 | # Fakeroot is required to stop the apt update command giving up | 144 | # Fakeroot is required to stop the apt update command giving up |
2610 | 146 | fakeroot multistrap -f mstrap.conf | 145 | fakeroot multistrap -f mstrap.conf |
2611 | 147 | 146 | ||
2612 | 148 | rm -f var/cache/apt/archives/lock | 147 | rm -f var/cache/apt/archives/lock |
2613 | 149 | 148 | ||
2614 | @@ -163,4 +162,4 @@ | |||
2615 | 163 | ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink} | 162 | ln -sf $(pwd)$(readlink ${broken_symlink}) ${broken_symlink} |
2616 | 164 | done | 163 | done |
2617 | 165 | 164 | ||
2619 | 166 | popd > /dev/null | 165 | popd > /dev/null |
FAILED: Continuous integration, rev:1308 /mir-jenkins. ubuntu. com/job/ mir-ubuntu- ci/132/ /mir-jenkins. ubuntu. com/job/ build-mir/ 5179/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/5416/ console /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= artful/ 5403/console /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 5403/console /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= zesty/5403/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= artful/ 5222/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= zesty/5222/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= artful/ 5222/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 5222/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= zesty/5222/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= artful/ 5222/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= mesa,release= zesty/5222/ console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 5222/console
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ubuntu- ci/132/ rebuild
https:/