Skip to content

Commit

Permalink
set up build
Browse files Browse the repository at this point in the history
  • Loading branch information
ygkn committed Oct 22, 2022
1 parent 43f015e commit e2ca053
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions desktop/electron/main/menu/tray.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Menu, Tray } from "electron";
import { app, Menu, Tray } from "electron";
import { join } from "path";

import { publicPath } from "../path";
Expand All @@ -9,7 +9,9 @@ export const createTray = ({
appState,
...menuTemplateParam
}: Parameters<typeof renderMenuTemplate>[0]) => {
const iconPath = join(publicPath, "assets/menu-bar-icon.png");
const iconPath = app.isPackaged
? join(process.resourcesPath!, "public", "assets", "menu-bar-icon.png")
: join(publicPath, "assets", "menu-bar-icon.png");
const tray = new Tray(iconPath);
tray.setToolTip("スマートポインター");

Expand Down
3 changes: 3 additions & 0 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"check:type": "tsc"
},
"build": {
"extraResources": [
"public/assets/**/*"
],
"productName": "smartpointer",
"appId": "dev.abelab.smartpointer",
"mac": {
Expand Down

0 comments on commit e2ca053

Please sign in to comment.