Skip to content

Commit

Permalink
build: icons update
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Dec 11, 2023
1 parent c26869f commit c2c48c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ nsis:
uninstallDisplayName: ${productName}
createDesktopShortcut: always
mac:
icon: 'assets/menu-icon/soda_icon.png'
entitlementsInherit: ./entitlements.mac.inherit.plist
notarize: true
extraResources:
Expand Down
Binary file added resources/soda_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { join } from 'path'
import { electronApp, optimizer, is } from '@electron-toolkit/utils'
import { autoUpdater } from "electron-updater";
import { trackEvent, trackKombuchaEvent } from "./analytics"
import icon from '../../resources/icon.png?asset'
import icon from '../../resources/soda_icon.png?asset'
import ElectronLog from "electron-log"
import axios from "axios"
import fp from "find-free-port"
Expand Down Expand Up @@ -564,8 +564,20 @@ const initialize = () => {
trackEvent("Success", "App Launched - OS", os.platform() + "-" + os.release());
trackEvent("Success", "App Launched - SODA", app.getVersion());

console.log(__dirname)


function createWindow() {

let iconPath = ""
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
iconPath = process.env['ELECTRON_RENDERER_URL'] + "/public/menu-icon/soda_icon.png"
} else {
iconPath = join(__dirname, '../renderer/public/menu-icon/soda_icon.png')
}

console.log(iconPath)

// Create the browser window.
mainWindow = new BrowserWindow({
show: false,
Expand All @@ -577,7 +589,7 @@ const initialize = () => {
show: false,
nodeIntegration: true,
autoHideMenuBar: true,
...(process.platform === 'linux' ? { icon } : {}),
icon: iconPath,
webPreferences: {
preload: join(__dirname, '../preload/index.js'),
sandbox: false,
Expand Down

0 comments on commit c2c48c2

Please sign in to comment.