mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(electron-forge): add app icon configuration for all platforms
This commit is contained in:
@@ -318,6 +318,15 @@ const createMainWindow = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
|
// Set app name and dock icon for development mode on macOS
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
|
app.setName('seedit');
|
||||||
|
if (app.dock) {
|
||||||
|
const iconPath = path.join(dirname, '..', isDev ? 'public' : 'build', 'icon.png');
|
||||||
|
app.dock.setIcon(iconPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
createMainWindow();
|
createMainWindow();
|
||||||
|
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const config = {
|
|||||||
name: '5chan',
|
name: '5chan',
|
||||||
executableName: '5chan',
|
executableName: '5chan',
|
||||||
appBundleId: '5chan.desktop',
|
appBundleId: '5chan.desktop',
|
||||||
|
icon: './public/icon', // electron-forge adds the correct extension per platform
|
||||||
|
|
||||||
// NOTE: asar is disabled because of a bug where electron-packager silently fails
|
// NOTE: asar is disabled because of a bug where electron-packager silently fails
|
||||||
// during asar creation with 5chan's large node_modules. The app works fine without it.
|
// during asar creation with 5chan's large node_modules. The app works fine without it.
|
||||||
@@ -67,6 +68,7 @@ const config = {
|
|||||||
platforms: ['darwin'],
|
platforms: ['darwin'],
|
||||||
config: {
|
config: {
|
||||||
name: '5chan',
|
name: '5chan',
|
||||||
|
icon: './public/icon.png',
|
||||||
format: 'UDZO',
|
format: 'UDZO',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -80,6 +82,8 @@ const config = {
|
|||||||
platforms: ['win32'],
|
platforms: ['win32'],
|
||||||
config: {
|
config: {
|
||||||
name: '5chan',
|
name: '5chan',
|
||||||
|
setupIcon: './public/favicon.ico',
|
||||||
|
iconUrl: 'file://public/favicon.ico',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// Linux
|
// Linux
|
||||||
@@ -88,6 +92,8 @@ const config = {
|
|||||||
platforms: ['linux'],
|
platforms: ['linux'],
|
||||||
config: {
|
config: {
|
||||||
options: {
|
options: {
|
||||||
|
name: '5chan',
|
||||||
|
icon: './public/icon.png',
|
||||||
categories: ['Network'],
|
categories: ['Network'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user