class wsHTML5Compiler {
- public static function factory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false) {
+ public static function factory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false) {
if (is_null($version)) {
global $core;
$dao = new wsDAOBook($core->con);
}
if ($version == 'stable') {
- return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache);
+ return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
} else {
- return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache);
+ return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
}
}
protected $standalone = false;
protected $hiddenContents = array();
protected $appcache;
+ protected $home;
- function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false) {
+ function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false) {
global $core;
$this->phonegapVersion = self::getPhonegapVersion($phonegapVersion);
$this->appcache = $appcache;
+ $this->home = $home;
if ($version == 'stable') {
$this->assets = WS_COMPILE_ASSETS . '/_html5prod';
$versions[] = $file;
}
usort($versions, 'version_compare');
- $versions=array_reverse($versions, true);
+ $versions = array_reverse($versions, true);
return $versions;
}
$this->config->videoFormats = $this->getVideosFormats(false);
$this->config->htmlmultimedia = $this->htmlmultimedia;
$this->config->phonegap = $this->phonegap;
+ if ($this->home) {
+ $this->config->home = '%apphome%';
+ }
foreach ($this->additionalConfig as $k => $v) {
$this->config->$k = $v;
}