Merge lp:~zeller-benjamin/notes-app/sdkcompat into lp:notes-app

Proposed by Benjamin Zeller
Status: Needs review
Proposed branch: lp:~zeller-benjamin/notes-app/sdkcompat
Merge into: lp:notes-app
Diff against target: 115 lines (+30/-13)
5 files modified
CMakeLists.txt (+7/-2)
click/CMakeLists.txt (+8/-1)
click/manifest.json.in (+9/-10)
debian/rules (+3/-0)
src/NotesApp/Plugins/CMakeLists.txt (+3/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/notes-app/sdkcompat
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+233892@code.launchpad.net

Commit message

Make notes app cmake project useable out of the Box with QtCreator
- Enable click mode by default
- Disable click mode in debian rules file
- Add variable UBUNTU_MANIFEST_PATH variable so QtC knows where to look
for the manifest file
- Rename notes-apparmor.json => notes.apparmor (editor support)
- Automatically substitute click architecture in the manifest file

Description of the change

Make notes app cmake project useable out of the Box with QtCreator in devices and emulator,
there is still a problem with running it locally, because the QML plugin is in a nested
directory in the builddir, which is currently not supported.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

289. By Benjamin Zeller

Make notes app cmake project useable out of the Box with QtCreator
- Enable click mode by default
- Disable click mode in debian rules file
- Add variable UBUNTU_MANIFEST_PATH variable so QtC knows where to look
for the manifest file
- Rename notes-apparmor.json => notes.apparmor (editor support)
- Automatically substitute click architecture in the manifest file

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-06-20 16:52:42 +0000
3+++ CMakeLists.txt 2014-09-09 09:16:59 +0000
4@@ -27,8 +27,8 @@
5 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP})
6 endif()
7
8-option(INSTALL_TESTS "Install the tests on make install" on)
9-option(CLICK_MODE "Installs to a contained location" off)
10+option(INSTALL_TESTS "Install the tests on make install" off)
11+option(CLICK_MODE "Installs to a contained location" on)
12
13 if(CLICK_MODE)
14 set(CMAKE_INSTALL_PREFIX "/")
15@@ -43,6 +43,11 @@
16 set(NOTES_APP notes-app)
17 set(AUTOPILOT_DIR notes_app)
18 set(ICON_FILE notepad@30.png)
19+set(UBUNTU_MANIFEST_PATH "click/manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
20+
21+# make non compiled files visible in qtcreator
22+file(GLOB_RECURSE NON_COMPILED_FILES *.qml *.js *.py *.svg *.png *.in *.json *.desktop *.pot *.apparmor qmldir)
23+add_custom_target(NON_COMPILED_TARGET ALL SOURCES ${NON_COMPILED_FILES})
24
25 if(NOT CLICK_MODE)
26 set(NOTES_APP_DIR ${CMAKE_INSTALL_DATADIR}/${NOTES_APP})
27
28=== modified file 'click/CMakeLists.txt'
29--- click/CMakeLists.txt 2013-09-23 16:29:47 +0000
30+++ click/CMakeLists.txt 2014-09-09 09:16:59 +0000
31@@ -2,9 +2,16 @@
32 if(NOT BZR_REVNO)
33 set(BZR_REVNO "trunk")
34 endif(NOT BZR_REVNO)
35+
36+ execute_process(
37+ COMMAND dpkg-architecture -qDEB_HOST_ARCH
38+ OUTPUT_VARIABLE CLICK_ARCH
39+ OUTPUT_STRIP_TRAILING_WHITESPACE
40+ )
41+
42 configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
43 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json
44 DESTINATION ${CMAKE_INSTALL_PREFIX})
45- install(FILES notes-apparmor.json
46+ install(FILES notes.apparmor
47 DESTINATION ${CMAKE_INSTALL_PREFIX})
48 endif(CLICK_MODE)
49
50=== modified file 'click/manifest.json.in'
51--- click/manifest.json.in 2014-04-10 10:38:52 +0000
52+++ click/manifest.json.in 2014-09-09 09:16:59 +0000
53@@ -1,24 +1,23 @@
54 {
55- "architecture": "armhf",
56- "description":
57- "Note taking application for the Ubuntu platform",
58- "framework": "ubuntu-sdk-14.04-dev1",
59+ "architecture": "@CLICK_ARCH@",
60+ "description": "Note taking application for the Ubuntu platform",
61+ "framework": "ubuntu-sdk-14.04-dev1",
62 "hooks": {
63 "notes": {
64- "apparmor": "notes-apparmor.json",
65+ "apparmor": "notes.apparmor",
66 "desktop": "@CMAKE_INSTALL_DATADIR@/applications/@DESKTOP_FILE@"
67 }
68- },
69+ },
70 "icon": "notepad",
71 "maintainer": "Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>",
72- "name": "com.ubuntu.notes",
73- "title": "Notes",
74+ "name": "com.ubuntu.notes",
75+ "title": "Notes",
76 "version": "1.4.@BZR_REVNO@",
77 "x-source": {
78- "vcs-bzr": "lp:notes-app",
79+ "vcs-bzr": "lp:notes-app",
80 "vcs-bzr-revno": "@BZR_REVNO@"
81 },
82 "x-test": {
83- "autopilot": "@AUTOPILOT_DIR@"
84+ "autopilot": "@AUTOPILOT_DIR@"
85 }
86 }
87
88=== renamed file 'click/notes-apparmor.json' => 'click/notes.apparmor'
89=== modified file 'debian/rules'
90--- debian/rules 2014-04-10 10:38:52 +0000
91+++ debian/rules 2014-09-09 09:16:59 +0000
92@@ -13,6 +13,9 @@
93 %:
94 dh $@ --parallel --with translations,python3
95
96+override_dh_auto_configure:
97+ dh_auto_configure -- -DCLICK_MODE=OFF -DINSTALL_TESTS=ON
98+
99 override_dh_install:
100 dh_install --fail-missing
101
102
103=== modified file 'src/NotesApp/Plugins/CMakeLists.txt'
104--- src/NotesApp/Plugins/CMakeLists.txt 2013-05-07 15:45:23 +0000
105+++ src/NotesApp/Plugins/CMakeLists.txt 2014-09-09 09:16:59 +0000
106@@ -22,6 +22,9 @@
107 endfunction(QUERY_QMAKE)
108 query_qmake(QT_INSTALL_QML QT_IMPORTS_DIR)
109
110+#make sure that the qmldir file is in the QML2_IMPORT_PATH when running from QtC
111+file(COPY qmldir DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
112+
113 set(PLUGIN_DIR ${QT_IMPORTS_DIR}/NotesApp/Plugins)
114 install(TARGETS notes-app-plugin DESTINATION ${PLUGIN_DIR})
115 install(FILES qmldir DESTINATION ${PLUGIN_DIR})

Subscribers

People subscribed via source and target branches