Content-Length: 1269025 | pFad | http://github.com/enigmatic-user/TinyMCE/commit/16a07625b781ef8fa3eb1750d791b48d2618e562

95 [tinymce] · enigmatic-user/TinyMCE@16a0762 · GitHub
Skip to content

Commit

Permalink
[tinymce]
Browse files Browse the repository at this point in the history
- Tagging 4.0.0 release
  • Loading branch information
Shaun McCormick committed May 31, 2010
2 parents 016ba11 + 8e87f48 commit 16a0762
Show file tree
Hide file tree
Showing 310 changed files with 42,956 additions and 0 deletions.
8 changes: 8 additions & 0 deletions _build/build.config.sample.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
// define the MODX path constants necessary for core installation
define('MODX_BASE_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . '/modx097/');
define('MODX_CORE_PATH', MODX_BASE_PATH . 'core/');
define('MODX_MANAGER_PATH', MODX_BASE_PATH . 'manager/');
define('MODX_CONNECTORS_PATH', MODX_BASE_PATH . 'connectors/');
define('MODX_ASSETS_PATH', MODX_BASE_PATH . 'assets/');
?>
124 changes: 124 additions & 0 deletions _build/build.transport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?php
/**
* TinyMCE build script
*
* @package tinymce
* @subpackage build
*/
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tstart = $mtime;
set_time_limit(0);

$root = dirname(dirname(__FILE__)).'/';
$sources= array (
'root' => $root,
'build' => $root .'_build/',
'resolvers' => $root . '_build/resolvers/',
'data' => $root . '_build/data/',
'docs' => $root . 'core/components/tinymce/docs/',
'lexicon' => $root . 'core/components/tinymce/lexicon/',
'source_assets' => $root . 'assets/components/tinymce',
'source_core' => $root . 'core/components/tinymce',
);

define('PKG_NAME','TinyMCE');
define('PKG_NAMESPACE',strtolower(PKG_NAME));
define('PKG_VERSION','4.0.0');
define('PKG_RELEASE','rc1');

require_once dirname(__FILE__) . '/build.config.php';
require_once MODX_CORE_PATH . 'model/modx/modx.class.php';
$modx= new modX();
$modx->initialize('mgr');
$modx->setLogLevel(modX::LOG_LEVEL_INFO);
echo XPDO_CLI_MODE ? '' : '<pre>';
$modx->setLogTarget('ECHO');

$modx->loadClass('transport.modPackageBuilder','',false, true);
$builder = new modPackageBuilder($modx);
$builder->createPackage(PKG_NAMESPACE,PKG_VERSION,PKG_RELEASE);
$builder->registerNamespace(PKG_NAMESPACE,false,true,'{core_path}components/'.PKG_NAMESPACE.'/');

/* create the plugin object */
$plugin= $modx->newObject('modPlugin');
$plugin->set('id',1);
$plugin->set('name', PKG_NAME);
$plugin->set('description', PKG_NAME.' '.PKG_VERSION.'-'.PKG_RELEASE.' plugin for MODx Revolution');
$plugin->set('plugincode', file_get_contents($sources['source_core'] . '/tinymce.plugin.php'));
$plugin->set('category', 0);

/* add plugin events */
$modx->log(xPDO::LOG_LEVEL_INFO,'Packaging in Plugin Events...'); flush();
$events = include $sources['data'].'transport.plugin.events.php';
if (is_array($events) && !empty($events)) {
$plugin->addMany($events);
} else {
$modx->log(xPDO::LOG_LEVEL_ERROR,'Could not find plugin events!');
}

/* load plugin properties */
$modx->log(xPDO::LOG_LEVEL_INFO,'Setting Plugin Properties...'); flush();
$properties = include $sources['data'].'properties.inc.php';
$plugin->setProperties($properties);

$attributes= array(
xPDOTransport::UNIQUE_KEY => 'name',
xPDOTransport::PRESERVE_KEYS => false,
xPDOTransport::UPDATE_OBJECT => true,
xPDOTransport::RELATED_OBJECTS => true,
xPDOTransport::RELATED_OBJECT_ATTRIBUTES => array (
'PluginEvents' => array(
xPDOTransport::PRESERVE_KEYS => true,
xPDOTransport::UPDATE_OBJECT => false,
xPDOTransport::UNIQUE_KEY => array('pluginid','event'),
),
),
);
$vehicle = $builder->createVehicle($plugin, $attributes);
$vehicle->resolve('file',array(
'source' => $sources['source_assets'],
'target' => "return MODX_ASSETS_PATH . 'components/';",
));
$vehicle->resolve('file',array(
'source' => $sources['source_core'],
'target' => "return MODX_CORE_PATH . 'components/';",
));
$vehicle->resolve('php',array(
'source' => $sources['resolvers'] . 'resolve.whicheditor.php',
));
$builder->putVehicle($vehicle);

/* load system settings */
$settings = include $sources['data'].'transport.settings.php';
$attributes= array(
xPDOTransport::UNIQUE_KEY => 'key',
xPDOTransport::PRESERVE_KEYS => true,
xPDOTransport::UPDATE_OBJECT => false,
);
foreach ($settings as $setting) {
$vehicle = $builder->createVehicle($setting,$attributes);
$builder->putVehicle($vehicle);
}

/* now pack in the license file, readme and setup options */
$modx->log(xPDO::LOG_LEVEL_INFO,'Setting Package Attributes...'); flush();
$builder->setPackageAttributes(array(
'license' => file_get_contents($sources['docs'] . 'license.txt'),
'readme' => file_get_contents($sources['docs'] . 'readme.txt'),
));

$modx->log(xPDO::LOG_LEVEL_INFO,'Zipping up package...'); flush();
$builder->pack();

$mtime= microtime();
$mtime= explode(" ", $mtime);
$mtime= $mtime[1] + $mtime[0];
$tend= $mtime;
$totalTime= ($tend - $tstart);
$totalTime= sprintf("%2.4f s", $totalTime);

$modx->log(modX::LOG_LEVEL_INFO,"\n<br />Package Built.<br />\nExecution time: {$totalTime}\n");

exit ();
Loading

0 comments on commit 16a0762

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/enigmatic-user/TinyMCE/commit/16a07625b781ef8fa3eb1750d791b48d2618e562

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy