diff --git a/build/icon.icns b/build/icon.icns index 34d8371..4bc39dc 100644 Binary files a/build/icon.icns and b/build/icon.icns differ diff --git a/build/icon.ico b/build/icon.ico new file mode 100644 index 0000000..4e2abc1 Binary files /dev/null and b/build/icon.ico differ diff --git a/build/icon.svg b/build/icon.svg new file mode 100644 index 0000000..53e39f1 --- /dev/null +++ b/build/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 9801f00..b3b5435 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ ], "beforePack": "scripts/build/sandboxFix.js", "linux": { - "icon": "build/icon.icns", + "icon": "build/icon.svg", "category": "Network", "maintainer": "vendicated+vesktop@riseup.net", "target": [ @@ -160,6 +160,7 @@ "oneClick": false }, "win": { + "icon": "build/icon.ico", "target": [ { "target": "nsis", @@ -181,9 +182,9 @@ "provider": "github" }, "rpm": { - "fpm": [ + "fpm": [ "--rpm-rpmbuild-define=_build_id_links none" - ] + ] } }, "pnpm": { @@ -192,4 +193,3 @@ } } } - diff --git a/src/main/about.ts b/src/main/about.ts index 4d9f541..98c454d 100644 --- a/src/main/about.ts +++ b/src/main/about.ts @@ -6,7 +6,7 @@ import { BrowserWindow } from "electron"; import { join } from "path"; -import { ICON_PATH, VIEW_DIR } from "shared/paths"; +import { VIEW_DIR } from "shared/paths"; import { makeLinksOpenExternally } from "./utils/makeLinksOpenExternally"; @@ -14,7 +14,6 @@ export function createAboutWindow() { const about = new BrowserWindow({ center: true, autoHideMenuBar: true, - icon: ICON_PATH, webPreferences: { preload: join(__dirname, "updaterPreload.js") } diff --git a/src/main/firstLaunch.ts b/src/main/firstLaunch.ts index dee4882..9f062b9 100644 --- a/src/main/firstLaunch.ts +++ b/src/main/firstLaunch.ts @@ -9,7 +9,7 @@ import { BrowserWindow } from "electron/main"; import { copyFileSync, mkdirSync, readdirSync } from "fs"; import { join } from "path"; import { SplashProps } from "shared/browserWinProperties"; -import { ICON_PATH, VIEW_DIR } from "shared/paths"; +import { VIEW_DIR } from "shared/paths"; import { autoStart } from "./autoStart"; import { DATA_DIR } from "./constants"; @@ -31,8 +31,7 @@ export function createFirstLaunchTour() { frame: true, autoHideMenuBar: true, height: 470, - width: 550, - icon: ICON_PATH + width: 550 }); makeLinksOpenExternally(win); diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index d860b37..10dcf4b 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -23,7 +23,7 @@ import { isTruthy } from "shared/utils/guards"; import { once } from "shared/utils/once"; import type { SettingsStore } from "shared/utils/SettingsStore"; -import { ICON_PATH } from "../shared/paths"; +import { TRAY_ICON_PATH } from "../shared/paths"; import { createAboutWindow } from "./about"; import { initArRPC } from "./arrpc"; import { @@ -123,7 +123,7 @@ function initTray(win: BrowserWindow) { } ]); - tray = new Tray(ICON_PATH); + tray = new Tray(TRAY_ICON_PATH); tray.setToolTip("Vesktop"); tray.setContextMenu(trayMenu); tray.on("click", onTrayClick); @@ -407,7 +407,6 @@ function createMainWindow() { // disable renderer backgrounding to prevent the app from unloading when in the background backgroundThrottling: false }, - icon: ICON_PATH, frame: !noFrame, ...(transparent && { transparent: true, diff --git a/src/main/splash.ts b/src/main/splash.ts index 7c05de9..c45321a 100644 --- a/src/main/splash.ts +++ b/src/main/splash.ts @@ -7,14 +7,13 @@ import { BrowserWindow } from "electron"; import { join } from "path"; import { SplashProps } from "shared/browserWinProperties"; -import { ICON_PATH, VIEW_DIR } from "shared/paths"; +import { VIEW_DIR } from "shared/paths"; import { Settings } from "./settings"; export function createSplashWindow(startMinimized = false) { const splash = new BrowserWindow({ ...SplashProps, - icon: ICON_PATH, show: !startMinimized }); diff --git a/src/shared/paths.ts b/src/shared/paths.ts index 483250a..2ec74e4 100644 --- a/src/shared/paths.ts +++ b/src/shared/paths.ts @@ -9,4 +9,4 @@ import { join } from "path"; export const STATIC_DIR = /* @__PURE__ */ join(__dirname, "..", "..", "static"); export const VIEW_DIR = /* @__PURE__ */ join(STATIC_DIR, "views"); export const BADGE_DIR = /* @__PURE__ */ join(STATIC_DIR, "badges"); -export const ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "icon.png"); +export const TRAY_ICON_PATH = /* @__PURE__ */ join(STATIC_DIR, "tray.png"); diff --git a/static/icon.ico b/static/icon.ico deleted file mode 100644 index 1dc9894..0000000 Binary files a/static/icon.ico and /dev/null differ diff --git a/static/icon.png b/static/icon.png deleted file mode 100644 index 027ab0b..0000000 Binary files a/static/icon.png and /dev/null differ diff --git a/build/icon.png b/static/tray.png similarity index 100% rename from build/icon.png rename to static/tray.png