}
public static function updateHTML5Sources($args = array(), $externals = true) {
- $svn = new cubeCommandLine('updatewshtml5prod');
- $svn->setPath(CONVERTER_PATH);
- $svn->execute();
+ $branchesDir = WS_COMPILE_ASSETS . '/player/branches/';
+ $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5');
+ echo '<pre>';
+ echo $git->executeCmd('pull --all');
+ $git = new CubeIT_CommandLine_Git($branchesDir . 'fluidbook-html5');
+ $b = $git->executeCmd('branch -r');
+ echo $b;
+ $bb = explode("\n", $b);
+ $branches = array();
+ foreach ($bb as $item) {
+ $item = trim($item);
+ if ($item == '') {
+ continue;
+ }
+ $e = explode('->', $item);
+ if (count($e) == 2) {
+ $item = $e[1];
+ } else {
+ $item = $e[0];
+ }
+ $e = explode("/", $item);
+ $branches[trim($e[1])] = true;
+ }
+ $branches = array_keys($branches);
+ foreach ($branches as $b) {
+ echo '<b>' . $b . '</b>' . "\n";
+ if (!file_exists($branchesDir . $b)) {
+ $git = new CubeIT_CommandLine_Git($branchesDir);
+ echo $git->executeCmd('clone -b ' . $b . ' --single-branch git@git.cubedesigners.com:fluidbook-html5.git ' . $b);
+ }
+ $git = new CubeIT_CommandLine_Git($branchesDir . $b);
+ echo $git->executeCmd('pull');
+ }
+ echo '</pre>';
+ file_put_contents(WS_CACHE . '/activebranches', json_encode($branches));
}
public static function cleanDownload($args) {
$this->fields['navOrderH'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Ordre des icônes dans la nav') . ' (' . __('Si différente') . ')', 'grade' => 3);
- $this->fields['mobileLVersion'] = array('type' => 'combo', 'default' => 'stable', 'editable' => true, 'label' => __('Version logicielle'), 'grade' =>1,
- 'datas' => array(__('Stable') => 'stable',
- __('En cours de développement') => 'dev')
+
+ $branches = array(__('Stable') => 'stable',
+ __('En cours de développement') => 'dev');
+ $gitbranches = json_decode(file_get_contents(WS_CACHE . '/activebranches'));
+ foreach ($gitbranches as $b) {
+ $branches['Branch ' . $b] = 'branch:' . $b;
+ }
+
+ $this->fields['mobileLVersion'] = array('type' => 'combo', 'default' => 'stable', 'editable' => true,
+ 'label' => __('Version logicielle'), 'grade' => 1,
+ 'datas' => $branches
);
$this->fields['mobileTransitions'] = array('type' => 'combo', 'default' => 'flip', 'editable' => true, 'label' => __('Transitions entre les pages'), 'grade' => 3,
}
if ($version == 'stable') {
- return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
+ $class = 'wsHTML5Compiler';
} else {
- return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
+ $class = 'wsHTML5CompilerDev';
}
+ return new $class($book_id, $version, $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
}
protected static $resolutions = array(150, 300);
$script .= '<script type="text/javascript" charset="utf-8" src="' . $p . '"></script>' . "\n";
}
$script .= $iscript;
-
$description = '<meta name="description" content="' . html::escapeHTML(isset($this->book->parametres->seoDescription) && $this->book->parametres->seoDescription ? $this->book->parametres->seoDescription : $titre . ' - Powered by Fluidbook') . '">';