electron-builder

how to clear user data while delete mac electron app from application directly?

為{幸葍}努か 提交于 2021-02-20 02:52:27
问题 how to delete user data while deleting the macos electron app? It seems we need to write a daemon to listen to the folders change, but how to do? do you have more clear or easier methods to handle it? packaging used electron-builder. 回答1: I use electron-localstorage to set one flag into app, while everytime you start app, which will check if the flag can get from app, if not, this was new installed and opend first time, so it will clear the old userdata. const userDataPath = app.getPath(

Loading preload script in Electron and Vue

吃可爱长大的小学妹 提交于 2021-02-16 14:39:30
问题 I am using Vue CLI 3 and vue-cli-plugin-electron-builder to package my Vue Electron app and I am not able to get my preload.js script for electron working. main window win = new BrowserWindow({ width: 800, height: 600 webPreferences: { nodeIntegration: false, preload: path.join(__dirname, "/../src/preload.js") // works but window.electron.dialog in undefined } }); preload.js const { dialog } = require("electron"); window.electron = {}; window.electron.dialog = dialog; The window.electron

electron-builder snap installer confusing home directory

旧时模样 提交于 2021-02-11 06:56:11
问题 This is a follow up of the previous question Defult home directory for snap installer using electron-builder, asked as requested there. I'm currently building a electron app an building the installer like .deb and .snap with electron-builder. My app uses showSaveDialog/showOpenDialog to open/save file that opens up a nautilus (in ubuntu) like file explorer. Now if the app is installed using the .snap installer, the Home tab in the explorer pop-up points to the /home/user/snap/<app>/<revision>

Configure electron-builder to run powershell script

懵懂的女人 提交于 2021-02-08 01:32:51
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Configure electron-builder to run powershell script

不问归期 提交于 2021-02-08 01:27:11
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Configure electron-builder to run powershell script

梦想的初衷 提交于 2021-02-08 01:26:05
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Configure electron-builder to run powershell script

て烟熏妆下的殇ゞ 提交于 2021-02-08 01:26:04
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Configure electron-builder to run powershell script

北战南征 提交于 2021-02-08 01:24:41
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Configure electron-builder to run powershell script

眉间皱痕 提交于 2021-02-08 01:23:17
问题 I have an installation file created by electron-builder and faced issue that can't find a way how to run powershell script after installation. The idea is to make some changes in windows registry and set permission for application folder. As far as I understand it should be configured in build section in package.json . In api I found that it is exist afterPack method, but I can't figure it out how to execute powershell file through it. Thank you. 回答1: First, create an afterPack.js file,

Default home directory for snap installer using electron-builder

坚强是说给别人听的谎言 提交于 2021-01-29 15:26:55
问题 I'm currently building a electron app an building the installer like .deb and .snap with electron-builder. Inside the app I need the access the user home directory for some reason and I'm using process.env.HOME || process.env.USERPROFILE to get the home directory (also app.getPath('home') returns the same). This works properly for other cases but when the app installed with .snap , instead of the actual home( /home/username ) directory this returns ~/snap/<app_name>/3/ as home directory. ( 3