From: vincent@cubedesigners.com Date: Wed, 17 Oct 2018 14:24:02 +0000 (+0000) Subject: wip #2303 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6fff3a3717502a9dc0874f93fa3cca9458161d4a;p=cubeextranet.git wip #2303 @2 --- diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 5da6f12d2..d2652f905 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -325,6 +325,7 @@ class wsUrl $res .= '' . __('Version') . '' . form::field(array('settings[version]', 'version'), 10, 64, $collection->settings['version']) . ''; $res .= '' . __('Orientation') . '' . form::combo(array('settings[orientation]', 'orientation'), array(__('Portrait et Paysage') => 'unspecified', __('Portrait') => 'portrait', __('Paysage') => 'landscape'), $collection->settings['orientation']) . ''; $res .= '' . __('Full offline') . '' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . ''; + $res .= '' . __('Stockage publications') . ' (Android)' . form::combo(array('settings[android_storage]', 'android_storage'), array(__('Fichier expansion (.obb)') => 'expansion', __('Application (.apk)') => 'apk'), $collection->settings['android_storage']) . ''; $res .= '' . __('Identifiant de l\'application') . '' . form::field(array('settings[namespace]', 'namespace'), 64, 64, $collection->settings['namespace']) . ''; $res .= '' . __('Certificat APNS') . ' Dev (' . __('Fichier .pem') . ')'; $res .= '' . __('Certificat APNS') . ' Prod (' . __('Fichier .pem') . ')'; @@ -578,7 +579,7 @@ class wsUrl continue; } $tk = 'download_' . $k; - if (!$book->parametres->{$tk} && $k!=='scorm') { + if (!$book->parametres->{$tk} && $k !== 'scorm') { if ($core->user->rs == 'Kadreo' || $core->user->rs == 'STUDIOFRANCE') { $disabled = ' class="disabled"'; } else { diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 09741543b..fd9e87b3b 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -51,6 +51,7 @@ class wsExporter $phonegap->setBuild($collection->settings['build']); if ($os == 'android') { $phonegap->setLicenseKey($collection->settings['license_key']); + $phonegap->setExpansion($collection->settings['android_storage'] !== 'apk'); } $phonegap->setNamespace($collection->settings['namespace']); $phonegap->setActivity($collection->settings['activity']); @@ -69,6 +70,9 @@ class wsExporter $phonegap->setDistantCompiler(self::VINCENT, 'vincent', 'atacama', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022, SSH_KEY); } else if ($os == 'android') { $manifestType = isset($collection->settings['offline']) ? 'Offline' : 'Online'; + if (!$phonegap->getExpansion()) { + $manifestType .= 'Standalone'; + } $phonegap->setManifest(WS_COMPILE_ASSETS . '/_html5app/_android/AndroidManifest' . $manifestType . '.xml'); $phonegap->setMain(WS_COMPILE_ASSETS . '/_html5app/_android/Main' . $manifestType . '.java'); $phonegap->setMainDir(WS_COMPILE_ASSETS . '/_html5app/_android/'); @@ -339,8 +343,9 @@ class wsExporter return $packager->makePackage(false); } - protected function _killFtp($book_id){ - $kill='pkill -f "^lftp(.*)'.$book_id.'"'; + protected function _killFtp($book_id) + { + $kill = 'pkill -f "^lftp(.*)' . $book_id . '"'; `$kill`; }