Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 32 lines (25 sloc) 0.844 kB
9a15218 @thousandsofthem Common functional moved to iron_core_php
thousandsofthem authored
1 <?php
2 /**
3 * This script creates .phar archive with all required dependencies.
4 * Archive usage:
5 * include("phar://iron_worker.phar");
6 * or
7 * include("phar://".dirname(__FILE__)."/iron_worker.phar");
8 */
9
10 unlink('iron_worker.phar');
11
12 $phar = new Phar('iron_worker.phar');
13
14 # Loader
15 $phar->setStub('<?php
16 Phar::mapPhar("iron_worker.phar");
17 require "phar://iron_worker.phar/IronCore.class.php";
18 require "phar://iron_worker.phar/IronWorker.class.php";
19 __HALT_COMPILER(); ?>');
20
21 # Files
22 $phar->addFile('../iron_core_php/IronCore.class.php','IronCore.class.php');
23 $phar->addFile('IronWorker.class.php');
24 $phar->addFile('LICENSE', 'LICENSE');
25
26 echo "\ndone - ".(round(filesize('iron_worker.phar')/1024,2))." KB\n";
27
28 # Verification
29 include("phar://iron_worker.phar");
30 $worker = new IronWorker('config.ini');
31
32 echo "Build finished successfully\n";
Something went wrong with that request. Please try again.