浏览代码

Remove duplicated icon

Per https://www.electron.build/icons, a single 512x512 icon.png placed in the
buildResources directory (default `build`) is enough to generate icons for all
three - macOS, Windows and Linux.
Manav Rathi 1 年之前
父节点
当前提交
42679bc9da
共有 4 个文件被更改,包括 1 次插入8 次删除
  1. 二进制
      desktop/build/icon.icns
  2. 二进制
      desktop/build/window-icon.png
  3. 0 1
      desktop/electron-builder.yml
  4. 1 7
      desktop/src/main/init.ts

二进制
desktop/build/icon.icns


二进制
desktop/build/window-icon.png


+ 0 - 1
desktop/electron-builder.yml

@@ -12,7 +12,6 @@ linux:
           arch: [x64, arm64]
         - target: pacman
           arch: [x64, arm64]
-    icon: ./resources/icon.icns
     category: Photography
 mac:
     target:

+ 1 - 7
desktop/src/main/init.ts

@@ -20,21 +20,15 @@ const execAsync = util.promisify(require("child_process").exec);
  * This window will show the HTML served from {@link rendererURL}.
  */
 export const createWindow = async () => {
-    const appImgPath = isDev
-        ? "../build/window-icon.png"
-        : path.join(process.resourcesPath, "window-icon.png");
-    const appIcon = nativeImage.createFromPath(appImgPath);
-
     // Create the main window. This'll show our web content.
     const mainWindow = new BrowserWindow({
         webPreferences: {
             preload: path.join(app.getAppPath(), "preload.js"),
         },
-        icon: appIcon,
         // The color to show in the window until the web content gets loaded.
         // See: https://www.electronjs.org/docs/latest/api/browser-window#setting-the-backgroundcolor-property
         backgroundColor: "black",
-        // We'll show conditionally depending on `wasAutoLaunched` later
+        // We'll show it conditionally depending on `wasAutoLaunched` later.
         show: false,
     });