Merge lp:~sergiusens/ubuntu-clock-app/reboot-packaging into lp:~dholbach/ubuntu-clock-app/reboot-packaging

Proposed by Sergio Schvezov
Status: Merged
Merged at revision: 60
Proposed branch: lp:~sergiusens/ubuntu-clock-app/reboot-packaging
Merge into: lp:~dholbach/ubuntu-clock-app/reboot-packaging
Diff against target: 221 lines (+50/-62)
10 files modified
CMakeLists.txt (+18/-24)
app/CMakeLists.txt (+11/-5)
app/alarm/CMakeLists.txt (+1/-1)
app/clock/CMakeLists.txt (+1/-1)
app/components/CMakeLists.txt (+1/-1)
app/graphics/CMakeLists.txt (+5/-3)
app/worldclock/CMakeLists.txt (+1/-1)
backend/CMakeLists.txt (+10/-8)
cmake/Click.cmake (+0/-17)
manifest.json (+2/-1)
To merge this branch: bzr merge lp:~sergiusens/ubuntu-clock-app/reboot-packaging
Reviewer Review Type Date Requested Status
Nekhelesh Ramananthan (community) Needs Information
Ubuntu Phone Apps Jenkins Bot continuous-integration Pending
Daniel Holbach Pending
Review via email: mp+230013@code.launchpad.net

This proposal supersedes a proposal from 2014-08-07.

Description of the change

Changes:
- used a proper qt_imports_dir (still needs qml import updates).
- moved gnuinstalldirs higher up for better path management
- removed a bunch of very custom variables and build on top
- removed the install target for the gallery directory as it was a dup and going to the wrong path
- not installing icon for deb and just rely on us using the desktop default (we can depend on the suru icon set, it's there)
- made some rules filter out if not in qtcreator
- I've changed the path for a couple of things to use common subpaths in most cases, it may break some of your scenarios.

TODOs:
- change qml imports
- test (I haven't touched anything autopilot)

I hope this unblocks you guys

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

- change qml imports

What do you mean by this? Does this mean "import Alarm.Settings 1.0" in the qml code will change to something else?

- I've changed the path for a couple of things to use common subpaths in most cases, it may break some of your scenarios.

Not exactly sure what you mean by scenarios.

review: Needs Information
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Thu, Aug 7, 2014 at 7:34 PM, Nekhelesh Ramananthan <<email address hidden>
> wrote:

> Review: Needs Information
>
> - change qml imports
>
> What do you mean by this? Does this mean "import Alarm.Settings 1.0" in
> the qml code will change to something else?
>

Since Daniel mentioned a better location for the libs I appended a Clock.
to the path, so most likely it means you need to prepend this.

>
> - I've changed the path for a couple of things to use common subpaths in
> most cases, it may break some of your scenarios.
>
> Not exactly sure what you mean by scenarios.
>

In other words, needs testing in qt creator

I don't have a full environment with me to test all this; I'll look into
this in the AM

Is this landing into the archives btw?

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> On Thu, Aug 7, 2014 at 7:34 PM, Nekhelesh Ramananthan <<email address hidden>
> > wrote:
>
> > Review: Needs Information
> >
> > - change qml imports
> >
> > What do you mean by this? Does this mean "import Alarm.Settings 1.0" in
> > the qml code will change to something else?
> >
>
> Since Daniel mentioned a better location for the libs I appended a Clock.
> to the path, so most likely it means you need to prepend this.
>
>

Ah okay. I don't think it will require a prepend since the QMLDir files still state Alarm.Setting or DateTime etc. But I will have to try in the morning to confirm that.

> >
> > - I've changed the path for a couple of things to use common subpaths in
> > most cases, it may break some of your scenarios.
> >
> > Not exactly sure what you mean by scenarios.
> >
>
> In other words, needs testing in qt creator
>
> I don't have a full environment with me to test all this; I'll look into
> this in the AM

Initial run on the device failed as it received a failed event. Again will see in the morning what is the issue.
>
> Is this landing into the archives btw?

We are planning to swap the old clock app with the new clock app (next week) in the default phone images since we are nearly feature complete. This is why I am trying to get the cmake stuff and the debian packaging done asap.

60. By Daniel Holbach

* Using GnuInstallDirs takes care of the arch triplet.
* Used a proper qt_imports_dir (still needs qml import updates).
* Moved gnuinstalldirs higher up for better path management.
* Removed a bunch of very custom variables and build on top.
* Removed the install target for the gallery directory as it was a dup
  and going to the wrong path.
* Not installing icon for deb and just rely on us using the desktop
  default (we can depend on the suru icon set, it's there).
* Made some rules filter out if not in qtcreator.
* Changed the path for a couple of things to use common subpaths in most
  cases.

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

Thanks a lot. Great work. This almost fixes LP: #1354081 and takes care of LP: #1354082 for good.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-08-05 07:46:44 +0000
+++ CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -2,7 +2,6 @@
2cmake_minimum_required(VERSION 2.8.9)2cmake_minimum_required(VERSION 2.8.9)
33
4set (UBUNTU_PROJECT_TYPE "ClickApp" CACHE INTERNAL "Tells QtCreator this is a Click application project")4set (UBUNTU_PROJECT_TYPE "ClickApp" CACHE INTERNAL "Tells QtCreator this is a Click application project")
5set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
6set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")5set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra")
76
8find_package(Qt5Core)7find_package(Qt5Core)
@@ -20,38 +19,33 @@
20set(APP_NAME clock)19set(APP_NAME clock)
21set(APP_HARDCODE ubuntu-clock-app)20set(APP_HARDCODE ubuntu-clock-app)
22set(MAIN_QML ${APP_HARDCODE}.qml)21set(MAIN_QML ${APP_HARDCODE}.qml)
23set(ICON clock-app@30.png)22set(ICON clock-app)
23
24# Standard install paths
25include(GNUInstallDirs)
2426
25#set install paths27#set install paths
26if(${CLICK_MODE})28if(CLICK_MODE)
27 set(CMAKE_INSTALL_PREFIX /)29 set(CMAKE_INSTALL_PREFIX "/")
28 set(DATA_DIR /)30 set(UBUNTU-CLOCK_APP_DIR "${CMAKE_INSTALL_DATADIR}/qml")
29 set(DESKTOP_DIR ${DATA_DIR})
30 set(UBUNTU-CLOCK-APP_DIR "share/qml/ubuntu-clock-app")
31 set(ICON "${UBUNTU-CLOCK-APP_DIR}/${ICON}")
3231
33 execute_process(
34 COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
35 OUTPUT_VARIABLE ARCH_TRIPLET
36 OUTPUT_STRIP_TRAILING_WHITESPACE
37 )
38 set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
39else()
40 set(DATA_DIR "share/clockapp")
41 set(DESKTOP_DIR ${DATA_DIR})
42 set(ICON "${DATA_DIR}/${ICON}")
43 set(UBUNTU-CLOCK-APP_DIR "share/ubuntu-clock-app/qml")
44 include(GNUInstallDirs)
45 set(QT_IMPORTS_DIR "${CMAKE_INSTALL_LIBDIR}")32 set(QT_IMPORTS_DIR "${CMAKE_INSTALL_LIBDIR}")
46endif()33 set(EXEC "qmlscene $@ ${UBUNTU-CLOCK_APP_DIR}/${MAIN_QML}")
34else(CLICK_MODE)
35 set(UBUNTU-CLOCK_APP_DIR "${CMAKE_INSTALL_DATADIR}/ubuntu-clock-app/qml")
36 execute_process(
37 COMMAND qmake -query QT_INSTALL_QML
38 OUTPUT_VARIABLE QT_IMPORTS_DIR
39 OUTPUT_STRIP_TRAILING_WHITESPACE
40 )
4741
48set(EXEC "qmlscene $@ ${UBUNTU-CLOCK-APP_DIR}/${MAIN_QML}")42 set(EXEC "qmlscene $@ ${CMAKE_INSTALL_DATADIR}/${UBUNTU-CLOCK_APP_DIR}/${MAIN_QML}")
43endif(CLICK_MODE)
4944
50if(${CLICK_MODE})45if(${CLICK_MODE})
51 install(FILES manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})46 install(FILES manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
47 install(FILES "${APP_HARDCODE}.json" DESTINATION ${CMAKE_INSTALL_DATADIR})
52endif()48endif()
53install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})
54install(FILES "${APP_HARDCODE}.json" DESTINATION ${DATA_DIR})
5549
56add_subdirectory(app)50add_subdirectory(app)
57add_subdirectory(backend)51add_subdirectory(backend)
5852
=== modified file 'app/CMakeLists.txt'
--- app/CMakeLists.txt 2014-07-13 11:18:31 +0000
+++ app/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -1,14 +1,20 @@
1file(GLOB QML_JS_FILES *.qml *.js *.png)1if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
2
3# make the files visible on qtcreator
4add_custom_target(ubuntu-clock-app_QMlFiles ALL SOURCES ${QML_JS_FILES})2add_custom_target(ubuntu-clock-app_QMlFiles ALL SOURCES ${QML_JS_FILES})
3endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
4
5
6if(CLICK_MODE)
7 set(ICON "${ICON}@30.png")
8 install(FILES ${ICON} DESTINATION ${CMAKE_INSTALL_PREFIX})
9endif(CLICK_MODE)
510
6# substitute variables in the desktop file11# substitute variables in the desktop file
7set(DESKTOP_FILE "ubuntu-clock-app.desktop")12set(DESKTOP_FILE "ubuntu-clock-app.desktop")
8configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})13configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
914
10install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})15install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
11install(FILES ${QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR})16 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
17install(FILES ${MAIN_QML} DESTINATION ${UBUNTU-CLOCK_APP_DIR})
1218
13add_subdirectory(clock)19add_subdirectory(clock)
14add_subdirectory(alarm)20add_subdirectory(alarm)
1521
=== modified file 'app/alarm/CMakeLists.txt'
--- app/alarm/CMakeLists.txt 2014-06-16 14:09:12 +0000
+++ app/alarm/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -3,4 +3,4 @@
3# make the files visible in the qtcreator tree3# make the files visible in the qtcreator tree
4add_custom_target(ubuntu-clock-app_alarm_QMlFiles ALL SOURCES ${ALARM_QML_JS_FILES})4add_custom_target(ubuntu-clock-app_alarm_QMlFiles ALL SOURCES ${ALARM_QML_JS_FILES})
55
6install(FILES ${ALARM_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR}/alarm)6install(FILES ${ALARM_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK_APP_DIR}/alarm)
77
=== modified file 'app/clock/CMakeLists.txt'
--- app/clock/CMakeLists.txt 2014-06-06 18:45:49 +0000
+++ app/clock/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -3,4 +3,4 @@
3# make the files visible in the qtcreator tree3# make the files visible in the qtcreator tree
4add_custom_target(ubuntu-clock-app_clock_QMlFiles ALL SOURCES ${CLOCK_QML_JS_FILES})4add_custom_target(ubuntu-clock-app_clock_QMlFiles ALL SOURCES ${CLOCK_QML_JS_FILES})
55
6install(FILES ${CLOCK_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR}/clock)6install(FILES ${CLOCK_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK_APP_DIR}/clock)
77
=== modified file 'app/components/CMakeLists.txt'
--- app/components/CMakeLists.txt 2014-06-06 18:45:49 +0000
+++ app/components/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -3,4 +3,4 @@
3# make the files visible in the qtcreator tree3# make the files visible in the qtcreator tree
4add_custom_target(ubuntu-clock-app_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})4add_custom_target(ubuntu-clock-app_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})
55
6install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR}/components)6install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK_APP_DIR}/components)
77
=== modified file 'app/graphics/CMakeLists.txt'
--- app/graphics/CMakeLists.txt 2014-06-06 18:45:49 +0000
+++ app/graphics/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -1,6 +1,8 @@
1file(GLOB IMAGES_PNG_FILES *.png *.jpg)1file(GLOB GRAPHICS_FILES *.png *.jpg)
22
3# make the files visible in the qtcreator tree3# make the files visible in the qtcreator tree
4add_custom_target(ubuntu-clock-app_graphics_PNGFiles ALL SOURCES ${IMAGES_PNG_FILES})4if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
5 add_custom_target(ubuntu-clock-app_graphics_PNGFiles ALL SOURCES ${IMAGES_PNG_FILES})
6endif(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
57
6install(FILES ${IMAGES_PNG_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR}/graphics)8install(FILES ${GRAPHICS_FILES} DESTINATION ${UBUNTU-CLOCK_APP_DIR}/graphics)
79
=== modified file 'app/worldclock/CMakeLists.txt'
--- app/worldclock/CMakeLists.txt 2014-07-13 11:18:31 +0000
+++ app/worldclock/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -3,4 +3,4 @@
3# make the files visible in the qtcreator tree3# make the files visible in the qtcreator tree
4add_custom_target(ubuntu-clock-app_worldclock_QMlFiles ALL SOURCES ${WORLDCLOCK_QML_JS_FILES})4add_custom_target(ubuntu-clock-app_worldclock_QMlFiles ALL SOURCES ${WORLDCLOCK_QML_JS_FILES})
55
6install(FILES ${WORLDCLOCK_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK-APP_DIR}/worldclock)6install(FILES ${WORLDCLOCK_QML_JS_FILES} DESTINATION ${UBUNTU-CLOCK_APP_DIR}/worldclock)
77
=== modified file 'backend/CMakeLists.txt'
--- backend/CMakeLists.txt 2014-07-26 09:34:15 +0000
+++ backend/CMakeLists.txt 2014-08-07 21:06:25 +0000
@@ -66,12 +66,14 @@
66 DEPENDS ${QMLFILES}66 DEPENDS ${QMLFILES}
67)67)
6868
69set(MODULE_PATH ${QT_IMPORTS_DIR}/Clock)
70
69# Install plugin file71# Install plugin file
70install(TARGETS timezone DESTINATION ${QT_IMPORTS_DIR}/Timezone/)72install(TARGETS timezone DESTINATION ${MODULE_PATH}/Timezone/)
71install(FILES modules/Timezone/qmldir DESTINATION ${QT_IMPORTS_DIR}/Timezone/)73install(FILES modules/Timezone/qmldir DESTINATION ${MODULE_PATH}/Timezone/)
7274
73install(TARGETS datetime DESTINATION ${QT_IMPORTS_DIR}/DateTime/)75install(TARGETS datetime DESTINATION ${MODULE_PATH}/DateTime/)
74install(FILES modules/DateTime/qmldir DESTINATION ${QT_IMPORTS_DIR}/DateTime/)76install(FILES modules/DateTime/qmldir DESTINATION ${MODULE_PATH}/DateTime/)
7577
76install(TARGETS alarmsettings DESTINATION ${QT_IMPORTS_DIR}/Alarm/Settings/)78install(TARGETS alarmsettings DESTINATION ${MODULE_PATH}/Alarm/Settings/)
77install(FILES modules/Alarm/Settings/qmldir DESTINATION ${QT_IMPORTS_DIR}/Alarm/Settings/)79install(FILES modules/Alarm/Settings/qmldir DESTINATION ${MODULE_PATH}/Alarm/Settings/)
7880
=== removed directory 'cmake'
=== removed file 'cmake/Click.cmake'
--- cmake/Click.cmake 2014-06-06 18:45:49 +0000
+++ cmake/Click.cmake 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
1if(CLICK_MODE)
2 STRING(REPLACE "/usr/" "/" QT_IMPORTS_DIR ${QT_IMPORTS_DIR})
3 set(CMAKE_INSTALL_PREFIX /)
4 set(CMAKE_INSTALL_BINDIR /)
5 set(DATA_DIR /)
6 set(EXEC "qmlscene $@ -I .${QT_IMPORTS_DIR} ${UBUNTU-CLOCK-APP_DIR}/${MAIN_QML}")
7 set(DESKTOP_DIR ${DATA_DIR})
8 set(ICON ".${DATA_DIR}/${ICON}")
9 install(FILES manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
10 install(DIRECTORY "app/graphics" DESTINATION ${DATA_DIR})
11 install(FILES "${CMAKE_PROJECT_NAME}.json" DESTINATION ${DATA_DIR})
12else(CLICK_MODE)
13 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_NAME})
14 set(EXEC "qmlscene $@ ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/qml/${MAIN_QML}")
15 set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
16 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
17endif(CLICK_MODE)
180
=== modified file 'manifest.json'
--- manifest.json 2014-07-31 19:33:54 +0000
+++ manifest.json 2014-08-07 21:06:25 +0000
@@ -4,10 +4,11 @@
4 "framework": "ubuntu-sdk-14.10-dev2",4 "framework": "ubuntu-sdk-14.10-dev2",
5 "architecture": "all",5 "architecture": "all",
6 "title": "Clock Reboot",6 "title": "Clock Reboot",
7 "icon": "clock@30.png",
7 "hooks": {8 "hooks": {
8 "ubuntu-clock-app": {9 "ubuntu-clock-app": {
9 "apparmor": "ubuntu-clock-app.json",10 "apparmor": "ubuntu-clock-app.json",
10 "desktop": "ubuntu-clock-app.desktop"11 "desktop": "share/applications/ubuntu-clock-app.desktop"
11 }12 }
12 },13 },
13 "version": "0.1",14 "version": "0.1",

Subscribers

People subscribed via source and target branches