Skip to content

Commit 1d0a2e1

Browse files
committed
Fixed icon displaying after build.
1 parent 1bf2b3a commit 1d0a2e1

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ yarn-error.log*
2424
/dist_electron
2525
/notes
2626
/notes
27+
/configbackup.json

public/Icon.png

-5.41 KB
Binary file not shown.

src/assets/Icon.png

-5.41 KB
Binary file not shown.

src/background.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
'use strict'
22

3-
import { app, protocol, BrowserWindow, ipcMain, remote } from 'electron'
3+
import { app, protocol, BrowserWindow} from 'electron'
44
import {
55
createProtocol,
66
installVueDevtools
77
} from 'vue-cli-plugin-electron-builder/lib'
88
const isDevelopment = process.env.NODE_ENV !== 'production'
99
const nativeImage = require('electron').nativeImage;
10-
var image = nativeImage.createFromPath(__dirname + '/assets/icon.png');
11-
image.setTemplateImage(true);
12-
console.log(__dirname + '/assets/icon.png')
10+
// var image = nativeImage.createFromPath(__dirname + '/assets/icon.png');
11+
// image.setTemplateImage(true);
12+
// console.log(__dirname + '/assets/icon.png')
1313
// Keep a global reference of the window object, if you don't, the window will
1414
// be closed automatically when the JavaScript object is garbage collected.
1515
let win;
@@ -26,8 +26,7 @@ function createWindow () {
2626
autoHideMenuBar: true,
2727
transparent: true,
2828
frame: false,
29-
resizable:true,
30-
icon: image
29+
resizable:true
3130
})
3231

3332
if (process.env.WEBPACK_DEV_SERVER_URL) {

vue.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
pluginOptions: {
3+
electronBuilder: {
4+
builderOptions: {
5+
"appId": "com.coreparadox.sticky",
6+
"icon": __dirname + '/src/assets/icon.ico',
7+
"win": {
8+
"icon": __dirname + '/src/assets/icon.ico',
9+
"target": "NSIS"
10+
},
11+
"win": {
12+
"icon": __dirname + '/src/assets/icon.ico',
13+
"target": "NSIS"
14+
},
15+
}
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)