Merge lp:~libqtelegram-team/telegram-app/app-bundle-thumbnailer into lp:telegram-app/app

Proposed by Michał Karnicki on 2015-07-20
Status: Merged
Approved by: Roberto Mier Escandón  on 2015-07-20
Approved revision: 113
Merged at revision: 113
Proposed branch: lp:~libqtelegram-team/telegram-app/app-bundle-thumbnailer
Merge into: lp:telegram-app/app
Diff against target: 46 lines (+12/-0)
2 files modified
CMakeLists.txt (+6/-0)
src/main.cpp (+6/-0)
To merge this branch: bzr merge lp:~libqtelegram-team/telegram-app/app-bundle-thumbnailer
Reviewer Review Type Date Requested Status
Roberto Mier Escandón  2015-07-20 Approve on 2015-07-20
Review via email: mp+265260@code.launchpad.net

Description of the Change

Bundle the old thumbnailer, as it has been removed in recent image. This is a temporary workaround before we have a proper C++ thumbnailer API.

I tested this the following way.

1) mv /usr/lib/arm-linux-gnueabihf/thumbnailer/vs-thumb /usr/lib/arm-linux-gnueabihf/thumbnailer/vs-thumb.old
2) record a video, confirm the gallery cannot generate a thumbnail (proves the shipped vs-thumb will not be used by Telegram app)
3) open Telegram, send the video, confirm the thumbnail is present

To post a comment you must log in.

lgtm
Tested ok in regular and secret chats

review: Approve

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 2015-04-27 13:54:43 +0000
3+++ CMakeLists.txt 2015-07-20 13:25:43 +0000
4@@ -157,6 +157,12 @@
5 DESTINATION ${CMAKE_INSTALL_PREFIX})
6
7 install(
8+ PROGRAMS
9+ "thumbnailer/libthumbnailer.so.0"
10+ "thumbnailer/vs-thumb"
11+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
12+
13+install(
14 DIRECTORY
15 "assets"
16 "images"
17
18=== modified file 'src/main.cpp'
19--- src/main.cpp 2015-04-15 15:03:12 +0000
20+++ src/main.cpp 2015-07-20 13:25:43 +0000
21@@ -14,6 +14,8 @@
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 */
24
25+#include <stdlib.h>
26+
27 #include <QtGui/QGuiApplication>
28 #include <QtQml/QtQml>
29 #include <QtQml/QQmlDebuggingEnabler>
30@@ -111,6 +113,10 @@
31 qFatal("Could not find %s!", qPrintable(filePath));
32 }
33
34+ QString thumbnailerPath = QCoreApplication::applicationDirPath();
35+ thumbnailerPath.append("/lib/arm-linux-gnueabihf/");
36+ setenv("TN_UTILDIR", thumbnailerPath.toStdString().c_str(), 1);
37+
38 QGuiApplication::setApplicationName("Telegram");
39 QGuiApplication::setOrganizationName("com.ubuntu.telegram");
40
41
42=== added directory 'thumbnailer'
43=== added file 'thumbnailer/libthumbnailer.so.0'
44Binary files thumbnailer/libthumbnailer.so.0 1970-01-01 00:00:00 +0000 and thumbnailer/libthumbnailer.so.0 2015-07-20 13:25:43 +0000 differ
45=== added file 'thumbnailer/vs-thumb'
46Binary files thumbnailer/vs-thumb 1970-01-01 00:00:00 +0000 and thumbnailer/vs-thumb 2015-07-20 13:25:43 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: