From 797dd0dd20b8ff7cfcb5935b16e5779943bb779c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 9 Sep 2013 11:30:33 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.services.php | 5 ++++- inc/ws/Metier/class.ws.collection.php | 1 - inc/ws/Util/class.ws.exporter.php | 26 ++++++++++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 1c09723a4..0b8505050 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -625,6 +625,9 @@ class wsServices extends cubeFlashGateway { $daoCollection = new wsDAOCollection($core->con); $collection = $daoCollection->selectById($id); + $ns = $collection->settings['namespace']; + + $vcompo = WS_COLLECTIONS . '/versions/' . $id . '/' . $version . '/composition.json'; $composition = json_decode(file_get_contents($vcompo)); @@ -675,7 +678,7 @@ class wsServices extends cubeFlashGateway { $traductions[$r->lang_id] = json_decode($r->traductions); } - $d = array('id' => $id, 'langs' => $langs, 'langnames' => $langsnames, 'time' => $version, 'datas' => $composition, 'couvertures' => $couvertures, 'traductions' => $traductions, 'contents' => $contents); + $d = array('id' => $id, 'ns' => $ns, 'langs' => $langs, 'langnames' => $langsnames, 'time' => $version, 'datas' => $composition, 'couvertures' => $couvertures, 'traductions' => $traductions, 'contents' => $contents); $d = array_merge($d, $this->_getManifest($publications, '/fluidbook/collections/versions/' . $id . '/' . $version . '/' . $os, $books, $resolution)); $dao = new wsDAOCollection($core->con); diff --git a/inc/ws/Metier/class.ws.collection.php b/inc/ws/Metier/class.ws.collection.php index 2de01df2e..3c061a6ab 100644 --- a/inc/ws/Metier/class.ws.collection.php +++ b/inc/ws/Metier/class.ws.collection.php @@ -11,7 +11,6 @@ class wsCollection extends cubeMetier { protected $settings; protected $theme; protected $contents; - } ?> diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index ac9b80be7..8ef893b55 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -28,19 +28,37 @@ class wsExporter { $phonegap->setId($collection->settings['namespace']); $phonegap->setAuthor('Fluidbook', 'contact@fluidbook.com', 'http://www.fluidbook.com'); $phonegap->setVersion('1.0.0'); + $phonegap->setIcon($compiler->wdir . '/' . $collection->theme['icon']); + foreach ($compiler->langs as $l) { + $src = $compiler->wdir . '/' . $collection->theme['splash_' . $l]; + $phonegap->setSplash($src); + break; + } $phonegap->setWWWDirectory($dir); if ($os == 'ios') { - $phonegap->setDistantCompiler('paris.cubedesigners.com', 'vincent', '', '/Phonegap/Projects/' . $d, 22022); + $phonegap->setDistantCompiler('paris.cubedesigners.com', 'vincent', '', '/Phonegap/Projects/' . $d, '/mnt/macbox/Phonegap/Projects/' . $d, 22022); } else if ($os == 'android') { - $phonegap->setDistantCompiler('paris.cubedesigners.com', 'Vincent', 'iquique', 'h:/Works/Phonegap/Projects/' . $d, 22322); + $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); $phonegap->setPreference('target-device', CubeIT_Mobile_Phonegap::TARGET_TABLET); $phonegap->setPreference('show-splash-screen-spinner', false); $phonegap->setPreference('auto-hide-splash-screen', false); - $phonegap->addFeatures(array('Device', 'Connection', '')); + $phonegap->addFeatures(array( + CubeIT_Mobile_Phonegap::FEATURE_CONNECTION, + CubeIT_Mobile_Phonegap::FEATURE_DEVICE, + CubeIT_Mobile_Phonegap::FEATURE_FILE, + CubeIT_Mobile_Phonegap::FEATURE_FILETRANSFER, + CubeIT_Mobile_Phonegap::FEATURE_STORAGE, + CubeIT_Mobile_Phonegap::FEATURE_NOTIFICATION_DIALOG, + CubeIT_Mobile_Phonegap::FEATURE_INAPPBROWSER, + CubeIT_Mobile_Phonegap::FEATURE_SPLASHSCREEN, + CubeIT_Mobile_Phonegap::FEATURE_PUSHNOTIFICATION + ) + ); - $phonegap->run(); + $full = isset($_GET['ctrl']) && $_GET['ctrl'] == 'true'; + $phonegap->run($full); /* $this->_createProject($os, $collection->nom, $collection->settings['namespace']); $this->_collectionAssets($os, $compiler); -- 2.39.5