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

Proposed by Sergio Schvezov
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
Bill Filler Pending
Renato Araujo Oliveira Filho 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

Add default bzr source for click

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
196. By Sergio Schvezov

Adding missing cmake options

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

196. By Sergio Schvezov

Adding missing cmake options

195. By Sergio Schvezov

Add default bzr source for click

194. By Sergio Schvezov

Initial click support sans test adaptation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-09-25 23:08:08 +0000
+++ CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -35,11 +35,28 @@
35# Standard install paths35# Standard install paths
36include(GNUInstallDirs)36include(GNUInstallDirs)
3737
38set(MEDIAPLAYER_DIR ${CMAKE_INSTALL_DATADIR}/mediaplayer-app)38option(INSTALL_TESTS "Install the tests on make install" on)
3939option(CLICK_MODE "Installs to a contained location" off)
40# for dh_translations to extract the domain40
41# (regarding syntax consistency, see http://pad.lv/1181187)41set(MEDIAPLAYER mediaplayer-app)
42set (GETTEXT_PACKAGE "mediaplayer-app")42
43if(CLICK_MODE)
44 if(NOT DEFINED BZR_SOURCE)
45 set(BZR_SOURCE "lp:mediaplayer-app")
46 endif(NOT DEFINED BZR_SOURCE)
47 set(APP_PACKAGE_NAME "com.ubuntu.media")
48 set(CMAKE_INSTALL_PREFIX /)
49 set(CMAKE_INSTALL_BINDIR /)
50 set(INSTALL_TESTS off)
51 set (GETTEXT_PACKAGE "${APP_PACKAGE_NAME}")
52 add_definitions("-DCLICK_MODE=1")
53else(CLICK_MODE)
54 # for dh_translations to extract the domain
55 # (regarding syntax consistency, see http://pad.lv/1181187)
56 set (GETTEXT_PACKAGE "${MEDIAPLAYER}")
57endif(CLICK_MODE)
58
59set(MEDIAPLAYER_DIR ${CMAKE_INSTALL_DATADIR}/${MEDIAPLAYER})
4360
44# Tests61# Tests
45enable_testing()62enable_testing()
@@ -49,6 +66,7 @@
49add_subdirectory(src)66add_subdirectory(src)
50add_subdirectory(tests)67add_subdirectory(tests)
51add_subdirectory(po)68add_subdirectory(po)
69add_subdirectory(click)
5270
53configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)71configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
5472
5573
=== added directory 'click'
=== added file 'click-build.sh'
--- click-build.sh 1970-01-01 00:00:00 +0000
+++ click-build.sh 2014-01-13 09:49:12 +0000
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3export LC_ALL=C
4
5BZR_SOURCE=${1:-"lp:mediaplayer-app"}
6
7CLICKARCH=armhf
8rm -rf $CLICKARCH-build
9mkdir $CLICKARCH-build
10cd $CLICKARCH-build
11cmake .. -DINSTALL_TESTS=off -DCLICK_MODE=on \
12 -DBZR_REVNO=$(cd ..; bzr revno) \
13 -DBZR_SOURCE="$BZR_SOURCE"
14make DESTDIR=../package install
15cd ..
16click build package
017
=== added file 'click/CMakeLists.txt'
--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ click/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -0,0 +1,10 @@
1if(CLICK_MODE)
2 if(NOT BZR_REVNO)
3 set(BZR_REVNO "latest")
4 endif(NOT BZR_REVNO)
5 configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
6 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json
7 DESTINATION ${CMAKE_INSTALL_PREFIX})
8 install(FILES mediaplayer-apparmor.json
9 DESTINATION ${CMAKE_INSTALL_PREFIX})
10endif(CLICK_MODE)
011
=== added file 'click/manifest.json.in'
--- click/manifest.json.in 1970-01-01 00:00:00 +0000
+++ click/manifest.json.in 2014-01-13 09:49:12 +0000
@@ -0,0 +1,21 @@
1{
2 "description":
3 "Watch media files",
4 "framework": "ubuntu-sdk-13.10",
5 "architecture": "armhf",
6 "hooks": {
7 "mediaplayer": {
8 "apparmor": "mediaplayer-apparmor.json",
9 "desktop": "@CMAKE_INSTALL_DATADIR@/applications/@MEDIAPLAYER@.desktop"
10 }
11 },
12 "icon": "share/icons/hicolor/scalable/apps/@MEDIAPLAYER@.svg",
13 "maintainer": "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>",
14 "name": "@APP_PACKAGE_NAME@",
15 "title": "Media",
16 "version": "1.0.@BZR_REVNO@",
17 "x-source": {
18 "vcs-bzr": "@BZR_SOURCE@",
19 "vcs-bzr-revno": "@BZR_REVNO@"
20 }
21}
022
=== added file 'click/mediaplayer-apparmor.json'
--- click/mediaplayer-apparmor.json 1970-01-01 00:00:00 +0000
+++ click/mediaplayer-apparmor.json 2014-01-13 09:49:12 +0000
@@ -0,0 +1,10 @@
1{
2 "policy_groups": ["accounts",
3 "audio",
4 "content_exchange",
5 "content_exchange_source",
6 "video",
7 "video_files"
8 ],
9 "policy_version": 1.0
10}
011
=== modified file 'config.h.in'
--- config.h.in 2013-01-18 17:40:11 +0000
+++ config.h.in 2014-01-13 09:49:12 +0000
@@ -28,11 +28,20 @@
28 return installed;28 return installed;
29}29}
3030
31inline bool isClick() {
32#ifdef CLICK_MODE
33 return true;
34#else
35 return false;
36#endif
37}
38
31inline QString mediaPlayerDirectory() {39inline QString mediaPlayerDirectory() {
32 if (isRunningInstalled()) {40 if (isClick()) {
41 return QDir::currentPath() + "@CMAKE_INSTALL_PREFIX@/@MEDIAPLAYER_DIR@";
42 } else if (isRunningInstalled()) {
33 return QString("@CMAKE_INSTALL_PREFIX@/@MEDIAPLAYER_DIR@");43 return QString("@CMAKE_INSTALL_PREFIX@/@MEDIAPLAYER_DIR@");
34 } else {44 } else {
35 return QString("@mediaplayer_src_SOURCE_DIR@");45 return QString("@mediaplayer_src_SOURCE_DIR@");
36 }46 }
37}47}
38
3948
=== modified file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2013-06-11 15:54:49 +0000
+++ data/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -1,5 +1,5 @@
1set(MEDIAPLAYER_DESKTOP_FILE mediaplayer-app.desktop)1set(MEDIAPLAYER_DESKTOP_FILE @MEDIAPLAYER@.desktop)
2set(MEDIAPLAYER_APP_ICON mediaplayer-app.svg)2set(MEDIAPLAYER_APP_ICON @MEDIAPLAYER@.svg)
33
4file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})4file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${MEDIAPLAYER_DESKTOP_FILE})
5file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)5file(STRINGS ${MEDIAPLAYER_DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
66
=== modified file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2013-06-12 12:07:34 +0000
+++ po/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -2,7 +2,7 @@
22
3include(FindGettext)3include(FindGettext)
44
5set(DOMAIN mediaplayer-app)5set(DOMAIN ${GETTEXT_PACKAGE})
6set(POT_FILE ${DOMAIN}.pot)6set(POT_FILE ${DOMAIN}.pot)
7file(GLOB PO_FILES *.po)7file(GLOB PO_FILES *.po)
8file(GLOB_RECURSE I18N_SRCS RELATIVE ${CMAKE_SOURCE_DIR}8file(GLOB_RECURSE I18N_SRCS RELATIVE ${CMAKE_SOURCE_DIR}
99
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2014-01-07 19:36:45 +0000
+++ src/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -1,21 +1,14 @@
1project(mediaplayer_src)1project(mediaplayer_src)
22
3set(MEDIAPLAYER mediaplayer-app)
4
5include_directories(3include_directories(
6 ${CMAKE_BINARY_DIR}4 ${CMAKE_BINARY_DIR}
7 ${sdkhelper_SOURCE_DIR}5 ${sdkhelper_SOURCE_DIR}
8 #${GSTLIB_INCLUDE_DIRS}
9 )6 )
107
11set(mediaplayer_HDRS8set(mediaplayer_HDRS
12 #thumbnail-provider.h
13 #thumbnail-pipeline-gst.h
14 mediaplayer.h)9 mediaplayer.h)
1510
16set(mediaplayer_SRCS11set(mediaplayer_SRCS
17 #thumbnail-provider.cpp
18 #thumbnail-pipeline-gst.cpp
19 mediaplayer.cpp12 mediaplayer.cpp
20 main.cpp)13 main.cpp)
2114
2215
=== modified file 'tests/autopilot/CMakeLists.txt'
--- tests/autopilot/CMakeLists.txt 2013-05-23 20:00:37 +0000
+++ tests/autopilot/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -3,9 +3,11 @@
3execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"3execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
4 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)4 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
55
6if(INSTALL_TESTS)
6install(DIRECTORY ${AUTOPILOT_DIR}7install(DIRECTORY ${AUTOPILOT_DIR}
7 DESTINATION ${PYTHON_PACKAGE_DIR}8 DESTINATION ${PYTHON_PACKAGE_DIR}
8 )9 )
10endif(INSTALL_TESTS)
911
10include(${CMAKE_SOURCE_DIR}/cmake/autopilot.cmake)12include(${CMAKE_SOURCE_DIR}/cmake/autopilot.cmake)
11declare_autopilot_test("MEDIAPLAYER_APP=${mediaplayer_src_BINARY_DIR}/mediaplayer-app;MEDIAPLAYER_DATA_DIR=${sample_videos_SOURCE_DIR}"13declare_autopilot_test("MEDIAPLAYER_APP=${mediaplayer_src_BINARY_DIR}/mediaplayer-app;MEDIAPLAYER_DATA_DIR=${sample_videos_SOURCE_DIR}"
1214
=== modified file 'tests/videos/CMakeLists.txt'
--- tests/videos/CMakeLists.txt 2013-11-01 13:24:19 +0000
+++ tests/videos/CMakeLists.txt 2014-01-13 09:49:12 +0000
@@ -2,6 +2,8 @@
22
3set(MEDIAPLAYER_TEST_VIDEOS small.ogg)3set(MEDIAPLAYER_TEST_VIDEOS small.ogg)
44
5install(FILES ${MEDIAPLAYER_TEST_VIDEOS}5if(INSTALL_TESTS)
6 DESTINATION ${CMAKE_INSTALL_DATADIR}/mediaplayer-app/videos6 install(FILES ${MEDIAPLAYER_TEST_VIDEOS}
7 )7 DESTINATION ${CMAKE_INSTALL_DATADIR}/mediaplayer-app/videos
8 )
9endif(INSTALL_TESTS)

Subscribers

People subscribed via source and target branches