diff --git a/dist/assets/image/linux.png b/dist/assets/image/linux.png new file mode 100644 index 0000000..c76c241 Binary files /dev/null and b/dist/assets/image/linux.png differ diff --git a/dist/assets/image/mac.icns b/dist/assets/image/mac.icns new file mode 100644 index 0000000..573e1c7 Binary files /dev/null and b/dist/assets/image/mac.icns differ diff --git a/dist/assets/image/win.ico b/dist/assets/image/win.ico new file mode 100644 index 0000000..b15cc67 Binary files /dev/null and b/dist/assets/image/win.ico differ diff --git a/main.ts b/main.ts index fb83941..1e1b4d4 100644 --- a/main.ts +++ b/main.ts @@ -1,6 +1,7 @@ import { app, BrowserWindow, ipcMain, dialog } from "electron"; import * as path from "path"; import * as url from "url"; +import * as os from 'os'; import { AppTray } from "./electronMain/uiElements/appTray"; let win: Electron.BrowserWindow | null; @@ -12,7 +13,9 @@ function createWindow() { autoHideMenuBar: true, frame: false, show: true, transparent: true, resizable: false, skipTaskbar: true, - alwaysOnTop: true, hasShadow: false + alwaysOnTop: true, + hasShadow: false, + icon: os.platform() == 'linux' ? path.join(__dirname, '/assets/image/linux.png') : undefined }) win.loadURL(url.format({ diff --git a/package.json b/package.json index 12821e9..aef2ebf 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "watch": "webpack --watch --config webpack.config.app.js", "build": "webpack --config webpack.config.main.js && webpack --config webpack.config.app.js", "test": "", - "package": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=all --arch=x64 --out=release-builds", - "package-win32-x64": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=win32 --arch=x64 --out=release-builds", + "package": "npm run package-win32-x64 && npm run package-linux-x64 && npm run package-osx-x64", + "package-win32-x64": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=win32 --arch=x64 --out=release-builds --icon=dist/assets/image/win.ico", "package-linux-x64": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=linux --arch=x64 --out=release-builds", - "package-osx-x64": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=darwin --arch=x64 --out=release-builds" + "package-osx-x64": "electron-packager ./dist electron-live2d --overwrite --asar=true --platform=darwin --arch=x64 --out=release-builds --icon=dist/assets/image/mac.icns" }, "author": "", "license": "MIT",