]> _ Git - cubeextranet.git/commitdiff
wip #2303 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Oct 2018 14:24:02 +0000 (14:24 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 17 Oct 2018 14:24:02 +0000 (14:24 +0000)
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/class.ws.exporter.php

index 5da6f12d20286878f52bf1039794b5c597e48b36..d2652f9057e066c0b6edc50dee920bd73bec889d 100644 (file)
@@ -325,6 +325,7 @@ class wsUrl
                $res .= '<tr><td class="min nowrap">' . __('Version') . '</td><td>' . form::field(array('settings[version]', 'version'), 10, 64, $collection->settings['version']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Orientation') . '</td><td>' . form::combo(array('settings[orientation]', 'orientation'), array(__('Portrait et Paysage') => 'unspecified', __('Portrait') => 'portrait', __('Paysage') => 'landscape'), $collection->settings['orientation']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Full offline') . '</td><td>' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '</td></tr>';
+               $res .= '<tr><td class="min nowrap">' . __('Stockage publications') . ' (Android)</td><td>' . form::combo(array('settings[android_storage]', 'android_storage'), array(__('Fichier expansion (.obb)') => 'expansion', __('Application (.apk)') => 'apk'), $collection->settings['android_storage']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Identifiant de l\'application') . '</td><td>' . form::field(array('settings[namespace]', 'namespace'), 64, 64, $collection->settings['namespace']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Certificat APNS') . ' Dev (' . __('Fichier .pem') . ')</td><td><input type="file" name="apns_dev" /></td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Certificat APNS') . ' Prod (' . __('Fichier .pem') . ')</td><td><input type="file" name="apns_prod" /></td></tr>';
@@ -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 {
index 09741543b3db30e27c598f450e863f983a5f7963..fd9e87b3b637993a4e5dac8fff33c029c3e76b94 100644 (file)
@@ -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`;
        }