Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron icons #3613

Merged
merged 4 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/icon.icns
Binary file not shown.
Binary file added assets/icon.ico
Binary file not shown.
File renamed without changes
Binary file added assets/icon@2x.icns
Binary file not shown.
20 changes: 17 additions & 3 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { MakerRpm } from '@electron-forge/maker-rpm'
import { VitePlugin } from '@electron-forge/plugin-vite'
import { FusesPlugin } from '@electron-forge/plugin-fuses'
import { FuseV1Options, FuseVersion } from '@electron/fuses'
import path from 'path'

const rootDir = process.cwd()

const config: ForgeConfig = {
packagerConfig: {
Expand All @@ -19,13 +22,24 @@ const config: ForgeConfig = {
}) ||
undefined,
executableName: 'zoo-modeling-app',
icon: path.resolve(rootDir, 'assets', 'icon'),
},
rebuildConfig: {},
makers: [
new MakerSquirrel({}),
new MakerSquirrel({
setupIcon: path.resolve(rootDir, 'assets', 'icon.ico'),
}),
new MakerZIP({}, ['darwin']),
new MakerRpm({}),
new MakerDeb({}),
new MakerRpm({
options: {
icon: path.resolve(rootDir, 'assets', 'icon.png'),
},
}),
new MakerDeb({
options: {
icon: path.resolve(rootDir, 'assets', 'icon.png'),
},
}),
],
plugins: [
new VitePlugin({
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const createWindow = () => {
sandbox: false, // expose nodejs in preload
preload: path.join(__dirname, './preload.js'),
},
icon: path.resolve(process.cwd(), 'assets', 'icon.png'),
})

// and load the index.html of the app.
Expand Down
Loading