From e64e61c9bfc242bf5d030d80618c332ef5f3188c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 19 Feb 2013 16:43:28 +0000 Subject: [PATCH] --- inc/ws/Util/class.ws.exporter.php | 1 + inc/ws/Util/html5/class.ws.html5.compiler.php | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 9cbb2fb03..ef91a7e44 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -114,6 +114,7 @@ class wsExporter { protected function _transfertPhonegap($os, $package, $destination) { if ($os == 'android') { $this->_rsync($package, '/home/dev/Works/Phonegap/Projects/' . $destination, true); + `/usr/local/bin/updatephonegapandroid`; } else if ($os == 'ios') { $this->_rsync($package, '/mnt/macbook/Phonegap/Projects/' . $destination, true); } diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 50b04f031..5e52d7e7e 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -75,6 +75,8 @@ class wsHTML5Compiler { 'js/libs/jquery/jquery.transit.js', 'js/widget.js' ); + public $phonegapStandardPlugins = array('ios' => array('ExternalFileUtil'), + 'android' => array('webintent')); public $pluginCSS = array(); public $pluginJs = array(); public $htmlmultimedia = array(); @@ -452,9 +454,11 @@ class wsHTML5Compiler { if ($this->phonegap) { $script .= '' . "\n"; - if ($this->phonegap == 'ios') { - copy($this->assets . '/js/libs/phonegap/plugins/ios/ExternalFileUtil.js', $this->vdir . '/data/ExternalFileUtil.js'); - $script .= '' . "\n"; + $standardPlugins = isset($this->phonegapStandardPlugins[$this->phonegap]) ? $this->phonegapStandardPlugins[$this->phonegap] : array(); + + foreach($standardPlugins as $p){ + copy($this->assets . '/js/libs/phonegap/plugins/'.$this->phonegap.'/'.$p.'.js', $this->vdir . '/data/'.$p.'.js'); + $script .= '' . "\n"; } $plugins = explode("\n", $this->book->parametres->phonegapPlugins); @@ -742,12 +746,14 @@ class wsHTML5Compiler { $this->config->coquilletteFront = $this->colorToCSS($this->theme->parametres->arrowsColor); $this->config->videoFormats = $this->getVideosFormats(false); $this->config->htmlmultimedia = $this->htmlmultimedia; + $this->config->phonegap = $this->phonegap; foreach ($this->additionalConfig as $k => $v) { $this->config->$k = $v; } if ($this->phonegap) { $this->config->friend = $this->config->twitter = $this->config->facebook = false; } + $this->config->standalone = $this->standalone; return 'var DATAS=' . json_encode($this->config) . ';' . "\n"; } -- 2.39.5