Automatic Installation

Fast and easy way:

$ cd <IDE source>
$ curl -Ls http://tiny.cc/cawcodereview | sh

This will install Code Review extension and its dependencies Git and Notification extensions, install npm and bower dependencies and apply all patches.

If the automatic installation does not work for you, open a bug and use the steps below.

Manual installation

First, we will use jsontool in order to modify JSON-formatted configuration files, so first make sure it’s installed:

$ npm install -g jsontool

Code Review extension depends on 2 others, so first please install them:

So, first please install these extensions.

Notification extension

Clone the extension into your tree:

$ cd <IDE source>
$ git submodule add \
    https://github.com/korya/hp-ide-notification-extension.git \
    app/extensions/hpsw/notifications/1.00

Tell the server to load the extension in server/file-system/extensions/manifest.json:

$ json -I -f server/file-system/extensions/manifest.json \
  -E 'this.defaultExtension.push({"id":"notifications","version":1,"author":"hpsw"})'

In current implementattion, in addition to the installation of the extension, you have to apply a patch, that reserves a space for notification icon by putting a placeholder for it. To apply the patch:

$ cd <IDE source>
$ patch -p1 <app/extensions/hpsw/notifications/1.00/patch.d/00-notification-placeholder.diff

Git extension

Clone the extension into your tree:

$ cd <IDE source>
$ git submodule add \
    https://github.com/korya/hp-ide-git-extension.git \
    app/extensions/hpsw/git-service/1.00

Install the dependencies:

$ json -I -f package.json -E 'this.dependencies["git-rest-api"]="0.1.1"'
$ npm install git-rest-api@0.1.1

Tell the server to load the extension: - register server side code:

$ json -I -f server/file-system/config-files/config.json \
  -E 'this.modules["git-service"]="../app/extensions/hpsw/git-service/1.00/server"'
$ json -I -f server/file-system/extensions/manifest.json \
  -E 'this.defaultExtension.push({"id":"git-service","version":1,"author":"hpsw"})'

Code Review extension

Now you’re ready to install the Code Review extension itself. Clone it to your source tree:

$ cd <IDE source>
$ git submodule add \
    https://github.com/korya/hp-ide-code-review-extension.git \
    app/extensions/hpsw/code-review/1.00

Install the dependencies:

$ json -I -f package.json -E 'this.dependencies["socket.io"]="0.9.16"'
$ npm install socket.io@0.9.16
$ json -I -f bower.json -E 'this.dependencies["socket.io-client"]="0.9.16"'
$ bower install

Tell the server to load the extension: - register server side code:

$ json -I -f server/file-system/config-files/config.json \
  -E 'this.modules["code-review"]="../app/extensions/hpsw/code-review/1.00/server"'
$ json -I -f server/file-system/extensions/manifest.json \
  -E 'this.defaultExtension.push({"id":"code-review","version":1,"author":"hpsw"})'

In addition, you have to apply the following patches, providing a functionality that is still missing in a mainstream:

$ cat app/extensions/hpsw/code-review/1.00/patch.d/[0-9][0-9]-*.diff | patch -p1

Done

Good job!

Now you should have a source tree with a functioning Code Review system, and you can run the server:

$ cd ./server
$ node server