Merge lp:~nskaggs/ubuntu-filemanager-app/fix-click-buddy-build into lp:ubuntu-filemanager-app

Proposed by Nicholas Skaggs
Status: Rejected
Rejected by: Nicholas Skaggs
Proposed branch: lp:~nskaggs/ubuntu-filemanager-app/fix-click-buddy-build
Merge into: lp:ubuntu-filemanager-app
Diff against target: 203 lines (+47/-39)
5 files modified
CMakeLists.txt (+10/-13)
click/CMakeLists.txt (+8/-0)
click/apparmor.json (+4/-3)
click/manifest.json.in (+8/-8)
src/app/main.cpp (+17/-15)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-filemanager-app/fix-click-buddy-build
Reviewer Review Type Date Requested Status
Carlos Jose Mazieri Approve
Review via email: mp+216478@code.launchpad.net
To post a comment you must log in.
162. By Nicholas Skaggs

further cmake tweaks

Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

I cannot test it, it looks OK.

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

Hey Carlos, I don't want to merge this, as it's just for testing at the moment. These changes break qtcreator changes David put in on the last merge. We need to fix it so both things work. Thanks!

Revision history for this message
Carlos Jose Mazieri (carlos-mazieri) wrote :

Hi Nicholas, I saw this status " Work in Progress" just after approving it.

I am worried, right now there are building issues breaking File
Manager build/deploy, I would like someone to take a look on that. I
have two other changes to release and I cannot do it because this
problem.

By the way, do you mind removing this MP and propose it only when it is ready?

Thanks,
Carlos

On 4/21/14, Nicholas Skaggs <email address hidden> wrote:
> Hey Carlos, I don't want to merge this, as it's just for testing at the
> moment. These changes break qtcreator changes David put in on the last
> merge. We need to fix it so both things work. Thanks!
> --
> https://code.launchpad.net/~nskaggs/ubuntu-filemanager-app/fix-click-buddy-build/+merge/216478
> You are reviewing the proposed merge of
> lp:~nskaggs/ubuntu-filemanager-app/fix-click-buddy-build into
> lp:ubuntu-filemanager-app.
>

163. By Nicholas Skaggs

remove -q option for loading qml

164. By Nicholas Skaggs

fix qml name

165. By Nicholas Skaggs

add debugging to main.cpp

166. By Nicholas Skaggs

debugging file load path

167. By Nicholas Skaggs

semicolon

168. By Nicholas Skaggs

hardcoding load path

169. By Nicholas Skaggs

move qml under bin dir

170. By Nicholas Skaggs

cmake tweaks to qml location and desktop file name

171. By Nicholas Skaggs

backdate framework

172. By Nicholas Skaggs

fix framework

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

Hey Carlos, it's set to Work in progress so you shouldn't be seeing it anywhere. It's nicer to share as an mp, plus I like seeing the diff. My apologies if it's disturbing you. On the build issues, see

https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1294301

That's what this MP is all about. It should work, but it simply doesn't. David is back tomorrow and we'll keep working on this. Sorry for the trouble. We want to release too!

Unmerged revisions

172. By Nicholas Skaggs

fix framework

171. By Nicholas Skaggs

backdate framework

170. By Nicholas Skaggs

cmake tweaks to qml location and desktop file name

169. By Nicholas Skaggs

move qml under bin dir

168. By Nicholas Skaggs

hardcoding load path

167. By Nicholas Skaggs

semicolon

166. By Nicholas Skaggs

debugging file load path

165. By Nicholas Skaggs

add debugging to main.cpp

164. By Nicholas Skaggs

fix qml name

163. By Nicholas Skaggs

remove -q option for loading qml

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 21:28:47 +0000
3+++ CMakeLists.txt 2014-04-22 22:54:39 +0000
4@@ -11,13 +11,13 @@
5 option(CLICK_MODE "Installs to a contained location" off)
6
7 set(APP_NAME filemanager)
8-set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
9-set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
10+set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")
11+set(ICON ${APP_NAME}64.png)
12 set(APP_HARDCODE ubuntu-filemanager-app)
13+set(AUTOPILOT_DIR ubuntu_filemanager_app)
14 set(MAIN_QML ${APP_HARDCODE}.qml)
15-set(ICON_FILE filemanager64.png)
16-set(AUTOPILOT_DIR ubuntu_filemanager_app)
17 set(EXEC "filemanager")
18+set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher")
19
20 if(CLICK_MODE)
21 if(NOT DEFINED BZR_SOURCE)
22@@ -32,14 +32,11 @@
23 OUTPUT_STRIP_TRAILING_WHITESPACE
24 )
25 set(CMAKE_INSTALL_PREFIX /)
26- set(CMAKE_INSTALL_BINDIR /)
27- set(DATA_DIR /)
28- set(ICON ${ICON_FILE})
29 set(QT_IMPORTS_DIR "/lib/${ARCH_TRIPLET}")
30 set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
31+ set(DATA_DIR /)
32 set(DESKTOP_DIR ${DATA_DIR})
33 set(URLS_DIR ${DATA_DIR})
34- install(FILES manifest.json apparmor.json DESTINATION ${CMAKE_INSTALL_PREFIX})
35 else(CLICK_MODE)
36 execute_process(
37 COMMAND qmake -query QT_INSTALL_QML
38@@ -47,14 +44,14 @@
39 OUTPUT_STRIP_TRAILING_WHITESPACE
40 )
41 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
42- set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
43+ set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
44 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
45 set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
46 endif(CLICK_MODE)
47
48 file(GLOB_RECURSE I18N_SRC_FILES
49 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
50- src/app/**.qml *.desktop.in)
51+ src/app/qml/*.qml *.desktop.in)
52 list(SORT I18N_SRC_FILES)
53
54 file(GLOB SRC_FILES
55@@ -63,14 +60,14 @@
56 install(FILES ${SRC_FILES} DESTINATION ${DATA_DIR})
57
58 configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
59-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
60- DESTINATION ${DESKTOP_DIR})
61-
62+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
63 install(FILES ${URLS_FILE} DESTINATION ${URLS_DIR})
64
65+
66 # Tests
67 enable_testing()
68
69+add_subdirectory(click)
70 add_subdirectory(po)
71 add_subdirectory(tests)
72 add_subdirectory(src)
73
74=== added directory 'click'
75=== added file 'click/CMakeLists.txt'
76--- click/CMakeLists.txt 1970-01-01 00:00:00 +0000
77+++ click/CMakeLists.txt 2014-04-22 22:54:39 +0000
78@@ -0,0 +1,8 @@
79+if(CLICK_MODE)
80+ if(NOT BZR_REVNO)
81+ set(BZR_REVNO "latest")
82+ endif(NOT BZR_REVNO)
83+ configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json)
84+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json apparmor.json
85+ DESTINATION ${CMAKE_INSTALL_PREFIX})
86+endif(CLICK_MODE)
87
88=== renamed file 'apparmor.json' => 'click/apparmor.json'
89--- apparmor.json 2014-04-15 08:19:12 +0000
90+++ click/apparmor.json 2014-04-22 22:54:39 +0000
91@@ -1,4 +1,5 @@
92 {
93- "policy_version": 1.1,
94- "template": "unconfined"
95-}
96+ "policy_version": 1.1,
97+ "template": "unconfined",
98+ "policy_groups": []
99+}
100\ No newline at end of file
101
102=== renamed file 'manifest.json' => 'click/manifest.json.in'
103--- manifest.json 2014-04-15 08:19:12 +0000
104+++ click/manifest.json.in 2014-04-22 22:54:39 +0000
105@@ -5,20 +5,20 @@
106 "hooks": {
107 "filemanager": {
108 "apparmor": "apparmor.json",
109- "desktop": "com.ubuntu.filemanager.desktop",
110- "urls": "com.ubuntu.filemanager_filemanager.url-dispatcher"
111+ "desktop": "@DESKTOP_FILE@",
112+ "urls": "@URLS_FILE@"
113 }
114 },
115 "icon": "filemanager64.png",
116 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
117- "name": "com.ubuntu.filemanager",
118+ "name": "@PROJECT_NAME@",
119 "title": "File Manager",
120- "version": "0.3",
121+ "version": "0.3.@BZR_REVNO@",
122 "x-source": {
123- "vcs-bzr": "lp:ubuntu-filemanager-app",
124- "vcs-bzr-revno": "latest"
125+ "vcs-bzr": "@BZR_SOURCE@",
126+ "vcs-bzr-revno": "@BZR_REVNO@"
127 },
128 "x-test": {
129- "autopilot": "ubuntu_filemanager_app"
130+ "autopilot": "@AUTOPILOT_DIR@"
131 }
132-}
133\ No newline at end of file
134+}
135
136=== renamed file 'com.ubuntu.filemanager.desktop.in' => 'com.ubuntu.filemanager_filemanager.desktop.in'
137=== modified file 'src/app/main.cpp'
138--- src/app/main.cpp 2014-04-14 20:54:31 +0000
139+++ src/app/main.cpp 2014-04-22 22:54:39 +0000
140@@ -45,11 +45,9 @@
141 qDebug() << " -t|--tablet If running on Desktop, start in a tablet sized window.";
142 qDebug() << " -h|--help Print this help.";
143 qDebug() << " -I <path> Give a path for an additional QML import directory. May be used multiple times.";
144- qDebug() << " -q <qmlfile> Give an alternative location for the main qml file.";
145 return 0;
146 }
147
148- QString qmlfile;
149 for (int i = 0; i < args.count(); i++) {
150 if (args.at(i) == "-I" && args.count() > i + 1) {
151 QString addedPath = args.at(i+1);
152@@ -58,8 +56,6 @@
153 addedPath.prepend(QDir::currentPath());
154 }
155 importPathList.append(addedPath);
156- } else if (args.at(i) == "-q" && args.count() > i + 1) {
157- qmlfile = args.at(i+1);
158 }
159 }
160
161@@ -78,6 +74,8 @@
162 }
163 }
164
165+ qDebug() << "Running from " << QDir::currentPath();
166+
167 view.engine()->rootContext()->setContextProperty("tablet", QVariant(false));
168 view.engine()->rootContext()->setContextProperty("phone", QVariant(false));
169 if (args.contains("-t") || args.contains("--tablet")) {
170@@ -93,18 +91,22 @@
171
172 view.engine()->setImportPathList(importPathList);
173
174- // load the qml file
175+ QString qmlfile;
176+ const QString filePath = QLatin1String("qml/ubuntu-filemanager-app.qml");
177+ QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
178+ paths.prepend(QCoreApplication::applicationDirPath());
179+ paths.append("/opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.filemanager/");
180+ Q_FOREACH (const QString &path, paths) {
181+ QString myPath = path + QLatin1Char('/') + filePath;
182+ qDebug() << "Checking for qml in " << myPath << " using path " << path;
183+ if (QFile::exists(myPath)) {
184+ qmlfile = myPath;
185+ break;
186+ }
187+ }
188+ // sanity check
189 if (qmlfile.isEmpty()) {
190- QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
191- paths.prepend(".");
192-
193- foreach (const QString &path, paths) {
194- QFileInfo fi(path + "/qml/ubuntu-filemanager-app.qml");
195- if (fi.exists()) {
196- qmlfile = path + "/qml/ubuntu-filemanager-app.qml";
197- break;
198- }
199- }
200+ qFatal("File: %s does not exist at any of the standard paths!", qPrintable(filePath));
201 }
202 qDebug() << "using main qml file from:" << qmlfile;
203 view.setSource(QUrl::fromLocalFile(qmlfile));

Subscribers

People subscribed via source and target branches