Merge lp:~sergiusens/mediaplayer-app/click-support into lp:mediaplayer-app

Proposed by Sergio Schvezov on 2014-01-13
Status: Needs review
Proposed branch: lp:~sergiusens/mediaplayer-app/click-support
Merge into: lp:mediaplayer-app
Diff against target: 233 lines (+101/-20)
11 files modified
CMakeLists.txt (+23/-5)
click-build.sh (+16/-0)
click/CMakeLists.txt (+10/-0)
click/manifest.json.in (+21/-0)
click/mediaplayer-apparmor.json (+10/-0)
config.h.in (+11/-2)
data/CMakeLists.txt (+2/-2)
po/CMakeLists.txt (+1/-1)
src/CMakeLists.txt (+0/-7)
tests/autopilot/CMakeLists.txt (+2/-0)
tests/videos/CMakeLists.txt (+5/-3)
To merge this branch: bzr merge lp:~sergiusens/mediaplayer-app/click-support
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2014-01-13
Bill Filler 2014-01-13 Pending
Renato Araujo Oliveira Filho 2014-01-13 Pending
Review via email: mp+201350@code.launchpad.net

Commit message

Initial click support sans autopilot tests

To post a comment you must log in.
195. By Sergio Schvezov on 2014-01-13

Add default bzr source for click

196. By Sergio Schvezov on 2014-01-13

Adding missing cmake options

PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

196. By Sergio Schvezov on 2014-01-13

Adding missing cmake options

195. By Sergio Schvezov on 2014-01-13

Add default bzr source for click

194. By Sergio Schvezov on 2014-01-13

Initial click support sans test adaptation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-09-25 23:08:08 +0000
3+++ CMakeLists.txt 2014-01-13 09:49:12 +0000
4@@ -35,11 +35,28 @@
5 # Standard install paths
6 include(GNUInstallDirs)
7
8-set(MEDIAPLAYER_DIR ${CMAKE_INSTALL_DATADIR}/mediaplayer-app)
9-
10-# for dh_translations to extract the domain
11-# (regarding syntax consistency, see http://pad.lv/1181187)
12-set (GETTEXT_PACKAGE "mediaplayer-app")
13+option(INSTALL_TESTS "Install the tests on make install" on)
14+option(CLICK_MODE "Installs to a contained location" off)
15+
16+set(MEDIAPLAYER mediaplayer-app)
17+
18+if(CLICK_MODE)
19+ if(NOT DEFINED BZR_SOURCE)
20+ set(BZR_SOURCE "lp:mediaplayer-app")
21+ endif(NOT DEFINED BZR_SOURCE)
22+ set(APP_PACKAGE_NAME "com.ubuntu.media")
23+ set(CMAKE_INSTALL_PREFIX /)
24+ set(CMAKE_INSTALL_BINDIR /)
25+ set(INSTALL_TESTS off)
26+ set (GETTEXT_PACKAGE "${APP_PACKAGE_NAME}")
27+ add_definitions("-DCLICK_MODE=1")
28+else(CLICK_MODE)
29+ # for dh_translations to extract the domain
30+ # (regarding syntax consistency, see http://pad.lv/1181187)
31+ set (GETTEXT_PACKAGE "${MEDIAPLAYER}")
32+endif(CLICK_MODE)
33+
34+set(MEDIAPLAYER_DIR ${CMAKE_INSTALL_DATADIR}/${MEDIAPLAYER})
35
36 # Tests
37 enable_testing()
38@@ -49,6 +66,7 @@
39 add_subdirectory(src)
40 add_subdirectory(tests)
41 add_subdirectory(po)
42+add_subdirectory(click)
43
44 configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
45
46
47=== added directory 'click'
48=== added file 'click-build.sh'
49--- click-build.sh 1970-01-01 00:00:00 +0000
50+++ click-build.sh 2014-01-13 09:49:12 +0000
51@@ -0,0 +1,16 @@
52+#!/bin/sh
53+
54+export LC_ALL=C
55+
56+BZR_SOURCE=${1:-"lp:mediaplayer-app"}
57+
58+CLICKARCH=armhf
59+rm -rf $CLICKARCH-build
60+mkdir $CLICKARCH-build
61+cd $CLICKARCH-build
62+cmake .. -DINSTALL_TESTS=off -DCLICK_MODE=on \
63+ -DBZR_REVNO=$(cd ..; bzr revno) \
64+ -DBZR_SOURCE="$BZR_SOURCE"
65+make DESTDIR=../package install
66+cd ..
67+click build package
68
69=== added file 'click/CMakeLists.txt'
70--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
71+++ click/CMakeLists.txt 2014-01-13 09:49:12 +0000
72@@ -0,0 +1,10 @@
73+if(CLICK_MODE)
74+ if(NOT BZR_REVNO)
75+ set(BZR_REVNO "latest")
76+ endif(NOT BZR_REVNO)
77+ configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
78+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json
79+ DESTINATION ${CMAKE_INSTALL_PREFIX})
80+ install(FILES mediaplayer-apparmor.json
81+ DESTINATION ${CMAKE_INSTALL_PREFIX})
82+endif(CLICK_MODE)
83
84=== added file 'click/manifest.json.in'
85--- click/manifest.json.in 1970-01-01 00:00:00 +0000
86+++ click/manifest.json.in 2014-01-13 09:49:12 +0000
87@@ -0,0 +1,21 @@
88+{
89+ "description":
90+ "Watch media files",
91+ "framework": "ubuntu-sdk-13.10",
92+ "architecture": "armhf",
93+ "hooks": {
94+ "mediaplayer": {
95+ "apparmor": "mediaplayer-apparmor.json",
96+ "desktop": "@CMAKE_INSTALL_DATADIR@/applications/@MEDIAPLAYER@.desktop"
97+ }
98+ },
99+ "icon": "share/icons/hicolor/scalable/apps/@MEDIAPLAYER@.svg",
100+ "maintainer": "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>",
101+ "name": "@APP_PACKAGE_NAME@",
102+ "title": "Media",
103+ "version": "1.0.@BZR_REVNO@",
104+ "x-source": {
105+ "vcs-bzr": "@BZR_SOURCE@",
106+ "vcs-bzr-revno": "@BZR_REVNO@"
107+ }
108+}
109
110=== added file 'click/mediaplayer-apparmor.json'
111--- click/mediaplayer-apparmor.json 1970-01-01 00:00:00 +0000
112+++ click/mediaplayer-apparmor.json 2014-01-13 09:49:12 +0000
113@@ -0,0 +1,10 @@
114+{
115+ "policy_groups": ["accounts",
116+ "audio",
117+ "content_exchange",
118+ "content_exchange_source",
119+ "video",
120+ "video_files"
121+ ],
122+ "policy_version": 1.0
123+}
124
125=== modified file 'config.h.in'
126--- config.h.in 2013-01-18 17:40:11 +0000
127+++ config.h.in 2014-01-13 09:49:12 +0000
128@@ -28,11 +28,20 @@
129 return installed;
130 }
131
132+inline bool isClick() {
133+#ifdef CLICK_MODE
134+ return true;
135+#else
136+ return false;
137+#endif
138+}
139+
140 inline QString mediaPlayerDirectory() {
141- if (isRunningInstalled()) {
142+ if (isClick()) {
143+ return QDir::currentPath() + "@CMAKE_INSTALL_PREFIX@/@MEDIAPLAYER_DIR@";
144+ } else if (isRunningInstalled()) {
145 return QString("@CMAKE_INSTALL_PREFIX@/@MEDIAPLAYER_DIR@");
146 } else {
147 return QString("@mediaplayer_src_SOURCE_DIR@");
148 }
149 }
150-
151
152=== modified file 'data/CMakeLists.txt'
153--- data/CMakeLists.txt 2013-06-11 15:54:49 +0000
154+++ data/CMakeLists.txt 2014-01-13 09:49:12 +0000
155@@ -1,5 +1,5 @@
156-set(MEDIAPLAYER_DESKTOP_FILE mediaplayer-app.desktop)
157-set(MEDIAPLAYER_APP_ICON mediaplayer-app.svg)
158+set(MEDIAPLAYER_DESKTOP_FILE @MEDIAPLAYER@.desktop)
159+set(MEDIAPLAYER_APP_ICON @MEDIAPLAYER@.svg)
160
161 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})
162 file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
163
164=== modified file 'po/CMakeLists.txt'
165--- po/CMakeLists.txt 2013-06-12 12:07:34 +0000
166+++ po/CMakeLists.txt 2014-01-13 09:49:12 +0000
167@@ -2,7 +2,7 @@
168
169 include(FindGettext)
170
171-set(DOMAIN mediaplayer-app)
172+set(DOMAIN ${GETTEXT_PACKAGE})
173 set(POT_FILE ${DOMAIN}.pot)
174 file(GLOB PO_FILES *.po)
175 file(GLOB_RECURSE I18N_SRCS RELATIVE ${CMAKE_SOURCE_DIR}
176
177=== modified file 'src/CMakeLists.txt'
178--- src/CMakeLists.txt 2014-01-07 19:36:45 +0000
179+++ src/CMakeLists.txt 2014-01-13 09:49:12 +0000
180@@ -1,21 +1,14 @@
181 project(mediaplayer_src)
182
183-set(MEDIAPLAYER mediaplayer-app)
184-
185 include_directories(
186 ${CMAKE_BINARY_DIR}
187 ${sdkhelper_SOURCE_DIR}
188- #${GSTLIB_INCLUDE_DIRS}
189 )
190
191 set(mediaplayer_HDRS
192- #thumbnail-provider.h
193- #thumbnail-pipeline-gst.h
194 mediaplayer.h)
195
196 set(mediaplayer_SRCS
197- #thumbnail-provider.cpp
198- #thumbnail-pipeline-gst.cpp
199 mediaplayer.cpp
200 main.cpp)
201
202
203=== modified file 'tests/autopilot/CMakeLists.txt'
204--- tests/autopilot/CMakeLists.txt 2013-05-23 20:00:37 +0000
205+++ tests/autopilot/CMakeLists.txt 2014-01-13 09:49:12 +0000
206@@ -3,9 +3,11 @@
207 execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
208 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
209
210+if(INSTALL_TESTS)
211 install(DIRECTORY ${AUTOPILOT_DIR}
212 DESTINATION ${PYTHON_PACKAGE_DIR}
213 )
214+endif(INSTALL_TESTS)
215
216 include(${CMAKE_SOURCE_DIR}/cmake/autopilot.cmake)
217 declare_autopilot_test("MEDIAPLAYER_APP=${mediaplayer_src_BINARY_DIR}/mediaplayer-app;MEDIAPLAYER_DATA_DIR=${sample_videos_SOURCE_DIR}"
218
219=== modified file 'tests/videos/CMakeLists.txt'
220--- tests/videos/CMakeLists.txt 2013-11-01 13:24:19 +0000
221+++ tests/videos/CMakeLists.txt 2014-01-13 09:49:12 +0000
222@@ -2,6 +2,8 @@
223
224 set(MEDIAPLAYER_TEST_VIDEOS small.ogg)
225
226-install(FILES ${MEDIAPLAYER_TEST_VIDEOS}
227- DESTINATION ${CMAKE_INSTALL_DATADIR}/mediaplayer-app/videos
228- )
229+if(INSTALL_TESTS)
230+ install(FILES ${MEDIAPLAYER_TEST_VIDEOS}
231+ DESTINATION ${CMAKE_INSTALL_DATADIR}/mediaplayer-app/videos
232+ )
233+endif(INSTALL_TESTS)

Subscribers

People subscribed via source and target branches