Difference between revisions of "EPM Development"

From EPrints Documentation
Jump to: navigation, search
(Add a plugin)
(Might as well just make this a redirect to My First Bazaar Package)
(Tag: New redirect)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:EPM]]
+
#REDIRECT [[My First Bazaar Package]]
 
 
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.)
 
 
 
[[File:Epm_development_files.jpg]]
 

Latest revision as of 12:31, 21 January 2022