def install(self): """Install QuillsEnabled. """ out = StringIO() portal = getToolByName(self,'portal_url').getPortalObject() portal_setup = getToolByName(self, 'portal_setup') quickinstaller = portal.portal_quickinstaller for dependency in config.DEPENDENCIES: print >> out, u"Installing dependency %s:" % dependency quickinstaller.installProduct(dependency) transaction.savepoint() # Register CSS #registerStylesheets(self, out) for extension_id in EXTENSION_PROFILES: portal_setup.runAllImportStepsFromProfile('profile-%s' % extension_id, purge_old=False) transaction.savepoint() install_subskin(self, out, config.GLOBALS) addNewDiscussionReplyFormAction(portal, out) # Keep some of our types out of the navtree #updateNavtreeProperties(self, out) # Allow Weblogs to be used as the front page of a site # FIXME: When this is enabled there is no way to add an Entry to the blog #updateDefaultPageTypes(self) #permissions.setupPortalSecurity(self, out) #automigrate(self, out) #updateSchemas(self, out) print >> out, u"Successfully installed %s." % config.PROJECTNAME return out.getvalue()
def installFinalSteps(context): """Install Quills. """ # Only run step if a flag file is present # see http://maurits.vanrees.org/weblog/archive/2007/06/discovering-genericsetup if context.readDataFile('quills_product_various.txt') is None: return out = StringIO() # install dependencies portal = context.getSite() quickinstaller = portal.portal_quickinstaller for dependency in config.DEPENDENCIES: print >> out, u"Installing dependency %s:" % dependency quickinstaller.installProduct(dependency) commit() automigrate(portal, out) updateSchemas(portal, out) addNewDiscussionReplyFormAction(portal, out) print >> out, u"Successfully installed %s." % config.PROJECTNAME return out.getvalue()
def installFinalSteps(context): """Install Quills. """ # Only run step if a flag file is present # see http://maurits.vanrees.org/weblog/archive/2007/06/discovering-genericsetup if context.readDataFile('quills_product_various.txt') is None: return out = StringIO() # install dependencies portal = context.getSite() quickinstaller = portal.portal_quickinstaller for dependency in config.DEPENDENCIES: print("Installing dependency %s:" % dependency, file=out) quickinstaller.installProduct(dependency) commit() automigrate(portal, out) updateSchemas(portal, out) addNewDiscussionReplyFormAction(portal, out) print("Successfully installed %s." % config.PROJECTNAME, file=out) return out.getvalue()