node-webkit

node js - How do I create build for commercial usage?

笑着哭i 提交于 2019-12-10 18:06:13
问题 I am working on node js application and it is now ready to use. I want to make exe of this application so that it can be used for commercial usage. Up to now I have used enclose module using which I have compiled the code of application but I have found some issues in that (app got crash on idle condition). App is running good without enclose or compiled code. I have searched on google and found some alternate modules like JXcore, Node webkit and Electron etc. but JX core giving error same as

Node-Webkit start function in different window

大憨熊 提交于 2019-12-10 15:38:39
问题 My node-webkit application consists of a control window and a presentation window. The control window gathers data and eventually launches the presentation window via the window.open function. The presentation window now has access to some information in the global variable. Now I want to render a graphical representation of that information by creating SVG elements and so forth. I already have a javascript function to do exactly that, but I need some way of starting that function from the

Node-webkit child spawn UNKNOWN error

自古美人都是妖i 提交于 2019-12-10 14:39:10
问题 I'm trying to launch an .exe elsewhere on my Windows filesystem. spawn = require('child_process').spawn; game.process = spawn(path.join(config.values.armaPath, 'arma3.exe'), { detached: true }); I've wrapped it in a try/catch and the error I'm getting isn't helpful: Error {code: "UNKNOWN", errno: "UNKNOWN", syscall: "spawn", stack: (...), message: "spawn UNKNOWN"}code: "UNKNOWN"errno: "UNKNOWN"message: "spawn UNKNOWN" I've confirmed that the path.join to the .exe is correct. I've also tried

Accessing USB devices from node-webkit?

前提是你 提交于 2019-12-10 13:56:45
问题 I'm building a node-webkit app that needs to run on all 3 main desktop environments (windows, mac and linux) I need my app to connect to a plugged in USB device and I'm having a bit of trouble working out exactly how to go about this. Is there an npm that would work across all OS's? Could I get one built in C++ that would work? Is there anything built in to node-webkit for interacting with devices (Devices API?) Thanks in advance. 回答1: You're almost certain to need a C/C++ module to make this

使用Sublime快速开发node-webkit客户端程序

与世无争的帅哥 提交于 2019-12-10 08:11:24
在使用node-webkit进行客户端开发时,如何开发调试就成了一个比较麻烦的问题,通常来说,我们需要将Web程序代码写好后,将根目录打包成一个zip包,再将zip包拖拽到nw.js上进行运行;在刚开始学习node-webkit开发时,只知道用这样的方式调试程序,但显然这样很不优雅高效。 查阅官方文档后,实际可以使用Sublime这个文本编辑器进行开发调试,而不用反复的打包 Sublime text是非常优秀的跨平台编辑器用于开发node-webkit应用,首先要下载后在本机上安装。 下面说说在各大平台上使用、配置的具体内容(以sublime text 2为例) Mac OS X 1.下载node-webkit.app并放在/Application文件夹内 2.从sublime text 2菜单选择 Tools -> Build System -> New Build System 3.输入以下代码: { "cmd": ["node-webkit", "--enable-logging", "${project_path:${file_path}}"], "working_dir": "${project_path:${file_path}}", "path": "/Applications/node-webkit.app/Contents/MacOS/" } 注意

how to use node-webkit with express server?

自作多情 提交于 2019-12-10 04:19:14
问题 I am developing an app using nodejs and express. I want to export it as a package with node-webkit. How can I start server and run app with it ? 回答1: I am working on learning this myself. Here are the basics for converting an express app to a node webkit app. I will assume that you have a node.js app with two modules installed. The first being express.js and the second some template engine. I am using handlebars so I will use it for this example. I will also assume the app you want to convert

How to achieve persistent storage in NeDB?

我只是一个虾纸丫 提交于 2019-12-09 06:47:45
问题 I tried NeDB in node-webkit it's working fine on in memory data but not able to store in persistent storage. 回答1: definitely no node-webkit or nedb expert but this is how I did it and it worked. As already mentioned by mvanderw in the comments, definitely make sure to check the autoload option. This is for example my configuration for a simple node-webkit/ angular todo app: var Datastore = require('nedb'), path = require('path'), db = new Datastore({ filename: path.join(require('nw.gui').App

Windows user name variable and javascript

冷暖自知 提交于 2019-12-08 09:27:09
问题 I asked this question a few weeks ago and recently came back to it and solved it. I have a hidden input that looks like this: <input style="display:none;" class="fileDialog" type="file" nwworkingdir="C:\Users\" nwsaveas/> This opens a save dialog at the dir given to nwworkingdir . I would like the default location to be the user's Pictures directory but I am having trouble getting the system user name dynamically with javascript. I need the username because the path is usually C:\Users

node.js child process doesn't work in node webkit

白昼怎懂夜的黑 提交于 2019-12-07 12:22:59
问题 I made a small app with node webkit. Pre-packaging, it works fine. But after I zipped it and added it to Contents/Resources in node-webkit.app I get an error when I run the app. It opens fine, but the task it does involves child processes, and I get this error: Uncaught node.js Error Error: spawn ENOENT. I'm guessing it might be something related to the issue raised in this question: Node-Webkit Child Process Exec because my child processes are calling pdftk, a separate command line program.

Node WebKit and YouTube: chrome is not defined

♀尐吖头ヾ 提交于 2019-12-07 11:47:12
问题 I'm developing an app for Android , iOS , Mac OS and Windows using PhoneGap and Node-WebKit . This application has embedded youtube videos. These youtube videos are working fine in my Mobile app ( Android / iPhone ) using PhoneGap , but if I test it on my Mac (building the app using grunt node-webkit builder) I get the following error: Uncaught ReferenceError: chrome is not defined www-embed-player.js:184 I tried to check that line and there is some code like: chrome.cast.requestSession(v