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
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-04-09 18:30:57 +0000
+++ CMakeLists.txt 2014-04-22 23:20:58 +0000
@@ -11,7 +11,7 @@
11option(CLICK_MODE "Installs to a contained location" off)11option(CLICK_MODE "Installs to a contained location" off)
1212
13set(APP_NAME reminders)13set(APP_NAME reminders)
14set(DESKTOP_FILE "${PROJECT_NAME}.desktop")14set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
15set(ICON ${APP_NAME}.png)15set(ICON ${APP_NAME}.png)
16set(AUTOPILOT_DIR reminders)16set(AUTOPILOT_DIR reminders)
17set(APP_HARDCODE reminders)17set(APP_HARDCODE reminders)
@@ -20,40 +20,40 @@
2020
21if(CLICK_MODE)21if(CLICK_MODE)
22 if(NOT DEFINED BZR_SOURCE)22 if(NOT DEFINED BZR_SOURCE)
23 set(BZR_SOURCE "lp:${APP_HARDCODE}")23 set(BZR_SOURCE "lp:${APP_HARDCODE}")
24 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")24 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
25 endif(NOT DEFINED BZR_SOURCE)25 endif(NOT DEFINED BZR_SOURCE)
26 execute_process(26 execute_process(
27 COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH27 COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
28 OUTPUT_VARIABLE ARCH_TRIPLET28 OUTPUT_VARIABLE ARCH_TRIPLET
29 OUTPUT_STRIP_TRAILING_WHITESPACE29 OUTPUT_STRIP_TRAILING_WHITESPACE
30 )30 )
31 set(CMAKE_INSTALL_PREFIX /)31 set(CMAKE_INSTALL_PREFIX /)
32 set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")32 set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
33 set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)33 set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
34 set(DATA_DIR /)34 set(DATA_DIR /)
35 set(DESKTOP_DIR ${DATA_DIR})35 set(DESKTOP_DIR ${DATA_DIR})
36 install(FILES manifest.json apparmor.json DESTINATION ${CMAKE_INSTALL_PREFIX})
37else(CLICK_MODE)36else(CLICK_MODE)
38 # components PATH37 # components PATH
39 execute_process(38 execute_process(
40 COMMAND qmake -query QT_INSTALL_QML39 COMMAND qmake -query QT_INSTALL_QML
41 OUTPUT_VARIABLE QT_IMPORTS_DIR40 OUTPUT_VARIABLE QT_IMPORTS_DIR
42 OUTPUT_STRIP_TRAILING_WHITESPACE41 OUTPUT_STRIP_TRAILING_WHITESPACE
43 )42 )
44 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})43 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
45 set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")44 set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
46 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)45 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
47endif(CLICK_MODE)46endif(CLICK_MODE)
4847
49file(GLOB_RECURSE I18N_SRC_FILES48file(GLOB_RECURSE I18N_SRC_FILES
50 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}49 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
51 src/app/qml/*.qml *.desktop.in)50 src/app/qml/*.qml *.desktop.in)
52list(SORT I18N_SRC_FILES)51list(SORT I18N_SRC_FILES)
5352
53
54file(GLOB SRC_FILES54file(GLOB SRC_FILES
55 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}55 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
56 *.qml *.js *.png *.js)56 *.qml *.js *.png *.js)
57install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})57install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
5858
59configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})59configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
@@ -62,6 +62,7 @@
62# Tests62# Tests
63enable_testing()63enable_testing()
6464
65add_subdirectory(click)
65add_subdirectory(po)66add_subdirectory(po)
66add_subdirectory(tests)67add_subdirectory(tests)
67add_subdirectory(3rdParty)68add_subdirectory(3rdParty)
6869
=== added directory 'click'
=== added file 'click/CMakeLists.txt'
--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ click/CMakeLists.txt 2014-04-22 23:20:58 +0000
@@ -0,0 +1,8 @@
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 apparmor.json
7 DESTINATION ${CMAKE_INSTALL_PREFIX})
8endif(CLICK_MODE)
09
=== renamed file 'apparmor.json' => 'click/apparmor.json'
=== renamed file 'manifest.json' => 'click/manifest.json.in'
--- manifest.json 2014-04-09 13:57:06 +0000
+++ click/manifest.json.in 2014-04-22 23:20:58 +0000
@@ -3,20 +3,20 @@
3 "framework": "ubuntu-sdk-14.04-dev1",3 "framework": "ubuntu-sdk-14.04-dev1",
4 "architecture": "armhf",4 "architecture": "armhf",
5 "hooks": {5 "hooks": {
6 "reminders": {6 "@APP_NAME@": {
7 "apparmor": "apparmor.json",7 "apparmor": "apparmor.json",
8 "desktop": "com.ubuntu.reminders.desktop"8 "desktop": "@DESKTOP_FILE@"
9 }9 }
10 },10 },
11 "maintainer": "Ubuntu Reminders app developers <ubuntu-phone@lists.launchpad.net>",11 "maintainer": "Ubuntu Reminders app developers <ubuntu-phone@lists.launchpad.net>",
12 "name": "com.ubuntu.reminders",12 "name": "@PROJECT_NAME@",
13 "title": "Reminders",13 "title": "Reminders",
14 "version": "0.5",14 "version": "0.5.@BZR_REVNO@",
15 "x-source": {15 "x-source": {
16 "vcs-bzr": "lp:reminders",16 "vcs-bzr": "@BZR_SOURCE@",
17 "vcs-bzr-revno": "latest"17 "vcs-bzr-revno": "@BZR_REVNO@"
18 },18 },
19 "x-test": {19 "x-test": {
20 "autopilot": "reminders"20 "autopilot": "@AUTOPILOT_DIR@"
21 }21 }
22}22}
2323
=== renamed file 'com.ubuntu.reminders.desktop.in' => 'com.ubuntu.reminders_reminders.desktop.in'
=== modified file 'src/app/main.cpp'
--- src/app/main.cpp 2014-04-09 13:29:27 +0000
+++ src/app/main.cpp 2014-04-22 23:20:58 +0000
@@ -27,7 +27,6 @@
27#include <QtQuick/QQuickView>27#include <QtQuick/QQuickView>
28#include <QtQml/QtQml>28#include <QtQml/QtQml>
29#include <QLibrary>29#include <QLibrary>
30#include <QDir>
3130
32#include <QDebug>31#include <QDebug>
3332
@@ -78,6 +77,7 @@
78 }77 }
79 }78 }
8079
80 qDebug() << "Running from " << QDir::currentPath();
81 view.engine()->rootContext()->setContextProperty("tablet", QVariant(false));81 view.engine()->rootContext()->setContextProperty("tablet", QVariant(false));
82 view.engine()->rootContext()->setContextProperty("phone", QVariant(false));82 view.engine()->rootContext()->setContextProperty("phone", QVariant(false));
83 if (args.contains("-t") || args.contains("--tablet")) {83 if (args.contains("-t") || args.contains("--tablet")) {
@@ -104,9 +104,11 @@
104 QString qmlfile;104 QString qmlfile;
105 const QString filePath = QLatin1String("qml/reminders.qml");105 const QString filePath = QLatin1String("qml/reminders.qml");
106 QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);106 QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
107 paths.prepend(QDir::currentPath());107 paths.prepend(QCoreApplication::applicationDirPath());
108 paths.append("/opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.reminders/");
108 Q_FOREACH (const QString &path, paths) {109 Q_FOREACH (const QString &path, paths) {
109 QString myPath = path + QLatin1Char('/') + filePath;110 QString myPath = path + QLatin1Char('/') + filePath;
111 qDebug() << "Checking for qml in " << myPath << " using path " << path;
110 if (QFile::exists(myPath)) {112 if (QFile::exists(myPath)) {
111 qmlfile = myPath;113 qmlfile = myPath;
112 break;114 break;
113115
=== modified file 'tests/autopilot/reminders/tests/__init__.py'
--- tests/autopilot/reminders/tests/__init__.py 2014-04-04 06:09:17 +0000
+++ tests/autopilot/reminders/tests/__init__.py 2014-04-22 23:20:58 +0000
@@ -71,14 +71,11 @@
71 def launch_test_installed(self):71 def launch_test_installed(self):
72 return self.launch_test_application(72 return self.launch_test_application(
73 self.installed_location_binary,73 self.installed_location_binary,
74 '-q ' + self.installed_location_qml,
75 '--desktop_file_hint=/usr/share/applications/'
76 'reminders.desktop',
77 app_type='qt',74 app_type='qt',
78 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)75 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
7976
80 @autopilot_logging.log_action(logger.info)77 @autopilot_logging.log_action(logger.info)
81 def launch_test_click(self):78 def launch_test_click(self):
82 return self.launch_click_package(79 return self.launch_click_package(
83 'com.ubuntu.reminders-app',80 'com.ubuntu.reminders',
84 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)81 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)

Subscribers

People subscribed via source and target branches