Merge lp:~flscogna/ubuntu-weather-app/reorganization-and-native-launcher into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Filippo Scognamiglio
Status: Rejected
Rejected by: Daniel Holbach
Proposed branch: lp:~flscogna/ubuntu-weather-app/reorganization-and-native-launcher
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 300 lines (+127/-40)
9 files modified
CMakeLists.txt (+21/-18)
debian/control (+7/-6)
debian/qtdeclarative5-ubuntuweather-timezone-plugin1.0.install (+1/-1)
src/CMakeLists.txt (+2/-0)
src/app/CMakeLists.txt (+24/-0)
src/app/main.cpp (+66/-0)
src/plugins/CMakeLists.txt (+6/-2)
ubuntu-weather-app.desktop (+0/-10)
ubuntu-weather-app.in (+0/-3)
To merge this branch: bzr merge lp:~flscogna/ubuntu-weather-app/reorganization-and-native-launcher
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Daniel Holbach (community) Needs Fixing
Nicholas Skaggs (community) Needs Fixing
Alan Pope 🍺🐧🐱 πŸ¦„ Pending
Review via email: mp+241351@code.launchpad.net

Commit message

Project reorganization and migration to native launcher.

Description of the change

The project has been reorganized following the terminal as a guideline. The program is now launched from a binary executable (instead of relying on qmlscene) I tested it both on the phone and on the desktop. I really hope everything is in place.

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: Needs Fixing (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Getting the following tracebacks when running the autopilot tests:

http://paste.ubuntu.com/8944971/

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

It's not currently building; dpkg-buildpackage -rfakeroot -D -us -uc failed

review: Needs Fixing
Revision history for this message
Filippo Scognamiglio (flscogna) wrote :

I'm sorry I completely forgot about this. I will take a look at it soon.

Revision history for this message
Daniel Holbach (dholbach) wrote :

<dholbach> dh_install: qtdeclarative5-ubuntuweather-timezone-plugin1.0 missing files (usr/lib/*/qt5/), aborting
<swordfish90> balloons, dholbach Ok thanks. There is probably an issue with the timezone plugin.
<dholbach> looks like stuff gets installed into:
 /tmp/buildd/ubuntu-weather-app-1.8.3ubuntu1/debian/tmp/usr/lib/x86_64-linux-gnu/TimeZone/*
 so qt5 <-> TimeZone
 that's the mismatch
 I don't know where you want things installed
 either you need to change things in CMakeLists.txt
 or in debian/*.install
<dholbach> I would suggest to have a look at where other app store their plugins
 so it's nice and consistent

Let me know if you need any help.

review: Needs Fixing
389. By Filippo Scognamiglio

Fix a couple of issues in desktop building.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
390. By Filippo Scognamiglio

Fix names and removes unused files.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel Holbach (dholbach) wrote :
391. By Filippo Scognamiglio

Merge changes from dholbach.

Revision history for this message
Filippo Scognamiglio (flscogna) wrote :

Ok, I just merged the branch by Daniel (thank you very very much), and it seems to work fine. Please give it another go.

Revision history for this message
Filippo Scognamiglio (flscogna) wrote :

Ok, I just merged the branch by Daniel (thank you very very much), and it seems to work fine. Please give it another go.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Daniel Holbach (dholbach) wrote :

Is anyone looking after this? Maybe somebody from the touch team can help make this work?

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

Daniel, it seems the build still fails; not sure why.

dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b ubuntu-weather-app-1.8.3ubuntu1 gave error exit status 1
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
bzr: ERROR: The build failed.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Right... I think we need a landing team expert to get on the case.

Unmerged revisions

391. By Filippo Scognamiglio

Merge changes from dholbach.

390. By Filippo Scognamiglio

Fix names and removes unused files.

389. By Filippo Scognamiglio

Fix a couple of issues in desktop building.

388. By Filippo Scognamiglio

Project reorganization and migration to native launcher.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-09-20 20:05:02 +0000
+++ CMakeLists.txt 2014-12-09 18:21:47 +0000
@@ -6,7 +6,9 @@
6find_package(Qt5Core REQUIRED)6find_package(Qt5Core REQUIRED)
7find_package(Qt5Qml REQUIRED)7find_package(Qt5Qml REQUIRED)
8find_package(Qt5Quick REQUIRED)8find_package(Qt5Quick REQUIRED)
9
9set(CMAKE_AUTOMOC ON)10set(CMAKE_AUTOMOC ON)
11set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra -fPIC")
1012
11# Standard install paths13# Standard install paths
12include(GNUInstallDirs)14include(GNUInstallDirs)
@@ -14,8 +16,8 @@
14option(INSTALL_TESTS "Install the tests on make install" on)16option(INSTALL_TESTS "Install the tests on make install" on)
15option(CLICK_MODE "Installs to a contained location" on)17option(CLICK_MODE "Installs to a contained location" on)
1618
17set(APP_NAME weather)19set(APP_NAME ubuntu-weather-app)
18set(DESKTOP_FILE "${PROJECT_NAME}_${APP_NAME}.desktop")20set(DESKTOP_FILE "${PROJECT_NAME}_weather.desktop")
19set(APP_HARDCODE ubuntu-weather-app)21set(APP_HARDCODE ubuntu-weather-app)
20set(MAIN_QML ubuntu-weather-app.qml)22set(MAIN_QML ubuntu-weather-app.qml)
21set(ICON_FILE weather-app@30.png)23set(ICON_FILE weather-app@30.png)
@@ -35,6 +37,8 @@
35 OUTPUT_STRIP_TRAILING_WHITESPACE37 OUTPUT_STRIP_TRAILING_WHITESPACE
36)38)
3739
40set(EXEC "${APP_NAME}")
41
38if(CLICK_MODE)42if(CLICK_MODE)
39 if(NOT DEFINED BZR_SOURCE)43 if(NOT DEFINED BZR_SOURCE)
40 set(BZR_SOURCE "lp:${APP_HARDCODE}")44 set(BZR_SOURCE "lp:${APP_HARDCODE}")
@@ -44,16 +48,15 @@
44 set(CMAKE_INSTALL_BINDIR /)48 set(CMAKE_INSTALL_BINDIR /)
45 set(DATA_DIR /)49 set(DATA_DIR /)
46 set(ICON ${ICON_FILE})50 set(ICON ${ICON_FILE})
47 set(EXEC "qmlscene $@ ${MAIN_QML}")
48 set(DESKTOP_DIR ${DATA_DIR})51 set(DESKTOP_DIR ${DATA_DIR})
52 set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
49else(CLICK_MODE)53else(CLICK_MODE)
50 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})54 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
51 set(EXEC ${APP_HARDCODE})
52 set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})55 set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE})
53 configure_file(${APP_HARDCODE}.in56# configure_file(${APP_HARDCODE}.in
54 ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})57# ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE})
55 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}58# install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}
56 DESTINATION ${CMAKE_INSTALL_BINDIR})59# DESTINATION ${CMAKE_INSTALL_BINDIR})
57 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)60 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
58endif(CLICK_MODE)61endif(CLICK_MODE)
5962
@@ -64,13 +67,15 @@
64list(SORT I18N_SRC_FILES)67list(SORT I18N_SRC_FILES)
65message("Found ${I18N_SRC_FILES}")68message("Found ${I18N_SRC_FILES}")
6669
67file(GLOB SRC_FILES70#file(GLOB SRC_FILES
68 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}71# RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
69 *.qml *.js *.png *.js)72# *.qml *.js *.png *.js)
70install(DIRECTORY components resources DESTINATION ${DATA_DIR})73
71install(FILES key.js DESTINATION ${DATA_DIR})74#install(DIRECTORY components resources DESTINATION ${DATA_DIR})
72install(FILES ${MAIN_QML} ${ICON_FILE} DESTINATION ${DATA_DIR})75#install(FILES key.js DESTINATION ${DATA_DIR})
7376#install(FILES ${MAIN_QML} ${ICON_FILE} DESTINATION ${DATA_DIR})
77
78install(FILES ${ICON_FILE} DESTINATION ${DATA_DIR})
74configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)79configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)
7580
76add_custom_target(${DESKTOP_FILE} ALL81add_custom_target(${DESKTOP_FILE} ALL
@@ -87,9 +92,7 @@
87file(GLOB QML_JS_FILES *.qml *.js)92file(GLOB QML_JS_FILES *.qml *.js)
88add_custom_target(ubuntu-weather-app_QMlFiles ALL SOURCES ${QML_JS_FILES})93add_custom_target(ubuntu-weather-app_QMlFiles ALL SOURCES ${QML_JS_FILES})
8994
95add_subdirectory(src)
90add_subdirectory(click)96add_subdirectory(click)
91add_subdirectory(po)97add_subdirectory(po)
92add_subdirectory(tests)98add_subdirectory(tests)
93add_subdirectory(components)
94add_subdirectory(plugins)
95
9699
=== modified file 'debian/control'
--- debian/control 2014-10-01 09:45:07 +0000
+++ debian/control 2014-12-09 18:21:47 +0000
@@ -11,27 +11,28 @@
11 qtbase5-dev-tools,11 qtbase5-dev-tools,
12 qtdeclarative5-dev,12 qtdeclarative5-dev,
13 qtdeclarative5-dev-tools,13 qtdeclarative5-dev-tools,
14 qtdeclarative5-ubuntu-ui-toolkit-plugin,14 qtdeclarative5-ubuntu-ui-toolkit-plugin
15Standards-Version: 3.9.515Standards-Version: 3.9.6
16Section: misc16Section: misc
17Homepage: https://launchpad.net/ubuntu-weather-app17Homepage: https://launchpad.net/ubuntu-weather-app
18Vcs-Bzr: https://code.launchpad.net/~ubuntu-weather-dev/ubuntu-weather-app/trunk18Vcs-Bzr: https://code.launchpad.net/~ubuntu-weather-dev/ubuntu-weather-app/trunk
1919
20Package: ubuntu-weather-app20Package: ubuntu-weather-app
21Architecture: all21Architecture: any
22Depends: qmlscene,22Depends: qmlscene,
23 qtdeclarative5-localstorage-plugin,23 qtdeclarative5-localstorage-plugin,
24 qtdeclarative5-qtquick2-plugin,24 qtdeclarative5-qtquick2-plugin,
25 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,25 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
26 qtdeclarative5-ubuntuweather-timezone-plugin1.0 (>= ${source:Version}),
26 suru-icon-theme | ubuntu-mobile-icons,27 suru-icon-theme | ubuntu-mobile-icons,
27 qtdeclarative5-ubuntuweather-timezone-plugin1.0 (>= ${source:Version}),28 ${misc:Depends},
28 ${misc:Depends}29 ${shlibs:Depends}
29Description: Weather application30Description: Weather application
30 Core Weather application31 Core Weather application
3132
32Package: qtdeclarative5-ubuntuweather-timezone-plugin1.033Package: qtdeclarative5-ubuntuweather-timezone-plugin1.0
33Architecture: any34Architecture: any
34Depends: ${shlibs:Depends}, ${misc:Depends}35Depends: ${misc:Depends}, ${shlibs:Depends}
35Description: Timezone plugin, used by the Ubuntu Weather app36Description: Timezone plugin, used by the Ubuntu Weather app
36 This package contains the timezone plugin written for the Ubuntu37 This package contains the timezone plugin written for the Ubuntu
37 Weather app.38 Weather app.
3839
=== modified file 'debian/qtdeclarative5-ubuntuweather-timezone-plugin1.0.install'
--- debian/qtdeclarative5-ubuntuweather-timezone-plugin1.0.install 2014-10-01 09:45:07 +0000
+++ debian/qtdeclarative5-ubuntuweather-timezone-plugin1.0.install 2014-12-09 18:21:47 +0000
@@ -1,1 +1,1 @@
1usr/lib/*/qt5/1usr/lib/*/TimeZone/*
22
=== added directory 'src'
=== added file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/CMakeLists.txt 2014-12-09 18:21:47 +0000
@@ -0,0 +1,2 @@
1add_subdirectory(plugins)
2add_subdirectory(app)
03
=== added directory 'src/app'
=== added file 'src/app/CMakeLists.txt'
--- src/app/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ src/app/CMakeLists.txt 2014-12-09 18:21:47 +0000
@@ -0,0 +1,24 @@
1file(GLOB_RECURSE QML_SRCS *.qml *.js)
2
3set(weather_SRCS
4 main.cpp
5 ${QML_SRCS}
6)
7
8add_executable(ubuntu-weather-app ${weather_SRCS})
9
10qt5_use_modules(ubuntu-weather-app Gui Qml Quick)
11
12if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
13add_custom_target(weahter-qmlfiles ALL
14 COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/qml ${CMAKE_CURRENT_BINARY_DIR}
15 DEPENDS ${QMLFILES}
16)
17endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
18
19install(DIRECTORY qml DESTINATION ${DATA_DIR})
20if(CLICK_MODE)
21 install(TARGETS ubuntu-weather-app DESTINATION ${BIN_DIR})
22else()
23 install(TARGETS ubuntu-weather-app RUNTIME DESTINATION bin)
24endif()
025
=== added file 'src/app/main.cpp'
--- src/app/main.cpp 1970-01-01 00:00:00 +0000
+++ src/app/main.cpp 2014-12-09 18:21:47 +0000
@@ -0,0 +1,66 @@
1/*
2 * Copyright: 2013 - 2014 Canonical, Ltd
3 *
4 * This file is part of ubuntu-weather-app
5 *
6 * ubuntu-weather-app is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * ubuntu-weather-app is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Authors: Filippo Scognamiglio <flscogna@gmail.com>
20 */
21
22#include <QtGui/QGuiApplication>
23#include <QtQuick/QQuickView>
24#include <QtQml/QtQml>
25#include <QLibrary>
26#include <QDir>
27
28#include <QDebug>
29
30int main(int argc, char *argv[])
31{
32 QGuiApplication a(argc, argv);
33 QQuickView view;
34 view.setResizeMode(QQuickView::SizeRootObjectToView);
35
36 // Set up import paths. Might be useful to tweak them.
37 QStringList importPathList = view.engine()->importPathList();
38 importPathList.prepend(QCoreApplication::applicationDirPath() + "/../plugins/");
39 view.engine()->setImportPathList(importPathList);
40
41 // TODO: Manage command line arguments if needed.
42 QStringList args = a.arguments();
43
44 // Load the main QML file
45 QStringList paths = QStandardPaths::standardLocations(QStandardPaths::DataLocation);
46 paths.prepend(QDir::currentPath());
47 paths.prepend(QCoreApplication::applicationDirPath());
48
49 QString qmlfile;
50
51 foreach (const QString &path, paths) {
52 QString filename("/qml/ubuntu-weather-app.qml");
53 QFileInfo fi(path + filename);
54 qDebug() << "Trying to load QML from:" << path + filename;
55 if (fi.exists()) {
56 qmlfile = path + filename;
57 break;
58 }
59 }
60
61 qDebug() << "using main qml file from:" << qmlfile;
62 view.setSource(QUrl::fromLocalFile(qmlfile));
63 view.show();
64
65 return a.exec();
66}
067
=== added directory 'src/app/qml'
=== renamed directory 'components' => 'src/app/qml/components'
=== renamed file 'key.js' => 'src/app/qml/key.js'
=== renamed directory 'resources' => 'src/app/qml/resources'
=== renamed file 'ubuntu-weather-app.qml' => 'src/app/qml/ubuntu-weather-app.qml'
=== renamed file 'ubuntu-weather-app.qmlproject' => 'src/app/qml/ubuntu-weather-app.qmlproject'
=== renamed directory 'plugins' => 'src/plugins'
=== modified file 'src/plugins/CMakeLists.txt'
--- plugins/CMakeLists.txt 2014-10-01 09:45:07 +0000
+++ src/plugins/CMakeLists.txt 2014-12-09 18:21:47 +0000
@@ -2,9 +2,13 @@
2 ${CMAKE_CURRENT_SOURCE_DIR}2 ${CMAKE_CURRENT_SOURCE_DIR}
3)3)
44
5set(PLUGIN_DIR TimeZone)
6
5set(7set(
6 timeZone_SRCS8 timeZone_SRCS
9 TimeZone/timezone.h
7 TimeZone/timezone.cpp10 TimeZone/timezone.cpp
11 TimeZone/timezone_plugin.h
8 TimeZone/timezone_plugin.cpp12 TimeZone/timezone_plugin.cpp
9)13)
1014
@@ -23,5 +27,5 @@
23)27)
2428
25# Install plugin file29# Install plugin file
26install(TARGETS TimeZoneBackend DESTINATION ${QT_IMPORTS_DIR}/qt5/qml/UbuntuWeather/TimeZone/)30install(TARGETS TimeZoneBackend DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN_DIR})
27install(FILES TimeZone/qmldir DESTINATION ${QT_IMPORTS_DIR}/qt5/qml/UbuntuWeather/TimeZone/)31install(FILES TimeZone/qmldir DESTINATION ${QT_IMPORTS_DIR}/${PLUGIN_DIR})
2832
=== removed file 'ubuntu-weather-app.desktop'
--- ubuntu-weather-app.desktop 2014-04-16 14:42:16 +0000
+++ ubuntu-weather-app.desktop 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1[Desktop Entry]
2Encoding=UTF-8
3Version=1.0
4Type=Application
5Terminal=false
6Exec=qmlscene -qt5 ubuntu-weather-app.qml
7Icon=weather64.png
8Name=Weather
9X-Ubuntu-Touch=true
10X-Ubuntu-StageHint=SideStage
110
=== removed file 'ubuntu-weather-app.in'
--- ubuntu-weather-app.in 2014-04-16 17:35:03 +0000
+++ ubuntu-weather-app.in 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1#!/bin/bash
2export QT_SELECT=qt5
3exec qmlscene @CMAKE_INSTALL_PREFIX@/@DATA_DIR@/@MAIN_QML@

Subscribers

People subscribed via source and target branches