Merge pull request #793 from feross/debian-system-install
Add system-wide menu item for debian and derivates
This commit is contained in:
@@ -484,6 +484,11 @@ function buildLinux (cb) {
|
||||
dest: destPath,
|
||||
expand: true,
|
||||
cwd: filesPath
|
||||
}, {
|
||||
src: ['./**'],
|
||||
dest: path.join('/usr', 'share'),
|
||||
expand: true,
|
||||
cwd: path.join(config.STATIC_PATH, 'linux', 'share')
|
||||
}], function (err) {
|
||||
if (err) return cb(err)
|
||||
console.log(`Linux: Created ${destArch} deb.`)
|
||||
|
||||
@@ -280,6 +280,9 @@ function installLinux () {
|
||||
var config = require('../config')
|
||||
var log = require('./log')
|
||||
|
||||
// Do not install in user dir if running on system
|
||||
if (/^\/opt/.test(process.execPath)) return
|
||||
|
||||
installDesktopFile()
|
||||
installIconFile()
|
||||
|
||||
|
||||
33
static/linux/share/applications/webtorrent-desktop.desktop
Normal file
33
static/linux/share/applications/webtorrent-desktop.desktop
Normal file
@@ -0,0 +1,33 @@
|
||||
[Desktop Entry]
|
||||
Name=WebTorrent
|
||||
Version=1.0
|
||||
GenericName=BitTorrent Client
|
||||
X-GNOME-FullName=WebTorrent
|
||||
Comment=Download and share files over BitTorrent
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Icon=webtorrent-desktop
|
||||
Terminal=false
|
||||
Path=/opt/webtorrent-desktop
|
||||
Exec=/opt/webtorrent-desktop/WebTorrent %U
|
||||
TryExec=/opt/webtorrent-desktop/WebTorrent
|
||||
StartupNotify=false
|
||||
Categories=Network;FileTransfer;P2P;
|
||||
MimeType=application/x-bittorrent;x-scheme-handler/magnet;x-scheme-handler/stream-magnet;
|
||||
|
||||
Actions=CreateNewTorrent;OpenTorrentFile;OpenTorrentAddress;
|
||||
|
||||
[Desktop Action CreateNewTorrent]
|
||||
Name=Create New Torrent...
|
||||
Exec=/opt/webtorrent-desktop/WebTorrent -n
|
||||
Path=/opt/webtorrent-desktop
|
||||
|
||||
[Desktop Action OpenTorrentFile]
|
||||
Name=Open Torrent File...
|
||||
Exec=/opt/webtorrent-desktop/WebTorrent -o
|
||||
Path=/opt/webtorrent-desktop
|
||||
|
||||
[Desktop Action OpenTorrentAddress]
|
||||
Name=Open Torrent Address...
|
||||
Exec=/opt/webtorrent-desktop/WebTorrent -u
|
||||
Path=/opt/webtorrent-desktop
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user