EduploneExam/Extensions Install.py,1.4,1.4.2.1
Nils Haagen <[email protected]> Sun, 02 Oct 2005 21:21:14 +0000
| Newsgroups | gmane.comp.web.zope.eduplone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/eduplone/EduploneExam/Extensions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3645/Extensions
Modified Files:
Tag: exam-1_1
Install.py
Log Message:
exam-1_1 init. moving to the next version...
Index: Install.py
===================================================================
RCS file: /cvsroot/eduplone/EduploneExam/Extensions/Install.py,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -C2 -d -r1.4 -r1.4.2.1
*** Install.py 8 Apr 2005 09:18:09 -0000 1.4
--- Install.py 2 Oct 2005 21:21:12 -0000 1.4.2.1
***************
*** 5,10 ****
#
# Generated:
! # Generator: ArchGenXML Version 1.4 devel 1
! # http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
--- 5,10 ----
#
# Generated:
! # Generator: ArchGenXML Version 1.4.0-beta2 devel
! # http://plone.org/products/archgenxml
#
# GNU General Public Licence (GPL)
***************
*** 25,31 ****
__docformat__ = 'plaintext'
__version__ = '$ Revision 0.0 $'[11:-2]
! from Products.CMFCore.utils import manage_addTool
from Products.CMFCore.utils import getToolByName
from Products.ExternalMethod.ExternalMethod import ExternalMethod
from Products.Archetypes.Extensions.utils import installTypes
--- 25,38 ----
__docformat__ = 'plaintext'
__version__ = '$ Revision 0.0 $'[11:-2]
!
! import os.path
! import sys
! from StringIO import StringIO
!
! from App.Common import package_home
from Products.CMFCore.utils import getToolByName
+ from Products.CMFCore.utils import manage_addTool
from Products.ExternalMethod.ExternalMethod import ExternalMethod
+ from zExceptions import NotFound, BadRequest
from Products.Archetypes.Extensions.utils import installTypes
***************
*** 35,55 ****
except ImportError:
from Products.Archetypes.public import listTypes
!
! from Products.EduploneExam import PROJECTNAME
! from Products.EduploneExam import product_globals as GLOBALS
!
! from zExceptions import NotFound, BadRequest
!
! from StringIO import StringIO
! import sys
def install(self):
""" External Method to install EduploneExam """
out = StringIO()
- #install_dependencies(self, out)
-
print >> out, "Installation log of %s:" % PROJECTNAME
! classes=listTypes(PROJECTNAME)
installTypes(self, out,
classes,
--- 42,68 ----
except ImportError:
from Products.Archetypes.public import listTypes
! from Products.EduploneExam.config import PROJECTNAME
! from Products.EduploneExam.config import product_globals as GLOBALS
def install(self):
""" External Method to install EduploneExam """
out = StringIO()
print >> out, "Installation log of %s:" % PROJECTNAME
! # If the config contains a list of dependencies, try to install
! # them. Add a list called DEPENDENCIES to your custom
! # AppConfig.py (imported by config.py) to use it.
! try:
! from Products.EduploneExam.config import DEPENDENCIES
! except:
! DEPENDENCIES = []
! portal = getToolByName(self,'portal_url').getPortalObject()
! quickinstaller = portal.portal_quickinstaller
! for dependency in DEPENDENCIES:
! print >> out, "Installing dependency %s:" % dependency
! quickinstaller.installProduct(dependency)
! get_transaction().commit(1)
!
! classes = listTypes(PROJECTNAME)
installTypes(self, out,
classes,
***************
*** 63,76 ****
installWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'installWorkflows').__of__(self)
except NotFound:
! installWorkflows=None
if installWorkflows:
print >>out,'Workflow Install:'
! res=installWorkflows(self,out)
print >>out,res or 'no output'
else:
print >>out,'no workflow install'
!
# try to call a custom install method
--- 76,94 ----
installWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'installWorkflows').__of__(self)
except NotFound:
! installWorkflows = None
if installWorkflows:
print >>out,'Workflow Install:'
! res = installWorkflows(self,out)
print >>out,res or 'no output'
else:
print >>out,'no workflow install'
!
! # enable portal_factory for given types
! factory_tool = getToolByName(self,'portal_factory')
! factory_types=[
! ] + factory_tool.getFactoryTypes().keys()
! factory_tool.manage_setPortalFactoryTypes(listOfTypeIds=factory_types)
# try to call a custom install method
***************
*** 78,87 ****
try:
install = ExternalMethod('temp','temp',PROJECTNAME+'.AppInstall', 'install')
! except:
! install=None
if install:
print >>out,'Custom Install:'
! res=install(self)
if res:
print >>out,res
--- 96,105 ----
try:
install = ExternalMethod('temp','temp',PROJECTNAME+'.AppInstall', 'install')
! except NotFound:
! install = None
if install:
print >>out,'Custom Install:'
! res = install(self)
if res:
print >>out,res
***************
*** 90,94 ****
else:
print >>out,'no custom install'
-
return out.getvalue()
--- 108,111 ----
***************
*** 96,110 ****
out = StringIO()
-
# try to call a workflow uninstall method
! # in 'InstallWorkflows.py' method 'installWorkflows'
try:
installWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'uninstallWorkflows').__of__(self)
except NotFound:
! installWorkflows=None
if installWorkflows:
print >>out,'Workflow Uninstall:'
! res=uninstallWorkflows(self,out)
print >>out,res or 'no output'
else:
--- 113,126 ----
out = StringIO()
# try to call a workflow uninstall method
! # in 'InstallWorkflows.py' method 'uninstallWorkflows'
try:
installWorkflows = ExternalMethod('temp','temp',PROJECTNAME+'.InstallWorkflows', 'uninstallWorkflows').__of__(self)
except NotFound:
! installWorkflows = None
if installWorkflows:
print >>out,'Workflow Uninstall:'
! res = uninstallWorkflows(self,out)
print >>out,res or 'no output'
else:
***************
*** 116,124 ****
uninstall = ExternalMethod('temp','temp',PROJECTNAME+'.AppInstall', 'uninstall')
except:
! uninstall=None
if uninstall:
print >>out,'Custom Uninstall:'
! res=uninstall(self)
if res:
print >>out,res
--- 132,140 ----
uninstall = ExternalMethod('temp','temp',PROJECTNAME+'.AppInstall', 'uninstall')
except:
! uninstall = None
if uninstall:
print >>out,'Custom Uninstall:'
! res = uninstall(self)
if res:
print >>out,res
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl