Blog | Roadmap | Browse Source | View Tickets | Register | Trac Login | Forgot Password?

Developers installation guide - OSX

This document is a step by step guide for setting up your Mac to run ICE2 as a developer. These instructions use MacPorts to assist installation, to install without MacPorts see the wiki for alternative instructions.

Note: Root access is required to complete the set-up.

1 Required software

OpenOffice.org 3.0

Download and install OpenOffice.org 3.1

MacPorts

Download and install MacPorts from http://www.macports.org

You should add /opt/local/bin and /usr/local/bin to your shell's path.

export PATH=$PATH:/opt/local/bin:/usr/local/bin

If you are behind a web proxy set the http_proxy environment variable e.g.

export http_proxy=http://hostname:port 
  • or use the following structure to install packages:

sudo env http_proxy=http://proxyHostname:proxyPort port install $portName

Easy Install

Download and install easy_install

curl -O http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py -U setuptools

2 Install packages

Before doing any installing make sure you have Xcode installed, it is available on your OS disk and is needed to build the packages.

sudo port selfupdate
sudo port install subversion
sudo port install python25
sudo port install python_select
sudo port install py25-hashlib
sudo port install py25-libxml2
sudo port install py25-setuptools
sudo port install py25-cheetah
sudo port install py25-paste
sudo port install py25-gdata
sudo port install py25-pil

If MacPorts fails

If an install fails using MacPorts:

sudo port clean $port-name

Set MacPorts python 2.5 as the default

sudo python_select python25

2.1 Other packages

PyLucene

Homepage: http://pylucene.osafoundation.org/

This is required for searching.

  1. Download and extract PyLucene 2.3.x source from http://downloads.osafoundation.org/PyLucene/jcc/

  2. Build and install JCC (included with PyLucene)

    cd ${PYLUCENE_SRC_DIR}/jcc
    python setup.py build
    sudo python setup.py install
    cd ${PYLUCENE_SRC_DIR}
  3. Modify the Makefile for a MacPorts python 2.5 installation

    Example Makefile configuration

    # Mac OS X (MacPorts Python 2.5, Java 1.5)
    PREFIX_PYTHON=/opt/local
    ANT=ant
    PYTHON=$(PREFIX_PYTHON)/bin/python
    JCC=$(PYTHON) -m jcc
    NUM_FILES=1
  4. Make sure any proxy settings are registered in the .subversion/servers file in the user home directory.

  5. Build and install PyLucene

    make all
    sudo make install

pysvn

Homepage: http://pysvn.tigris.org/

  1. Download and extract pysvn 1.6 source from http://pysvn.tigris.org/project_downloads.html

  2. Build and install pysvn

    cd ${PYSVN_SRC_DIR}/Source
    python setup.py configure
    sed -i .backup -e "14s@\(.*\) /opt/local/lib/libsvn_ra_dav-1.a \(.*\)/opt/local/lib/libdb-4.3.a \(.*\)@\1 \2 \3
     /opt/local/lib/libsvn_ra_neon-1.a
     /opt/local/lib/libsvn_ra_serf-1.a /opt/local/lib/libserf-0.a 
    /opt/local/lib/libsvn_fs_util-1.a /opt/local/lib/db46/libdb-4.6.a -lsasl2@" Makefile
    make
    sudo cp -r pysvn /opt/local/lib/python2.5/site-packages

py2app

Homepage: http://www.undefined.org/python/

This is only required for building the Mac OS X compiled binary.

  1. Download and install py2app

    sudo easy_install-2.5 -U py2app

openid

Homepage: http://openidenabled.com/python-openid/

This is only required if openid is used.

  1. Download and install openid

    sudo easy_install-2.5 python-openid

textile

Homepage: http://pypi.python.org/pypi/textile/

This is only required for conversion of wikitext to html

  1. Download and install textile

    sudo easy_install-2.5 textile

webDAV

Homepage: http://sourceforge.net/projects/pywebdav/

This is only required if ICE content is exported directly to a webDAV location.

  1. Download and install webDAV

    sudo easy_install-2.5 python_webdav_library

pyPdf

  1. Download and install pyPdf

    sudo easy_install-2.5 pyPdf

curl

  1. Download and install curl

    sudo easy_install-2.5 pycurl

Reportlab

  1. Download and install ReportLab

    sudo easy_install-2.5 Reportlab

foresite

Homepage: http://code.google.com/p/foresite-toolkit/

This is only required for constructing, parsing, manipulating and serializing OAI-ORE Resource Maps.

  1. Download and install rdflib2.4.0

    sudo easy_install-2.5 -U rdflib==2.4.0
  2. Download and install lxml

    sudo easy_install-2.5 -U lxml
  3. Download and extract foresite-0.9 from

    http://foresite-toolkit.googlecode.com/files/foresite-0.9.tgz

  4. Install foresite

    cd ${FORESITE_SRC_DIR}
    sudo python ./setup.py install

2.2 Verify the packages are installed

The Python packages can be verified by:

python
>>> import lxml
>>> import textile
>>> import openid
>>> import rdflib
>>> import foresite
>>> import gdata
>>> import libxml2
>>> import lucene
>>> import paste
>>> import py2app
>>> import pysvn
>>> import Cheetah
>>> import Image

3 Configure OOo

  1. Open Configure OpenOffice.org

  2. Click OK to enable macros.

  3. Change Macro settings to Medium or Low

    Tools > Options > Security > Macro Security > Select Medium or Low > OK

  4. Restart OpenOffice

  5. From the menu, select ICE...Change port

  6. Enter 2002

  7. Close the document

  8. Restart the OpenOffice

  9. To edit documents using ICE styles install the word processor toolbars.

4 Source code

  1. Checkout the source code:

    svn co http://ice.usq.edu.au/svn/ice/trunk/apps ice-source
  2. Run ICE from the source

    cd ice-source/apps/ice
    ./ice.sh

5 Configure ICE

ICE uses a subversion repository to access it's content for editing, you will need to have the URL for the location of the subversion repository before proceeding.

See how to setup an ICE repository.

5.1 Configure ICE

  1. Start the ICE server see 4 (above)

  2. Go to http://localhost:8000/edit-config

    Config editor page will load

  3. Enter SVN URL in the New repository URL: field or fill in the information required under Advanced repository settings

  4. Click Save and then click Close editor.

  5. Enter your username and password for the SVN URL provided.

    ICE will then checkout the content from the given SVN URL.

5.2 Add document templates

Before you can create documents using ICE you will need to add some ICE templates.

  1. Create a folder called templates in the root of your repository. For example if your content was located in ~\ICE\MyFiles make the directory ~\ICE\MyFiles\templates

  2. Download either an OpenOffice.org template (Default.odt) and/or Word template (Default.doc) into the templates directory you just added. Change these files or add others into the template directory as required.

    You should now be able to create new files using the Add tab in ICE.

previous up next