Web IDE as an app! (node-webkit / nw.js) #123
Replies: 30 comments
-
Posted at 2015-10-12 by Ollie Coincidentally, I'd just ordered two more picos so this is great news - will check it out! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by @gfwilliams Thanks - hope it works out for you! I just wish I could easily package it up for all platforms, but because |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by Ollie Looking in the repo, I'm not seeing the "extras/create_nodewebkit.js" file. There's a bashfile that looks to be misnamed - create_nodewebit.sh. That the one? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by @gfwilliams I think you probably aren't on the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by Ollie No, thats not it, I'm looking in that branch. File definitely not there. I think you must mean the bash file, which seems to relate. Seems also i'll need to find a version of Xcode that'll install on 10.6.8 - as that is requirement to install the serialport package - which errors for me when I try it. I might just put this Mac in the bin ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by @gfwilliams Oh, sorry - misread your comment - the Really? XCode to install the serial port? That's pretty rough :( I honestly thought that the build process for Node.js on Mac would be nice and easy. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by Ollie Yes. Needs xCode Command Line Tools. No problems will get there. One other thing might want to add to the instructions - if cloning need to add the "--recursive" flag to get the submodule, otherwise it comes down with an empty EspruinoTools folder. I guess people might know this - I didn't. Assuming I can get XCode, are you wanting the community to build binaries and let you have them? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by @gfwilliams Thanks - i'll update the docs :)
That'd be great - I was hoping there was a better way of doing the builds (like some automated process I could run from my PC that would build all the packages) but it looks like that isn't the case because of the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by MrTimcakes Can Travis not prebuild Node-SerialPort? http://cylonjs.com/blog/2014/11/19/creating-multiplatform-precompiled-binaries-for-node-modules/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by Ollie Struggling.. so close but so far My issue seems to be that the instructions and the zip routine imply that after following the process "node_modules/serialport" should exist in the EspruinoWebIDE directory. It doesn't it is installed at ~/ If I move it in, I can build with the bash file and it does not complain about a missing folder and I can get the the IDE to load but it complains about not being able to find serial.js, so never moves beyond "searching" I'm not expecting any help with this, but if someone else on Mac Osx 10.6.8 has the opportunity to compile this I'd love to hear how they went on. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by @gfwilliams @ducky could work - looks like they use some other service for Windows compiles? I didn't think Travis did Windows VMs? @ollie - sorry to hear that - I'm not sure why node_modules would be in the wrong place. Could be some argument to Is it actually complaining about serial.js? Or |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-13 by Ollie "serialport" I'm pretty sure now you say. I may have mislead there. Re the placement. Should this be an NPM package, do we need to do npm init before all of the above? Would that get the file included in the correct path? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-14 by @gfwilliams I'm not really sure about the paths - I'm not a big node.js user, but... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-14 by Ollie Don't worry - back burnered for the moment. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-22 by Jammer First off, awesome product! I just found out about Espruino and I defo need to order 1 of those Picos! :D Back to the topic! Could you use serialport2 instead? It says it supports Mac OSX, linux, and Windows and doesn't seem to require the user do any manual preinstalls. Also take a look at electron.atom.io. Its got a lot of great features over nw.js :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-22 by Jammer lol ok, Serialport2 was merged into node-serialport and is being deprecated. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-22 by @gfwilliams Ahh, interesting. I did see Looks to me like it still uses native bindings, so would have the same issue. Maybe you could try and make a really simple Another option would be to actually distribute an Espruino binary for windows/mac/linux, and serve the Web IDE up via HTTP. It's got a certain appeal to it ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-29 by JGreen This is great news for my sysadmin guy right Gordon? Might cut out some of the quirks in Chrome? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-29 by @gfwilliams Yes - it'll just be one application to install, so assuming you can get him to do that it'll be a load better. And it won't randomly break. You haven't had any more issues with the IDE have you? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-29 by JGreen It was great thanks! :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-01 by OwenBrotherwood I am struggling, as usual.
Now I am getting a nw (just some missing libraries I need to find) Did I miss something obvious in the https://github.com/espruino/EspruinoWebIDE README.md? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-02 by @gfwilliams Which operating system is this on? You might be missing:
I'd work out which version of nw.js you need and install that directly from the nw.js site (not NPM). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by OwenBrotherwood OS: I did once try with Ubuntu for a week ago with bad results but I was new then. The other day was Bash on Ubuntu on Windows and I will now try again with the reference OS of Ubuntu 16.x and get back on my experience. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by oesterle @gordon, I was thinking about several similar frameworks with a lot of traction, large communities, and big name sponsorship. Have you checked out GitHub's Electron? It's used in building the popular, multi-language Atom editor. Also, there is Adobe PhoneGap, which targets iOS and Android devices, wrapping your HTML/JS/CSS in a mobile native app. (Disclosure: I helped create PhoneGap at the iOSDevCamp hackathon in 2008.) Additionally, Facebook's React Native might be interesting. Logic is in JavaScript, and UI elements are native to mobile. Adaptations are emerging for desktop macOS & Windows. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by OwenBrotherwood I wasn't gonna mention electron, yet. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams @oesterle yes, it can actually run under Electron right now as well - but the situation is actually even worse there :) The problem is getting to talk to the underlying hardware - as you say there are loads of solutions for packaging HTML out there already. Generally getting at the OS for stuff like Bluetooth LE requires native modules, and that means that if you insist on installing yourself from GitHub you need to have a build environment installed. I've pre-built everything for Windows so it should work fine if you just download the binaries from the Web IDE page, but I believe @OwenBrotherwood is trying to compile himself, and setting up a compile environment for Node.js in Windows is really painful. NW.js has the real benefit that it contains Chrome's extensions - that means that on Mac and Linux it 'just works' (assuming you have BLE set up right) without needing any other modules. It's only on Windows where there's no Web Bluetooth support that there's a big issue (although it'll still work for USB devices), but when Chrome finally adds Web Bluetooth support for Windows in the next few months it'll start 'just working' too - I think at that point it'll be the only sensible solution for this kind of thing. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by OwenBrotherwood node.js on windows is not painful : one just has to do it correctly :) nw.js was under my radar and I have to do a "catch up" in the area: I think that Gordon is usually right, so my "catch up" has to hurry up. electron is no bed of roses: I take Gordons comments very seriously. Background information: In general, I focus on Windows problem free usage (teachers) and will be doing chromebook (pupils) analysis so the kids can play and learn with teachers that can also follow what they are doing. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-03 by @gfwilliams Windows 10 x64 should work fine with the Web IDE download - it's just using from source that is painful - made worse by the fact that the node.js and NW.js/Electron V8 versions usually don't match, so you can't just use NPM to install the native packages. This is worth a look if you're interested in NW.js/Electron differences: http://tangiblejs.com/posts/nw-js-and-electron-compared-2016-edition |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by OwenBrotherwood It is "interesting" to install https://software.intel.com/en-us/intel-xdk (nw.js flagship from Intel for developement) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-02-07 by @gfwilliams Hi - can you post stuff like this somewhere other than the news thread? It's worth noting that NW.js for Windows will likely be just like you found Chrome was - it'll say it supports Web Bluetooth, but it doesn't do anything other than display the device chooser. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-12 by @gfwilliams
I just got the Web IDE working with node-webkit (now nw.js) - which means that soon it'll be available as a native (downloadable) app on Windows/Mac/Linux!
I don't have any packaged versions yet (all I have is x64 Linux, which I bet won't be helpful for many of you!) - unfortunately as it needs the platform-specific
node-serialport
library I have to work out how to include a build of that for each platform in the package (I wonder if anyone can help here?).For now, to make your own package you need to:
sudo npm install -g nw
npm install serialport
- it turns out there's a bit more to it (seeextras/create_nodewebkit.sh
for the magic commands)extras/create_nodewebkit.sh
And you now have a node-webkit package that you can run with
nw extras/espruino.nw
- and it should work just like the normal Web IDE - except hopefully with a working serial port :)Beta Was this translation helpful? Give feedback.
All reactions