electron

Can RxJS Observables perform inter-process communication in an Electron app?

倖福魔咒の 提交于 2019-12-11 14:55:32
问题 For an Electron app, I was wondering, if we could instead of using the remote module to communicate between different Renderer Processes, use Observables. I have read that Renderer Processes and the Main process are completely different which would, the way I understand, restrict the usage of Observables. I am also not completely aware of the details of an Observable. So please, go easy on me :P 回答1: Per comment, I think there are some misreadings what Observable can do vs. can't do.

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' during npm install

爱⌒轻易说出口 提交于 2019-12-11 14:48:39
问题 I am writing code to load c++ dll from electron. My dll is 32 bit. I am using NaN and bindings to achieve this. I used the following commands to set build for 32 bit: node-gyp clean configure build --verbose --arch=ia32 npm set npm_config_arch ia32 npm install --arch=ia32 electron-prebuilt -g When I run npm install I get the following error: fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' Although I am able to build and run my module with the following

Electron: Open default email client

安稳与你 提交于 2019-12-11 14:24:58
问题 I am using election framework to built .exe and .dmg files. In the app I have a button, clicking on which it must open default email application installed on the system to send an email. Following is the code to open email client shell.openExternal("mailto:xyz@abc.com?subject=MySubject&body="); But, it only works on few systems. Note: It is already checked that other systems also have default email client. Is there any better way to do it. So, it will work on all system? Thanks in advance for

Cannot start Electron application - missing package.json

蓝咒 提交于 2019-12-11 10:47:49
问题 I'm currently doing a Python project where I want to display my results in an Electron application. I have seen a demo video on YouTube on how to set up Electron on a Mac. The video showed 3 simple steps to be executed in the terminal: git clone https://github.com/electron/electron-quick-start cd electron-quick-start npm install && npm start When I first ran the above commands it worked fine for me. I was able to start the Electron application. But when I tried to re-start the application

Electron with Firebase authentication

痞子三分冷 提交于 2019-12-11 09:47:35
问题 I have a web applications written in React that I want to also encapsulate into Electron. The authentication part is done using Firebase signinWithPopup method. When trying to authenticate electron opens a popup but nothing happens and it remains blank. I can't seem to catch any error in the console of the main app or the popup. I'm suspecting it may be an issue with the authorized domains inside Firebase but I'm not sure and I was wondering if it's even possible. 来源: https://stackoverflow

Save the log in electron devtools to a file

只愿长相守 提交于 2019-12-11 09:45:26
问题 I am working on Electron app with angular 5 for the rendering process, is there is a way to export the console programmatically? I need a way to synchronize the logging data to file so, I can review it anytime without opening electron devtools and save as option, I need it programmatically I save my own logs, but what if there is a module that logging an error i need to get whole console log history and export it to log file 回答1: You can use electron-log , which is a logging module for

What is the equivalent for app.dock.hide();

强颜欢笑 提交于 2019-12-11 09:25:47
问题 I currently working on an electron tray application. For Mac, the electron framework has a function for hiding the app in the dock. app.dock.hide(); I try to run this on a Windows machine and get an error. TypeError: Cannot read property 'hide' of undefined Now I am looking for an equivalent functionality for Windows to hide the app in the taskbar. 回答1: Mac OS X is application-oriented, whereas Windows is window-oriented... app.dock.hide () Is indeed tagged as macOS only. In order to make the

In Electron, how to include only specific node_modules with electron-packager?

落爺英雄遲暮 提交于 2019-12-11 08:55:01
问题 I'm try to packaging my electron app, and it requires mqtt and node-notifier module. So I want to do is exclude all node_modules except them. Let's assume that I want to exclude these files from packaging: npm-debug gulpfile.js .vscode So setting --ignore option like this: --ignore='npm-debug|gulpfile\.js|\.vscode' working fine. But additionally excluding node_modules except mqtt and node-notifier, I don't know how to make regex! --ignore='npm-debug|gulpfile\.js|\.vscode|^((?!node_modules

Electron — Can't get custom icon to appear

依然范特西╮ 提交于 2019-12-11 08:34:47
问题 I'm having an issue setting the icon for my Electron app in two different ways: Non-Packaged (Running the app via terminal) My main.js does specify an 'icon' value, pointing to the icon file, but it does not apply. Packaged (with electron-packager) My package.json file specifies the 'icon' key, pointing to the icon file, and I have the .icns (Mac) file in the build directory. I used electron-packager to build the app, but the icon is not applied, the default electron icon is used instead. Not

CommonsChunkPlugin doesn't work with electron

蓝咒 提交于 2019-12-11 08:17:07
问题 I have an electron app that I'm building with Webpack 2. I have a custom module ( mymodule ) that I want to be a separate bundle referenced by the other bundles. The problem is that when I use the CommonsChunkPlugin with my main process, electron locks up as the app is starting. I can see the electron logo appear in the doc but the window never shows up. Note that it doesn't have to be a module I wrote, I can use lodash with CommonsChunkPlugin and get the same result. Interestingly, if I use