WP5PACK=0
PATCHPACK=0
SK5PACK=0
+STANDALONEPACK=0
L10NPACK=0
REPOREPORT=0
echo " WordPress|wp5 - generate Wordpress PHP5 module"
echo " patchset - generate a tarball with patch files"
echo " sk - generate Drupal StarterKit module"
+ echo " standalone - generate CiviCRM Standalone"
echo
echo "You also need to have distmaker.conf file in place."
echo "See distmaker.conf.dist for example contents."
echo "Current directory is : $THIS_DIR";
exit 1
else
- export DM_SOURCEDIR DM_GENFILESDIR DM_TMPDIR DM_TARGETDIR DM_PHP DM_RSYNC DM_ZIP DM_VERSION DM_REF_CORE DM_REF_DRUPAL DM_REF_DRUPAL8 DM_REF_JOOMLA DM_REF_WORDPRESS DM_REF_PACKAGES
+ export DM_SOURCEDIR DM_GENFILESDIR DM_TMPDIR DM_TARGETDIR DM_PHP DM_RSYNC DM_ZIP DM_VERSION DM_REF_CORE DM_REF_DRUPAL DM_REF_DRUPAL8 DM_REF_JOOMLA DM_REF_WORDPRESS DM_REF_STANDALONE DM_REF_PACKAGES
if [ ! -d "$DM_SOURCEDIR" ]; then
echo; echo "ERROR! " DM_SOURCEDIR "directory not found!"; echo "(if you get empty directory name, it might mean that one of necessary variables is not set)"; echo;
fi
WP5PACK=1
;;
+ # STANDALONE
+ standalone|Standalone)
+ echo; echo "Generating CiviCRM Standalone"; echo;
+ STANDALONEPACK=1
+ ;;
+
## PATCHSET export
patchset)
echo; echo "Generating patchset"; echo;
WP5PACK=1
PATCHPACK=1
SKPACK=1
+ STANDALONEPACK=1
L10NPACK=1
REPOREPORT=1
;;
bash $P/dists/wordpress_php5.sh
fi
+if [ "$STANDALONEPACK" = 1 ]; then
+ echo; echo "Packaging for CiviCRM Standalone"; echo;
+ bash $P/dists/standalone.sh
+fi
+
if [ "$PATCHPACK" = 1 ]; then
echo; echo "Packaging for patchset tarball"; echo;
bash $P/dists/patchset.sh
SKPACK="$SKPACK" \
J5PACK="$J5PACK" \
WP5PACK="$WP5PACK" \
+ STANDALONEPACK="$STANDALONEPACK" \
bash $P/dists/repo-report.sh
fi
--- /dev/null
+#!/bin/bash
+set -ex
+
+P=`dirname $0`
+CFFILE=$P/../distmaker.conf
+if [ ! -f $CFFILE ] ; then
+ echo "NO DISTMAKER.CONF FILE!"
+ exit 1
+else
+ . $CFFILE
+fi
+. "$P/common.sh"
+
+SRC=$DM_SOURCEDIR
+TRG=$DM_TMPDIR/civicrm
+
+# copy all the stuff
+dm_reset_dirs "$TRG" "$TRG/civicrm/web/core"
+dm_install_core "$SRC" "$TRG/civicrm/web/core"
+dm_install_coreext "$SRC" "$TRG/civicrm/web/core" $(dm_core_exts)
+dm_install_packages "$SRC/packages" "$TRG/civicrm/web/core/packages"
+dm_install_vendor "$SRC/vendor" "$TRG/civicrm/web/core/vendor"
+dm_install_bower "$SRC/bower_components" "$TRG/civicrm/web/core/bower_components"
+dm_install_cvext com.iatspayments.civicrm "$TRG/civicrm/web/core/ext/iatspayments"
+$SRC/tools/standalone/bin/scaffold $TRG/civicrm
+
+# gen tarball
+cd $TRG/civicrm
+tar czf $DM_TARGETDIR/civicrm-$DM_VERSION-standalone.tar.gz .
+
+# clean up
+rm -rf $TRG
->addListener('civi.setup.checkRequirements', function (\Civi\Setup\Event\CheckRequirementsEvent $e) {
\Civi\Setup::log()->info(sprintf('[%s] Handle %s', basename(__FILE__), 'checkRequirements'));
- $dbFields = array('db', 'cmsDb');
+ $dbFields = ['db'];
+
+ if ($e->getModel()->cms !== 'Standalone') {
+ $dbFields[] = 'cmsDb';
+ }
+
foreach ($dbFields as $dbField) {
$errors = 0;
$db = $e->getModel()->{$dbField};
invoke();
}
else {
- $coreUrl = '/assets/civicrm/core';
-
\Civi\Setup::assertProtocolCompatibility(1.0);
\Civi\Setup::init([
'cms' => 'Standalone',
'srcPath' => $civiCorePath,
]);
- $ctrl = \Civi\Setup::instance()->createController()->getCtrl();
+ $coreUrl = \Civi\Setup::instance()->getModel()->mandatorySettings['userFrameworkResourceURL'];
+
+ $ctrl = \Civi\Setup::instance()->createController()->getCtrl();
$ctrl->setUrls([
// The URL of this setup controller. May be used for POST-backs
'ctrl' => '/civicrm', /* @todo this had url('civicrm') ? */