rely on electron's automatic ASAR handling
This commit is contained in:
12
config.js
12
config.js
@@ -3,8 +3,8 @@ var path = require('path')
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
APP_COPYRIGHT: 'Copyright © 2014-2016 The WebTorrent Project',
|
APP_COPYRIGHT: 'Copyright © 2014-2016 The WebTorrent Project',
|
||||||
APP_FILE_ICON: path.join(pathToStatic(), 'WebTorrentFile'),
|
APP_FILE_ICON: path.join(__dirname, 'static', 'WebTorrentFile'),
|
||||||
APP_ICON: path.join(pathToStatic(), 'WebTorrent'),
|
APP_ICON: path.join(__dirname, 'static', 'WebTorrent'),
|
||||||
APP_NAME: 'WebTorrent',
|
APP_NAME: 'WebTorrent',
|
||||||
|
|
||||||
CONFIG_PATH: applicationConfigPath('WebTorrent'),
|
CONFIG_PATH: applicationConfigPath('WebTorrent'),
|
||||||
@@ -15,7 +15,7 @@ module.exports = {
|
|||||||
|
|
||||||
IS_PRODUCTION: isProduction(),
|
IS_PRODUCTION: isProduction(),
|
||||||
|
|
||||||
STATIC_PATH: pathToStatic(),
|
STATIC_PATH: path.join(__dirname, 'static'),
|
||||||
|
|
||||||
SOUND_ADD: 'file://' + path.join(__dirname, 'static', 'sound', 'add.wav'),
|
SOUND_ADD: 'file://' + path.join(__dirname, 'static', 'sound', 'add.wav'),
|
||||||
SOUND_DELETE: 'file://' + path.join(__dirname, 'static', 'sound', 'delete.wav'),
|
SOUND_DELETE: 'file://' + path.join(__dirname, 'static', 'sound', 'delete.wav'),
|
||||||
@@ -41,9 +41,3 @@ function isProduction () {
|
|||||||
return !/\/electron$/.test(process.execPath)
|
return !/\/electron$/.test(process.execPath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pathToStatic () {
|
|
||||||
return isProduction()
|
|
||||||
? path.join(process.resourcesPath, 'app.asar.unpacked', 'static')
|
|
||||||
: path.join(__dirname, 'static')
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user