I have created an sample installation profile (based on one that I grabbed from the Acqua Drupal install profiles. Thus far I understand the basic architecture. I add dependancies, but I cant figure out how to enable the modules. For instance, I want to require views, views_ui, and features, and I want those modules to be automatically enabled when I install the profile. I'm assuming I add code somewhere in my .install file within the profile. Can someone give me an example of how I would require and enable views for instance?
You need to add them as
dependencies in the .info file. To take a segment from standard.info:
dependencies = block dependencies = color dependencies = comment dependencies = contextual dependencies = dashboard
To add a little reference from How to Write a Drupal 7 Installation Profile:
The contents of the profilename.info file are as follows:
- The name, description, and core assignments are all required.
- The dependencies list includes all modules that will be enabled when this profile is installed (the ones above are the defaults from the Standard install profile).
- You can optionally include other declarations that can also appear in module .info files.
So enabling views would just be:
dependencies = views
And if you want the UI:
dependencies = views_ui