Merge lp:~renatofilho/camera-app/shared-snappy into lp:camera-app

Proposed by Renato Araujo Oliveira Filho
Status: Rejected
Rejected by: Renato Araujo Oliveira Filho
Proposed branch: lp:~renatofilho/camera-app/shared-snappy
Merge into: lp:camera-app
Diff against target: 128 lines (+29/-30)
4 files modified
config.h.in (+15/-11)
debian/control (+1/-0)
snap/camera.wrapper (+1/-1)
snapcraft.yaml (+12/-18)
To merge this branch: bzr merge lp:~renatofilho/camera-app/shared-snappy
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+311314@code.launchpad.net

Commit message

Set correct path when running as snap.
Added missing dep 'qtdeclarative5-qtsensors-plugin'.
Use 'ubuntu-app-platform' content share.

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
675. By Renato Araujo Oliveira Filho

Revet changes.

676. By Renato Araujo Oliveira Filho

Add empty dir used to mount platform shared content.

677. By Renato Araujo Oliveira Filho

Add missing library path on LD_LIBRARY_PATH.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.h.in'
2--- config.h.in 2016-09-09 11:56:55 +0000
3+++ config.h.in 2016-11-18 22:40:21 +0000
4@@ -29,33 +29,37 @@
5 #endif
6 }
7
8-static QString SNAP_ENV = qgetenv("SNAP");
9+inline bool isSnap() {
10+ static const QByteArray snapPath(qgetenv("SNAP"));
11+ return !snapPath.isEmpty();
12+}
13+
14+inline QByteArray installPrefix() {
15+ static const QByteArray snapPath(qgetenv("SNAP") + "@CMAKE_INSTALL_PREFIX@");
16+ return snapPath;
17+}
18
19 inline bool isRunningInstalled() {
20 static bool installed = (QCoreApplication::applicationDirPath() ==
21- QDir(("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@")).canonicalPath());
22+ QDir("@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@").canonicalPath());
23 return installed;
24 }
25
26 inline QString cameraAppDirectory() {
27- if (!SNAP_ENV.isEmpty()) {
28- return SNAP_ENV + "@CMAKE_INSTALL_PREFIX@/@CAMERA_APP_DIR@/";
29- } else if (isClick()) {
30+ if (isClick()) {
31 return QDir::currentPath();
32- } else if (isRunningInstalled()) {
33- return QString("@CMAKE_INSTALL_PREFIX@/@CAMERA_APP_DIR@/");
34+ } else if (isSnap() || isRunningInstalled()) {
35+ return (installPrefix() + "/@CAMERA_APP_DIR@/");
36 } else {
37 return QString("@CMAKE_SOURCE_DIR@/");
38 }
39 }
40
41 inline QString cameraAppImportDirectory() {
42- if (!SNAP_ENV.isEmpty()) {
43- return SNAP_ENV + "@CMAKE_INSTALL_PREFIX@/@PLUGIN_BASE@";
44- } else if (isClick()) {
45+ if (isClick()) {
46 return QDir::currentPath() + "/@PLUGIN_BASE@";
47 } else {
48- return "@CMAKE_INSTALL_PREFIX@/@PLUGIN_BASE@";
49+ return (installPrefix() + "/@PLUGIN_BASE@");
50 }
51 }
52
53
54=== modified file 'debian/control'
55--- debian/control 2016-08-22 17:27:05 +0000
56+++ debian/control 2016-11-18 22:40:21 +0000
57@@ -45,6 +45,7 @@
58 qtdeclarative5-ubuntu-content1,
59 qml-module-ubuntu-thumbnailer0.1,
60 qml-module-qtpositioning,
61+ qtdeclarative5-qtsensors-plugin,
62 qtdeclarative5-ubuntu-ui-extras0.2,
63 ${misc:Depends},
64 ${shlibs:Depends},
65
66=== added directory 'snap'
67=== renamed file 'camera.wrapper' => 'snap/camera.wrapper'
68--- camera.wrapper 2016-09-29 13:47:52 +0000
69+++ snap/camera.wrapper 2016-11-18 22:40:21 +0000
70@@ -27,4 +27,4 @@
71 mkdir -p $HOME/.config/
72 ln -s /home/$USER/.config/user-dirs.dirs $HOME/.config/user-dirs.dirs
73
74-exec "$SNAP/bin/desktop-launch" "camera-app" --desktop_file_hint=unity8 "$@"
75+exec "$SNAP/usr/bin/camera-app" --desktop_file_hint=unity8 "$@"
76
77=== modified file 'snapcraft.yaml'
78--- snapcraft.yaml 2016-09-29 13:38:02 +0000
79+++ snapcraft.yaml 2016-11-18 22:40:21 +0000
80@@ -7,21 +7,23 @@
81
82 apps:
83 camera-app:
84- command: bin/camera.wrapper
85- plugs: [unity7, opengl, camera, pulseaudio, home]
86+ command: desktop-launch $SNAP/bin/camera.wrapper
87+ plugs: [unity7, opengl, camera, pulseaudio, home, platform]
88+
89+plugs:
90+ platform:
91+ interface: content
92+ content: ubuntu-app-platform1
93+ target: ubuntu-app-platform
94
95 parts:
96 wrapper:
97- source: .
98+ source: snap/
99 plugin: dump
100 organize:
101 camera.wrapper: bin/camera.wrapper
102- stage:
103- - bin/camera.wrapper
104- snap:
105- - bin/camera.wrapper
106
107- camera:
108+ camera-app:
109 source: .
110 plugin: cmake
111 configflags: [-DCMAKE_INSTALL_PREFIX=/usr, -DCLICK_MODE=off]
112@@ -37,14 +39,6 @@
113 - libusermetricsinput1-dev
114 - qtmultimedia5-dev
115 stage-packages:
116- - ubuntu-sdk-libs
117- - qtubuntu-desktop
118- - qml-module-qtpositioning
119- - qtdeclarative5-unity-action-plugin
120- - qtdeclarative5-usermetrics0.1
121- - qtdeclarative5-ubuntu-content1
122- - qtdeclarative5-ubuntu-ui-extras0.2
123- - qtdeclarative5-ubuntu-thumbnailer0.1
124 - xdg-user-dirs
125- - mir-graphics-drivers-desktop
126- after: [desktop-qt5]
127+ after:
128+ - desktop-ubuntu-app-platform

Subscribers

People subscribed via source and target branches