electron

How to Change ElectronJS App default Icon?

懵懂的女人 提交于 2020-12-08 10:57:22
问题 I am new to electronjs. I want to convert an angular app to desktop. I could achieve it successfully but the problem is that the app icon is set to default electron and not the icon I provided as follows: win = new BrowserWindow({ width: 600, height: 670, icon: `${__dirname}/dist/assets/imgs/logo.png` }) I changed the icon after building the app using resource hacker but what I need is to change it at build time in the correct way. what am I missing> 回答1: In main.js, specify icon win = new

ConnectionError: Failed to connect to localhost:undefined in 15000ms

拟墨画扇 提交于 2020-12-06 12:10:10
问题 I am using KnexJs attempting to connect to a local Microsoft SQL Server Express. However, with the below configuration, I am getting an error. I've followed the typical steps, but I'm still getting the error. What I've tried: Set up a SQL Server authentication login for the database Enable SQL Server authentication on the server Enable TCP/IP on the server Restart the Windows services Restart the SQL Server through SQL Server Management Studio Verify ability to log in through SQL Server

ConnectionError: Failed to connect to localhost:undefined in 15000ms

五迷三道 提交于 2020-12-06 12:09:54
问题 I am using KnexJs attempting to connect to a local Microsoft SQL Server Express. However, with the below configuration, I am getting an error. I've followed the typical steps, but I'm still getting the error. What I've tried: Set up a SQL Server authentication login for the database Enable SQL Server authentication on the server Enable TCP/IP on the server Restart the Windows services Restart the SQL Server through SQL Server Management Studio Verify ability to log in through SQL Server

ConnectionError: Failed to connect to localhost:undefined in 15000ms

依然范特西╮ 提交于 2020-12-06 12:06:38
问题 I am using KnexJs attempting to connect to a local Microsoft SQL Server Express. However, with the below configuration, I am getting an error. I've followed the typical steps, but I'm still getting the error. What I've tried: Set up a SQL Server authentication login for the database Enable SQL Server authentication on the server Enable TCP/IP on the server Restart the Windows services Restart the SQL Server through SQL Server Management Studio Verify ability to log in through SQL Server

Electron - throws Not allowed to load local resource when using showOpenDialog

泪湿孤枕 提交于 2020-12-06 04:07:23
问题 I just wanted to use showOpenDialog and load an image. But when I select an image app will crash. main.js: ... ipcMain.on('open-file-dialog', function (event) { const window = BrowserWindow.getFocusedWindow(); dialog.showOpenDialog(window, { properties: ['openFile'] }, p => { console.log(p) }); }) renderer.js: document.querySelector('#select-image').addEventListener('click', function (event) { ipcRenderer.send('open-file-dialog') }); When I select anything this error shows in console : Not

Electron - throws Not allowed to load local resource when using showOpenDialog

别来无恙 提交于 2020-12-06 04:00:41
问题 I just wanted to use showOpenDialog and load an image. But when I select an image app will crash. main.js: ... ipcMain.on('open-file-dialog', function (event) { const window = BrowserWindow.getFocusedWindow(); dialog.showOpenDialog(window, { properties: ['openFile'] }, p => { console.log(p) }); }) renderer.js: document.querySelector('#select-image').addEventListener('click', function (event) { ipcRenderer.send('open-file-dialog') }); When I select anything this error shows in console : Not

开发者实测 M1 芯片:除了大型应用程序启动慢点,整体性能优秀!

限于喜欢 提交于 2020-12-05 11:07:41
来源|CSDN 作者|Peter 译者|弯月 苹果新出的M1芯片推出已经有一段时间了,这个让人兴奋的Mac专用芯片对于开发者来说究竟是不是友好?PSPDFKit的创始人、开发者Peter Steinberger购置了一台新版MacBook Air,从开发者的角度进行了测试。测试结果如何?快来看看吧!‍‍‍ 以下为译文: 最近大家都因为苹果的新 M1 芯片而兴奋不已。我也买了一台 MacBook Air 16GB M1 版,想看看是否能当作主力开发机使用。下面是我在测试了一个星期之后的报告。 01 Xcode Xcode 在 M1 上的运行速度非常快。编译 PSPDFKit PDF SDK( debug, arm64 版)几乎能与加载了目前最快的英特尔芯片的 MacBook Pro 媲美, 前者的编译时间是 8 分 49 秒,后者是 7 分 31 秒。 作为比较,我的黑苹果编译同样的项目需要不到5分钟。 对于一台无风扇的机器来说,这已经非常了不起了。苹果的上一款无风扇 MacBook 是 2017 年的 12 寸版本,用它编译同一个项目需要 41 分钟。 绝大多数测试都能通过,尽管我发现了我们之前没有注意到的一些针对 arm64 的错误,因为我们的 CI 并没有真正在 arm64 的硬件上运行过测试。模拟器采用与真实设备同样的架构很有好处,可以帮我们找到更多错误。 iOS 14

vue-electron脚手架安装及说明 打包基于Vue的 桌面应用程序

做~自己de王妃 提交于 2020-12-05 00:41:21
今天这篇文章是讲述一下 融合了vue-cli+electron的一种新的脚手架,省去许多繁琐配置,即vue-electron。 下面就说一下安装和使用,假设你的电脑已经安装node.js,并且已经全局搭建好vue-cli脚手架,如果没有的话,打开终端:$npm install --global vue-cli 全局安装。 1.新建文件夹,cd 到你将要安装的文件夹目录,$vue init simulatedgreg/electron-vue 这一步骤极其相似于当初安装vue-cli脚手架时,一个一个步骤来,截几张图 类似于这样 选择 enter yes 或者 no 看自己的选择 注意这一步呢,我选择了electron-packager 项。到这里你就可以看到,本来的空文件夹里现在新建了vue-electron基础文件 2.$npm install 这一步主要是安装依赖,耗时有点久。完毕后项目内多了node_modules 文件夹,里面东西较多。如图: 3.$npm run dev 会出现的 界面如图:右下角是一起出来的控制台 哈哈,完美呈现出来桌面应用。 4.打包。先看看项目package.json文件截图 scripts内各种打包命令,其中就包括Mac、Windows、Linux三大平台。例如我想在Mac上打包运行,$npm run build:darwin

How to manage configuration for Webpack/Electron app?

北战南征 提交于 2020-12-01 09:48:49
问题 I am using Webpack 2 and Electron to build nodejs application on Mac. In my project in the root I have directory 'data' where I store configuration in a json like data/configurations/files.json (in practices there are different files with dynamic names) After webpackaing though when I call: fs.readdirSync(remote.app.getAppPath()); to get files in the root I get only these packed: [ "default_app.js", "icon.png", "index.html", "main.js", "package.json", "renderer.js" ] path.join(remote.app

How to manage configuration for Webpack/Electron app?

我与影子孤独终老i 提交于 2020-12-01 09:48:41
问题 I am using Webpack 2 and Electron to build nodejs application on Mac. In my project in the root I have directory 'data' where I store configuration in a json like data/configurations/files.json (in practices there are different files with dynamic names) After webpackaing though when I call: fs.readdirSync(remote.app.getAppPath()); to get files in the root I get only these packed: [ "default_app.js", "icon.png", "index.html", "main.js", "package.json", "renderer.js" ] path.join(remote.app