Skip to content

Commit

Permalink
fix icon path reference and don't init app menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kashyab12 committed May 26, 2024
1 parent b3246aa commit c6d9952
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config: ForgeConfig = {
},
rebuildConfig: {},
makers: [new MakerSquirrel({}), new MakerZIP({}, ['darwin']), new MakerRpm({}), new MakerDeb({options: {
icon: './images/icon.png'
icon: 'public/images/icon.png'
}})],
plugins: [
new VitePlugin({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "seek",
"productName": "seek",
"version": "1.0.0",
"icon": "public/images/icon.png",
"description": "spotlight search for linux",
"main": ".vite/build/main.js",
"scripts": {
Expand Down
File renamed without changes
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const createWindow = (): BrowserWindow => {
const mainWindow = new BrowserWindow({
width: 800,
height: 800,
icon: `${app.getAppPath()}/images/icon.png`,
icon: path.join(__dirname, "images/icon.png"),
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
nodeIntegration: true,
Expand Down Expand Up @@ -81,7 +81,7 @@ const regWindowEvents = () => {
}

const setupTray = () => {
tray = new Tray(`${app.getAppPath()}/images/icon.png`)
tray = new Tray(path.join(__dirname, "images/icon.png"))
const contextMenu = Menu.buildFromTemplate([
{ label: 'Exit', type: 'normal', click: () => app.quit() }
])
Expand Down Expand Up @@ -124,5 +124,6 @@ app.on('activate', () => {
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
Menu.setApplicationMenu(null)
}
});
2 changes: 1 addition & 1 deletion src/scripts/installed-apps.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { exec } from "child_process"
import { promisify } from "util";
import { promises as fs } from 'fs';
import { App } from "electron";
import type { App } from "electron";

const execAsync = promisify(exec)

Expand Down

0 comments on commit c6d9952

Please sign in to comment.