electron

Signing installer for windows app using electron builder

给你一囗甜甜゛ 提交于 2019-12-05 02:07:44
问题 I am using electron-builder for creating installer for my desktop app in windows by command build -w it cerates folder win-unpacked(for build) and win(for installer) here is my package.json { "name": "CoDesktopElectron", "version": "1.0.0", "description": "CoDesktopElectron", "homepage": "https://app.onepgr.com/", "author": "ankur", "private": true, scripts": { "postinstall": "install-app-deps", "start": "npm install && npm run compile && electron ./app", "compile": "rimraf app/out && tsc",

What's the outcome of setting node-integration to false when creating a new browser window in Electron?

点点圈 提交于 2019-12-05 01:08:51
In order to get jQuery to load and function correctly in a HTML page I was opening in Electron (formerly Atom Shell), I had to disable Node integration when creating the BrowserWindow in my main.js file. Can someone please tell me what setting node-integration: false will keep me from being able to do that I would normally be able to do had I not disabled it? Setting node-integration to false will disable node.js in the renderer process - i.e. your app can only do what a web browser will do. Instead of doing this, use Zepto.js which is compatible with Electron and has the same API. 来源: https:/

Electron app. Multiple html files

删除回忆录丶 提交于 2019-12-05 01:06:54
问题 I have an electron app with multiple html files in the root directory. index.html page1.html page.html I cannot find a way to redirect from index.html to page1.html once Electro has started. Does anyone know how to do this? 回答1: When your first page is index.html you call that page, when you create your window. const win = new BrowserWindow(options); win.loadUrl(`file://${__dirname}/index.html`); If you want to load another page maybe win.loadUrl(`file://${__dirname}/page.html`); could help

Adding Apple in-app purchase to Electron HTML/JS app

僤鯓⒐⒋嵵緔 提交于 2019-12-04 23:02:13
Is there a way to add Mac App Store in-app purchase to Electron HTML/JS application? There are app store modules for Phonegap, Nativescript, ImpactJS etc but I can't seem to find anything for Electron or pure JS. As suggested in one of the similar GitHub issues , you can try out customising nodobjc module . A Node.js module for in-App-Purchase for iOS, Android, Amazon and Windows. https://github.com/voltrue2/in-app-purchase From what I can see on this post, no one has really given a thorough answer. I need to do in app purchases in my Electron app for the Mac App Store. It doesn't seem like

Electron 菜单切换主题与css替换 ts编写

人盡茶涼 提交于 2019-12-04 21:11:16
////目标css<link rel="stylesheet" id="theme_css" href="路径"> ////ts //参数 可以去 electron api 了解 import { Menu, MenuItemConstructorOptions, BrowserWindow, nativeTheme } from "electron"; export class MainMenu { public static Setup(): void { const template: MenuItemConstructorOptions[] = [ { label: '主题转换', submenu: [ { label: 'dark', click: () => { let allWins = BrowserWindow.getAllWindows(); if(allWins != null && allWins.length > 0) {           //切换 菜单色 黑 nativeTheme.themeSource = 'dark'; allWins.forEach( win => win.webContents.send('change_theme' , 'dark') ); } } }, { label: 'white', click: () => {

How to symbolicate Electron crash log

本秂侑毒 提交于 2019-12-04 18:51:50
Electron version: electron v1.6.7 Operating system: Mac OS X 10.12.1 app crashed when start Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0] Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread 0 com.github.electron.framework 0x000000010e73d3f2 0x10e619000 + 1197042 1 com.github.electron.framework 0x000000010e7145e5 0x10e619000 + 1029605 2 com.github.electron.framework 0x000000010e71457d 0x10e619000 + 1029501 3 com.github.electron.framework 0x000000010e71403e 0x10e619000 + 1028158 4 com.github

How to getCurrentPosition via navigator.geolocation in Electron app?

﹥>﹥吖頭↗ 提交于 2019-12-04 18:46:49
When I try to get the current position navigator.geolocation.getCurrentPosition(handleCoordinates, handleError, {timeout:10000}) it returns "Network location provider at ' https://www.googleapis.com/ ' : Returned error code 400." Can somebody suggest any possible ways? You should configure correct google api key to request google related services in chromium. https://github.com/electron/electron/blob/master/docs/api/environment-variables.md#google_api_key https://github.com/electron/electron/issues/9420 来源: https://stackoverflow.com/questions/47955815/how-to-getcurrentposition-via-navigator

how to use electron browser window inside components in angular-cli?

雨燕双飞 提交于 2019-12-04 18:09:53
Angular-cli doesn't accept the electron inside components. how to use electron browser window inside components in angular-cli? I got an error fs.existsync like this. Is there any other options to use electron with angular2 components? var electron = require('electron'); or import electron from 'electron'; Both are not working inside ts? <!doctype html> <html> <head>   <meta charset="utf-8">   <script src="http://code.jquery.com/jquery-2.1.1.js"></script>   <title>Workdesk 2.0</title>   <!--<base href="./">-->   <base href="./">   <meta name="viewport" content="width=device-width, initial

Minimal Example: Opening a window in electron from react application?

久未见 提交于 2019-12-04 17:47:56
Say I am building a desktop application with react/redux & electron. So my index.html file in electron looks like this: <!DOCTYPE html> <html> ... <body> <div id="content"></div> <script src="public/js/bundle.js"></script> </body> </html> My biggest React container (call it app.js) is loaded into the 'id=content' div. This works fine so far, but now I am wondering how to open a new file dialog window (or any new window for that matter) when the user clicks a button in my react application. I found some examples here & here , but both examples only explain how to load the file dialog window

Listen for keyboard events and mouse movement outside of Electron app

倖福魔咒の 提交于 2019-12-04 17:43:16
问题 I've been getting into a few Electron projects and I am trying to figure out how you could listen for any keypresses or and track mouse movement when the app is in the background. I am using the menubar plugin so the app is still running in the background. I tried using the global-shortcut API but it looks like that is for shortcuts only and you can't register individual keystrokes. I've also looked over the API and have yet to find an event for keystrokes and mouse movements outside the app