]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 19 Feb 2013 16:43:28 +0000 (16:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 19 Feb 2013 16:43:28 +0000 (16:43 +0000)
inc/ws/Util/class.ws.exporter.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index 9cbb2fb03cdba117422d9eec424185b2c7e15f77..ef91a7e4404fb2458f1e800afea399ecb8b1315a 100644 (file)
@@ -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);
                }
index 50b04f0316bda78fd43bd5e52d5c0e510385e69c..5e52d7e7e62397f7933796bf661e99c769f7665a 100644 (file)
@@ -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 .= '<script type="text/javascript" src="data/cordova.js"></script>' . "\n";
 
-                       if ($this->phonegap == 'ios') {
-                               copy($this->assets . '/js/libs/phonegap/plugins/ios/ExternalFileUtil.js', $this->vdir . '/data/ExternalFileUtil.js');
-                               $script .= '<script type="text/javascript" src="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 .= '<script type="text/javascript" src="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";
        }