electron

Electron Autoupdater with Private GitHub Repository?

旧城冷巷雨未停 提交于 2019-12-23 04:43:52
问题 I have implemented Electron AutoUpdater with PRIVATE GitHub Repository as provider to publish electron application. Now, i can publish it using GitHub repository but Whenever AutoUpdater tries to download the updates from GitHub repository, Everytime it prompts with response code 404 Not found.. I have tried passing token in setFeedURL method and also set it in GH_TOKEN but seems like that does not work either. autoUpdater.setFeedURL({ provider: 'github' , owner: 'owner' , repo: 'repo-name' ,

electron vue 开发客户端程序

拥有回忆 提交于 2019-12-23 03:07:15
文档知识点 https://electronjs.org/docs/tutorial/about (1)Electron通过将 Chromium 和 Node.js 合并到同一个运行时环境中,并将其打包为Mac,Windows和Linux系统下的应用来实现这一目的。 即electron内置了浏览器和node环境。 Electron包括2个进程:main-process ,render-process。 main-process:控制应用的生命周期 render-process:浏览器渲染。 这2个进行之间通过IPC进行通信。 (2) 通信过程待研究 https://electronjs.org/docs/faq#how-to-share-data-between-web-pages 开发小tips (1)main 进程热更新 webpack配置: function startMain () { return new Promise((resolve, reject) => { mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main) const compiler = webpack(mainConfig) compiler

ERROR in renderer.js from UglifyJs Unexpected token punc «(»

吃可爱长大的小学妹 提交于 2019-12-23 00:48:10
问题 Version: webpack 2.3.3 Hi there I'm trying to build my first Electron app using Vuejs. Everything seems to be going great until I've come to package the app. When I run npm run dev everything works just fine. However, when I run npm build:darwin I get the following error ERROR in renderer.js from UglifyJs Unexpected token punc «(», expected punc «:» [renderer.js:26813,14] It does end up compiling however when I run the application I get the white screen of death. From what I read, this can be

Call renderer process from React-Redux action (Electron)

夙愿已清 提交于 2019-12-22 18:20:10
问题 I have a electron application which uses React & Redux, so I have action creators, reducers etc. I also have a function in my renderer file (nodejs) which does some async stuff. I want to call this function from within my action creator. I guess I will have to use redux-thunk for this or some other async library, however, I am not quite sure how to access this function in the renderer process and use it in my react.redux app? So e.g. for the action creator: export const downloadFromYoutube =

Debugging Electron renderer process with VSCode

雨燕双飞 提交于 2019-12-22 11:28:51
问题 I tried this document, but hit a problem. I went through the guide one by one and it is all fine until "1. Update the contents of renderer.js to" in "Debugging of the renderer process" section. But when I try "2. While your debug session is...." , VSCode shows the image like below and I cannot attach the debugger to the Electron process. The list in the image shows the tabs of my browser but there's no option corresponding to the electron process launched by the Main debugger. How do I solve

Why doesn't npm start run electron app?

試著忘記壹切 提交于 2019-12-22 09:58:12
问题 I have the following in package.json for several electron apps: "name": "my-app", "version": "1.0.0", "description": "", "main": "main.js", "scripts": { "start": "electron ." }, When I'd do npm start in the app folder, the corresponding app use to run. I just started getting the following output for all of my electron apps when using npm start : electron . module.js:471 throw err; ^ Error: Cannot find module './' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load

How to open an Electron dialog from angular 2 component?

大城市里の小女人 提交于 2019-12-22 09:34:54
问题 I want to click a button to open folder dialog in my component. Here is what I am trying to do: HTML: <div> <input class="u-full-width" placeholder="Folder" type="text" [(ngModel)]="folder"> <button id="browse" class="button-primary" (click)="browse()">Browse</button> <input id="fileInput" type="file" style="display: none" /> </div> component.ts // var remote = require('remote'); // var dialog = remote.require('dialog'); folder: string; browse() { dialog.showOpenDialog({title: 'Select a

Getting a app to be run on startup

爱⌒轻易说出口 提交于 2019-12-22 08:38:46
问题 I'm making a mac app using atom shell that lives in the menubar. I was wondering what my options would be for getting it to run at startup. Does it have to be done manually by the user? Do I need permission from the user to do this? How would I do it programmatically with node / bash? Is there an existing thing within atom shell to do this? Is there an existing module that can do this? 回答1: Give the auto-launch module a try, it should do what you want. To answer your questions: No No, but it

Write file to disk from blob in electron application

China☆狼群 提交于 2019-12-22 06:47:52
问题 I am creating an Electron Application in which I am recording data from webcam and desktop, at the end of the recording session, I want to save the data to a file in the background. I do not know how to write the data from a blob to a file directly. Any suggestions? Below is my current handling for MediaRecord Stop event. this.mediaRecorder.onstop = (e) => { var blob = new Blob(this.chunks, { 'type' : 'video/mp4; codecs=H.264' }); var fs = require('fs'); var fr = new FileReader(); var data =

require(“electron”).app is undefined. I npm installed fresh modules. Unsure what to do

不羁岁月 提交于 2019-12-22 05:52:43
问题 Yesterday, I was developing on Electron perfectly fine. Then I hop onto my computer to realize Electron isn't working at all now. I removed node_modules and did a fresh npm install package.json: ... "devDependencies": { "devtron": "^1.4.0", "electron": "^1.4.7" }, "dependencies": { "electron-debug": "^1.1.0" } ... This is the error I got. I followed the suggestions used of previous issues of this problem. Nothing is resolving it. Electron is not installed globally. Everything should be self