Merge lp:~dpm/ubuntu-docviewer-app/cmake-fixes into lp:ubuntu-docviewer-app/trunk

Proposed by David Planella
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 32
Merged at revision: 30
Proposed branch: lp:~dpm/ubuntu-docviewer-app/cmake-fixes
Merge into: lp:ubuntu-docviewer-app/trunk
Diff against target: 143 lines (+42/-31)
5 files modified
CMakeLists.txt (+30/-18)
com.ubuntu.docviewer.desktop.in.in (+2/-3)
docviewer.apparmor (+1/-1)
manifest.json.in (+8/-8)
ubuntu-docviewer-app.qml (+1/-1)
To merge this branch: bzr merge lp:~dpm/ubuntu-docviewer-app/cmake-fixes
Reviewer Review Type Date Requested Status
Andrew Hayzen (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+235774@code.launchpad.net

Commit message

Some cmake fixes for the app to build from Qt Creator or plain cmake.

Description of the change

Some cmake fixes for the app to build from Qt Creator or plain cmake.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Awesome, managed to build and review a click package inside qtcreator and with click-buddy.

review: Approve

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 2014-09-17 16:32:46 +0000
3+++ CMakeLists.txt 2014-09-24 09:47:51 +0000
4@@ -10,36 +10,48 @@
5 option(CLICK_MODE "Installs to a contained location" on)
6
7 set(APP_NAME docviewer)
8-set(DESKTOP_FILE "ubuntu-docviewer-app.desktop")
9+set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
10 #set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
11 set(MAIN_QML ubuntu-docviewer-app.qml)
12 set(ICON_FILE docviewer@30.png)
13 set(AUTOPILOT_DIR ubuntu_docviewer_app)
14 set(APP_HARDCODE docviewer-app)
15-set(UBUNTU_MANIFEST_PATH "manifest.json" CACHE INTERNAL "Relative path to the manifest file")
16+set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
17
18 if(CLICK_MODE)
19 if(NOT DEFINED BZR_SOURCE)
20- set(BZR_SOURCE "lp:ubuntu-${APP_HARDCODE}")
21- message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
22+ set(BZR_SOURCE "lp:ubuntu-${APP_HARDCODE}")
23+ message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
24 endif(NOT DEFINED BZR_SOURCE)
25+ if(NOT BZR_REVNO)
26+ set(BZR_REVNO "latest")
27+ endif(NOT BZR_REVNO)
28 set(CMAKE_INSTALL_PREFIX /)
29 set(CMAKE_INSTALL_BINDIR /)
30- set(DATA_DIR /)
31- set (ICON ${ICON_FILE})
32- set(EXEC "qmlscene %u ${MAIN_QML}")
33- set(DESKTOP_DIR ${DATA_DIR})
34- set(URLS_DIR ${DATA_DIR})
35+ set(DATA_DIR /)
36+ set (ICON ${ICON_FILE})
37+ set(EXEC "qmlscene %u ${MAIN_QML}")
38+ set(DESKTOP_DIR ${DATA_DIR})
39+ set(URLS_DIR ${DATA_DIR})
40+ configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
41+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json docviewer.apparmor
42+ DESTINATION ${CMAKE_INSTALL_PREFIX})
43+ # Make the click files visible in Qt Creator
44+ file(GLOB CLICK_FILES
45+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
46+ *.json *.json.in *.apparmor)
47+
48+ add_custom_target(com_ubuntu_shorts_CLICKFiles ALL SOURCES ${CLICK_FILES})
49 else(CLICK_MODE)
50- set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/ubuntu-${APP_HARDCODE})
51- set(EXEC ${APP_HARDCODE})
52- set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
53- configure_file(${APP_HARDCODE}.in
54- ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
55- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
56- DESTINATION ${CMAKE_INSTALL_BINDIR})
57- set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
58- set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
59+ set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/ubuntu-${APP_HARDCODE})
60+ set(EXEC ${APP_HARDCODE})
61+ set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
62+ configure_file(${APP_HARDCODE}.in
63+ ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
64+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
65+ DESTINATION ${CMAKE_INSTALL_BINDIR})
66+ set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
67+ set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
68 endif(CLICK_MODE)
69
70 file(GLOB_RECURSE I18N_SRC_FILES
71
72=== removed file 'avatar@8.png'
73Binary files avatar@8.png 2013-02-12 16:18:48 +0000 and avatar@8.png 1970-01-01 00:00:00 +0000 differ
74=== renamed file 'ubuntu-docviewer-app.desktop.in.in' => 'com.ubuntu.docviewer.desktop.in.in'
75--- ubuntu-docviewer-app.desktop.in.in 2014-09-11 20:10:32 +0000
76+++ com.ubuntu.docviewer.desktop.in.in 2014-09-24 09:47:51 +0000
77@@ -1,12 +1,11 @@
78 [Desktop Entry]
79-Encoding=UTF-8
80 Version=1.0
81 Type=Application
82 Terminal=false
83 Exec=@EXEC@
84 Icon=@ICON@
85-Name=Document Viewer
86+_Name=Document Viewer
87+_Keywords=documents;viewer;pdf;reader;
88 MimeType=text/plain;image/png;image/jpeg;image/svg+xml;application/pdf
89-Path=/usr/share/ubuntu-docviewer-app
90 X-Ubuntu-Touch=true
91 X-Ubuntu-StageHint=SideStage
92
93=== modified file 'docviewer.apparmor'
94--- docviewer.apparmor 2014-09-14 16:09:19 +0000
95+++ docviewer.apparmor 2014-09-24 09:47:51 +0000
96@@ -1,4 +1,4 @@
97 {
98 "policy_groups": [],
99 "policy_version": 1.2
100-}
101+}
102\ No newline at end of file
103
104=== renamed file 'manifest.json' => 'manifest.json.in'
105--- manifest.json 2014-09-12 21:37:38 +0000
106+++ manifest.json.in 2014-09-24 09:47:51 +0000
107@@ -1,15 +1,15 @@
108 {
109 "description": "Document Viewer application for Ubuntu devices",
110- "framework": "ubuntu-sdk-13.10",
111- "architecture": "@CLICK_ARCH@",
112+ "framework": "ubuntu-sdk-14.10-qml-dev3",
113+ "architecture": "all",
114 "hooks": {
115- "ubuntu-docviewer-app": {
116+ "docviewer": {
117 "apparmor": "docviewer.apparmor",
118- "desktop": "ubuntu-docviewer-app.desktop"
119+ "desktop": "com.ubuntu.docviewer.desktop"
120 }
121 },
122- "maintainer": "Granger Anthony <grangeranthony@gmail.com>",
123- "name": "com.ubuntu.ubuntu-docviewer-app",
124- "title": "Docviewer",
125- "version": "0.1"
126+ "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
127+ "name": "com.ubuntu.docviewer",
128+ "title": "Document viewer",
129+ "version": "0.1.@BZR_REVNO@"
130 }
131
132=== modified file 'ubuntu-docviewer-app.qml'
133--- ubuntu-docviewer-app.qml 2014-03-13 18:11:54 +0000
134+++ ubuntu-docviewer-app.qml 2014-09-24 09:47:51 +0000
135@@ -11,7 +11,7 @@
136 MainView {
137 objectName: "docviewer"
138
139- applicationName: "ubuntu-docviewer-app"
140+ applicationName: "com.ubuntu.docviewer"
141
142 width: units.gu(50)
143 height: units.gu(75)

Subscribers

People subscribed via source and target branches