- $pkgPath = $crmPath . DIRECTORY_SEPARATOR . 'packages';
- set_include_path($crmPath . PATH_SEPARATOR .
- $pkgPath . PATH_SEPARATOR .
- get_include_path()
- );
+ // Setup classloader
+ // This is needed to allow CiviCRM to be installed by drush.
+ // TODO: move to civicrm.drush.inc drush_civicrm_install()
+ global $crmPath;
+ require_once $crmPath . '/CRM/Core/ClassLoader.php';
+ CRM_Core_ClassLoader::singleton()->register();