electron

Frameless window with controls in electron (Windows)

北慕城南 提交于 2019-12-31 08:03:25
问题 I want my app to have no title bar but still be closeable, draggable, minimizable, maximizable and resizable like a regular window. I can do this in OS X since there is a titleBarStyle option called hidden-inset that I can use but unfortunately it's not available for Windows, which is the platform that I'm developing for. How would I go about doing something like this in Windows? Here's an example of what I'm talking about. 回答1: Assuming you don't want window chrome, you can accomplish this

Chained msi Installer with Electron

a 夏天 提交于 2019-12-30 07:33:11
问题 I'm new to Electron and I am building an app that I would like to install on Windows. I read the documentation on how to distribute your app in Electron's docs, and I know about: electron-forge electron-builder electron-packager Currently I'm working with: "electron-builder-squirrel-windows": "^19.20.0", "electron-builder": "^19.20.0", "electron": "^1.6.11" Given this, I was able to create a Setup.exe to install my App, BUT I was not able to create any UI for the installation process. I want

How do I get Winston to work with Webpack?

 ̄綄美尐妖づ 提交于 2019-12-30 06:18:11
问题 I have an electron application which is using node.js. I would like to use Winston for logging in the application. I've added winston to my package.json file, but when I run the build command for webpack I'm getting some warnings from the colors.js dependency in winston. '...the request of a dependency is an expression...' It then references winston and colors.js. Ignoring the warnings doesn't work, as the electron application gets an exception trying to load some files from winston. I did

Cross platform NPM start script

一曲冷凌霜 提交于 2019-12-30 06:15:45
问题 I'm building out an Electron app that will be developed by folks on both Windows and OS X. I'd like to create a cross-platform start script. So far, I've had exactly zero luck getting something that works. The issue, I think, is that I need to set the NODE_ENV environment variable and the syntax is slightly different. I'm hoping there's a way that I just haven't found yet. My current scripts section follows: "scripts": { "start:osx": "NODE_ENV=development electron ./app/", "start:win": "set

Can MongoDB be packaged in an Electron app?

半腔热情 提交于 2019-12-30 04:59:05
问题 Can I package MongoDB in an Electron app so I don't need to install it on a client's machine? I'm developing an app on OSX and it will probably be used on Windows. Do I need to separately install Mongo on the clients? 回答1: Yes. I have used this method in the past. It brings in mongod.exe and launches it. Take a look here to see how it is done. https://github.com/nosqlclient/nosqlclient-electron/blob/master/index.js 回答2: The simple and obvious answer is: No. MongoDB is AFAIK not embeddable ,

Electron - IPC - sending data between windows

半腔热情 提交于 2019-12-30 03:16:05
问题 In the main process, I create a window called mainWindow . On a button click, I create a new browserWindow called notesWindow . What I want to do is send data from notesWindow to mainWindow What I did is used IPC send to first send the data from notesWindow to the main process, retrieve the data on the main process, then send that data to mainWindow , but mainWindow is unable to receive the sender event. Sending data to the main process works fine, but from the main process to browserWindow

node初识——node中的require方法与require.js的区别

柔情痞子 提交于 2019-12-30 00:59:18
出处:http://blog.csdn.net/u013613428/article/details/51966500 作为一个前端的新手,总是诧异于js的模块载入方式,看到了通过requireJs提供的require()命令之后,发现node也是通过类似的方法加载模块,我就好奇,这两个是一个东西吗?用electron写了一个web desk app,想通过CI上建一个job刷新repository,然后通过网页可以在team里面随时share软件的进度和功能,发现通过浏览器直接打开的这个app没法加载其他的库: 当时候分析,问题在于electron是一个基于Node的platform,整个app的打开必须通过node main.js (electron的main.js),一层一层的往下加载。这时的require是由node提供的。那能不能通过先加载requireJs,然后由requireJs来加载呢? 简单试了一下,不行。百度了一下,发现requirejs 用的AMD 规范而node 用的是Commonjs 。如果你加载的库不符合AMD规范,也就是没有用define()函数包裹,那requireJs不能简单的完成加载,这时就需要用require.config()进行配置。 具体可参考:http://blog.csdn .NET /u013613428/article

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib

烂漫一生 提交于 2019-12-30 00:32:12
问题 Using electron-builder to build Windows app, When signing up, I got this error : dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib Referenced from: /Users/puss/Library/Caches/electron-builder/winCodeSign/winCodeSign-1.7.0/darwin/osslsigncode Reason: image not found 回答1: I try to uninstall openssl and reinstall openssl, It worked. brew remove openssl brew install openssl 回答2: If you are in MacOS 10.15 (Catalina), try this (reinstall openssl): brew update && brew

Requiring a JavaScript Node.js module in TypeScript (allowJs' is not set)

你。 提交于 2019-12-29 05:07:41
问题 I have an Angular2 app inside Electron. Now, I would like to use the @pokusew/pcsclite library to use NFC functionality. This library uses native Node.js modules. When I try to require the library in my component.ts like this: declare var pcsclite: any; var pcsclite = require('../../../node_modules/@pokusew/pcsclite/'); I get and error that says: error TS6143: Module '../..' was resolved to '../../lib/pcsclite.js', but '--allowJs' is not set. On the other hand, if I try to import the library

Spawn a child process in Electron

纵然是瞬间 提交于 2019-12-29 04:37:06
问题 I'm using Node v6.2.2 and Electron v1.2.5. I have a small application that I've built on top of Electron and now I need to fork the process to run some long running task in another node process but it doesn't seems to work, when I'm looking at the ChildProcess object I can see that in the argument spawnargs[0] is initialized with the electron executable instead of node so what I did is I've tried to use spawn instead but it's not working as far as I can tell. Here is the code I'm using to