Setting Up Electron app icon after successful build

atul
1 min readOct 11, 2019

--

Setting Up Electron app icon after successful build …..there are ways to setup

FIRST WAY — go to “ package.json” and add below mentioned code

“build”: {

“mac”: {

“icon”: “assets/icons/mac/logo.icns”

},

“linux”: {

“icon”: “assets/icons/png/logo.png”,

},

“win”: {

“icon”: “assets/icons/win/logo.ico”

}

},

SECOND WAY — go to “package.json”

“scripts”: {

“react-start”: “react-scripts start”,

“react-build”: “react-scripts build”,

“react-test”: “react-scripts test — env=jsdom”,

“react-eject”: “react-scripts eject”,

“electron-build”: “electron-builder”,

“release”: “yarn react-build && electron-builder — publish=always”,

“build”: “yarn react-build && yarn electron-build”,

“test”: “rescripts test”,

“eject”: “react-scripts eject”,

“start”: “concurrently \”cross-env BROWSER=none yarn react-start\” \”wait-on http://localhost:3000 && electron .\””,

“package-mac”: “electron-packager . — overwrite — platform=darwin — arch=x64 — icon=assets/icons/mac/logo.icns — prune=true — out=release-builds”,

“package-win”: “electron-packager . — overwrite — asar=true — platform=win32 — arch=ia32 — icon=assets/icons/win/logo.ico — prune=true — out=release-builds — version-string.CompanyName=CE — version-string.FileDescription=CE — version-string.ProductName=\”Ytube downloader\””,

“package-linux”: “electron-packager . — overwrite — asar=true — platform=linux — arch=x64 — icon=assets/icons/png/logo.png — prune=true — out=release-builds”,

“postinstall”: “electron-builder install-app-deps”,

“preelectron-pack”: “yarn build”,

“electron-pack”: “build -mw”

},

add assests to root directory

--

--