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.
Download and extract PyLucene 2.3.x source from http://downloads.osafoundation.org/PyLucene/jcc/
Build and install JCC (included with PyLucene)
cd ${PYLUCENE_SRC_DIR}/jccpython setup.py build
sudo python setup.py install
cd ${PYLUCENE_SRC_DIR}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
Make sure any proxy settings are registered in the .subversion/servers file in the user home directory.
Build and install PyLucene
make all sudo make install
pysvn
Homepage: http://pysvn.tigris.org/
Download and extract pysvn 1.6 source from http://pysvn.tigris.org/project_downloads.html
Build and install pysvn
cd ${PYSVN_SRC_DIR}/Sourcepython 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.
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.
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
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.
Download and install webDAV
sudo easy_install-2.5 python_webdav_library
pyPdf
Download and install pyPdf
sudo easy_install-2.5 pyPdf
curl
Download and install curl
sudo easy_install-2.5 pycurl
Reportlab
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.
Download and install rdflib2.4.0
sudo easy_install-2.5 -U rdflib==2.4.0
Download and install lxml
sudo easy_install-2.5 -U lxml
Download and extract foresite-0.9 from
http://foresite-toolkit.googlecode.com/files/foresite-0.9.tgz
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
Click OK to enable macros.
Change Macro settings to Medium or Low
Tools > Options > Security > Macro Security > Select Medium or Low > OK
Restart OpenOffice
From the menu, select ICE...Change port
Enter 2002
Close the document
Restart the OpenOffice
To edit documents using ICE styles install the word processor toolbars.
4 Source code
Checkout the source code:
svn co http://ice.usq.edu.au/svn/ice/trunk/apps ice-source
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
Start the ICE server – see 4 (above)
Go to http://localhost:8000/edit-config
Config editor page will load
Enter SVN URL in the ‘New repository URL:’ field or fill in the information required under ‘Advanced repository settings’
Click ‘Save’ and then click ‘Close editor’.
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.
Create a folder called ‘templates’ in the root of your repository. For example if your content was located in ~
\ICE\MyFilesmake the directory ~\ICE\MyFiles\templatesDownload 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.






