Look for libappindicator libraries instead of package
This commit is contained in:
@@ -49,18 +49,10 @@ function initWin32 () {
|
|||||||
function checkLinuxTraySupport (cb) {
|
function checkLinuxTraySupport (cb) {
|
||||||
const cp = require('child_process')
|
const cp = require('child_process')
|
||||||
|
|
||||||
// Check that we're on Ubuntu (or another debian system) and that we have
|
// Check that libappindicator libraries are installed in system.
|
||||||
// libappindicator1. If WebTorrent was installed from the deb file, we should
|
cp.exec('ls /usr/lib*/libappindicator*', function (err, stdout) {
|
||||||
// always have it. If it was installed from the zip file, we might not.
|
|
||||||
cp.exec('dpkg --get-selections libappindicator1', function (err, stdout) {
|
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
// Unfortunately there's no cleaner way, as far as I can tell, to check
|
cb(null)
|
||||||
// whether a debian package is installed:
|
|
||||||
if (stdout.endsWith('\tinstall\n')) {
|
|
||||||
cb(null)
|
|
||||||
} else {
|
|
||||||
cb(new Error('debian package not installed'))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user