Rapid Widget Development App (RWDA) on Ubuntu 14.04

  • 1
  • Problem
  • Updated 4 years ago
  • In Progress
Hello, I am trying to develop my own widget and I am having trouble setting up the development environment on Ubuntu 14.04. According to the RWDA web page I need to unzip the install package and run "nw", but there is no such file in the package. The package contains:  icudtl.dat, libffmpegsumo.so,  nw.pak, and  rv-widget-dev-app. I tried to run "rv-widget-dev-app" but I get the error "error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory".

I am actually a pretty decent software developer and linux system administrator, and it would be really nice if a few more bread crumbs of information were included on how to create a hello world widget. AKA a tutorial.

Actually, all I want to do is modify the existing web page widget to have an option for a 5 second refresh. It looks like it is going to take 30 seconds to make that change, but hours to set up the development environment.

James
Photo of James B

James B

  • 170 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Alan Clayton

Alan Clayton, Official Rep

  • 8,788 Points 5k badge 2x thumb
Hi James, take a look at the Web Page Widget ReadMe in the repo here, https://github.com/Rise-Vision/widget-web-page and let me know if that helps. You can fork that repo and make changes as necessary. Let us know if you have any problems. Thanks!
Photo of James B

James B

  • 170 Points 100 badge 2x thumb
Actually, I was trying to install the preview app first (https://github.com/Rise-Vision/widget-preview), but I tried the web page widget as you suggested first and I ran into errors installing that as well. I keep getting errors about node dependencies, and other errors about node not being available. I have now tried three different ways to install a node development environment and all I get is different npm errors. I have a stock install of Ubuntu 14.04, so I was wondering if anybody was developing with that OS, and if so if they had any advice. I have extensive experience developing with Java, perl, python, etc, but no experience with node, angular, etc. I am uses to just being able to apt-get install whatever I need, so not being able to even start on this project is a bit frustrating.
Photo of James B

James B

  • 170 Points 100 badge 2x thumb
OK, so soft linking /usr/bin/nodejs to /usr/bin/node got me further, but now I'm stuck on:

    pm ERR! peerinvalid The package chai does not satisfy its siblings' peerDependencies requirements!
    npm ERR! peerinvalid Peer chai-as-promised@4.1.1 wants chai@>= 1.7.0 < 2
    npm ERR! peerinvalid Peer karma-chai@0.1.0 wants chai@*
    npm ERR! peerinvalid Peer sinon-chai@2.7.0 wants chai@>=1.9.2 <3

So since I'm stuck for now I'm going to start looking into Google Gadgets.
Photo of Matthew Fisher

Matthew Fisher

  • 1,420 Points 1k badge 2x thumb
James,

I'm not sure if this will solve the problem for you, but among the less intuitive things that I had to apt-get for my environment (that were not handled as an automatic dependency or specifically mentioned) were nodejs-legacy and ruby-dev.

Nodejs-legacy will eliminate the need for that symlink, so you may want to remove it so it doesn't cause any additional issues.

Let me know if it helps!

Thanks,

Matthew
Photo of James B

James B

  • 170 Points 100 badge 2x thumb
Matthew, thanks, that did indeed provide the symlink, but I am still getting the dependency issue. Not knowing jack crap about node, I tried adding &quote; "chai": "~1.9.2", &quote; to the top of the devDependencies list in package.json and it seems to have compiled. Or completed. Or whatever.

So now that I have the web page widget, uhh, apparently happy, back to my original question please. How do I install the RWDA on Ubuntu/Linux? The doc refers to an executable that does not exist. And there isn't any documentation on the next step after that.
Photo of James B

James B

  • 170 Points 100 badge 2x thumb
OK, more progress. It turns out that nw is a tool and you run "npm install -g nw" to install it. But the binary still doesn't work because it is missing some files that nw uses. But if you clone the widget preview, build it, and run it, it works. Go team! Running gulp tests fail, which is a problem because I think I have found a rather large bug and supposedly no changes will be accepted unless all the tests pass. But at least now I can use my own version of the widget now.
Photo of Matthew Fisher

Matthew Fisher

  • 1,420 Points 1k badge 2x thumb
James,

I spoke with Stuart about this after the github issue was opened (https://github.com/Rise-Vision/widget-preview/issues/58) and was able to figure out the missing dependencies which prevented you from opening the binary, at least.

Some of these may already be installed if you are using the stock Ubuntu (I'm using a lightweight variant that didn't have these installed).  Also, the ":i386" suffix on each of these are only required if you are running the 64 bit version of the OS.

libgtk2.0-0:i386libatk1.0-0:i386
libpangocairo-1.0-0:i386
libgdk-pixbuf2.0-0:i386
libcairo2:i386
libpango-1.0-0:i386
libfreetype6:i386
libfontconfig1:i386
libglib2.0-0:i386
libglib2.0-0:i386
libxi6:i386
libnss3:i386
libnspr4:i386
libgconf-2-4:i386
libexpat1:i386
libxfixes3:i386
libxrender1:i386
libxcomposite1:i386
libxdamage1:i386
libxtst6:i386
libcap2:i386
libudev1:i386 
libnotify4:i386

The relevant command (to copy/paste):
sudo apt-get install libgtk2.0-0:i386 libatk1.0-0:i386 libpangocairo-1.0-0:i386 libgdk-pixbuf2.0-0:i386 libcairo2:i386 libpango-1.0-0:i386 libfreetype6:i386 libfontconfig1:i386 libglib2.0-0:i386 libglib2.0-0:i386 libxi6:i386 libnss3:i386 libnspr4:i386 libgconf-2-4:i386 libexpat1:i386 libxfixes3:i386 libxrender1:i386 libxcomposite1:i386 libxdamage1:i386 libxtst6:i386 libcap2:i386 libudev1:i386  libnotify4:i386
At that point, you should be able to execute ./rv-widget-dev-app

If there are still errors, check for additional missing libraries with the command
"ldd ./rv-widget-dev-app" and look for anything "not found".

Hopefully this will take care of it for you.

Matthew