Giter Club home page Giter Club logo

nwjs_rpi's Introduction

NW.js port for Raspberry Pi

NW.js (formerly node-webkit) binary compiled for the ARMv6 used by Raspberry Pi. It also runs on Raspberry Pi Zero, Raspberry Pi Zero 2, Raspberry Pi 2, Raspberry Pi 3, Raspberry Pi 4 and Raspberry Pi 400 since they are backward compatible with ARMv6. Other compatible hardware should also be able to run this binary (as Orange Pi, Banana Pi, etc.).

Instructions

  1. You need a package.nw which is just a .zip file with .nw extension that contains your project (at least, it needs an index.html and a package.json inside). The included package.nw is just an example using the Yasminoku game. Since this is only a port, if you need it you can go to the official web site of NW.js and read the documentation to know more about package.nw, package.json, etc.

  2. Optional: merge nw and package.nw into a single file with the following command:

    cat nw package.nw > Your_new_binary_file
    
  3. Edit fix_libudev.so.0 and fix_libudev.so.1 and replace Your_new_binary_file found in their code by the real name of your binary file (if you did not merge nw and package.nw together, then replace it by just nw).

  4. If you need it, give executable permissions (and other desired permissions) to Your_new_binary_file (or nw) using the chmod command (as root).

  5. Try to run the binary:

    ./Your_new_binary_file
    

    If you did not merge the nw and package.nw files in one single file (as explained in step 2), you should run this command instead:

    ./nw
    
  6. In the case the system complains about libudev.so.0 when you try to run the binary, just type the following command:

    ./fix_libudev.so.0
    

    Likewise, if needed, do the same for libudev.so.1 running this:

    ./fix_libudev.so.1
    

    Note: these two commands above will only work if you have followed the step 3 properly before. Each of them only needs to be executed once and never again. Only execute the script needed and do not execute the other script when not needed (i.e. no error is thrown).

    If the system complains also about libgconf-2.so.4, run this:

    sudo apt-get install libgconf-2-4
    

    If you see any error regarding NSS (as for example something like this: Failed to load NSS libraries), try running this:

    sudo ln -s /usr/lib/arm-linux-gnueabihf/nss/ /usr/lib/nss
    
  7. If all works well, you can distribute your project. You will need these files at least (in the same folder): libffmpegsumo.so, nw.pak and Your_new_binary_file (or nw and package.nw instead). I would recommend including fix_libudev.so.0 and fix_libudev.so.1 optionally (modified as explained in step 3) if you think others might need them.

Versions

node-webkit (now called NW.js) version: v.0.7.0-pre

Node.js version: v0.10.12

Tested on

  • "Raspberry Pi Model B Revision 2.0 Mounting holes" with 512MB RAM (000e revision) using Raspbian GNU/Linux 7 "wheezy" (Linux raspberrypi 4.1.19+ #858 armv6l GNU/Linux).
  • "Raspberry Pi 2 Model B PCB Revision 1.1" with 1024MB RAM (a01041 revision) using Raspbian GNU/Linux 8 "jessie" (Linux raspberrypi 4.9.35-v7+ #1014 SMP armv7l GNU/Linux).
  • "Raspberry Pi 3 Model B PCB Revision 1.2" with 1024MB RAM (a02082 revision) using Raspbian GNU/Linux 8 "jessie" (Linux raspberrypi 4.1.19-v7+ #858 SMP armv7l GNU/Linux).
  • "Raspberry Pi Zero W PCB Revision 1.1" with 512MB RAM (9000c1 revision) using Raspbian GNU/Linux 9 "stretch" (Linux raspberrypi 4.14.71+ #1145 SMP armv6l GNU/Linux).
  • "Raspberry Pi 3 Model B+ PCB Revision 1.3" with 1024MB RAM (a020d3 revision) using Raspbian GNU/Linux 9 "stretch" (Linux raspberrypi 4.14.71-v7+ #1145 SMP armv7l GNU/Linux).
  • "Raspberry Pi 4 Model B PCB Revision 1.4" with 8GB RAM (d03114 revision) using Raspbian GNU/Linux 11 "bullseye" (Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT aarch64 GNU/Linux).
  • "Orange Pi Zero (Allwinner H2+)" with 512MB RAM (hardware sun8i, 0000 revision) using Raspbian GNU/Linux 8 "jessie" (Linux OrangePizero 3.4.39 #2 SMP PREEMPT armv7l GNU/Linux).
  • "Orange Pi Zero Plus2 (Allwinner H3)" with 512MB RAM (hardware sun8i, 0000 revision) using Raspbian GNU/Linux 8 "jessie" (Linux OrangePI 3.4.112-opi #1 SMP PREEMPT armv7l GNU/Linux).

Compatibility

  • Raspberry Pi Zero, all models
  • Raspberry Pi Zero 2, all models
  • Raspberry Pi, all models
  • Raspberry Pi 2, all models
  • Raspberry Pi 3, all models
  • Raspberry Pi 4, all models
  • Raspberry Pi 400, all models
  • Other devices with compatible hardware (Orange Pi, Banana Pi, etc.)

Known issues

  • No sound available.

Credits

The original binary was shared by Nils Måsén "piksel" (aka "spaculo") at https://www.youtube.com/watch?v=MqNUYk9Y8jY so thank you very much! :)

This repository was created by Juan Alba Maldonado

nwjs_rpi's People

Contributors

jalbam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nwjs_rpi's Issues

Build instructions ?

Is it possible to share your build configurations to build it ourselves ? Would like to have the newest nwjs version

Audio is not defined

With a working Chrome app, using node-webkit on RaspPi, I get the following error :

Uncaught ReferenceError: Audio is not defined
It looks like the html5 audio API is off.

Crashes on start

nw crashes every time when started:

[871:0108/045032:ERROR:zygote_host_impl_linux.cc(144)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[873:0108/045034:ERROR:nss_util.cc(734)] Failed to load NSS libraries.

util.js:554
  ctor.super_ = superCtor;
              ^
TypeError: Cannot set property 'super_' of undefined
    at Object.exports.inherits (util.js:554:15)
    at Function.startup.initNw (node.js:796:34)
    at startup (node.js:67:13)
    at node.js:876:3

<audio> support

Hi
Thanks for the prebuilt binary.
I don't seem to be getting support (.ogg files) ?
Is it supported? or do I have a dependency issue ?

No such file or directory ERROR

I can't run the nw file.

I've changed it's running permissions (chmod +x nw), but even so it's stil won't run.

== ENV ==
Raspberry Pi 3 B

uname -a

Linux raspberry 6.1.61-v8+ #1696 SMP PREEMPT Thu Nov 2 16:44:46 GMT 2023 aarch64 GNU/Linux

ls -lastrh /opt/Webkit/nw

90M -rwxr-xr-x 1 root root 90M Nov 11 19:43 /opt/Webkit/nw

/opt/Webkit/nw

-bash: /opt/Webkit/nw: No such file or directory

strace -f -s 1000 /opt/Webkit/nw

execve("/opt/Webkit/nw", ["/opt/Webkit/nw"], 0x7ff865dea8 /* 21 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++

Can anyone help me ?

Daemonizing nwjs

I need to make a daemon with the nwjs window so that I can start or stop it from command line and automatically launch it on startup. I've unsuccessfully tried to do so with systemctl and init.d (I think they just didn't manage to get control of display, even by launching a shell with export DISPLAY=:0.0). Any clues?

Request to move repo under NW Userland

Hi @jalbam,

I'm part of a GitHub org called NW Utils. I'm trying to consolidate NW tooling so it's easier to find useful projects and give much needed life to stagnant ones. I also think this would be a great opportunity to exchange ideas and learn new things. Let me know what you think and if you’d be willing to.

Best Regards
Ayushman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.