Wednesday, October 17, 2012

Running webinos widget browser with custom sources

Having installed the webinos widget browser on windows it works fine but if you want to run it using the latest webinos sources from the repository or even use your own custom version, then you need to do some more steps.
So here's the process.

  • Git clone and setup the latest webinos sources (Windows instructions). From now on I will refer to it as working webinos.
    This folder on my system is: C:\webinos\webinos-platform\
  • Grab and install the latest webinos installer. From now on I will refer to it as installed webinos.
    This folder on my system is: C:\Program Files (x86)\webinos\
  • Stop the installed service "webinos pzp" from the service manager. You can also change it to manual start up.
  • Open a console and head to the working webinos root folder.
  • You need to install some node modules so execute the following:
    npm install express@3.0
    npm install coffee-script
    npm install node-expat
    npm install jade
  • You also need dcrypt and zipfile but go ahead and copy them from the installed webinos folder under the node_modules folder to your working webinos folder's node_modules.
  • Now you are ready to fire up you pzp in the console from the working webinos directory with the --widgetServer switch which is required for the webinos browser to listen to. eg:
    "C:\Program Files (x86)\webinos\bin\node.exe" webinos_pzp.js --widgetServer
  • Enjoy the widget browser with your custom webinos sources by clicking on the Start menu navigating to the webinos folder and clicking the webinos shortcut.
Note that i have used the node that comes with the installer. This is mandatory at the moment as it includes a patch needed by the dcrypt module. If you don't care about the digitally signed widgets or you want to test another version of node, you will have to disable the dcrypt module and also copy some files next to your node executable.
  • In order to disable dcrypt i used an ugly hack of my own that it may brake staff. So I opened this file: "C:\webinos\webinos-platform\node_modules\dcrypt\dcrypt.js" and added the following lines on top:
    module.exports = {};
    return;
  • The files you need to copy are related with the zipfile module and are the "zip.dll" and "zlib1.dll". The origin path was C:\Program Files (x86)\webinos\bin and i copied them to my own node path: C:\webinos\node\Release

No comments: