From 9c59157a98d4a7b3eaebdb68b1a51a0e05b21e4b Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Sat, 29 Aug 2020 14:03:27 +0200 Subject: [PATCH 1/4] Remove VERSION entry --- static/linux/webtorrent-desktop.ejs | 1 - 1 file changed, 1 deletion(-) diff --git a/static/linux/webtorrent-desktop.ejs b/static/linux/webtorrent-desktop.ejs index e88789cc..1392b825 100644 --- a/static/linux/webtorrent-desktop.ejs +++ b/static/linux/webtorrent-desktop.ejs @@ -1,6 +1,5 @@ [Desktop Entry] Type=Application -<% if (version) { %>Version=<%= version %><% } %> Name=<%= productName %> <% if (genericName) { %>GenericName=<%= genericName %><% } %> <% if (description) { %>Comment=<%= description %><% } %> From 4a974a1d3d0d0280d2f7765c008df3bdacf6aaf7 Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Sun, 31 Jan 2021 11:12:18 +0100 Subject: [PATCH 2/4] Look for libappindicator libraries instead of package --- src/main/tray.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/tray.js b/src/main/tray.js index 08579a24..a6a4dc06 100644 --- a/src/main/tray.js +++ b/src/main/tray.js @@ -49,18 +49,10 @@ function initWin32 () { function checkLinuxTraySupport (cb) { const cp = require('child_process') - // Check that we're on Ubuntu (or another debian system) and that we have - // libappindicator1. If WebTorrent was installed from the deb file, we should - // always have it. If it was installed from the zip file, we might not. - cp.exec('dpkg --get-selections libappindicator1', function (err, stdout) { + // Check that libappindicator libraries are installed in system. + cp.exec('ls /usr/lib*/libappindicator*', function (err, stdout) { if (err) return cb(err) - // Unfortunately there's no cleaner way, as far as I can tell, to check - // whether a debian package is installed: - if (stdout.endsWith('\tinstall\n')) { - cb(null) - } else { - cb(new Error('debian package not installed')) - } + cb(null) }) } From 97b54744dfb1aa3401bb562a13653a3938499592 Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Sun, 31 Jan 2021 11:19:44 +0100 Subject: [PATCH 3/4] Update comment --- src/main/tray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/tray.js b/src/main/tray.js index a6a4dc06..c44221f7 100644 --- a/src/main/tray.js +++ b/src/main/tray.js @@ -44,7 +44,7 @@ function initWin32 () { } /** - * Check for libappindicator1 support before creating tray icon + * Check for libappindicator support before creating tray icon. */ function checkLinuxTraySupport (cb) { const cp = require('child_process') From f8d9567422beb674f5a74ca340506f131eff707e Mon Sep 17 00:00:00 2001 From: BlueManCZ Date: Sun, 31 Jan 2021 22:21:13 +0100 Subject: [PATCH 4/4] Change command --- src/main/tray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/tray.js b/src/main/tray.js index c44221f7..c2a8a665 100644 --- a/src/main/tray.js +++ b/src/main/tray.js @@ -50,7 +50,7 @@ function checkLinuxTraySupport (cb) { const cp = require('child_process') // Check that libappindicator libraries are installed in system. - cp.exec('ls /usr/lib*/libappindicator*', function (err, stdout) { + cp.exec('ldconfig -p | grep libappindicator', function (err, stdout) { if (err) return cb(err) cb(null) })