Le 10 mai 2011 à 07:45, ajung a écrit :
> As part of a current migration project we have a *lot* of Plone
> 2.5 AT-based Products to be ported to Plone 4. Some of them only
> contain an Install.py and there is too much code in order to rewrite
> the code using GenericSetup. Is there a way to call the old Install.py
> magic with Plone 4? Maurits pointed me to five:registerPackage but it
> does not seem to help me - eggified Products having
> Extensions/Install.py but no registered profile just don't show up
> in the quick installer.
Just register an (almost) empty GS profile and use an import step that calls
your external method.
This is somehow dirty but this works.
put a "profiles/default/my_product.txt" marker file
=== setuphandler.py ====
from zope.site.hooks import getSite
from Products.MyProducts.Extensions.Install import install
def my_import_step(setuptool):
if setuptool.readDataFile('my_product.txt') is None:
return
portal = getSite()
install(portal)
return
=== /setuphandler.py ====
HTH
--
Gilles Lenfant
>
> -aj
>
>
> --
> View this message in context:
> http://plone.293351.n2.nabble.com/Making-Install-py-working-in-Plone-4-tp6346634p6346634.html
> Sent from the Product Developers mailing list archive at Nabble.com.
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> https://lists.plone.org/mailman/listinfo/plone-product-developers
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers