App icon for Linux (#2116)
Summary: Fixes https://github.com/facebook/flipper/issues/1369 It seems that electron-builder has an issue when trying to set the app icon for Linux zip builds. A workaround for this is to set `icon` option for `BrowserWindow`. I created a new PNG file for this, it seems that 64x64 looks the best. ## Changelog App icon for Linux fixed. Pull Request resolved: https://github.com/facebook/flipper/pull/2116 Test Plan:  Reviewed By: mweststrate Differential Revision: D27461758 Pulled By: passy fbshipit-source-id: 0be3d6b356d1332e89c3df6c137269900417f9ba
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a501838650
commit
3a0d6a3acc
@@ -11,9 +11,6 @@
|
||||
"asarUnpack": [
|
||||
"PortForwardingMacApp.app/**/*"
|
||||
],
|
||||
"deb": {
|
||||
"icon": "icon.icns"
|
||||
},
|
||||
"dmg": {
|
||||
"background": "dmgBackground.png",
|
||||
"contents": [
|
||||
@@ -46,8 +43,7 @@
|
||||
}
|
||||
],
|
||||
"linux": {
|
||||
"category": "Development",
|
||||
"icon": "icon.icns"
|
||||
"category": "Development"
|
||||
},
|
||||
"mac": {
|
||||
"category": "public.app-category.developer-tools",
|
||||
|
||||
BIN
desktop/static/icons/app_64x64.png
Normal file
BIN
desktop/static/icons/app_64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -18,6 +18,7 @@ import {
|
||||
globalShortcut,
|
||||
session,
|
||||
} from 'electron';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import url from 'url';
|
||||
import fs from 'fs';
|
||||
@@ -279,6 +280,12 @@ function createWindow() {
|
||||
minWidth: 800,
|
||||
minHeight: 600,
|
||||
center: true,
|
||||
// The app icon is defined in package.json by default.
|
||||
// When building Linux zip, it must be defined here or else it won't work.
|
||||
icon:
|
||||
os.platform() === 'linux'
|
||||
? path.join(__dirname, 'icons/app_64x64.png')
|
||||
: undefined,
|
||||
webPreferences: {
|
||||
enableRemoteModule: true,
|
||||
backgroundThrottling: false,
|
||||
|
||||
Reference in New Issue
Block a user