Only use 'app.asar.unpacked' path where it is needed
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
var config = require('../config')
|
|
||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
registerProtocolHandlerWin32('magnet', 'URL:BitTorrent Magnet URL', config.APP_FILE_ICON + '.ico', process.execPath)
|
var path = require('path')
|
||||||
registerFileHandlerWin32('.torrent', 'io.webtorrent.torrent', 'BitTorrent Document', config.APP_FILE_ICON + '.ico', process.execPath)
|
var iconPath = path.join(process.resourcesPath, 'app.asar.unpacked', 'static', 'WebTorrentFile.ico')
|
||||||
|
registerProtocolHandlerWin32('magnet', 'URL:BitTorrent Magnet URL', iconPath, process.execPath)
|
||||||
|
registerFileHandlerWin32('.torrent', 'io.webtorrent.torrent', 'BitTorrent Document', iconPath, process.execPath)
|
||||||
}
|
}
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
installDesktopFile()
|
installDesktopFile()
|
||||||
@@ -11,6 +11,7 @@ module.exports = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function installDesktopFile () {
|
function installDesktopFile () {
|
||||||
|
var config = require('../config')
|
||||||
var fs = require('fs')
|
var fs = require('fs')
|
||||||
var path = require('path')
|
var path = require('path')
|
||||||
var os = require('os')
|
var os = require('os')
|
||||||
|
|||||||
Reference in New Issue
Block a user