From 23d3a83c20297e59421a2791f7a343b3939884b5 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 11 Mar 2014 17:16:07 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.url.php | 1 + inc/ws/Util/class.ws.exporter.php | 27 +++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index c5b9552c7..128d45815 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -305,6 +305,7 @@ class wsUrl { $res.='

' . __('Paramètres avancés') . '

'; $res.=''; + $res.=''; $res.=''; $res.=''; $res.=''; diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index a49f1d695..d07dbaea6 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -27,7 +27,11 @@ class wsExporter { $phonegap->setName($collection->nom); $phonegap->setId($collection->settings['namespace']); $phonegap->setAuthor('Fluidbook', 'contact@fluidbook.com', 'http://www.fluidbook.com'); - $phonegap->setVersion('1.0.0'); + $phonegap->setVersion($collection->settings['version']); + $phonegap->setBuild($collection->settings['build']); + $phonegap->setNamespace($collection->settings['namespace']); + $phonegap->setActivity($collection->settings['activity']); + foreach ($compiler->langs as $l) { $src = $compiler->wdir . '/' . $collection->theme['splash_' . $l]; $phonegap->setSplash($src, $l); @@ -37,6 +41,10 @@ class wsExporter { if ($os == 'ios') { $phonegap->setDistantCompiler('paris.cubedesigners.com', 'vincent', '', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022); } else if ($os == 'android') { + $manifestType = $collection->settings['offline'] ? 'Offline' : 'Online'; + $phonegap->setSourceVariables(array('obbmainsize' => '123456L')); + $phonegap->setManifest(WS_COMPILE_ASSETS . '/_html5app/_android/AndroidManifest' . $manifestType . '.xml'); + $phonegap->setMain(WS_COMPILE_ASSETS . '/_html5app/_android/Main' . $manifestType . '.java'); $phonegap->setDistantCompiler('paris.cubedesigners.com', 'Vincent', 'iquique', 'h:/Phonegap/Projects/' . $d, '/mnt/vincent/cygdrive/h/Phonegap/Projects/' . $d, 22322); } $phonegap->setPreference('orientation', CubeIT_Mobile_Phonegap::ORIENTATION_PORTRAIT); @@ -65,6 +73,7 @@ class wsExporter { if (isset($collection->settings['offline']) && $collection->settings['offline']) { $p = $compiler->getPublishedVersionPath($os); + $phonegap->addAdditionalSource('publications', $p); $exs = explode("\n", $collection->settings['offline_exclude']); @@ -109,7 +118,7 @@ class wsExporter { } /** - * + * * @param string $os * @param wsHTML5AppCompiler $compiler */ @@ -208,7 +217,7 @@ class wsExporter { $this->_iosPlugin($dir, 'ExternalFileUtil'); } } elseif ($os == 'android') { - + } } @@ -219,9 +228,9 @@ class wsExporter { protected function _iosPlugin($dir, $plugin) { // git@github.com:phonegap-build/PushPlugin.git $cl = new CubeIT_CommandLine('/usr/local/bin/plugman'); - $cl->setManualArg('--platform ios'); - $cl->setManualArg('--project ' . $dir); - $cl->setManualArg('--plugin /Phonegap/Plugins/' . $plugin); + $cl->setManualArg(' --platform ios'); + $cl->setManualArg(' --project ' . $dir); + $cl->setManualArg(' --plugin /Phonegap/Plugins/' . $plugin); $cl->setSSH('paris.cubedesigners.com', 'vincent', '', 22022); $cl->execute(); } @@ -389,9 +398,6 @@ class wsExporter { $lftp->setArg('e', implode(';', $commandes)); $lftp->setArg(null, $u['host']); $lftp->execute(); - - fb($lftp->commande); - fb($lftp->output); } protected function _rsync($src, $dest, $erase = false, $chown = null) { @@ -418,7 +424,6 @@ class wsExporter { protected function _download() { $r = wsPackager::package($this->book_id, $this->version); - fb($r); $this->x->addRedirection($r); } @@ -460,5 +465,3 @@ class wsExporter { } } - -?> -- 2.39.5
' . __('Activity') . '' . form::field(array('settings[activity]', 'activity'), 20, 64, $collection->settings['activity']) . '
' . __('Build') . '' . form::field(array('settings[build]', 'build'), 10, 64, $collection->settings['build']) . '
' . __('Version') . '' . form::field(array('settings[version]', 'version'), 10, 64, $collection->settings['version']) . '
' . __('Full offline') . '' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '