electron-builder

Env vars to change app name in project.json and set runtime vars?

帅比萌擦擦* 提交于 2021-01-28 07:50:30
问题 I need to generate two apps from the same codebase (e.g. "pro" and "lite" versions). There are a lot of questions here about this but none I found involve node or electron . I have only used env in development in very simple ways and after searching around, I haven't seen any mention of being able to use them in a deployed application. So two tasks: 1. Changing the name of the app So, using the package.json file with electron builder , I've tried to change the productName like this:

How to Change ElectronJS App default Icon?

…衆ロ難τιáo~ 提交于 2020-12-08 10:58:31
问题 I am new to electronjs. I want to convert an angular app to desktop. I could achieve it successfully but the problem is that the app icon is set to default electron and not the icon I provided as follows: win = new BrowserWindow({ width: 600, height: 670, icon: `${__dirname}/dist/assets/imgs/logo.png` }) I changed the icon after building the app using resource hacker but what I need is to change it at build time in the correct way. what am I missing> 回答1: In main.js, specify icon win = new

How to Change ElectronJS App default Icon?

懵懂的女人 提交于 2020-12-08 10:57:22
问题 I am new to electronjs. I want to convert an angular app to desktop. I could achieve it successfully but the problem is that the app icon is set to default electron and not the icon I provided as follows: win = new BrowserWindow({ width: 600, height: 670, icon: `${__dirname}/dist/assets/imgs/logo.png` }) I changed the icon after building the app using resource hacker but what I need is to change it at build time in the correct way. what am I missing> 回答1: In main.js, specify icon win = new

Can't Add Icon To Electron App With Electron Builder

谁都会走 提交于 2020-07-20 07:17:20
问题 I have made an app with Electron and am trying to package it with Electron Builder. Link to repository Does not contain node_modules folder: Repo here I have a folder named build with my icon.ico in it and my package.json is as follows: { "name": "attendant", "productName": "Attendant", "version": "0.1.0", "description": "A simple app to streamline web development by allowing you index.html to open on a live server in the default browser", "main": "main.js", "scripts": { "start": "electron ."

Electron Builder: Not allowed to load local resource: app.asar/build/index.html

泪湿孤枕 提交于 2020-07-05 06:59:47
问题 I have an issue when using electron builder I got blank page and error in console: Not allowed to load local resource: file:///C:/Users/emretekince/Desktop/DCSLogBook/client/dist/win-unpacked/resources/app.asar/build/index.html main.js const startUrl = process.env.ELECTRON_START_URL || url.format({ pathname: path.join(__dirname, '/build/index.html'), protocol: 'file:', slashes: true }); mainWindow.loadURL(startUrl); 回答1: Solved by adding "files" in package.json "files": [ "*.js", "build",

Electron Builder: Not allowed to load local resource: app.asar/build/index.html

Deadly 提交于 2020-07-05 06:59:04
问题 I have an issue when using electron builder I got blank page and error in console: Not allowed to load local resource: file:///C:/Users/emretekince/Desktop/DCSLogBook/client/dist/win-unpacked/resources/app.asar/build/index.html main.js const startUrl = process.env.ELECTRON_START_URL || url.format({ pathname: path.join(__dirname, '/build/index.html'), protocol: 'file:', slashes: true }); mainWindow.loadURL(startUrl); 回答1: Solved by adding "files" in package.json "files": [ "*.js", "build",

Electron index.html not loading after building the app

一世执手 提交于 2020-06-28 08:10:42
问题 I have an electron app that works perfectly fine before bundling it with electron-builder . After bundling it and opening the app, I get the following error : Not allowed to load local resource: file:///tmp/.mount_displa4VwuQh/resources/app.asar/file:/tmp/.mount_displa4VwuQh/resources/app.asar/build/index.html In the build folder I have the electron.js file and index.html and since the app is starting electron.js and thus index.html got bundled correctly. Here is my electron.js app entry