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);
}
'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();
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);
$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";
}