Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Check for libappindicator1 support before creating tray icon
- */
- function checkLinuxTraySupport (cb) {
- var 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) {
- if (err) return cb(false)
- // Unfortunately there's no cleaner way, as far as I can tell, to check
- // whether a debian package is installed:
- cb(stdout.endsWith('\tinstall\n'))
- })
- }
Add Comment
Please, Sign In to add comment