B4J Library [BANano] NW.js - Wrapper

Discussion in 'B4J Libraries & Classes' started by Kiffi, Feb 6, 2019.

  1. Kiffi

    Kiffi Well-Known Member Licensed User

    Hello,

    in this posting I want to show how easy it is to create desktop applications (Windows, Linux, MacOS) with BANano and NW.js.

    Getting Started:
    1. Download NW.js (https://nwjs.io/) and unpack it at a location of your choice.

    2. Download the attached library zip and extract it to the internal library folder.

    3. Download the attached demo zip and extract it into a folder of your choice.

    4. Open the demo with B4J

    Before you start the demo, it is important that you adjust the variable NwJsFolder. Here you have to enter the folder where you unpacked NW.js.

    Now you can start the demo in Debug mode. After a short time the NW.js window should open. There are some basic examples of how to control NW.js:

    [​IMG]

    Since NW.js has a' built-in' NodeJS, you can also use appropriate commands (such as those of the filesystem) to communicate from BANano with the 'outside world'.

    Just give it a try. :)

    Have fun... Peter
     

    Attached Files:

    Last edited: Feb 6, 2019
    Johan Hormaza, jmon, amaxco and 16 others like this.
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    Holy smoke! I'm still trying to grasp what I am seeing here. This opens up a whole new world for B4X using BAnano.

    Definitely will study your library code

    Fantastic job @Kiffi!
     
  3. alwaysbusy

    alwaysbusy Expert Licensed User

    A fix in BANano is needed to let this also work in release mode. I'll post a new version of BANano tomorrow
     
  4. swissmade

    swissmade Active Member Licensed User

    Nice Job
     
  5. Michael1968

    Michael1968 Active Member Licensed User

    Hi,
    I get this error compiling the demo in debug mode:

    B4j 7.0
    Java 1.8
     
  6. Kiffi

    Kiffi Well-Known Member Licensed User

    i'm not the B4J expert, but to my knowledge it should be enough if you rebuild the library on your machine. To do this, unzip LibrarySourceCode.zip and load the project into B4J. Then set the B4J mode to 'Release' and press <F5>. After BANano has created the required files, press <Alt> + <F5> so that B4J can create the Jar file.

    Greetings ... Peter
     
    joulongleu likes this.
  7. Michael1968

    Michael1968 Active Member Licensed User

    Hi Kiffi,
    the problem was in step 2

    delete the library files in the internal library folder
    and put them into the addional folder solved the problem.

    michael
     
    Kiffi likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice