Merge lp:~nskaggs/reminders-app/cmake-build-test into lp:reminders-app

Proposed by Nicholas Skaggs
Status: Rejected
Rejected by: Nicholas Skaggs
Proposed branch: lp:~nskaggs/reminders-app/cmake-build-test
Merge into: lp:reminders-app
Diff against target: 184 lines (+44/-36)
5 files modified
CMakeLists.txt (+24/-23)
click/CMakeLists.txt (+8/-0)
click/manifest.json.in (+7/-7)
src/app/main.cpp (+4/-2)
tests/autopilot/reminders/tests/__init__.py (+1/-4)
To merge this branch: bzr merge lp:~nskaggs/reminders-app/cmake-build-test
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Disapprove
Leo Arias (community) Approve
Review via email: mp+216793@code.launchpad.net

Description of the change

DO NOT MERGE, TESTING ONLY

To post a comment you must log in.
108. By Nicholas Skaggs

undo changes unintentional to manifest; use new framework

Revision history for this message
Leo Arias (elopio) wrote :

183 + 'com.ubuntu.reminders',

If you change this ^, you will need to change the launch statement in the tests/autopilot/reminders/tests/__init__.py file.

review: Needs Fixing
Revision history for this message
Leo Arias (elopio) wrote :

Scratch that, I'm drunk.

Revision history for this message
Leo Arias (elopio) wrote :

Approve, as the click you sent me works. I'm not able to test it myself though.

review: Approve
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I might tweak this to allow qtcreator to build properly to and pursuing merging.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

dpm got to this first :-)

review: Disapprove

Unmerged revisions

108. By Nicholas Skaggs

undo changes unintentional to manifest; use new framework

107. By Nicholas Skaggs

remove unused -q arg for installed launch

106. By Nicholas Skaggs

fix launch name

105. By Nicholas Skaggs

restore working click build

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-04-09 18:30:57 +0000
3+++ CMakeLists.txt 2014-04-22 23:20:58 +0000
4@@ -11,7 +11,7 @@
5 option(CLICK_MODE "Installs to a contained location" off)
6
7 set(APP_NAME reminders)
8-set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
9+set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
10 set(ICON ${APP_NAME}.png)
11 set(AUTOPILOT_DIR reminders)
12 set(APP_HARDCODE reminders)
13@@ -20,40 +20,40 @@
14
15 if(CLICK_MODE)
16 if(NOT DEFINED BZR_SOURCE)
17- set(BZR_SOURCE "lp:${APP_HARDCODE}")
18- message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
19+ set(BZR_SOURCE "lp:${APP_HARDCODE}")
20+ message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
21 endif(NOT DEFINED BZR_SOURCE)
22 execute_process(
23- COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
24- OUTPUT_VARIABLE ARCH_TRIPLET
25- OUTPUT_STRIP_TRAILING_WHITESPACE
26+ COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
27+ OUTPUT_VARIABLE ARCH_TRIPLET
28+ OUTPUT_STRIP_TRAILING_WHITESPACE
29 )
30 set(CMAKE_INSTALL_PREFIX /)
31 set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
32- set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
33- set(DATA_DIR /)
34- set(DESKTOP_DIR ${DATA_DIR})
35- install(FILES manifest.json apparmor.json DESTINATION ${CMAKE_INSTALL_PREFIX})
36+ set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
37+ set(DATA_DIR /)
38+ set(DESKTOP_DIR ${DATA_DIR})
39 else(CLICK_MODE)
40- # components PATH
41- execute_process(
42- COMMAND qmake -query QT_INSTALL_QML
43- OUTPUT_VARIABLE QT_IMPORTS_DIR
44- OUTPUT_STRIP_TRAILING_WHITESPACE
45- )
46- set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
47- set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
48- set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
49+ # components PATH
50+ execute_process(
51+ COMMAND qmake -query QT_INSTALL_QML
52+ OUTPUT_VARIABLE QT_IMPORTS_DIR
53+ OUTPUT_STRIP_TRAILING_WHITESPACE
54+ )
55+ set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
56+ set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
57+ set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
58 endif(CLICK_MODE)
59
60 file(GLOB_RECURSE I18N_SRC_FILES
61- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
62- src/app/qml/*.qml *.desktop.in)
63+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
64+ src/app/qml/*.qml *.desktop.in)
65 list(SORT I18N_SRC_FILES)
66
67+
68 file(GLOB SRC_FILES
69- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
70- *.qml *.js *.png *.js)
71+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
72+ *.qml *.js *.png *.js)
73 install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
74
75 configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
76@@ -62,6 +62,7 @@
77 # Tests
78 enable_testing()
79
80+add_subdirectory(click)
81 add_subdirectory(po)
82 add_subdirectory(tests)
83 add_subdirectory(3rdParty)
84
85=== added directory 'click'
86=== added file 'click/CMakeLists.txt'
87--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
88+++ click/CMakeLists.txt 2014-04-22 23:20:58 +0000
89@@ -0,0 +1,8 @@
90+if(CLICK_MODE)
91+ if(NOT BZR_REVNO)
92+ set(BZR_REVNO "latest")
93+ endif(NOT BZR_REVNO)
94+ configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
95+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json apparmor.json
96+ DESTINATION ${CMAKE_INSTALL_PREFIX})
97+endif(CLICK_MODE)
98
99=== renamed file 'apparmor.json' => 'click/apparmor.json'
100=== renamed file 'manifest.json' => 'click/manifest.json.in'
101--- manifest.json 2014-04-09 13:57:06 +0000
102+++ click/manifest.json.in 2014-04-22 23:20:58 +0000
103@@ -3,20 +3,20 @@
104 "framework": "ubuntu-sdk-14.04-dev1",
105 "architecture": "armhf",
106 "hooks": {
107- "reminders": {
108+ "@APP_NAME@": {
109 "apparmor": "apparmor.json",
110- "desktop": "com.ubuntu.reminders.desktop"
111+ "desktop": "@DESKTOP_FILE@"
112 }
113 },
114 "maintainer": "Ubuntu Reminders app developers <ubuntu-phone@lists.launchpad.net>",
115- "name": "com.ubuntu.reminders",
116+ "name": "@PROJECT_NAME@",
117 "title": "Reminders",
118- "version": "0.5",
119+ "version": "0.5.@BZR_REVNO@",
120 "x-source": {
121- "vcs-bzr": "lp:reminders",
122- "vcs-bzr-revno": "latest"
123+ "vcs-bzr": "@BZR_SOURCE@",
124+ "vcs-bzr-revno": "@BZR_REVNO@"
125 },
126 "x-test": {
127- "autopilot": "reminders"
128+ "autopilot": "@AUTOPILOT_DIR@"
129 }
130 }
131
132=== renamed file 'com.ubuntu.reminders.desktop.in' => 'com.ubuntu.reminders_reminders.desktop.in'
133=== modified file 'src/app/main.cpp'
134--- src/app/main.cpp 2014-04-09 13:29:27 +0000
135+++ src/app/main.cpp 2014-04-22 23:20:58 +0000
136@@ -27,7 +27,6 @@
137 #include <QtQuick/QQuickView>
138 #include <QtQml/QtQml>
139 #include <QLibrary>
140-#include <QDir>
141
142 #include <QDebug>
143
144@@ -78,6 +77,7 @@
145 }
146 }
147
148+ qDebug() << "Running from " << QDir::currentPath();
149 view.engine()->rootContext()->setContextProperty("tablet", QVariant(false));
150 view.engine()->rootContext()->setContextProperty("phone", QVariant(false));
151 if (args.contains("-t") || args.contains("--tablet")) {
152@@ -104,9 +104,11 @@
153 QString qmlfile;
154 const QString filePath = QLatin1String("qml/reminders.qml");
155 QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
156- paths.prepend(QDir::currentPath());
157+ paths.prepend(QCoreApplication::applicationDirPath());
158+ paths.append("/opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.reminders/");
159 Q_FOREACH (const QString &path, paths) {
160 QString myPath = path + QLatin1Char('/') + filePath;
161+ qDebug() << "Checking for qml in " << myPath << " using path " << path;
162 if (QFile::exists(myPath)) {
163 qmlfile = myPath;
164 break;
165
166=== modified file 'tests/autopilot/reminders/tests/__init__.py'
167--- tests/autopilot/reminders/tests/__init__.py 2014-04-04 06:09:17 +0000
168+++ tests/autopilot/reminders/tests/__init__.py 2014-04-22 23:20:58 +0000
169@@ -71,14 +71,11 @@
170 def launch_test_installed(self):
171 return self.launch_test_application(
172 self.installed_location_binary,
173- '-q ' + self.installed_location_qml,
174- '--desktop_file_hint=/usr/share/applications/'
175- 'reminders.desktop',
176 app_type='qt',
177 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
178
179 @autopilot_logging.log_action(logger.info)
180 def launch_test_click(self):
181 return self.launch_click_package(
182- 'com.ubuntu.reminders-app',
183+ 'com.ubuntu.reminders',
184 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)

Subscribers

People subscribed via source and target branches