Skip to content

Commit f4617ff

Browse files
committed
Fix icon path for bundled app.
1 parent bb66569 commit f4617ff

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stickynoteapp",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
File renamed without changes.

src/background.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22
import { app, protocol, BrowserWindow, Config, screen, shell, globalShortcut, ipcMain, Tray, Menu } from 'electron';
33
import {createProtocol, installVueDevtools} from 'vue-cli-plugin-electron-builder/lib';
4+
import { dirname } from 'path';
45
const isDevelopment = process.env.NODE_ENV !== 'production';
56
// Keep a global reference of the window and tray objects else they will
67
// be closed automatically when the JavaScript object is garbage collected.
@@ -33,7 +34,6 @@ function createWindow() {
3334

3435
win.on('close', (e) => {
3536
e.preventDefault();
36-
console.log("test")
3737
win.hide();
3838
})
3939

@@ -79,7 +79,7 @@ app.on('ready', async () => {
7979
})
8080

8181
function createTray() {
82-
tray = new Tray(require('path').join(__dirname, '/assets/icon.ico'));
82+
tray = new Tray(require('path').join('resources', 'icon.ico'));
8383
const contextMenu = Menu.buildFromTemplate([
8484
{ label: 'Restore', click: _ => win.show() },
8585
{ label: 'Quit', click: _ => { win.destroy(); app.quit() } }

vue.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ module.exports = {
33
electronBuilder: {
44
builderOptions: {
55
"appId": "com.coreparadox.sticky",
6-
"icon": __dirname + '/src/assets/icon.ico',
6+
"icon": __dirname + '/dist_electron/resources/app.asar/icon.ico',
77
"win": {
8-
"icon": __dirname + '/src/assets/icon.ico',
8+
"icon": __dirname + '/dist_electron/resources/app.asar/icon.ico',
99
"target": "NSIS"
10-
}
10+
},
11+
"extraFiles": [
12+
"resources/**"
13+
]
1114
}
1215
}
1316
}

0 commit comments

Comments
 (0)