Fix resources paths for packaged app

This commit is contained in:
Nick Denry 2019-04-26 04:30:01 +03:00
parent 9972421f18
commit ab1bbff252
2 changed files with 5 additions and 4 deletions

View File

@ -8,7 +8,8 @@ let mainWindow
let tray = null;
function initApp() {
tray = new Tray('./images/icon.png')
let iconPath = __dirname + '/images/icon.png'
tray = new Tray(iconPath)
tray.setToolTip('Chimeverse')
createWindow();
tray.on('click', function() {
@ -79,11 +80,11 @@ app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
* Export functions
*/
function showEnvelope() {
tray.setImage('./images/envelope.png')
tray.setImage(__dirname + '/images/envelope.png')
}
function hideEnvelope() {
tray.setImage('./images/icon.png')
tray.setImage(__dirname + '/images/icon.png')
}
exports.showEnvelope = showEnvelope;

View File

@ -68,7 +68,7 @@ angApp.factory('SystemService', () => {
let systemService = {}
systemService.playAudio = () => {
var audio = new Audio('sounds/graceful.ogg')
var audio = new Audio(__dirname + '/sounds/graceful.ogg')
audio.play()
}