/** * @author Laurent Jouanneau * @contributor * @copyright 2006-2015 Laurent Jouanneau * @link http://www.jelix.org * @licence GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html */ // arguments : fichier.lf chemin_source chemin_dist require_once __DIR__ . '/../lib/autoloader.php'; if ($_SERVER['argc'] < 4) { exit(1); } array_shift($_SERVER['argv']); // shift the script name $options = array('verbose' => false, 'stripcomment' => false); if (substr($_SERVER['argv'][0], 0, 1) == '-') { $sw = substr(array_shift($_SERVER['argv']), 1); $options['verbose'] = strpos('v', $sw) !== false; $options['stripcomment'] = strpos('c', $sw) !== false; } try { list($ficlist, $sourcedir, $distdir) = $_SERVER['argv']; jManifest::$verbose = $options['verbose']; jManifest::$stripComment = $options['stripcomment']; jManifest::process($ficlist, $sourcedir, $distdir, $_SERVER); exit(0); } catch (Exception $e) { echo $e->getMessage(); exit(1); }
} $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/'; } else { $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH); } if ($TARGET_REPOSITORY == 'none') { $TARGET_REPOSITORY = ''; } if ($TARGET_REPOSITORY != '') { $DELETE_DEPRECATED_FILES = true; } //----------------- Génération des sources //... creation des repertoires jBuildUtils::createDir($BUILD_TARGET_PATH); jManifest::$stripComment = $STRIP_COMMENT == '1'; jManifest::$verbose = $VERBOSE == '1'; jManifest::$usedVcs = $TARGET_REPOSITORY; jManifest::$sourcePropertiesFilesDefaultCharset = $DEFAULT_CHARSET; jManifest::$targetPropertiesFilesCharset = $PROPERTIES_CHARSET_TARGET; if ($DELETE_DEPRECATED_FILES) { jManifest::removeFiles('build/manifests/jelix-deprecated.mn', $BUILD_TARGET_PATH); if ($ENABLE_DEVELOPER) { jManifest::removeFiles('build/manifests/jelix-deprecated-dev.mn', $BUILD_TARGET_PATH); } } //... execution des manifests jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true); jManifest::process('build/manifests/jelix-www.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true); jManifest::$stripComment = false; jManifest::process('build/manifests/jelix-vendors.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true); jManifest::process('build/manifests/jelix-scripts.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());