-
Martin Aspeli's manual setup steps
last modified June 9, 2007 by optilude
1. You need to have your theme (static HTML) running somewhere. You
can use the Apache web server that comes with OS X (ends up on
http://localhost) or another server or a local apache install.
2. You need workingenv.py (colorstudy.org), libxml and libxslt
(xmlsoft.org, latest versions).
3. We are now going to create a workingenv sandbox for all the code:
$ python workingenv.py deliverance-env
4. I don't know if this is strictly necessary, but just to be safe,
edit the script deliverance-env/activate and add the following two lines
at the bottom:
export LD_LIBRARY_PATH=/Users/optilude/deliverance-env/lib
export DYLD_LIBRARY_PATH=/Users/optilude/deliverance-env/lib
Obviously, you'll need to change the first part of the paths.
5. Activate the workingenv:
$ cd deliverance-env
$ source bin/activate
Note that at this point, the PATH and PYTHONPATH refer to this
environment, and anything you do in *this terminal window* will be
relative to this environment. You can run 'deactivate' to turn it off,
or just close the window. Doing it this way ensures we don't mangle your
global environment.
6. Unpack the sources inside deliverance-env
$ mkdir tarballs
$ cd tarballs
$ mv ~/Desktop/libxml2-2.6.27.tar.gz .
$ mv ~/Desktop/libxslt-1.1.20.tar.gz .
$ tar xzf libxml2-2.6.27.tar.gz
$ tar xzf libxslt-1.1.20.tar.gz
7. Build libxml, make sure it gets installed in the sandbox
$ cd libxml2-2.6.27
$ ./configure --prefix=/Users/optilude/deliverance-env
$ make
$ make install
Note that you don't need to be root for any of this!
8. Build libxslt, referencing the libxml install and going into the
sandbox
$ cd ../libxstl-1.1.20
$ ./configure --prefix=/Users/optilude/deliverance-env
--with-libxml-prefix=~/Users/optilude/deliverance/deliverance-env/
$ make
$ make install
9. Install lxml using easy_install (this is where it's really
important that you did the "source bin/activate" step!)
$ easy_install lxml
10. Check out deliverance
$ cd /Users/optilude/deliverance-env/src
$ svn co http://codespeak.net/svn/z3/deliverance/trunk deliverance
$ cd deliverance
$ python setup.py develop
11. *In a different terminal Window*, start Zope
(bin/instance fg in the buildout directory)
At this point, we should have Apache with the theme file running on
http://localhost and Zope with Plone running at
http://localhost:8080/test (assuming Zope is at port 8080 and test is
the name of the Plone instance).
We will now start deliverance!
12. First, we need a rule file.
$ cd /path/to/deliverance-env
$ mkdir deliverance-rules
$ mv ~/Desktop/test.xml deliverance-rules/
13. Then we start deliverance-proxy
$ ./bin/deliverance-proxy --theme=http://localhost/theme.html
--serve=localhost:5001 --proxy=localhost:8080
--rule=file:///Users/optilude/deliverance-env/deliverance-rules/test.xml
Again, adjust paths as necessary. This says:
- Make deliverance serve on http://localhost:5001
- Proxy from Zope at http://localhost:8080
- Blend using the rule file test.xml
Now, if you go to http://localhost:8080/test/ you should see Plone as
normal. But if you go to http://localhost:5001/test/ you should see it
merged into the theme.html file. If there is an error, look in the
console where deliverance is running.
Inspecting the page with Firebug is probably useful.
Now, you'll notice that the rule file sucks all the CSS and JS from
Plone into the page. Therefore, if you want to turn off Plone's basic
theme so that it doesn't interfere with your own, go to portal_css in
the ZMI and untick base.css and public.css and click Save.
Note that if you want to start deliverance again, you'll need to:
$ cd /Users/optilude/deliverance-env
$ source bin/activate
$ $ ./bin/deliverance-proxy --theme=http://localhost/theme.html
--serve=localhost:5001 --proxy=localhost:8080
--rule=file:///Users/optilude/deliverance-env/deliverance-rules/test.xml
In other words, you need to activate the environment first. And you'll
find it much easier if you always use one terminal for deliverance and
another one for Zope.