Difference between revisions of "EPM Development"
(Created page with 'Category:EPM This page describes how to develop EPrints Package Management (EPM) extensions using a code versioning tool. The goal is to have your EPM source files managed …') |
(No difference)
|
Revision as of 13:40, 16 December 2011
This page describes how to develop EPrints Package Management (EPM) extensions using a code versioning tool.
The goal is to have your EPM source files managed through a code versioning tool and be able to edit them in a live system.
Create a blank EPM
Under Admin (System Tools) -> EPrints Bazaar (Developer Tools), enter a unique name for the package in Create a new EPM and click Create. For this howto we will call the extension "biscuits".
Add the blank EPM to SVN
From your EPrints root directory create a new SVN directory:
svn mkdir https://mysvn.example/biscuits -m " * Biscuits" svn checkout https://mysvn.example/biscuits lib/epm/biscuits
Add .epmi and cfg to SVN:
cd lib/epm/biscuits svn add biscuits.epmi cfg/ svn commit -m " * Biscuits EPM blank"
Add a plugin
We'll use the epm/biscuits directory to hold our other files to be managed by SVN.
cd lib/epm/biscuits mkdir -p lib/plugins/EPrints/Plugin/Export/ nano lib/plugins/EPrints/Plugin/Export/Biscuits.pm [ ... make a basic plugin ... ] svn add lib svn commit -m " * Biscuits export" cd ../../..
Use the link_lib argument with API:tools/epm to sym-link the plugin into your live archive:
./tools/epm link_lib biscuits
Finally, add your plugin to the list of files the biscuits EPM is tracking. In the Developer Tools screen for biscuits find the plugin and click to track it. (If the file does not appear you may need to refresh the file list by Save and Return and re-editing the EPM.)