electron

electron教程(四): 使用electron-builder或electron-packager将项目打包为可执行桌面程序(.exe)

冷暖自知 提交于 2020-04-20 10:33:55
我的electron教程系列 electron教程(一): electron的安装和项目的创建 electron教程(番外篇一): 开发环境及插件, VSCode调试, ESLint + Google JavaScript Style Guide代码规范 electron教程(番外篇二): 使用TypeScript版本的electron, VSCode调试TypeScript, TS版本的ESLint electron教程(二): http服务器, ws服务器, 子进程管理 electron教程(三): 使用ffi-napi引入C++的dll electron教程(四): 使用electron-builder或electron-packager将项目打包为可执行桌面程序(.exe) #引言 本篇将介绍如何将你开发的electron项目(main.js), 打包成一个可执行桌面程序(.exe). 有两个流行的工具可以做到这一点: electron-builder 和 electron-packager . 我不会详细地对比两者的优劣, 但会通过三个事实来帮助你选择合适的工具. 1. electron-builder 的Star为7.7k, electron-packager 的Star为6.6k. 2. 根据 electron-builder 的作者介绍, electron

electron结合serialport插件开发硬件指令操作项目

别说谁变了你拦得住时间么 提交于 2020-04-19 15:34:50
electron可以开发桌面系统,serialport包是node环境下连接串口设备的依赖,如果是用electron做硬件检测项目,需要考虑加入serialport包,但是我们直接npm install安装的serialport依赖,会因为binding的问题,在运行的时候报错,所以,一般会在下载安装依赖包之后,通过electron-rebuild再次编译,用来与electron匹配。 这里通过实际操作来演示一个简单的入门demo。 本实例需要一些准备环境,node10.20.0 版本,另外需要 安装一个windows-build-tools ,就是vc+python2.7的环境。有了这些环境,我们才能更方便的进行后续的操作。 准备package.json { "name": "electronserialport", "version": "0.0.1", "description": "", "main": "index.js", "author": "buejee", "license": "ISC", "scripts": { "dev": ".\\node_modules\\.bin\\electron ." }, "dependencies": { "serialport": "^8.0.7" }, "devDependencies": { "electron": "

自荐RedisViewer一个有情怀的跨平台Redis可视化客户端工具

江枫思渺然 提交于 2020-04-19 04:36:09
自荐一个有情怀的跨平台Redis可视化客户端工具——RedisViewer 转载自 最美分享Coder 2019-09-17 06:31:00 介绍 在以往的文章中曾经介绍过几款Redis的可视化工具,在笔者的印象中,Redis至今没有一款非常专业的可视化管理客户端,就算之前介绍过的几款也是差强人意,有些时候满足不了我们的需求,而今天本文要介绍的是另一款值得推荐的Redis可视化客户端,以下大多数通过截图的方式来展示这款软件!这款产品也是跨平台的,目前已经支持Windows和MacOS,理论支持Linux(尚未经过测试),方便不同平台开发者们使用!本软件出自@可乐onefineday之手! 相关技术栈 UI: electron、vue、elenentui 后端: springboot 、webflux 、mybatis 、mapper PS: 现阶段后端JVM使用openj9有效控制内存占用 后期规划会将使用Golang重构,来减少内存消耗和安装包大小 相关特性 1、列表 针对大数据量做了优化,前端分片加载,百万数据量无压力渲染, 对比其他客户端软件来说要好用很多 2、全功能控制台 支持官方95%命令的控制台命令(get/set/ttl/dbsize/info/cluster info/cluster nodes...与官方一致),再也不用ssh登录到服务器上面敲命令了 3

How to open developer tools inside of a webview

我与影子孤独终老i 提交于 2020-04-18 05:35:11
问题 I'm developing a browser using Electron . I've been trying to open the developer tools of a webview , and I did it using that code: document.getElementById("MyWebView").openDevTools(); But the problem is that the developer tools ' window is opened as a pop-up window (another window): I want to know who can I open it side by side to the webview (by creating another webview that shows the developer tools or by some other ways...). For example , here's a photo of Baker Browser ( Braker Browser

Dexie.js not store electron form submitted data

让人想犯罪 __ 提交于 2020-04-18 03:49:21
问题 I'm not sure what's wrong, I'm trying to save my data inside a dixie.js table I've created. I'm using electron and I've binded the data to an ipc event. I can see the passed data inside the macOS terminal, I suppose that the data are available also for the main process. I have passed the data directly to dexie but I'm not able to save or get them. Here is the code. I get this error inside the macOS teminal, it's dexie related but I don't know what's wrong. **ERROR Dexie { _dbSchema: {

Electron在mac下快捷键失效的问题及解决

百般思念 提交于 2020-04-17 02:09:45
【推荐阅读】微服务还能火多久?>>> 场景:在消息发送的输入框中,使用快捷键的复制粘贴,全选,等等都会失效。 解决方案如下: 将如下代码放到main/index.js主进程中 if (process.platform === 'darwin' ) { let contents = mainWindow.webContents globalShortcut.register( 'CommandOrControl+C', () => { contents.copy() }) globalShortcut.register( 'CommandOrControl+V', () => { contents.paste() }) globalShortcut.register( 'CommandOrControl+X', () => { contents.cut() }) globalShortcut.register( 'CommandOrControl+A', () => { contents.selectAll() }) } 来源: oschina 链接: https://my.oschina.net/u/4365323/blog/3236512

玩转VSCode-完整构建VSCode开发调试环境

隐身守侯 提交于 2020-04-13 07:54:48
原文: 玩转VSCode-完整构建VSCode开发调试环境 随着VSCode的不断完善和强大,是时候将部分开发迁移到VS Code中了。 目前使用VS2019开发.NET Core应用,一直有一个想法,在VS Code中复刻VS的开发环境,同时迁移到VS Code。 那么现在就开始吧。 首先,安装最新版的VS Code: https://code.visualstudio.com/ ,安装完成后可能会提示升级,升级即可,升级后的版本信息: 版本: 1.40 . 1 (system setup) 提交: 8795a9889db74563ddd43eb0a897a2384129a619 日期: 2019 - 11 -13T16: 49 : 35 .976Z Electron: 6.1 . 2 Chrome: 76.0 . 3809.146 Node.js: 12.4 . 0 V8: 7.6 . 303.31 -electron. 0 OS: Windows_NT x64 10.0 . 16299 接下来的操作分为几个步骤: 1. 安装各种强大VS Code插件 2. 创建.NET Core解决方案和工程 3. 调试运行 好的,那我们开始吧。 一、安装各种强大的VS Code插件 1. C# extension for Visual Studio Code 这个插件最重要的功能:

How to open update electron browser window with a new html file

微笑、不失礼 提交于 2020-04-11 07:24:29
问题 I am new to electron. I have two html pages and I want to open the second page when a button clicked. I have code this as follow, but I just get a blank window; not the second page. This is index.js const electron = require('electron') const {app, BrowserWindow} = electron app.on('ready',()=>{ let win = new BrowserWindow({width:960, hehight:540}) win.loadURL(`file://${__dirname}/login.html`) }) exports.openWindow = (fileName) => { let win = new BrowserWindow({width:960, height:540}) win