From: vincent@cubedesigners.com Date: Tue, 8 Feb 2011 13:25:35 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=031e7ba5ce361af521aa39e78bfeb6b7334611ef;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/packager/_common.php b/inc/ws/Controlleur/packager/_common.php index de7a2c8f6..8fdc81c2e 100644 --- a/inc/ws/Controlleur/packager/_common.php +++ b/inc/ws/Controlleur/packager/_common.php @@ -3,5 +3,6 @@ $__autoload['wsPackager'] = dirname(__FILE__) . '/class.ws.packager.php'; $__autoload['wsPackagerHTML'] = dirname(__FILE__) . '/class.ws.packager.html.php'; $__autoload['wsPackagerWinEXE'] = dirname(__FILE__) . '/class.ws.packager.win.exe.php'; $__autoload['wsPackagerWinCD'] = dirname(__FILE__) . '/class.ws.packager.win.cd.php'; +$__autoload['wsPackagerMacEXE'] = dirname(__FILE__) . '/class.ws.packager.mac.exe.php'; ?> \ No newline at end of file diff --git a/inc/ws/Controlleur/packager/class.ws.packager.html.php b/inc/ws/Controlleur/packager/class.ws.packager.html.php index 83cf17c8d..9a2600e71 100644 --- a/inc/ws/Controlleur/packager/class.ws.packager.html.php +++ b/inc/ws/Controlleur/packager/class.ws.packager.html.php @@ -90,6 +90,7 @@ class wsPackagerHTML extends wsPackager { public function makePackage() { + parent::makePackage(); return $this->zip(); } diff --git a/inc/ws/Controlleur/packager/class.ws.packager.mac.exe.php b/inc/ws/Controlleur/packager/class.ws.packager.mac.exe.php new file mode 100644 index 000000000..9335c357e --- /dev/null +++ b/inc/ws/Controlleur/packager/class.ws.packager.mac.exe.php @@ -0,0 +1,28 @@ +version = 'mac-exe'; + + $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 16)); + } + + public function preparePackage() + { + parent::preparePackage(); + + $this->copyFluidbookFiles(); + $this->copyOtherFiles(array('Fluidbook.app.zip')); + } + + public function makePackage() + { + parent::makePackage(); + return $this->zip($this->vdir . 'Fluidbook.app.zip'); + } +} + +?> \ No newline at end of file diff --git a/inc/ws/Controlleur/packager/class.ws.packager.php b/inc/ws/Controlleur/packager/class.ws.packager.php index 8cccff59b..691a53973 100644 --- a/inc/ws/Controlleur/packager/class.ws.packager.php +++ b/inc/ws/Controlleur/packager/class.ws.packager.php @@ -13,6 +13,10 @@ class wsPackager { $packager = new wsPackagerHTML($book_id); } elseif ($version == 'win-exe') { $packager = new wsPackagerWinEXE($book_id); + } elseif ($version == 'win-cd') { + $packager = new wsPackagerWinCD($book_id); + } elseif ($version == 'mac-exe') { + $packager = new wsPackagerMacEXE($book_id); } return $packager->makePackage(); @@ -41,7 +45,8 @@ class wsPackager { $this->initTempDir(); } - public function makePackage(){ + public function makePackage() + { $this->preparePackage(); } diff --git a/inc/ws/Controlleur/packager/class.ws.packager.win.exe.php b/inc/ws/Controlleur/packager/class.ws.packager.win.exe.php index fc63d067d..94dcc3cef 100644 --- a/inc/ws/Controlleur/packager/class.ws.packager.win.exe.php +++ b/inc/ws/Controlleur/packager/class.ws.packager.win.exe.php @@ -7,7 +7,7 @@ class wsPackagerWinEXE extends wsPackager { parent::__construct($book_id); $this->version = 'win-exe'; - $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 16)); + $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 16)).'.exe'; } public function preparePackage() @@ -20,6 +20,7 @@ class wsPackagerWinEXE extends wsPackager { public function makePackage() { + parent::makePackage(); return $this->zip(); } }