]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 11 Mar 2014 17:16:07 +0000 (17:16 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 11 Mar 2014 17:16:07 +0000 (17:16 +0000)
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/class.ws.exporter.php

index c5b9552c7dea79b8195e15e770fe15aafcd6c07a..128d45815c5acdca10de36d0d60bad336d580f89 100644 (file)
@@ -305,6 +305,7 @@ class wsUrl {
 
                $res.='<h3>' . __('Paramètres avancés') . '</h3>';
                $res.='<table class="max">';
+               $res.='<tr><td class="min nowrap">' . __('Activity') . '</td><td>' . form::field(array('settings[activity]', 'activity'), 20, 64, $collection->settings['activity']) . '</td></tr>';
                $res.='<tr><td class="min nowrap">' . __('Build') . '</td><td>' . form::field(array('settings[build]', 'build'), 10, 64, $collection->settings['build']) . '</td></tr>';
                $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">' . __('Full offline') . '</td><td>' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '</td></tr>';
index a49f1d6959b1f8d853d0a45185b5ee7425a1d597..d07dbaea6e1556ea18c4dbceacb139e8947c7953 100644 (file)
@@ -27,7 +27,11 @@ class wsExporter {
                $phonegap->setName($collection->nom);
                $phonegap->setId($collection->settings['namespace']);
                $phonegap->setAuthor('Fluidbook', 'contact@fluidbook.com', 'http://www.fluidbook.com');
-               $phonegap->setVersion('1.0.0');
+               $phonegap->setVersion($collection->settings['version']);
+               $phonegap->setBuild($collection->settings['build']);
+               $phonegap->setNamespace($collection->settings['namespace']);
+               $phonegap->setActivity($collection->settings['activity']);
+
                foreach ($compiler->langs as $l) {
                        $src = $compiler->wdir . '/' . $collection->theme['splash_' . $l];
                        $phonegap->setSplash($src, $l);
@@ -37,6 +41,10 @@ class wsExporter {
                if ($os == 'ios') {
                        $phonegap->setDistantCompiler('paris.cubedesigners.com', 'vincent', '', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022);
                } else if ($os == 'android') {
+                       $manifestType = $collection->settings['offline'] ? 'Offline' : 'Online';
+                       $phonegap->setSourceVariables(array('obbmainsize' => '123456L'));
+                       $phonegap->setManifest(WS_COMPILE_ASSETS . '/_html5app/_android/AndroidManifest' . $manifestType . '.xml');
+                       $phonegap->setMain(WS_COMPILE_ASSETS . '/_html5app/_android/Main' . $manifestType . '.java');
                        $phonegap->setDistantCompiler('paris.cubedesigners.com', 'Vincent', 'iquique', 'h:/Phonegap/Projects/' . $d, '/mnt/vincent/cygdrive/h/Phonegap/Projects/' . $d, 22322);
                }
                $phonegap->setPreference('orientation', CubeIT_Mobile_Phonegap::ORIENTATION_PORTRAIT);
@@ -65,6 +73,7 @@ class wsExporter {
 
                if (isset($collection->settings['offline']) && $collection->settings['offline']) {
                        $p = $compiler->getPublishedVersionPath($os);
+
                        $phonegap->addAdditionalSource('publications', $p);
 
                        $exs = explode("\n", $collection->settings['offline_exclude']);
@@ -109,7 +118,7 @@ class wsExporter {
        }
 
        /**
-        * 
+        *
         * @param string $os
         * @param wsHTML5AppCompiler $compiler
         */
@@ -208,7 +217,7 @@ class wsExporter {
                                $this->_iosPlugin($dir, 'ExternalFileUtil');
                        }
                } elseif ($os == 'android') {
-                       
+
                }
        }
 
@@ -219,9 +228,9 @@ class wsExporter {
        protected function _iosPlugin($dir, $plugin) {
                // git@github.com:phonegap-build/PushPlugin.git
                $cl = new CubeIT_CommandLine('/usr/local/bin/plugman');
-               $cl->setManualArg('--platform ios');
-               $cl->setManualArg('--project ' . $dir);
-               $cl->setManualArg('--plugin /Phonegap/Plugins/' . $plugin);
+               $cl->setManualArg(' --platform ios');
+               $cl->setManualArg(' --project ' . $dir);
+               $cl->setManualArg(' --plugin /Phonegap/Plugins/' . $plugin);
                $cl->setSSH('paris.cubedesigners.com', 'vincent', '', 22022);
                $cl->execute();
        }
@@ -389,9 +398,6 @@ class wsExporter {
                $lftp->setArg('e', implode(';', $commandes));
                $lftp->setArg(null, $u['host']);
                $lftp->execute();
-
-               fb($lftp->commande);
-               fb($lftp->output);
        }
 
        protected function _rsync($src, $dest, $erase = false, $chown = null) {
@@ -418,7 +424,6 @@ class wsExporter {
 
        protected function _download() {
                $r = wsPackager::package($this->book_id, $this->version);
-               fb($r);
                $this->x->addRedirection($r);
        }
 
@@ -460,5 +465,3 @@ class wsExporter {
        }
 
 }
-
-?>