Notes and tips on development of Evergreen ILS.

Before Starting with Evergreen development, please read the dev:git page on the Evergreen Wiki.

Getting the Master

cd /usr/src
git clone git://git.evergreen-ils.org/OpenSRF.git
chown -R opensrf:opensrf ./OpenSRF
git clone git://git.evergreen-ils.org/Evergreen.git ./Evergreen
chown -R opensrf:opensrf ./Evergreen

Now Hack, following the coding standards evergreen-ils.org/dokuwiki/doku.php?id=code_formatting_standards

Hacking for Commit

Follow these steps to create a bug in Launchpad, fetch the git master, hack it and create a patch

Evergreen Working Repository

The Evergreen team maintains a hosted Working repo, contributors should send their work in a head ref like user/$name/lp1234567-fix-things. Sign-off on your commmits (-s)

$ cd /usr/src/Evergreen
$ git checkout master && git pull
$ git checkout -b lp1234567 origin/master
## Edit
$ git commit -as
$ git push working lp1234567:user/$name/lp1234567

Hacking Evergreen w/Github

One super easy way to get working with Evergreen is to fork the project on github, then start hacking. Sign in to github, then fork the evergreen project - we called ours evergreen-edoceo.

~ $ cd /usr/src
. $ git clone git@github.com:edoceo/evergreen-edoceo.git
. $ cd evergreen-edoceo/
. $ git remote add upstream git://github.com/evergreen-library-system/Evergreen.git
. $ git fetch upstream
. $ git merge upstream/master

Now it's time to create a branch, edit the code-base as necessary, then commit that stuff back to the core. First checkout your new branch, to keep things clean. Then hack away, but make sure your code looks nice :0 When finished commit to your branch and then push that back up to github

Sync you master to the Evergreen master

. $ git checkout master
. $ git fetch upstream
. $ git merge upstream/master

Make the branch, hack and push back

. $ git checkout -b lp921806
. $ git commit ...
. $ git commit ...
. $ git fetch upstream
. $ git merge upstream/master
. $ git commit ...
. $ git commit ...
. $ git push origin

Update from the Evergreen Master, push back to your github, rebase, hack and push to your github.

. $ git checkout master
. $ git pull upstream master
. $ git push origin
. $ git checkout my_work
. $ git rebase master
. $ git commit ...
. $ git push origin

Running the Evergreen Client

If you are behind a proxy you may need to try this

Steps:
1) check the hostname by using it as url, are you able to connect to the server ??
2) If yes, then type about:config as url in firefox and type the word proxy to filter 
3) whatever comes you just need to add those things in your [client_package]/default/preferences/prefer.js 
4) restart the client again

Staff Client Console

This starts the staff client with a console window, showing some debug spew and some dump() information from the javascript. It's similar to debugging other xulrunner based applications/components, such as Firefox extensions.

cd "c:\program files\evergreen staff client 2.1"
xulrunner\xulrunner.exe application.ini -console

Staff client also runs nicely under Linux

cd /opt/evergreen/staff_client
~ $ ./xulrunner-bin  --app ./eg/application.ini --ilshost evergreen-server --ilsuser egsa --ilspassword egpw

Wiki about debug console

API Introspection

The srfsh tool as well as this XSL thing can show you details about the API. See the reference at demo.ils.edoceo.com/opac/extras/docgen.xsl

The docgen.xsl can be installed on your own system like so (assuming the Evergreen server and all that is running).

cp /usr/src/OpenSRF/src/extras/docgen.xsl \
    /openils/var/web/opac/extras/docgen.xsl

Now navigate to the evergreen server /opac/extras/docgen.xsl. The application name should be one of the items listed in opensrf.xml.

See Also