NW.js FAQ - Forum

Forum Navigation
VisualNEO Products: Web, Win and PixelNEO
You need to log in to create posts and topics.

NW.js FAQ

What's NW.js?

NW.js is a framework for building desktop applications for Windows, Linux and Mac OS X, using web technologies. It includes Node.js with Chromium’s browser engine. It's main goal is to create applications that could not only load a local web site within an application window, but also interact with the Operating System via a JavaScript API. This JavaScript API could control visual aspects like window dimensions, toolbar and menu items, as well as provide access to local files on the desktop. These are things that can’t be done with a hosted web site, or even a locally hosted web site.

How do I deploy my VisualNEO Web App as a Desktop App for Windows?

From it's first release, VisualNEO Web offers the possibility to compile and deploy your App as a .exe executable file for Windows. Although very easy to accomplish, it's a quite limited option as it depends on old Internet Explorer engine and do not offer any way to interact with the Operating System (no file access for example).

From version 20.2.29 VisualNEO Web can prepare your application to work as a NW.js Desktop App by following these easy steps on Windows:

  1. Download NW.js from it's official Website and unzip it.
  2. Inside the folder you have unziped NW.js, create a folder named package.nw.
  3. In Project > Properties > Platform Options > Web VisualNEO Web menu, check NW.js option.

    Compile to NW.js option in VisualNEO Web

  4. Go to Project > Compile/Publish menu and select Web Application option.
  5. Select your previously created package.nw as Build Folder and press Compile button.
  6. Run your application by double clicking nw.exe in your NW.js folder

Note that you can rename nw.exe and even change it's default icon using Resource Hacker or similar software.
For best comfort while testing your app, you can add nw.exe to the Tools menu.

How do I deploy my VisualNEO Web App as a Desktop App for Linux or Mac OS X?

On Linux the procedure is axactly the same as in Windows. Just copy your NW.js compiled App into a folder named package.nw. On Mac, put the files of your app into a folder named app.nw in nwjs.app/Contents/Resources/ and done.

Can I use Node.js programming language within VisualNEO Web?

Yes, just place your code between BeginJS and EndJS commands as you do with JavaScript.

Where are the specific NW.js VisualNEO Web commands?

They will be provided as plugins. Specific NW.js commands will be prefixed with "nw" and will not work on any other deployment options. These commands will allow file access (read and write) clipboard and printer access and much more. While we prepare all these plugins and commands you can do it right now by using Node.js and the NW.js API. You can even create your own plugins.

Where are the specific NW.js VisualNEO Web commands?

They will be provided as plugins. Specific NW.js commands will be prefixed with "nw" and will not work on any other deployment options.

Thanks for the heads up and your informative faq .. I had already started a plugin, finishing about 16 various commands last night.  Mostly for the OS and process functions to easily display information about the app environment.

When you get the time, would it be possible to have another button to launch a NW.js app from the toolbar rather than creating a tools link for each application on the menu?  A project option for the path/name of  nw.exe may be helpful.

thanks!

 

 

When you get the time, would it be possible to have another button to launch a NW.js app from the toolbar rather than creating a tools link for each application on the menu? A project option for the path/name of nw.exe may be helpful.

@darbdenral note that you can add Tools wich path is relative to the current project path using "%P".
Please, take a look at the attached capture. So you don't need a a new tool for each application, just one. You only need to keep allways the same folder structure relative to your project .neoapp file.

Uploaded files:
  • You need to login to have access to uploads.

That sounds great.  But I've not had any luck using that exact same command here.   %P\nw.exe I don't know why.  For testing, my project file and nw.exe files are both located in the same folder.  When launching from tools I get the Error message "Unable to launch program"  It only works if I include the full path to nw.exe from the tools menu.  Is there any error logging available I could tap into?

It's strange. It works fine for me. Just remember "%P" stores the current project path, so your project must be open and saved on the same folder before launching NWjs from the Tools menu.

Yes, it is weird..  I spent way too much time on it and gave up..  I even created a small program to log what was being sent as the %P parameter.  But I could only hard code my program path in the program field too, so I couldn't trap parameters being sent from there.

However, I was able to log the "%P" from the parameters field and I discovered it was sending a backslash on the end of the path.

Parameter 1 = D:\Documents\VisualNeoWeb\My Projects\Node Demo\

So maybe that's why it's failing, because %P\nw.exe  would essentially translate to
D:\Documents\VisualNeoWeb\My Projects\Node Demo\\nw.exe

Entering %Pnw.exe or "%P"nw.exe in the field  both fail too.  So then i thought, maybe it's something to do with the folder name having spaces because it does require the quotes to translate correctly.  So, I'm stumped.  It seems the extra backslash is likely the problem but only if it's not being checked for in your code.  But then why is yours working?

Anyways, you get the idea..  ;)  I dunno?

thanks!

When I execute my application (video application) in window with nwjs.exe, it is working but there is no VOLUME.

(see the attached picture)

It is the same problem with the nwjs.app for MAC.  There is no volume available.  The speaker is in grey state (like mute)

But when executing the "index.html" file, there is volume for both (Mac and Windows).

Uploaded files:
  • You need to login to have access to uploads.

Hi @rocote,

Please take a look here:
https://github.com/nwjs/nw.js/wiki/Using-MP3-&-MP4-(H.264)-using-the--video--&--audio--tags

Please, it would be a good idea to open a different thread within this forum section for each issue.
Thank you!

Best regards.

Sorry Luis, thanks to make me remember.

 

Open chat
1
Do you need more info?
Hi, do you have any doubt?