1 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
2 # This module is free software, and you may redistribute it and/or modify
3 # under the same terms as Python, so long as this copyright message and
4 # disclaimer are retained in their original form.
5 #
6 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
7 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
8 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
9 # POSSIBILITY OF SUCH DAMAGE.
10 #
11 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16 #
17 # $Id: __init__.py,v 1.5 2006-08-11 00:04:29 richard Exp $
18 #
19 __version__='1.1'
21 import os
22 # figure where ZRoundup is installed
23 here = None
24 if os.environ.has_key('INSTANCE_HOME'):
25 here = os.environ['INSTANCE_HOME']
26 path = os.path.join(here, 'Products', 'ZRoundup')
27 if not os.path.exists(path):
28 path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup')
29 if not os.path.exists(path):
30 here = None
31 if here is None:
32 from __main__ import here
33 path = os.path.join(here, 'Products', 'ZRoundup')
34 if not os.path.exists(path):
35 path = os.path.join(here, 'lib', 'python', 'Products', 'ZRoundup')
36 if not os.path.exists(path):
37 raise ValueError, "Can't determine where ZRoundup is installed"
39 # product initialisation
40 from ZRoundup import ZRoundup, manage_addZRoundupForm, manage_addZRoundup
41 def initialize(context):
42 context.registerClass(
43 ZRoundup,
44 meta_type = 'Z Roundup',
45 constructors = (
46 manage_addZRoundupForm, manage_addZRoundup
47 )
48 )
50 # set up the icon
51 from ImageFile import ImageFile
52 misc_ = {
53 'icon': ImageFile('icons/tick_symbol.gif', path),
54 }
57 # vim: set filetype=python ts=4 sw=4 et si