Skip to content

Commit

Permalink
Merge pull request #11 from dnovacik/app-icons
Browse files Browse the repository at this point in the history
feat: add icons to packaged apps
  • Loading branch information
betterbrand authored Feb 18, 2024
2 parents 51f589f + e5b27ca commit eaa40ff
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
62 changes: 48 additions & 14 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ const config: ForgeConfig = {
asar: true,
name: 'morpheus',
extraResource: ['./src/executables/'],
icon: 'src/frontend/assets/images/circle-mor-logo.ico',
icon: 'src/frontend/assets/images/circle-mor-logo',
osxSign: {
identity: process.env.APPLE_DEVELOPER_ID,
optionsForFile: () => {
return {
entitlements: './entitlements.plist'
}
entitlements: './entitlements.plist',
};
},
},
...((process.env.APPLE_ID && process.env.APPLE_ID_PASSWORD && process.env.APPLE_TEAM_ID) && { osxNotarize: {
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
}})
...(process.env.APPLE_ID &&
process.env.APPLE_ID_PASSWORD &&
process.env.APPLE_TEAM_ID && {
osxNotarize: {
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
},
}),
},
hooks: {
postPackage: async (_, { platform, outputPaths }) => {
Expand Down Expand Up @@ -64,20 +68,50 @@ const config: ForgeConfig = {
},
rebuildConfig: {},
makers: [
new MakerSquirrel({}),
new MakerSquirrel({
iconUrl: 'src/frontend/assets/images/circle-mor-logo.ico',
}),
new MakerZIP({}, ['darwin']),
new MakerRpm({}),
new MakerDeb({}),
new MakerDMG({}),
new MakerDeb({
options: {
icon: 'src/frontend/assets/images/MOR_logo_circle.iconset/icon_512x512.png',
maintainer: 'Morpheus',
homepage: 'https://www.mor.org',
categories: ['Utility'],
},
}),
new MakerDMG({
icon: 'src/frontend/assets/images/circle-mor-logo.icns',
format: 'ULFO',
background: 'src/frontend/assets/images/dmgbg.svg',
overwrite: true,
additionalDMGOptions: {
window: {
size: {
width: 600,
height: 600,
},
},
},
contents: [
{
x: 410,
y: 220,
type: 'link',
path: '/Applications',
},
],
}),
],
publishers: [
new PublisherGithub({
repository: {
owner: 'MorpheusAIs',
name: 'Node'
name: 'Node',
},
draft: true
})
draft: true,
}),
],
plugins: [
new AutoUnpackNativesPlugin({}),
Expand Down
Binary file added src/backend/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/backend/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { app, BrowserWindow, ipcMain, IpcMainEvent } from 'electron';
import { app, BrowserWindow, ipcMain } from 'electron';
import path from 'path';
import { IpcChannel, IpcMainChannel, OllamaChannel } from '../events';
import {
Expand Down Expand Up @@ -26,6 +26,7 @@ if (require('electron-squirrel-startup')) {

const createWindow = async (): Promise<void> => {
mainWindow = new BrowserWindow({
icon: 'icon.png',
height: 800,
width: 1200,
autoHideMenuBar: true,
Expand Down

0 comments on commit eaa40ff

Please sign in to comment.