BEFORE: To run distmaker and produce Joomla ZIPs, you need to create a dummy settings file.
For example, this is how `cividist` does it:
https://github.com/civicrm/civicrm-buildkit/blob/v19.07.0/bin/cividist#L119-L121
It seems that is just a long-winded way of setting up the Civi classloader. (It wouldn't
make sense to use any other Civi services this is a pre-bootstrap environment.)
AFTER: The dummy file is neither needed nor used. We just get the classloader directly.
ini_set('include_path',
"{$sourceCheckoutDir}:{$sourceCheckoutDir}/packages:" . ini_get('include_path')
);
-require_once "$sourceCheckoutDir/civicrm.config.php";
+
+define('CIVICRM_UF', 'Joomla');
+$GLOBALS['civicrm_root'] = $sourceCheckoutDir;
+require_once $sourceCheckoutDir . '/CRM/Core/ClassLoader.php';
+CRM_Core_ClassLoader::singleton()->register();
+
require_once 'Smarty/Smarty.class.php';
generateJoomlaConfig($version);