Requirements
============
This software uses several innovative development paradigms. As a result it 
has rather overwhelming installation instructions. Sorry about that.

* Zope 2.7.3 or later (2.8.1 recommended).

* Zope X3.0.0, with its src or lib/python directory on PYTHONPATH, 
  for instance by using 'path' in zope.conf (This is included in Zope 2.8).

* CPS 3.2.4 or 3.3.5. (3.3.5 recommended)
  CPS 3.3.6 and later includes CPSSharedCalendar.

The following requirements are usually bundled together with CPSSharedCalendar 
in a CPSSharedCalendar-bundle-x.x.x.tgz file. If you do not have that bundle
it's probably easier to just get the bundle than to try to install every 
required package separately:

* Five 1.0.2. Five can be found here: http://codespeak.net/z3/five
  Five 1.0.2 is included with Zope 2.8.1.

* CMFonFive. 1.1.0 or 1.2.0. 
  For CPS 3.2.4 you need CMFonFive 1.1.0:
  http://codespeak.net/z3/cmfonfive/release/CMFonFive-1.1.0.tgz
  
  For CPS 3.3.5 or later you need CMFonFive 1.2.0:
  http://codespeak.net/z3/cmfonfive/release/CMFonFive-1.2.0.tgz
  
* CPSonFive 1.0.0 or later (1.2.0 recommended).

* iCalendar 0.10. 
   http://codespeak.net/icalendar/iCalendar-0.10.tgz

* CalCore 1.3.0.

* CalZope 1.3.0 or later (1.3.2 recommended).


Intallation
===========

1. Install Zope 2. The recommended place is to install it in 
   /opt/Zope-2.7/ (or 2.8 if you use Zope 2.8).

   Create a Zope 2 instance by running /opt/Zope-2.7/bin/mkzopeinstance.
   Lets say you install it to /home/zopes/calendar.

2. (You can skip this if you run Zope 2.8) Install Zope 3. 
   The recommended place is to install it in /opt/ZopeX3-3.0.0/ 
   
   Edit your Zope2 instances config-file (/home/zopes/calendar/etc/zope.conf)
   to include Zope3s lib/python directory in the Python path by including 
   the following line:

   path /opt/ZopeX3-3.0.0/lib/python/

3. Install CPS. 

   - cd to your zope instace.
   - tar -xzf CPS-3.xxx.tgz or unzip CPS-3.xxx.zip
   - Start or restart your Zope server.
   - Go to the ZMI with a manager login.
   - Create a "CPSDefault Site".

4. Install CPSSharedCalendar
   Expand the CPSSharedCalendar bundle, or CPSSharedCalendar and all it's 
   required products into the Zope instance Products directory. Restart Zope.
   
   If you have CMFQuickInstaller installed, you can now use that to install 
   CPSSharedCalendar.
   If not, create an External method in the site root, which has 
   "CPSSharedCalendar.install" as the module and "install" as the method name,
   and run that script by clicking the "Test" tab.

5. Log in to CPS.
   Go to CPS in your browser and log in to create your home area, including
   the calendar. If you are already logged in, you can log in again by typing
   "login_form" at the end of the url, and use that form to log in. You'll 
   need to click on a link after logging in to see the link to your calendar, 
   which should be in your left "user" side bar.


Upgrade from earlier versions
=============================
1. To upgrade from CPSSharedCalendar earlier than 1.2.0, upgrade all the dependant
   products to the versions listed above (if you get this in a bundle, they are 
   all included).

2. Then create an External method in the site root, which has 
   "CPSSharedCalendar.upgrade" as the module and "upgrade" as the method name,
   and run that script by clicking the "Test" tab.

   A log of what was upgraded will be printed.


Migration from CPSCalendar
==========================
WARNING! This migration is destructive! It will delete all your old calendar
objects and replace them with new. Although great care and testing has been 
taken to ensure that the migration process migrates all data to the new 
calendars, this can never be made 100% foolproof. 

You are recommended to try this process out on a copy of your production 
system first, and verify that the calendar data is correct. Always make 
backups before upgrading production systems. 

1. Make sure your CPSCalendar is version 1.15.0 or later. This is 
   necessary since the migration depends on the correct export of data
   from CPSCalendar.
   
   Installing the latest version only requires you to replace the CPSCalendar
   directory with the latest version and restart the server.

2. Expand the CPSSharedCalendar bundle, or CPSSharedCalendar and all it's 
   required products into the Zope instance Products directory. Restart Zope.
   
3. If you have CMFQuickInstaller installed, you can now use that to install 
   CPSSharedCalendar.
   If not, create an External method in the site root, which has 
   "CPSSharedCalendar.install" as the module and "install" as the method name,
   and run that script by clicking the "Test" tab.

4. Create an External method in the site root, which has 
   "CPSSharedCalendar.upgrade" as the module and "migrate_from_cpscalendar" 
   as the method name,  and run that script by clicking the "Test" tab.
   If it exits without an error message, the upgrade worked.
